From d7f0d1dddc479378b2a4f2e58c44c947bf5ae8e6 Mon Sep 17 00:00:00 2001 From: liuy <37787198+LiuyCodes@users.noreply.github.com> Date: Mon, 19 Aug 2024 23:29:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4TOB=E3=80=81TOC=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lets/constant/ProfilesActiveConstant.java | 3 + .../lets/ofsvo/QueryOfsSoSaleOutVo.java | 3 + .../purchase/ProxyPurchaseWarehous.java | 115 ++++++++++ .../sales/SoSaleOutPluginInitializerToB.java | 115 ++++++++-- .../sales/SoSaleOutPluginInitializerToC.java | 84 +++++-- .../SoSaleReturnPluginInitializerToB.java | 205 ++++++++---------- .../SoSaleReturnPluginInitializerToC.java | 90 +++++++- .../plugin/lets/queryvo/StartAndEndVo.java | 121 +++++++++++ .../lets/u8cdto/OrderOutTobHeaderDto.java | 2 +- .../plugin/lets/u8cdto/OrderToBHeaderDto.java | 6 + .../plugin/lets/util/AfterSalesOrderUtil.java | 116 ++++++++++ .../plugin/lets/util/OffsetTimeTime.java | 39 ++++ .../plugin/lets/util/ShopTobOrToCUtil.java | 51 +++++ .../SoSaleReturnPluginInitializerToBTest.java | 3 +- .../lets/util/ShopTobOrToCUtilTest.java | 38 ++++ .../frame/ttxofs/basics/ApiDtoCacheMap.java | 5 +- .../ttxofs/basics/ReturnMessageBasics.java | 38 +--- .../dto/ofssalesordersearch/HeaderDto.java | 11 + .../RerturnGoodsOrderSearchData.java | 15 ++ .../RerturnGoodsOrderSearchDetails.java | 45 ++++ .../RerturnGoodsOrderSearchHeader.java | 66 ++++++ .../RerturnGoodsOrderSearchJsonRootBean.java | 18 ++ .../ReturnGoodHeaderDetailsDataDto.java | 1 + 23 files changed, 994 insertions(+), 196 deletions(-) create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/queryvo/StartAndEndVo.java create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/AfterSalesOrderUtil.java create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OffsetTimeTime.java create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtil.java create mode 100644 buildpackage/src/test/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtilTest.java create mode 100755 service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchData.java create mode 100755 service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchDetails.java create mode 100755 service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchHeader.java create mode 100755 service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchJsonRootBean.java diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java index 8ac51f6b..ab1dbabe 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java @@ -31,4 +31,7 @@ public class ProfilesActiveConstant { public static final String CUSTOMER = "'0','2'"; + public static final String sourceSystem1 = "OFS订单系统"; + + public static final String sourceSystem2 = "丽知商城"; } diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofsvo/QueryOfsSoSaleOutVo.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofsvo/QueryOfsSoSaleOutVo.java index 4fce0f74..68d3d2f9 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofsvo/QueryOfsSoSaleOutVo.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofsvo/QueryOfsSoSaleOutVo.java @@ -38,4 +38,7 @@ public class QueryOfsSoSaleOutVo { private String closedAt_start; private String closedAt_end; + + private String storeCode; + } diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java new file mode 100644 index 00000000..02ca0b59 --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java @@ -0,0 +1,115 @@ +//package com.hzya.frame.plugin.lets.plugin.purchase; +// +//import cn.hutool.core.util.StrUtil; +//import com.alibaba.fastjson.JSONObject; +//import com.hzya.frame.base.PluginBaseEntity; +//import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; +//import com.hzya.frame.plugin.lets.plugin.sales.SoSaleOutPluginInitializerToB; +//import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; +//import com.hzya.frame.plugin.lets.util.DateStrUtil; +//import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto; +//import com.hzya.frame.web.entity.JsonResultEntity; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +// +//import java.util.ArrayList; +//import java.util.List; +// +///** +// * 代理品牌采购业务:(代理品牌采购)OFS采购入库单生成U8C采购订单 +// * +// * @Author:liuyang +// * @Package:com.hzya.frame.plugin.lets.plugin.purchase +// * @Project:kangarooDataCenterV3 +// * @name:ProxyPurchase +// * @Date:2024/8/19 18:01 +// * @Filename:ProxyPurchase +// */ +//public class ProxyPurchaseWarehous extends PluginBaseEntity { +// +// Logger logger = LoggerFactory.getLogger(ProxyPurchaseWarehous.class); +// +// @Override +// public void initialize() { +// logger.info(getPluginLabel() + "執行初始化方法initialize()"); +// } +// +// @Override +// public void destroy() { +// logger.info(getPluginLabel() + "執行銷毀方法destroy()"); +// } +// +// @Override +// public String getPluginId() { +// return "com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseWarehous"; +// } +// +// @Override +// public String getPluginName() { +// return "OFS采购入库单生成U8C采购订单(代理品牌)"; +// } +// +// @Override +// public String getPluginLabel() { +// return "OFS采购入库单生成U8C采购订单(代理品牌)"; +// } +// +// @Override +// public String getPluginType() { +// return "3"; +// } +// +// @Override +// public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { +// return null; +// } +// +// /** +// * 根据指定时间范围拉取 +// * +// * @author liuyang +// */ +// public void startImplement(String startTime, String endTime) { +// String threadNameStr = StrUtil.format("(代理品牌采购)OFS采购入库单生成U8C采购订单 开始时间:{} 结束时间:{}", dateStr, summaryOrderNumber); +// logger.info(threadNameStr); +// +// Thread thread = new Thread(new Runnable() { +// @Override +// public void run() { +// try { +// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); +// String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); +// +// List headerDetailsDtoList = new ArrayList<>(); +// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); +// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time()); +// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time()); +// queryOfsSoSaleOutVo.setClientCode("LETS"); +// queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); +//// queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); +// queryOfsSoSaleOutVo.setStatus(900L); +// queryOfsSoSaleOutVo.setPageNo(1L); +// queryOfsSoSaleOutVo.setPageSize(50L); +// queryOfsSoSaleOutVo.setStoreCode(tobShop); +//// queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004"); +// queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L); +// logger.info("数据返回行数:{}", headerDetailsDtoList.size()); +// if (headerDetailsDtoList.size() > 0) { +// getSet(headerDetailsDtoList); +// } else { +// logger.info("没有查询到任何数据!不需要同步"); +// } +// } catch (Exception e) { +// logger.error("startImplement方法抛出异常", e); +// } +// } +// }, threadNameStr); +// thread.start(); +// try { +// thread.join(); +// } catch (Exception e) { +// logger.error("thread.join()异常", e); +// } +// } +// +//} \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java index 762dcfc8..9b24ce62 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java @@ -20,9 +20,7 @@ import com.hzya.frame.plugin.lets.ofs.service.ITocofsSaleoutService; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; import com.hzya.frame.plugin.lets.u8cdto.*; -import com.hzya.frame.plugin.lets.util.DateStrUtil; -import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil; -import com.hzya.frame.plugin.lets.util.TocOrderBasicArchivesCacheUtil; +import com.hzya.frame.plugin.lets.util.*; import com.hzya.frame.split.SplitListByCountUtil; import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto; @@ -131,6 +129,12 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { @Autowired private IBdInvmandocDao iBdInvmandocDao; + @Autowired + private AfterSalesOrderUtil afterSalesOrderUtil; + + @Autowired + private ShopTobOrToCUtil shopTobOrToCUtil; + /** * 按指定时间拉取 * @@ -144,29 +148,25 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { @Override public void run() { try { - // TODO 注意过滤TOB店铺 CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); + String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); List headerDetailsDtoList = new ArrayList<>(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); - queryOfsSoSaleOutVo.setShipAt_start("2024-07-05 16:38:00"); - queryOfsSoSaleOutVo.setShipAt_end("2024-07-05 16:50:30"); + queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time()); + queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time()); queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setStoreCode(tobShop); // queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004"); queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L); logger.info("数据返回行数:{}", headerDetailsDtoList.size()); if (headerDetailsDtoList.size() > 0) { - //保存到mysql - batchInsert(headerDetailsDtoList); - //过滤成功的数据 - List headerDetailsDtos = filterData(headerDetailsDtoList); - //执行推送主逻辑 - implement(headerDetailsDtos); + getSet(headerDetailsDtoList); } else { logger.info("没有查询到任何数据!不需要同步"); } @@ -183,6 +183,60 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { } } + + /** + * 根据出库单单号拉取 + * + * @author liuyang + */ + public void startImplement(String date) { + String threadNameStr = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单 出库单单号:{}", date); + logger.info(threadNameStr); + + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + try { + String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); + + List headerDetailsDtoList = new ArrayList<>(); + QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); + queryOfsSoSaleOutVo.setClientCode("LETS"); + queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); + queryOfsSoSaleOutVo.setStatus(900L); + queryOfsSoSaleOutVo.setPageNo(1L); + queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setStoreCode(tobShop); + queryOfsSoSaleOutVo.setCode(date); + queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L); + logger.info("根据根据号拉群:数据返回行数:{}", headerDetailsDtoList.size()); + if (headerDetailsDtoList.size() > 0) { + getSet(headerDetailsDtoList); + } else { + logger.info("没有查询到任何数据!不需要同步"); + } + } catch (Exception e) { + logger.error("startImplement方法抛出异常", e); + } + } + }, threadNameStr); + thread.start(); + try { + thread.join(); + } catch (Exception e) { + logger.error("thread.join()异常", e); + } + } + + private void getSet(List headerDetailsDtoList) throws Exception { + //保存到mysql + batchInsert(headerDetailsDtoList); + //过滤成功的数据 + List headerDetailsDtos = filterData(headerDetailsDtoList); + //执行推送主逻辑 + implement(headerDetailsDtos); + } + /** * 过滤掉成功的数据 * @@ -506,6 +560,23 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { HeaderDto header = headerDetailsDto.getHeader(); List details = headerDetailsDto.getDetails(); + //根据销售出库单,查询得到销售订单 + SaleOrderMessageDto saleOrderMessageDto = null; + try { + saleOrderMessageDto = afterSalesOrderUtil.getOfsOrder(header.getRefOrderCode()); + } catch (Exception e) { + logger.error("查询销售订单错误,失败原因:{}", e.getMessage()); + Assert.state(false, "查询销售订单错误,失败原因:{}", e.getMessage()); + } + + if (saleOrderMessageDto == null) { + Assert.state(false, "没有匹配到售后订单,系统业务无法完成"); + } + com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = saleOrderMessageDto.getData().get(0).getHeader(); + String memberId = header1.getMemberId(); + Assert.notNull(memberId, "TOB销售订单(OFS)表头会员id不能为空,否则无法匹配U8C客商档案!"); + Assert.state(!"".equals(memberId.trim()), "TOB销售订单(OFS)表头会员id不能为空,否则无法匹配U8C客商档案!"); + // 销售公司、发货公司 String companyCode = header.getCompanyCode(); Assert.notNull(companyCode, "O表头公司不能为空"); @@ -577,24 +648,32 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { //客商基本档案 //查询OFS对应的销售订单,得到会员id - QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); +// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); // queryOfsSoSaleOutVo.setCode(); - SaleOrderMessageDto ofsOrder = getOfsOrder(queryOfsSoSaleOutVo, 1L); +// SaleOrderMessageDto ofsOrder = getOfsOrder(queryOfsSoSaleOutVo, 1L); - String custName = "天猫intoyou旗舰店-自营"; +// String custName = "天猫intoyou旗舰店-自营"; BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity(); bdCubasdocEntity.setDataSourceCode("lets_u8c"); bdCubasdocEntity.setDr(0L); - bdCubasdocEntity.setCustname(custName); + bdCubasdocEntity.setDef1(memberId); List bdCubasdocEntityList = iBdCubasdocDao.query(bdCubasdocEntity); + if (bdCubasdocEntityList == null || bdCubasdocEntityList.size() == 0) { + Assert.state(false, "根据OFS会员id{},无法查询到U8C客商基本档案", memberId); + } else if (bdCubasdocEntityList.size() >= 2) { + Assert.state(false, "根据OFS会员id{},查询到U8C多个客商基本档案", memberId); + } //客商管理档案 BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity(); bdCumandocEntity1.setDataSourceCode("lets_u8c"); bdCumandocEntity1.setDr(0L); bdCumandocEntity1.setPkCorp(bdCorpEntityList.get(0).getPkCorp()); -// bdCumandocEntity1.setPkCubasdoc(bdCubasdocEntityList.get(0).getPkCubasdoc()); + bdCumandocEntity1.setCustflags(ProfilesActiveConstant.CUSTOMER); List bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1); + if (bdCumandocEntityList == null || bdCumandocEntityList.size() == 0) { + Assert.state(false, "根据客商基本档案主键{},没有办法查询到客商管理档案", bdCubasdocEntityList.get(0).getPkCubasdoc()); + } //查找平台 String platformZdyId = "0001A210000000000JUD"; @@ -637,7 +716,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { orderOutTobHeaderDto.setDeliverGoodsCorp(bdCorpEntityList.get(0)); orderOutTobHeaderDto.setPlatformArchives(bdDefdocEntityList.get(0)); orderOutTobHeaderDto.setShopArchives(bdDefdocEntityList2.get(0)); - orderOutTobHeaderDto.setOfsOrder(ofsOrder); + orderOutTobHeaderDto.setSaleOrderMessageDto(saleOrderMessageDto); orderOutTobHeaderDto.setHeader(header); orderOutTobHeaderDto.setDetails(details); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java index f9125f9d..3469c208 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java @@ -18,6 +18,7 @@ import com.hzya.frame.plugin.lets.ofs.service.ITocofsSaleoutService; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; import com.hzya.frame.plugin.lets.u8cdto.*; +import com.hzya.frame.plugin.lets.util.ShopTobOrToCUtil; import com.hzya.frame.plugin.lets.util.TocOrderBasicArchivesCacheUtil; import com.hzya.frame.plugin.lets.util.DateStrUtil; import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil; @@ -27,7 +28,6 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto; -import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto; import com.hzya.frame.ttxofs.service.OfsUnifiedService; import com.hzya.frame.web.entity.JsonResultEntity; import org.slf4j.Logger; @@ -92,9 +92,6 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { @Autowired private TocOrderBasicArchivesCacheUtil basicArchivesCacheUtil; - @Autowired - private ITocofsSaleoutService iTocofsSaleoutService; - @Autowired private ITocofsSaleoutDao iTocofsSaleoutDao; @@ -108,6 +105,9 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { private static final String ADD = "+"; + @Autowired + private ShopTobOrToCUtil shopTobOrToCUtil; + /** * 按指定时间拉取 * @@ -122,29 +122,24 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { public void run() { LOCK.lock(); try { - // TODO 注意过滤TOC店铺 CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); + String tobShop = shopTobOrToCUtil.getCommaShop("TOC"); List headerDetailsDtoList = new ArrayList<>(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); - queryOfsSoSaleOutVo.setShipAt_start("2024-07-05 16:38:00"); - queryOfsSoSaleOutVo.setShipAt_end("2024-07-05 16:50:30"); + queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time()); + queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time()); queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); -// queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setStoreCode(tobShop); // queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003"); queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L); logger.info("数据返回行数:{}", headerDetailsDtoList.size()); if (headerDetailsDtoList.size() > 0) { - //保存到mysql - batchInsert(headerDetailsDtoList); - //过滤成功的数据 - List headerDetailsDtos = filterData(headerDetailsDtoList); - //执行推送主逻辑 - implement(headerDetailsDtos); + getSet(headerDetailsDtoList); } else { logger.info("没有查询到任何数据!不需要同步"); } @@ -168,6 +163,67 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { } } + /** + * 按指定时间拉取 + * + * @author liuyang + */ + public void startImplement(String code) { + String threadNameStr = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 出库单单据号:{}", code); + logger.info(threadNameStr); + + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + LOCK.lock(); + try { + String tobShop = shopTobOrToCUtil.getCommaShop("TOC"); + + List headerDetailsDtoList = new ArrayList<>(); + QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); + queryOfsSoSaleOutVo.setClientCode("LETS"); + queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); + queryOfsSoSaleOutVo.setStatus(900L); + queryOfsSoSaleOutVo.setPageNo(1L); + queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setStoreCode(tobShop); + queryOfsSoSaleOutVo.setCode(code); + queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L); + logger.info("数据返回行数:{}", headerDetailsDtoList.size()); + if (headerDetailsDtoList.size() > 0) { + getSet(headerDetailsDtoList); + } else { + logger.info("没有查询到任何数据!不需要同步"); + } + } catch (Exception e) { + logger.error("startImplement方法抛出异常", e); + } finally { + try { + basicArchivesCacheUtil.clearCache(); + } catch (Exception e) { + logger.info("清理档案缓存失败", e); + } + LOCK.unlock(); + } + } + }, threadNameStr); + thread.start(); + try { + thread.join(); + } catch (Exception e) { + logger.error("thread.join()异常", e); + } + } + + private void getSet(List headerDetailsDtoList) throws Exception { + //保存到mysql + batchInsert(headerDetailsDtoList); + //过滤成功的数据 + List headerDetailsDtos = filterData(headerDetailsDtoList); + //执行推送主逻辑 + implement(headerDetailsDtos); + } + /** * 过滤掉成功的数据 * diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java index 1c2ce890..6b60de3f 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java @@ -14,28 +14,20 @@ import com.hzya.frame.plugin.lets.dao.*; import com.hzya.frame.plugin.lets.entity.*; import com.hzya.frame.plugin.lets.ofs.dao.ITocofsReturngoodsDao; import com.hzya.frame.plugin.lets.ofs.dao.ITocofsReturngoodsDetailedDao; -import com.hzya.frame.plugin.lets.ofs.dao.ITocofsSaleoutDetailedDao; import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsDetailedEntity; import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsEntity; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; +import com.hzya.frame.plugin.lets.queryvo.StartAndEndVo; import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; import com.hzya.frame.plugin.lets.u8cdto.*; -import com.hzya.frame.plugin.lets.util.DateStrUtil; -import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil; +import com.hzya.frame.plugin.lets.util.*; import com.hzya.frame.split.SplitListByCountUtil; import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto; import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto; -import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchData; -import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchJsonRootBean; -import com.hzya.frame.ttxofs.dto.returngoodsearch.RertunGoodsRootBean; -import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodHeaderDetailsDataDto; -import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto; -import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchHeaderDto; import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; import com.hzya.frame.ttxofs.service.OfsUnifiedService; import com.hzya.frame.web.entity.JsonResultEntity; -import lombok.Data; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -103,9 +95,6 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { @Autowired private IBdCalbodyDao iBdCalbodyDao; - @Autowired - private ITocofsSaleoutDetailedDao iTocofsSaleoutDetailedDao; - @Autowired private QueryBdBusitypeUtil queryBdBusitypeUtil; @@ -115,10 +104,6 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { @Autowired private IBdSalestruDao iBdSalestruDao; - private static final String NOTHING = "无"; - - private static final String ADD = "+"; - @Autowired private IBdCumandocDao iBdCumandocDao; @@ -140,6 +125,15 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { @Autowired private ITocofsReturngoodsDetailedDao iTocofsReturngoodsDetailedDao; + @Autowired + private AfterSalesOrderUtil afterSalesOrderUtil; + + @Autowired + private ShopTobOrToCUtil shopTobOrToCUtil; + + @Autowired + private OffsetTimeTime offsetTimeTime; + /** * 按指定时间拉取 * @@ -153,29 +147,24 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { @Override public void run() { try { - // TODO 注意过滤TOB店铺 - CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); + //生成一个时间范围 + StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); + //2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性 + String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); List returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); -// queryOfsSoSaleOutVo.setClosedAt_start("2024-07-16 16:44:00"); -// queryOfsSoSaleOutVo.setClosedAt_end("2024-07-16 16:44:02"); + queryOfsSoSaleOutVo.setClosedAt_start(startAndEndVo.getStart_time()); + queryOfsSoSaleOutVo.setClosedAt_end(startAndEndVo.getEnd_time()); queryOfsSoSaleOutVo.setClientCode("LETS"); - // queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); -// queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); -// queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageSize(50L); - queryOfsSoSaleOutVo.setCode("LETS-RE2024070800000001"); + queryOfsSoSaleOutVo.setStoreCode(tobShop); +// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001"); queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L); logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size()); if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { - //保存到mysql - batchInsert(returnGoodHeaderDetailsDataDtoArrayList); - //过滤成功的数据 - List stockinOrderList = filterData(returnGoodHeaderDetailsDataDtoArrayList); - //执行推送主逻辑 - implement(stockinOrderList); + getSet(returnGoodHeaderDetailsDataDtoArrayList); } else { logger.info("没有查询到任何数据!不需要同步"); } @@ -192,6 +181,67 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { } } + /** + * 按指定时间拉取 + * + * @author liuyang + */ + public void startImplement(String code) { + String threadNameStr = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单 售后入库单号:{}", code); + logger.info(threadNameStr); + + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + try { + //生成一个时间范围 +// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); + //2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性 + String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); + + List returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); + QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); +// queryOfsSoSaleOutVo.setClosedAt_start("2002-01-01 00:00:00");// 2024年8月19日 17:13:35 仅作为接口参数验证,O口头反馈根据单号查询,不会启用时间范围搜索 +// queryOfsSoSaleOutVo.setClosedAt_end("2002-01-01 23:59:59"); + queryOfsSoSaleOutVo.setClientCode("LETS"); + queryOfsSoSaleOutVo.setPageNo(1L); + queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setStoreCode(tobShop); + queryOfsSoSaleOutVo.setCode(code); + queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L); + logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size()); + if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { + getSet(returnGoodHeaderDetailsDataDtoArrayList); + } else { + logger.info("没有查询到任何数据!不需要同步"); + } + } catch (Exception e) { + logger.error("startImplement方法抛出异常", e); + } + } + }, threadNameStr); + thread.start(); + try { + thread.join(); + } catch (Exception e) { + logger.error("thread.join()异常", e); + } + } + + /** + * 环境预配置 + * + * @author liuyang + */ + private void getSet(List returnGoodHeaderDetailsDataDtoArrayList) throws Exception { + //保存到mysql + batchInsert(returnGoodHeaderDetailsDataDtoArrayList); + //过滤成功的数据 + List stockinOrderList = filterData(returnGoodHeaderDetailsDataDtoArrayList); + //执行推送主逻辑 + implement(stockinOrderList); + } + /** * 过滤掉成功的数据 * @@ -492,7 +542,14 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { List details = stockinOrder.getDetails(); //通过售后订单,查询销售订单 - SaleOrderMessageDto saleOrderMessageDto = queryAfterSalesOrder(header); + SaleOrderMessageDto saleOrderMessageDto = null; + try { + saleOrderMessageDto = afterSalesOrderUtil.queryAfterSalesOrder(header); + } catch (Exception e) { + logger.error("查询出售后订单错误,失败原因:{}", e.getMessage()); + Assert.state(false, "查询出售后订单错误,失败原因:{}", e.getMessage()); + } + if (saleOrderMessageDto == null) { Assert.state(false, "没有匹配到售后订单,系统业务无法完成"); } @@ -636,6 +693,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { orderOutTobHeaderDto.setDeliverGoodsCorp(bdCorpEntityList.get(0)); orderOutTobHeaderDto.setPlatformArchives(bdDefdocEntityList.get(0)); orderOutTobHeaderDto.setShopArchives(bdDefdocEntityList2.get(0)); + orderOutTobHeaderDto.setSaleOrderMessageDto(saleOrderMessageDto); orderOutTobHeaderDto.setHeader(header); orderOutTobHeaderDto.setDetails(details); @@ -725,6 +783,9 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { Assert.notNull(detailsDto.getSkuCode(), "O存货商家编码不能为空"); Assert.notNull(pkCorp, "发货公司主键不能为空"); + //TODO 测试 + detailsDto.setSkuCode("6973391730617"); + BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity(); bdInvmandocEntity.setInvcode(detailsDto.getSkuCode()); bdInvmandocEntity.setPkCorp(pkCorp); @@ -849,84 +910,4 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity { tocofsReturngoodsDetailedEntity.setBusinessType("TOB_RETURN");//业务类型 } } - - /** - * 根据售后订单号,查询售后订单 - * - * @param refOrderCode 售后订单号 - * @author liuyang - */ - public RerturnGoodsOrderSearchData getOfsRertunOrder(String refOrderCode) throws Exception { - Long pageSize = 200L; - Long pageNo = 1L; - - QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); - queryOfsSoSaleOutVo.setPageNo(pageNo); - queryOfsSoSaleOutVo.setPageSize(pageSize); - queryOfsSoSaleOutVo.setCode(refOrderCode); - - InterfaceParamDto interfaceParamDto = new InterfaceParamDto(); - interfaceParamDto.setApi("ofs.returnOrder.search"); - interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo)); - RerturnGoodsOrderSearchJsonRootBean rerturnGoodsOrderSearchJsonRootBean = (RerturnGoodsOrderSearchJsonRootBean) ofsUnifiedService.unified(interfaceParamDto); - if (rerturnGoodsOrderSearchJsonRootBean != null) { - if ("false".equals(rerturnGoodsOrderSearchJsonRootBean.getError()) && "0".equals(rerturnGoodsOrderSearchJsonRootBean.getCode()) && "Success".equals(rerturnGoodsOrderSearchJsonRootBean.getMsg())) { - List data = rerturnGoodsOrderSearchJsonRootBean.getData(); - if (data != null && data.size() > 0) { - return data.get(0); - } - } else { - logger.error("查询售后订单失败,接口返回结果:{}", JSON.toJSON(rerturnGoodsOrderSearchJsonRootBean)); - } - } else { - logger.error("rerturnGoodsOrderSearchJsonRootBean为空(返回结果为空),查询入参条件:{}!", JSON.toJSON(queryOfsSoSaleOutVo)); - } - Assert.state(false, "根据售后订单号:{} 没有查询到OFS售后订单", refOrderCode); - return null; - } - - /** - * 查询OFS销售订单 - * - * @param code OFS销售订单编码 - * @author liuyang - */ - public SaleOrderMessageDto getOfsOrder(String code) throws Exception { - Long pageSize = 200L; - Long pageNo = 1L; - - QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); - queryOfsSoSaleOutVo.setPageNo(pageNo); - queryOfsSoSaleOutVo.setPageSize(pageSize); - queryOfsSoSaleOutVo.setCode(code); - - InterfaceParamDto interfaceParamDto = new InterfaceParamDto(); - interfaceParamDto.setApi("ofs.salesOrder.search"); - interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo)); - SaleOrderMessageDto saleOrderMessageDto = (SaleOrderMessageDto) ofsUnifiedService.unified(interfaceParamDto); - return saleOrderMessageDto; - } - - /** - * 查询售后订单 - * - * @author liuyang - */ - private SaleOrderMessageDto queryAfterSalesOrder(StockinOrderSearchResponse.StockinOrder.StockinH header) throws Exception { - if (header != null) { - //根据售后入库单、查询售后订单 - RerturnGoodsOrderSearchData ofsRertunOrder = getOfsRertunOrder(header.getRefOrderCode()); - if (ofsRertunOrder == null || ofsRertunOrder.getHeader() == null || ofsRertunOrder.getDetails() == null) { - Assert.state(false, "根据OFS售后订单编码{},无法查询到售后订单信息!", header.getRefOrderCode()); - } - SaleOrderMessageDto ofsOrder = getOfsOrder(ofsRertunOrder.getHeader().getRefOrderCode()); - if (ofsOrder == null) { - Assert.state(false, "根据OFS销售订单编码{},无法查询到销售订单信息!", ofsRertunOrder.getHeader().getRefOrderCode()); - } - return ofsOrder; - } else { - logger.error("queryAfterSalesOrder方法入参为null(header为null!)"); - } - return null; - } } \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java index 79ac60c9..7ca0435f 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java @@ -17,6 +17,7 @@ import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsEntity; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; import com.hzya.frame.plugin.lets.u8cdto.*; +import com.hzya.frame.plugin.lets.util.ShopTobOrToCUtil; import com.hzya.frame.plugin.lets.util.TocReturnBasicArchivesCacheUtil; import com.hzya.frame.plugin.lets.util.DateStrUtil; import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil; @@ -103,6 +104,9 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity { @Autowired private TocReturnBasicArchivesCacheUtil tocReturnBasicArchivesCacheUtil; + @Autowired + private ShopTobOrToCUtil shopTobOrToCUtil; + /** * 按指定时间拉取 * @@ -117,30 +121,26 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity { public void run() { LOCK.lock(); try { - // TODO 注意过滤TOC店铺 + String tocShop = shopTobOrToCUtil.getCommaShop("TOC"); CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); List returnGoodHeaderDetailsDataDtoList = new ArrayList<>(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); - queryOfsSoSaleOutVo.setCreated_start("2024-07-16 15:35:35"); - queryOfsSoSaleOutVo.setCreated_end("2024-07-16 15:35:37"); + queryOfsSoSaleOutVo.setCreated_start(calculateDateVo.getStart_time()); + queryOfsSoSaleOutVo.setCreated_end(calculateDateVo.getEnd_time()); queryOfsSoSaleOutVo.setClientCode("LETS"); - // queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); + queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); - // queryOfsSoSaleOutVo.setStatus(900L); + queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageSize(50L); - queryOfsSoSaleOutVo.setCode("LETS-RE2024071600000001"); + queryOfsSoSaleOutVo.setStoreCode(tocShop); +// queryOfsSoSaleOutVo.setCode("LETS-RE2024071600000001"); queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoList, 1L); logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoList.size()); if (returnGoodHeaderDetailsDataDtoList.size() > 0) { - //保存到mysql - batchInsert(returnGoodHeaderDetailsDataDtoList); - //过滤成功的数据 - List returnGoodHeaderDetailsDataDtoList1 = filterData(returnGoodHeaderDetailsDataDtoList); - //执行推送主逻辑 - implement(returnGoodHeaderDetailsDataDtoList1); + getSet(returnGoodHeaderDetailsDataDtoList); } else { logger.info("没有查询到任何数据!不需要同步"); } @@ -164,6 +164,72 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity { } } + /** + * 按指定时间拉取 + * + * @author liuyang + */ + public void startImplement(String code) { + String threadNameStr = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 同步单据号:{}", code); + logger.info(threadNameStr); + + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + LOCK.lock(); + try { + String tocShop = shopTobOrToCUtil.getCommaShop("TOC"); + + List returnGoodHeaderDetailsDataDtoList = new ArrayList<>(); + QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); + queryOfsSoSaleOutVo.setClientCode("LETS"); + queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); + queryOfsSoSaleOutVo.setStatus(900L); + queryOfsSoSaleOutVo.setPageNo(1L); + queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setStoreCode(tocShop); + queryOfsSoSaleOutVo.setCode(code); + queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoList, 1L); + logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoList.size()); + if (returnGoodHeaderDetailsDataDtoList.size() > 0) { + getSet(returnGoodHeaderDetailsDataDtoList); + } else { + logger.info("没有查询到任何数据!不需要同步"); + } + } catch (Exception e) { + logger.error("startImplement方法抛出异常", e); + } finally { + try { + tocReturnBasicArchivesCacheUtil.clearCache(); + } catch (Exception e) { + logger.info("清理档案缓存失败", e); + } + LOCK.unlock(); + } + } + }, threadNameStr); + thread.start(); + try { + thread.join(); + } catch (Exception e) { + logger.error("thread.join()异常", e); + } + } + + /** + * 预备执行逻辑 + * + * @author liuyang + */ + private void getSet(List returnGoodHeaderDetailsDataDtoList) throws Exception { + //保存到mysql + batchInsert(returnGoodHeaderDetailsDataDtoList); + //过滤成功的数据 + List returnGoodHeaderDetailsDataDtoList1 = filterData(returnGoodHeaderDetailsDataDtoList); + //执行推送主逻辑 + implement(returnGoodHeaderDetailsDataDtoList1); + } + /** * 过滤掉成功的数据 * diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/queryvo/StartAndEndVo.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/queryvo/StartAndEndVo.java new file mode 100644 index 00000000..d66b1ebd --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/queryvo/StartAndEndVo.java @@ -0,0 +1,121 @@ +package com.hzya.frame.plugin.lets.queryvo; + +public class StartAndEndVo { + + /** + * 开始时间 + */ + private String start_time; + + /** + * 结束时间 + */ + private String end_time; + + /** + * 销售订单号 + */ + private String src_order_no; + + /** + * 退货入库单单号 + */ + private String order_no; + + /** + * 预入库单号 + */ + private String stockinNo; + + /** + * 出库单号 + */ + private String stockout_no; + + /** + * 店铺编码 + */ + private String shop_nos; + + /** + * 销售订单号 + */ + private String vreceiptcode; + + /** + * 业务类型 + */ + private String cbiztype; + + public String getCbiztype() { + return cbiztype; + } + + public void setCbiztype(String cbiztype) { + this.cbiztype = cbiztype; + } + + public String getVreceiptcode() { + return vreceiptcode; + } + + public void setVreceiptcode(String vreceiptcode) { + this.vreceiptcode = vreceiptcode; + } + + public String getShop_nos() { + return shop_nos; + } + + public void setShop_nos(String shop_nos) { + this.shop_nos = shop_nos; + } + + public String getStockout_no() { + return stockout_no; + } + + public void setStockout_no(String stockout_no) { + this.stockout_no = stockout_no; + } + + public String getStockinNo() { + return stockinNo; + } + + public void setStockinNo(String stockinNo) { + this.stockinNo = stockinNo; + } + + public String getOrder_no() { + return order_no; + } + + public void setOrder_no(String order_no) { + this.order_no = order_no; + } + + public String getSrc_order_no() { + return src_order_no; + } + + public void setSrc_order_no(String src_order_no) { + this.src_order_no = src_order_no; + } + + public String getStart_time() { + return start_time; + } + + public void setStart_time(String start_time) { + this.start_time = start_time; + } + + public String getEnd_time() { + return end_time; + } + + public void setEnd_time(String end_time) { + this.end_time = end_time; + } +} diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderOutTobHeaderDto.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderOutTobHeaderDto.java index caf11d3c..0cb642fd 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderOutTobHeaderDto.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderOutTobHeaderDto.java @@ -80,5 +80,5 @@ public class OrderOutTobHeaderDto extends HeaderDetailsDto { /** * OFS销售订单 */ - private SaleOrderMessageDto ofsOrder; + private SaleOrderMessageDto saleOrderMessageDto; } \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderToBHeaderDto.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderToBHeaderDto.java index 9e345caa..5344b07e 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderToBHeaderDto.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/OrderToBHeaderDto.java @@ -3,6 +3,7 @@ package com.hzya.frame.plugin.lets.u8cdto; import com.hzya.frame.plugin.lets.entity.*; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto; +import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto; import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto; import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchHeaderDto; import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; @@ -91,4 +92,9 @@ public class OrderToBHeaderDto { * TOB售后入库单表体 */ private List details; + + /** + * 售后订单 + */ + private SaleOrderMessageDto saleOrderMessageDto; } \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/AfterSalesOrderUtil.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/AfterSalesOrderUtil.java new file mode 100644 index 00000000..854ab5ff --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/AfterSalesOrderUtil.java @@ -0,0 +1,116 @@ +package com.hzya.frame.plugin.lets.util; + +import cn.hutool.core.lang.Assert; +import com.alibaba.fastjson.JSON; +import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; +import com.hzya.frame.plugin.lets.plugin.sales.SoSaleReturnPluginInitializerToB; +import com.hzya.frame.ttxofs.dto.InterfaceParamDto; +import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto; +import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchData; +import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchJsonRootBean; +import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; +import com.hzya.frame.ttxofs.service.OfsUnifiedService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @Author:liuyang + * @Package:com.hzya.frame.plugin.lets.util + * @Project:kangarooDataCenterV3 + * @name:AfterSalesOrderUtil + * @Date:2024/8/19 14:59 + * @Filename:AfterSalesOrderUtil + */ +@Component +public class AfterSalesOrderUtil { + + Logger logger = LoggerFactory.getLogger(AfterSalesOrderUtil.class); + + @Autowired + private OfsUnifiedService ofsUnifiedService; + + /** + * 查询售后订单 + * + * @author liuyang + */ + public SaleOrderMessageDto queryAfterSalesOrder(StockinOrderSearchResponse.StockinOrder.StockinH header) throws Exception { + if (header != null) { + //根据售后入库单、查询售后订单 + RerturnGoodsOrderSearchData ofsRertunOrder = getOfsRertunOrder(header.getRefOrderCode()); + if (ofsRertunOrder == null || ofsRertunOrder.getHeader() == null || ofsRertunOrder.getDetails() == null) { + Assert.state(false, "根据OFS售后订单编码{},无法查询到售后订单信息!", header.getRefOrderCode()); + } + SaleOrderMessageDto ofsOrder = getOfsOrder(ofsRertunOrder.getHeader().getRefOrderCode()); + if (ofsOrder == null) { + Assert.state(false, "根据OFS销售订单编码{},无法查询到销售订单信息!", ofsRertunOrder.getHeader().getRefOrderCode()); + } + return ofsOrder; + } else { + logger.error("queryAfterSalesOrder方法入参为null(header为null!)"); + } + return null; + } + + /** + * 根据售后订单号,查询售后订单 + * + * @param refOrderCode 售后订单号 + * @author liuyang + */ + public RerturnGoodsOrderSearchData getOfsRertunOrder(String refOrderCode) throws Exception { + Long pageSize = 200L; + Long pageNo = 1L; + + QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); + queryOfsSoSaleOutVo.setPageNo(pageNo); + queryOfsSoSaleOutVo.setPageSize(pageSize); + queryOfsSoSaleOutVo.setCode(refOrderCode); + + InterfaceParamDto interfaceParamDto = new InterfaceParamDto(); + interfaceParamDto.setApi("ofs.returnOrder.search"); + interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo)); + RerturnGoodsOrderSearchJsonRootBean rerturnGoodsOrderSearchJsonRootBean = (RerturnGoodsOrderSearchJsonRootBean) ofsUnifiedService.unified(interfaceParamDto); + if (rerturnGoodsOrderSearchJsonRootBean != null) { + if ("false".equals(rerturnGoodsOrderSearchJsonRootBean.getError()) && "0".equals(rerturnGoodsOrderSearchJsonRootBean.getCode()) && "Success".equals(rerturnGoodsOrderSearchJsonRootBean.getMsg())) { + List data = rerturnGoodsOrderSearchJsonRootBean.getData(); + if (data != null && data.size() > 0) { + return data.get(0); + } + } else { + logger.error("查询售后订单失败,接口返回结果:{}", JSON.toJSON(rerturnGoodsOrderSearchJsonRootBean)); + } + } else { + logger.error("rerturnGoodsOrderSearchJsonRootBean为空(返回结果为空),查询入参条件:{}!", JSON.toJSON(queryOfsSoSaleOutVo)); + } + Assert.state(false, "根据售后订单号:{} 没有查询到OFS售后订单", refOrderCode); + return null; + } + + /** + * 查询OFS销售订单 + * + * @param code OFS销售订单编码 + * @author liuyang + */ + public SaleOrderMessageDto getOfsOrder(String code) throws Exception { + Long pageSize = 200L; + Long pageNo = 1L; + + QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); + queryOfsSoSaleOutVo.setPageNo(pageNo); + queryOfsSoSaleOutVo.setPageSize(pageSize); + queryOfsSoSaleOutVo.setCode(code); + + InterfaceParamDto interfaceParamDto = new InterfaceParamDto(); + interfaceParamDto.setApi("ofs.salesOrder.search"); + interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo)); + SaleOrderMessageDto saleOrderMessageDto = (SaleOrderMessageDto) ofsUnifiedService.unified(interfaceParamDto); + return saleOrderMessageDto; + } + +} diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OffsetTimeTime.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OffsetTimeTime.java new file mode 100644 index 00000000..dda7f9a6 --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OffsetTimeTime.java @@ -0,0 +1,39 @@ +package com.hzya.frame.plugin.lets.util; + +import cn.hutool.core.date.DateField; +import cn.hutool.core.date.DateUtil; +import com.hzya.frame.plugin.lets.queryvo.StartAndEndVo; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/** + * @Author:liuyang + * @Package:com.hzya.frame.plugin.lets.util + * @Project:kangarooDataCenterV3 + * @name:OffsetTimeTime + * @Date:2024/8/19 16:27 + * @Filename:OffsetTimeTime + */ +@Component +public class OffsetTimeTime { + /** + * 实时执行,计算时间 + * + * @author liuyang + */ + public StartAndEndVo offsetTime() { + StartAndEndVo startAndEndVo = new StartAndEndVo(); + Date currentDate = new Date(); + Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10); + Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -2); + + String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss"); + String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss"); + + startAndEndVo.setStart_time(startTimeStr); + startAndEndVo.setEnd_time(endTimeStr); + + return startAndEndVo; + } +} diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtil.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtil.java new file mode 100644 index 00000000..16e69886 --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtil.java @@ -0,0 +1,51 @@ +package com.hzya.frame.plugin.lets.util; + +import cn.hutool.core.lang.Assert; +import com.hzya.frame.plugin.lets.dao.IBdDefdocDao; +import com.hzya.frame.plugin.lets.entity.BdDefdocEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Author:liuyang + * @Package:com.hzya.frame.plugin.lets.util + * @Project:kangarooDataCenterV3 + * @name:ShopTobOrToCUtil + * @Date:2024/8/19 15:20 + * @Filename:ShopTobOrToCUtil + */ +@Component +public class ShopTobOrToCUtil { + + @Autowired + private IBdDefdocDao iBdDefdocDao; + + /** + * 查询TOB或者TOC对应的销售订单店铺 + * + * @param memo TOB、TOC请传这个 + */ + public List queryU8cShop(String memo) { + //查询U8C店铺档案 + String platformZdyId2 = "0001A210000000000XZX"; + + BdDefdocEntity bdDefdocEntity2 = new BdDefdocEntity(); + bdDefdocEntity2.setPkDefdoclist(platformZdyId2); + bdDefdocEntity2.setDr(0); + bdDefdocEntity2.setDataSourceCode("lets_u8c"); + bdDefdocEntity2.setMemo(memo); + List bdDefdocEntityList2 = iBdDefdocDao.query(bdDefdocEntity2); + if (bdDefdocEntityList2.size() == 0) { + Assert.state(false, "根据O店铺编码{},无法匹配到U8C店铺自定义档案 备注类型:{}", memo); + } + return bdDefdocEntityList2; + } + + public String getCommaShop(String memo) { + List bdDefdocEntityList = queryU8cShop(memo); + return bdDefdocEntityList.stream().map(BdDefdocEntity::getDoccode).collect(Collectors.joining(",")); + } +} \ No newline at end of file diff --git a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToBTest.java b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToBTest.java index 6b1ce1f6..cc072f2a 100644 --- a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToBTest.java +++ b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToBTest.java @@ -28,7 +28,8 @@ public class SoSaleReturnPluginInitializerToBTest { @Test public void startImplement() { try { - soSaleReturnPluginInitializerToB.startImplement(null, null); +// soSaleReturnPluginInitializerToB.startImplement(null, null); + soSaleReturnPluginInitializerToB.startImplement("LETS-RE2024081900000001"); } catch (Exception e) { e.printStackTrace(); } diff --git a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtilTest.java b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtilTest.java new file mode 100644 index 00000000..d5d8bf8b --- /dev/null +++ b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/util/ShopTobOrToCUtilTest.java @@ -0,0 +1,38 @@ +package com.hzya.frame.plugin.lets.util; + +import com.hzya.frame.WebappApplication; +import com.hzya.frame.plugin.lets.entity.BdDefdocEntity; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.List; + +import static org.junit.Assert.*; + +/** + * @Author:liuyang + * @Package:com.hzya.frame.plugin.lets.util + * @Project:kangarooDataCenterV3 + * @name:ShopTobOrToCUtilTest + * @Date:2024/8/19 15:32 + * @Filename:ShopTobOrToCUtilTest + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = WebappApplication.class) +public class ShopTobOrToCUtilTest { + + @Autowired + private ShopTobOrToCUtil shopTobOrToCUtil; + + @Test + public void queryU8cShop() { + try { + System.out.println(shopTobOrToCUtil.getCommaShop("TOC")); + } catch (Exception e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hzya/frame/ttxofs/basics/ApiDtoCacheMap.java b/service/src/main/java/com/hzya/frame/ttxofs/basics/ApiDtoCacheMap.java index f3755c16..60b04ba3 100644 --- a/service/src/main/java/com/hzya/frame/ttxofs/basics/ApiDtoCacheMap.java +++ b/service/src/main/java/com/hzya/frame/ttxofs/basics/ApiDtoCacheMap.java @@ -7,6 +7,7 @@ import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OfsSupplierReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto; +import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchJsonRootBean; import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; import java.util.HashMap; @@ -35,9 +36,9 @@ public class ApiDtoCacheMap { apiDtoCacheMap.put("ofs.store.search", new OfsShopReturnMessageDto());//店铺查询 apiDtoCacheMap.put("ofs.vendor.search", new OfsSupplierReturnMessageDto());//店铺查询 - - apiDtoCacheMap.put("ofs.sku.search", new OFSSKUSearchResponse());//OFS存货档案查询接口 apiDtoCacheMap.put("ofs.inventory.class.search", new OFSSKUClassSearchResponse());//OFS存货分类查询接口 + + apiDtoCacheMap.put("ofs.returnOrder.search", new RerturnGoodsOrderSearchJsonRootBean());//售后订单 } } diff --git a/service/src/main/java/com/hzya/frame/ttxofs/basics/ReturnMessageBasics.java b/service/src/main/java/com/hzya/frame/ttxofs/basics/ReturnMessageBasics.java index f08a3976..874ca0a6 100644 --- a/service/src/main/java/com/hzya/frame/ttxofs/basics/ReturnMessageBasics.java +++ b/service/src/main/java/com/hzya/frame/ttxofs/basics/ReturnMessageBasics.java @@ -1,8 +1,6 @@ package com.hzya.frame.ttxofs.basics; -import com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto; - -import java.util.List; +import lombok.Data; /** * @Author:liuyang @@ -12,42 +10,10 @@ import java.util.List; * @Date:2024/7/30 11:45 * @Filename:ReturnMessageBasics */ +@Data public class ReturnMessageBasics { - private String code; private String msg; private String notify; private String error; - - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public String getNotify() { - return notify; - } - - public void setNotify(String notify) { - this.notify = notify; - } - - public String getError() { - return error; - } - - public void setError(String error) { - this.error = error; - } } diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssalesordersearch/HeaderDto.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssalesordersearch/HeaderDto.java index ec259c18..ccaa526f 100755 --- a/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssalesordersearch/HeaderDto.java +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssalesordersearch/HeaderDto.java @@ -97,6 +97,17 @@ public class HeaderDto { private String isFinanical; private String finanicalStatus; + //会员id + private String memberId; + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + public String getId() { return id; } diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchData.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchData.java new file mode 100755 index 00000000..6c9e8cc1 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchData.java @@ -0,0 +1,15 @@ +package com.hzya.frame.ttxofs.dto.returngoodordersearch; + +import java.util.List; + +/** + * Auto-generated: 2024-08-19 11:31:49 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@lombok.Data +public class RerturnGoodsOrderSearchData { + private RerturnGoodsOrderSearchHeader header; + private List details; +} \ No newline at end of file diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchDetails.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchDetails.java new file mode 100755 index 00000000..7d456edf --- /dev/null +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchDetails.java @@ -0,0 +1,45 @@ +/** + * Copyright 2024 bejson.com + */ +package com.hzya.frame.ttxofs.dto.returngoodordersearch; + +import lombok.Data; + +/** + * Auto-generated: 2024-08-19 11:31:49 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class RerturnGoodsOrderSearchDetails { + private String clientCode; + private String companyCode; + private String storeCode; + private String id; + private String returnOrderId; + private String returnOrderCode; + private String skuCode; + private String skuName; + private String returnType; + private String refundInd; + private String requestQty; + private String fulfillQty; + private String quantityUM; + private String msrPrice; + private String listPrice; + private String totalWeight; + private String totalVolume; + private String weightUM; + private String volumeUM; + private String totalAmount; + private String sourceOrderCode; + private String sourceDiscountPrice; + private String sourcePayAmount; + private String sourceRequestQty; + private String bomType; + private String created; + private String createdBy; + private String lastUpdated; + private String lastUpdatedBy; +} \ No newline at end of file diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchHeader.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchHeader.java new file mode 100755 index 00000000..d8a99a56 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchHeader.java @@ -0,0 +1,66 @@ +package com.hzya.frame.ttxofs.dto.returngoodordersearch; + +import lombok.Data; + +/** + * Auto-generated: 2024-08-19 11:31:49 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class RerturnGoodsOrderSearchHeader { + private String id; + private String clientCode; + private String companyCode; + private String storeCode; + private String facilityCode; + private String returnType; + private String exchangeType; + private String refundInd; + private String internalOrderType; + private String bizChannel; + private String code; + private String sourceUserAccount; + private String sourceUserName; + private String returnStatus; + private String shipStatus; + private String refundStatus; + private String refOrderCode; + private String refOrderId; + private String refOrderType; + private String refOrderStatusWhenReturned; + private String sourcePlatformCode; + private String sourceOrderCode; + private String returnNote; + private String requestRefundAmount; + private String actualRefundAmount; + private String totalQty; + private String totalFulfillQty; + private String shipFromAttentionTo; + private String shipFromAddress; + private String shipFromCountry; + private String shipFromState; + private String shipFromCity; + private String shipFromDistrict; + private String shipFromMobile; + private String returnCarrier; + private String returnWaybillCode; + private String auditBy; + private String auditAt; + private String refundThru; + private String csStuff; + private String errorCode; + private String errorDesc; + private String verificationStatus; + private String status; + private String created; + private String createdBy; + private String lastUpdated; + private String lastUpdatedBy; + private String processType; + private String returnNode; + private String sourceModifiedAt; + private String agNumberOfRetries; + private String realReturnReason; +} \ No newline at end of file diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchJsonRootBean.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchJsonRootBean.java new file mode 100755 index 00000000..01d95cef --- /dev/null +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodordersearch/RerturnGoodsOrderSearchJsonRootBean.java @@ -0,0 +1,18 @@ +package com.hzya.frame.ttxofs.dto.returngoodordersearch; + +import com.hzya.frame.ttxofs.basics.ReturnMessageBasics; + +import java.util.List; + +import lombok.Data; + +/** + * Auto-generated: 2024-08-19 11:31:49 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class RerturnGoodsOrderSearchJsonRootBean extends ReturnMessageBasics { + private List data; +} \ No newline at end of file diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodsearch/ReturnGoodHeaderDetailsDataDto.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodsearch/ReturnGoodHeaderDetailsDataDto.java index 82e281e4..fea9479f 100755 --- a/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodsearch/ReturnGoodHeaderDetailsDataDto.java +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/returngoodsearch/ReturnGoodHeaderDetailsDataDto.java @@ -8,6 +8,7 @@ import lombok.Data; import java.util.List; /** + * 售后入库单 * Auto-generated: 2024-08-09 10:15:6 * * @author bejson.com (i@bejson.com)