Merge remote-tracking branch 'origin/lets' into lets

This commit is contained in:
476474485@qq.com 2024-09-29 15:55:22 +08:00
commit f9d7040287
6 changed files with 218 additions and 193 deletions

View File

@ -172,7 +172,7 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
saveData(refundOnlyData); saveData(refundOnlyData);
//过滤日志 //过滤日志
List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders = filterData(returnGoodsOrders); List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders = filterData(refundOnlyData);
if (filterReturnGoodsOrders == null || filterReturnGoodsOrders.size() == 0) { if (filterReturnGoodsOrders == null || filterReturnGoodsOrders.size() == 0) {
return; return;
} }
@ -217,6 +217,12 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
} }
} }
/**
* 退款时间区间
*
* @param startTime
* @param endTime
*/
public void start(String startTime, String endTime) { public void start(String startTime, String endTime) {
try { try {
Date business_start = DateUtil.parse(startTime); Date business_start = DateUtil.parse(startTime);
@ -238,7 +244,7 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
saveData(refundOnlyData); saveData(refundOnlyData);
//过滤日志 //过滤日志
List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders = filterData(returnGoodsOrders); List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders = filterData(refundOnlyData);
if (filterReturnGoodsOrders == null || filterReturnGoodsOrders.size() == 0) { if (filterReturnGoodsOrders == null || filterReturnGoodsOrders.size() == 0) {
return; return;
} }
@ -262,6 +268,7 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
save(filterOriginalOrders); save(filterOriginalOrders);
} }
} }
/** /**
* 过滤元数据底表只过滤表头 * 过滤元数据底表只过滤表头
* *
@ -285,6 +292,7 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
/** /**
* returnType:0 不退货exchangeType:0 不换货refundInd:1 退款 * returnType:0 不退货exchangeType:0 不换货refundInd:1 退款
*
* @param rerturnGoodsOrderSearchData * @param rerturnGoodsOrderSearchData
* @return * @return
*/ */
@ -390,7 +398,7 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
ArapDjzbVO.Parentt parentvo = new ArapDjzbVO.Parentt(); ArapDjzbVO.Parentt parentvo = new ArapDjzbVO.Parentt();
//djrq 单据日期 //djrq 单据日期
format = split[3];//暂时取创建时间refundAt没返回 format = split[3];//暂时取创建时间refundAt没返回
format = "2024-09-25"; format = "2024-09-29";
parentvo.setDjrq(format); parentvo.setDjrq(format);
//dwbm 公司 //dwbm 公司
parentvo.setDwbm(split[0]); parentvo.setDwbm(split[0]);
@ -415,6 +423,9 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
parentvo.setDjlxbm("D0"); parentvo.setDjlxbm("D0");
//xslxbm 业务流程 //xslxbm 业务流程
parentvo.setXslxbm("JTK");//TOC仅退款 parentvo.setXslxbm("JTK");//TOC仅退款
//feinvstatus 开票状态
parentvo.setFeinvstatus("0");
//zyx1店铺 //zyx1店铺
parentvo.setZyx1(split[1]); parentvo.setZyx1(split[1]);
@ -422,9 +433,10 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
parentvo.setZyx2(v.get(0).getSourcePlatformCode()); parentvo.setZyx2(v.get(0).getSourcePlatformCode());
//zyx3 收发类别 销售出库写死SALES //zyx3 收发类别 销售出库写死SALES
parentvo.setZyx3("SALES"); parentvo.setZyx3("SALES");
//zyx16 单据红字标识 1Y 2N
parentvo.setZyx16("1");
//子表,需要通过多个主表的id找到多个子表,且退货金额==0的不要 //子表,需要通过多个主表的id找到多个子表,且退货金额==0的不要
List<ArapDjzbVO.Childrenn> children = new ArrayList<>();
List<RerturnGoodsOrderSearchDetails> ofsDetails = new ArrayList<>(); List<RerturnGoodsOrderSearchDetails> ofsDetails = new ArrayList<>();
for (RerturnGoodsOrderSearchHeader rerturnGoodsOrderSearchHeader : v) { for (RerturnGoodsOrderSearchHeader rerturnGoodsOrderSearchHeader : v) {
allDetail.stream().forEach(index -> { allDetail.stream().forEach(index -> {
@ -435,43 +447,78 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
} }
logDetails.addAll(ofsDetails); logDetails.addAll(ofsDetails);
List<ArapDjzbVO.Childrenn> children = new ArrayList<>();
for (RerturnGoodsOrderSearchDetails ofsDetail : ofsDetails) { //按sku分组
Map<String, List<RerturnGoodsOrderSearchDetails>> collectSKU = ofsDetails.stream().collect(Collectors.groupingBy(index -> index.getSkuCode()));
Set<Map.Entry<String, List<RerturnGoodsOrderSearchDetails>>> entries = collectSKU.entrySet();
for (Map.Entry<String, List<RerturnGoodsOrderSearchDetails>> entry : entries) {
children.clear();
String kk = entry.getKey();
List<RerturnGoodsOrderSearchDetails> vv = entry.getValue();
//kk是sku编码,vv是sku相同的子表
try {
ArapDjzbVO.Childrenn childrenn = new ArapDjzbVO.Childrenn(); ArapDjzbVO.Childrenn childrenn = new ArapDjzbVO.Childrenn();
//ddh 订单号
childrenn.setDdh(ofsDetail.getReturnOrderCode());
//cinventoryid 存货 //cinventoryid 存货
childrenn.setCinventoryid(ofsDetail.getSkuCode()); childrenn.setCinventoryid(kk);
//jfbbje jfybje 借方本币金额/借方原币金额
childrenn.setJfbbje("-" + ofsDetail.getTotalAmount());
childrenn.setJfybje("-" + ofsDetail.getTotalAmount());
//jfbbsj jfybsj 借方本币税金/借方原币税金 默认0.13
BigDecimal sj = new BigDecimal(ofsDetail.getTotalAmount()).multiply(new BigDecimal(0.13)).setScale(2, RoundingMode.FLOOR);
childrenn.setJfbbsj("-" + String.valueOf(sj));
childrenn.setJfybsj("-" + String.valueOf(sj));
//wbfbbje jfybwsje 借方本币无税金额/借方原币无税金额
BigDecimal ws = new BigDecimal(ofsDetail.getTotalAmount()).subtract(sj);
childrenn.setWbfbbje("-" + ws);
childrenn.setJfybwsje("-" + ws);
//zyx4 平台优惠
childrenn.setZyx4(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
//zyx5 支付优惠
childrenn.setZyx5(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
//zyx6 达人优惠
childrenn.setZyx6(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
//zyx7 商家优惠
childrenn.setZyx7(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
children.add(childrenn);
}
//sum:jfbbje jfybje 借方本币金额/借方原币金额
BigDecimal sum_jfbbje = new BigDecimal(0);
//sum:jfbbsj jfybsj 借方本币税金/借方原币税金 默认0.13
BigDecimal sum_jfbbsj = new BigDecimal(0);
//sum:wbfbbje jfybwsje 借方本币无税金额/借方原币无税金额
BigDecimal sum_wbfbbje = new BigDecimal(0);
//sum:zyx4 平台优惠
BigDecimal sum_zyx4 = new BigDecimal(0);
//sum:zyx5 支付优惠
BigDecimal sum_zyx5 = new BigDecimal(0);
//sum:zyx6 达人优惠
BigDecimal sum_zyx6 = new BigDecimal(0);
//sum:zyx7 商家优惠
BigDecimal sum_zyx7 = new BigDecimal(0);
//金额计算
for (RerturnGoodsOrderSearchDetails detail : vv) {
sum_jfbbje = sum_jfbbje.add(new BigDecimal(detail.getTotalAmount()));
BigDecimal sj = new BigDecimal(detail.getTotalAmount()).multiply(new BigDecimal(0.13)).setScale(2, RoundingMode.FLOOR);
sum_jfbbsj = sum_jfbbsj.add(sj);
BigDecimal ws = new BigDecimal(detail.getTotalAmount()).subtract(sj);
sum_wbfbbje = sum_wbfbbje.add(ws);
if (detail.getShareTargetPlatformDiscounts() != null) {
sum_zyx4 = sum_zyx4.add(detail.getShareTargetPlatformDiscounts());
}
if (detail.getShareTargetMerchantDiscounts() != null) {
sum_zyx5 = sum_zyx5.add(detail.getShareTargetMerchantDiscounts());
}
if (detail.getShareTargetExpertDiscounts() != null) {
sum_zyx6 = sum_zyx6.add(detail.getShareTargetExpertDiscounts());
}
if (detail.getShareTargetPayDiscounts() != null) {
sum_zyx7 = sum_zyx7.add(detail.getShareTargetPayDiscounts());
}
}
childrenn.setJfbbje("-" + sum_jfbbje);
childrenn.setJfybje("-" + sum_jfbbje);
childrenn.setJfbbsj("-" + sum_jfbbsj);
childrenn.setJfybsj("-" + sum_jfbbsj);
childrenn.setWbfbbje("-" + sum_wbfbbje);
childrenn.setJfybwsje("-" + sum_wbfbbje);
childrenn.setZyx4(String.valueOf(sum_zyx4));
childrenn.setZyx5(String.valueOf(sum_zyx5));
childrenn.setZyx6(String.valueOf(sum_zyx6));
childrenn.setZyx7(String.valueOf(sum_zyx7));
children.add(childrenn);
//推送
arapDjzbVO.setParentvo(parentvo); arapDjzbVO.setParentvo(parentvo);
arapDjzbVO.setChildren(children); arapDjzbVO.setChildren(children);
System.out.println(arapDjzbVO); System.out.println(arapDjzbVO);
mapStr = "{\"djzbvo\":[" + JSONUtil.toJsonStr(arapDjzbVO) + "]}"; mapStr = "{\"djzbvo\":[" + JSONUtil.toJsonStr(arapDjzbVO) + "]}";
System.out.println(mapStr); System.out.println(mapStr);
//推送 //推送
ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("arapYsInsertApproveCode"), mapStr); ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("arapYsInsertApproveCode"), mapStr);
//两层判断,一层中台转发,一层u8c返回 //两层判断,一层中台转发,一层u8c返回
@ -497,8 +544,8 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
Assert.state(false, "推送U8C--> 丽知:售后订单(仅退款)--->U8C红字应收单 失败 接口返回结果:{} 接口入参:{}", response, mapStr); Assert.state(false, "推送U8C--> 丽知:售后订单(仅退款)--->U8C红字应收单 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
} }
//成功 批量新增 ofsDetails //成功
for (RerturnGoodsOrderSearchDetails ofsDetail : ofsDetails) { for (RerturnGoodsOrderSearchDetails ofsDetail : vv) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity(); IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y); integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr); integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
@ -512,17 +559,41 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
integrationTaskLivingDetailsEntity.setPluginId(getPluginId()); integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity); saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("推送U8C丽知售后订单(仅退款)--->U8C红字应收单失败失败原因" + e); logger.error("推送U8C丽知售后订单(仅退款)--->U8C红字应收单失败失败原因" + e);
//失败 //失败则该k下的所有子表记录失败
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class); ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
String ErrMessage = ""; String ErrMessage = "";
if (reusltStrDto != null) { if (reusltStrDto != null) {
ErrMessage = "推送U8C丽知OFS调整入库(组装入库)--->U8C组装订单失败,失败原因:" + reusltStrDto.getErrormsg(); ErrMessage = "推送U8C丽知售后订单(仅退款)--->U8C红字应收单失败,失败原因:" + reusltStrDto.getErrormsg();
} else { } else {
ErrMessage = "推送U8C丽知OFS调整入库(组装入库)--->U8C组装订单失败失败原因" + e.getMessage(); ErrMessage = "推送U8C丽知售后订单(仅退款)--->U8C红字应收单失败失败原因" + e.getMessage();
}
//失败 批量新增 ofsDetails
for (RerturnGoodsOrderSearchDetails logDetail : vv) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
integrationTaskLivingDetailsEntity.setNewTransmitInfo(ErrMessage);
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(format);
integrationTaskLivingDetailsEntity.setRootAppPk(logDetail.getReturnOrderCode() + "_" + logDetail.getSkuCode());
integrationTaskLivingDetailsEntity.setRootAppBill(logDetail.getReturnOrderCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
}
}
}
} catch (Exception e) {
logger.error("推送U8C丽知售后订单(仅退款)--->U8C红字应收单最外层失败失败原因" + e);
//失败,最外层则该k下的所有子表记录失败
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
String ErrMessage = "";
if (reusltStrDto != null) {
ErrMessage = "推送U8C丽知售后订单(仅退款)--->U8C红字应收单最外层失败失败原因" + reusltStrDto.getErrormsg();
} else {
ErrMessage = "推送U8C丽知售后订单(仅退款)--->U8C红字应收单最外层失败失败原因" + e.getMessage();
} }
//失败 批量新增 ofsDetails //失败 批量新增 ofsDetails
for (RerturnGoodsOrderSearchDetails logDetail : logDetails) { for (RerturnGoodsOrderSearchDetails logDetail : logDetails) {
@ -537,70 +608,8 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
integrationTaskLivingDetailsEntity.setPluginId(getPluginId()); integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity); saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} }
} }
}); });
// //分摊后的明细
// List<RerturnGoodsOrderSearchDetails> ofsDetailsAll=new ArrayList<>();
//
//
// for (RerturnGoodsOrderSearchData returnGoodsOrder : filterReturnGoodsOrders) {
//
// RerturnGoodsOrderSearchHeader ofsHeader = returnGoodsOrder.getHeader();
//
// //平台优惠 platformDiscounts
// BigDecimal platform = new BigDecimal(ofsHeader.getPlatformDiscounts());
// //商家优惠 merchantDiscounts
// BigDecimal merchant = new BigDecimal(ofsHeader.getMerchantDiscounts());
// //达人优惠 expertDiscounts
// BigDecimal expert = new BigDecimal(ofsHeader.getExpertDiscounts());
// //支付优惠 payDiscounts
// BigDecimal pay = new BigDecimal(ofsHeader.getPayDiscounts());
//
// List<RerturnGoodsOrderSearchDetails> ofsDetails = returnGoodsOrder.getDetails();
// ofsDetails.stream().forEach(detail->{//表头的四个优惠放到表体
//// detail.setOriginalTargetPlatformDiscounts(platform);
//// detail.setOriginalTargetMerchantDiscounts(merchant);
//// detail.setOriginalTargetExpertDiscounts(expert);
//// detail.setOriginalTargetPayDiscounts(pay);
// detail.setOriginalTargetPlatformDiscounts(BigDecimal.valueOf(4));
// detail.setOriginalTargetMerchantDiscounts(BigDecimal.valueOf(5));
// detail.setOriginalTargetExpertDiscounts(BigDecimal.valueOf(6));
// detail.setOriginalTargetPayDiscounts(BigDecimal.valueOf(7));
// });
//
// //总金额
// BigDecimal totalCount = new BigDecimal(0);
// for (RerturnGoodsOrderSearchDetails ofsDetail : ofsDetails) {
// //请求数量*商品零售价
// BigDecimal count=new BigDecimal(ofsDetail.getRequestQty()).multiply(new BigDecimal(ofsDetail.getMsrPrice()));
// totalCount.add(count);
// }
//
// //分摊总比重1最后货品时分摊比例= 1-之前的
// BigDecimal ratioSurplus= new BigDecimal(1);
// for (int i = 0; i < ofsDetails.size(); i++) {
// if(i!=ofsDetails.size()){//最后一个直接取
// //给存货分摊比例,总金额/数量*单价
// BigDecimal ratio
// = totalCount.divide(new BigDecimal(ofsDetails.get(i).getRequestQty()).multiply(new BigDecimal(ofsDetails.get(i).getMsrPrice())));
// ratioSurplus.subtract(ratio);
// }
// //四个分摊优惠 按零售价摊
// //shareTargetPlatformDiscounts 分摊平台优惠
//// ofsDetails.get(i).setShareTargetPlatformDiscounts();
// //shareTargetMerchantDiscounts 分摊商家优惠
// //shareTargetExpertDiscounts 分摊达人优惠
// //shareTargetPayDiscounts 分摊支付优惠
//
//
// }
// }
//
System.out.println(1);
} }
/** /**

View File

@ -395,6 +395,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
* @author liuyang * @author liuyang
*/ */
private List<HeaderDetailsDto> filterDataStock(List<HeaderDetailsDto> headerDetailsDtoList) throws Exception { private List<HeaderDetailsDto> filterDataStock(List<HeaderDetailsDto> headerDetailsDtoList) throws Exception {
synchronized (PUSH_LOCK1) {
// List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList1 = new ArrayList<>(); // List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList1 = new ArrayList<>();
List<TocofsSaleoutDetailedEntity> allTocofsSaleoutDetailedEntityList = new ArrayList<>(); List<TocofsSaleoutDetailedEntity> allTocofsSaleoutDetailedEntityList = new ArrayList<>();
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
@ -408,6 +409,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
} }
return filterDataRowsAsPushOrFailedStock(allTocofsSaleoutDetailedEntityList, headerDetailsDtoList); return filterDataRowsAsPushOrFailedStock(allTocofsSaleoutDetailedEntityList, headerDetailsDtoList);
} }
}
/** /**
* 逗号拼接字符串主键作为批处理的一部分方便下一步的批量查询操作 * 逗号拼接字符串主键作为批处理的一部分方便下一步的批量查询操作
@ -509,6 +511,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
* @author liuyang * @author liuyang
*/ */
private List<HeaderDetailsDto> filterDataTran(List<HeaderDetailsDto> headerDetailsDtoList) throws Exception { private List<HeaderDetailsDto> filterDataTran(List<HeaderDetailsDto> headerDetailsDtoList) throws Exception {
synchronized (PUSH_LOCK2) {
List<TocofsSaleoutDetailedEntity> allTocofsSaleoutDetailedEntityList = new ArrayList<>(); List<TocofsSaleoutDetailedEntity> allTocofsSaleoutDetailedEntityList = new ArrayList<>();
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
List<List<HeaderDetailsDto>> splitListByCount = SplitListByCountUtil.splitListByCount(headerDetailsDtoList, 100); List<List<HeaderDetailsDto>> splitListByCount = SplitListByCountUtil.splitListByCount(headerDetailsDtoList, 100);
@ -521,6 +524,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
} }
return filterDataRowsAsPushOrFailedTran(allTocofsSaleoutDetailedEntityList, headerDetailsDtoList); return filterDataRowsAsPushOrFailedTran(allTocofsSaleoutDetailedEntityList, headerDetailsDtoList);
} }
}
/** /**
* 筛选出未推送或者失败的数据行 * 筛选出未推送或者失败的数据行
@ -2062,9 +2066,10 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
* @author liuyang * @author liuyang
*/ */
private Boolean checkTobOrder(String ofsId, String ofsCode) throws Exception { private Boolean checkTobOrder(String ofsId, String ofsCode) throws Exception {
synchronized (checkTobOrderLock) {
Assert.notNull(ofsId, "ofsId不能为空"); Assert.notNull(ofsId, "ofsId不能为空");
Assert.notNull(ofsCode, "ofsCode不能为空"); Assert.notNull(ofsCode, "ofsCode不能为空");
synchronized (checkTobOrderLock) {
SoSaleEntity soSaleEntity = new SoSaleEntity(); SoSaleEntity soSaleEntity = new SoSaleEntity();
soSaleEntity.setDr(0L); soSaleEntity.setDr(0L);
soSaleEntity.setDataSourceCode("lets_u8c"); soSaleEntity.setDataSourceCode("lets_u8c");

View File

@ -403,6 +403,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* @author liuyang * @author liuyang
*/ */
private List<StockinOrderSearchResponse.StockinOrder> filterDataStock(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) throws Exception { private List<StockinOrderSearchResponse.StockinOrder> filterDataStock(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) throws Exception {
synchronized (PUSH_LOCK1) {
// List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>(); // List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>();
List<TocofsReturngoodsDetailedEntity> tocofsReturngoodsDetailedEntityList = new ArrayList<>(); List<TocofsReturngoodsDetailedEntity> tocofsReturngoodsDetailedEntityList = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
@ -416,6 +417,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
} }
return filterDataRowsAsPushOrFailedStock(tocofsReturngoodsDetailedEntityList, returnGoodHeaderDetailsDataDtoArrayList); return filterDataRowsAsPushOrFailedStock(tocofsReturngoodsDetailedEntityList, returnGoodHeaderDetailsDataDtoArrayList);
} }
}
/** /**
* 筛选出未推送或者失败的数据行过滤库存同步业务 * 筛选出未推送或者失败的数据行过滤库存同步业务
@ -567,6 +569,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* @author liuyang * @author liuyang
*/ */
private List<StockinOrderSearchResponse.StockinOrder> filterDataTran(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) throws Exception { private List<StockinOrderSearchResponse.StockinOrder> filterDataTran(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) throws Exception {
synchronized (PUSH_LOCK2) {
// List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>(); // List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>();
List<TocofsReturngoodsDetailedEntity> tocofsReturngoodsDetailedEntityList = new ArrayList<>(); List<TocofsReturngoodsDetailedEntity> tocofsReturngoodsDetailedEntityList = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
@ -580,6 +583,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
} }
return filterDataRowsAsPushOrFailedTran(tocofsReturngoodsDetailedEntityList, returnGoodHeaderDetailsDataDtoArrayList); return filterDataRowsAsPushOrFailedTran(tocofsReturngoodsDetailedEntityList, returnGoodHeaderDetailsDataDtoArrayList);
} }
}
/** /**
* 保存抓取到的数据到mysql底表如果底表里已经存在则会忽略 * 保存抓取到的数据到mysql底表如果底表里已经存在则会忽略

View File

@ -202,7 +202,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
queryOfsSoSaleOutVo.setClosedAt_start(startTime); queryOfsSoSaleOutVo.setClosedAt_start(startTime);
queryOfsSoSaleOutVo.setClosedAt_end(endTime); queryOfsSoSaleOutVo.setClosedAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); // queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
//2024年8月22日 14:02:13 已经和O确认这个字段取消传递 //2024年8月22日 14:02:13 已经和O确认这个字段取消传递
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
@ -247,7 +247,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); // queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);

View File

@ -62,7 +62,9 @@ public class SoSaleOutPluginInitializerToBTest {
try { try {
// soSaleOutPluginInitializerToB.startImplementByTranTime("2024-09-12 14:04:00","2024-09-12 14:12:00"); // soSaleOutPluginInitializerToB.startImplementByTranTime("2024-09-12 14:04:00","2024-09-12 14:12:00");
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092000000003", "stock"); // soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092000000003", "stock");
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092600000009","stock");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -135,6 +135,11 @@ public class TransferTest {
// refundOnlyPluginInitializer.start("LETS-RO2023060900005007"); // refundOnlyPluginInitializer.start("LETS-RO2023060900005007");
refundOnlyPluginInitializer.start("LETS-RO2023082300000045"); refundOnlyPluginInitializer.start("LETS-RO2023082300000045");
} }
@Test
public void t81(){
refundOnlyPluginInitializer.start("2023-08-20","2023-08-25");
}
////////////////////////////////////////////////////////////////////////////////////仅退款 ////////////////////////////////////////////////////////////////////////////////////仅退款
} }