feat(lets): 新增 TOB 无源入库单处理功能- 新增 OrderToBHeaderDtoV2 类用于 TOB 无源入库单的数据传输
- 修改 PassiveWarehouseReceiptToC 类,增加对 TOB 无源入库单的处理逻辑 - 新增 PassiveWarehouseReceiptToB 类用于处理 TOB 无源入库单 - 更新配置文件,添加 TOB无源入库单处理相关的 bean- 新增测试用例,验证 TOB 无源入库单处理功能
This commit is contained in:
parent
2108f127fb
commit
5d8c2b64e5
|
@ -4,6 +4,8 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 如果是海外店铺,税率为 0
|
||||||
|
*
|
||||||
* @Author:liuyang
|
* @Author:liuyang
|
||||||
* @Package:com.hzya.frame.plugin.lets.constant
|
* @Package:com.hzya.frame.plugin.lets.constant
|
||||||
* @Project:kangarooDataCenterV3
|
* @Project:kangarooDataCenterV3
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -935,7 +935,6 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
// 查询基本档案
|
// 查询基本档案
|
||||||
String sceneType = "tran";
|
String sceneType = "tran";
|
||||||
List<PassiveStorageSonDetailsDto> passiveStorageSonDetailsDtos = queryBasicArchivesStock(passiveStorageResponseDataList, sceneType);
|
List<PassiveStorageSonDetailsDto> passiveStorageSonDetailsDtos = queryBasicArchivesStock(passiveStorageResponseDataList, sceneType);
|
||||||
filterAfterSalesOrder(passiveStorageResponseDataList);
|
|
||||||
|
|
||||||
// 分组汇总
|
// 分组汇总
|
||||||
String dimension = null;
|
String dimension = null;
|
||||||
|
@ -1236,6 +1235,9 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
//查询OFS无源入库单对应的售后订单,并关联无源无源入库单对象
|
//查询OFS无源入库单对应的售后订单,并关联无源无源入库单对象
|
||||||
List<RerturnGoodsOrderSearchData> rerturnGoodsOrderSearchData = queryBatchAfterSalesOrder(passiveStorageResponseDataList);
|
List<RerturnGoodsOrderSearchData> rerturnGoodsOrderSearchData = queryBatchAfterSalesOrder(passiveStorageResponseDataList);
|
||||||
findAfterSalesOrder(rerturnGoodsOrderSearchData, passiveStorageResponseDataList);
|
findAfterSalesOrder(rerturnGoodsOrderSearchData, passiveStorageResponseDataList);
|
||||||
|
if ("tran".equals(sceneType)) {
|
||||||
|
passiveStorageResponseDataList = filterAfterSalesOrder(passiveStorageResponseDataList);
|
||||||
|
}
|
||||||
|
|
||||||
//查询OFS售后订单对应的OFS销售订单
|
//查询OFS售后订单对应的OFS销售订单
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtos = queryBatchOfsOrder(passiveStorageResponseDataList);
|
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtos = queryBatchOfsOrder(passiveStorageResponseDataList);
|
||||||
|
|
|
@ -2846,7 +2846,9 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
||||||
private void splicingPrintingOrderNumber(List<HeaderDetailsDto> headerDetailsDtoList, String sceneType, String startTime, String endTime, String code) {
|
private void splicingPrintingOrderNumber(List<HeaderDetailsDto> headerDetailsDtoList, String sceneType, String startTime, String endTime, String code) {
|
||||||
try {
|
try {
|
||||||
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
|
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
|
||||||
String codesJoined = headerDetailsDtoList.stream().map(HeaderDetailsDto::getHeader).map(HeaderDto::getCode).collect(Collectors.joining(","));
|
String codesJoined = headerDetailsDtoList.stream()
|
||||||
|
.map(HeaderDetailsDto::getHeader)
|
||||||
|
.map(HeaderDto::getCode).collect(Collectors.joining(","));
|
||||||
logger.info("{} 销售出库单号:{} 查询条件:{} ~ {} code:{}", sceneType, codesJoined, startTime, endTime, code);
|
logger.info("{} 销售出库单号:{} 查询条件:{} ~ {} code:{}", sceneType, codesJoined, startTime, endTime, code);
|
||||||
} else {
|
} else {
|
||||||
logger.info("{} 销售出库单号:{} 查询条件:{} ~ {} code:{}", sceneType, "无", startTime, endTime, code);
|
logger.info("{} 销售出库单号:{} 查询条件:{} ~ {} code:{}", sceneType, "无", startTime, endTime, code);
|
||||||
|
|
|
@ -1317,10 +1317,11 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
||||||
soSaleorderBEntity.setDataSourceCode("lets_u8c");
|
soSaleorderBEntity.setDataSourceCode("lets_u8c");
|
||||||
List<SoSaleorderBEntity> soSaleorderBEntityList = iSoSaleorderBDao.query(soSaleorderBEntity);
|
List<SoSaleorderBEntity> soSaleorderBEntityList = iSoSaleorderBDao.query(soSaleorderBEntity);
|
||||||
if (soSaleorderBEntityList == null || soSaleorderBEntityList.size() == 0) {
|
if (soSaleorderBEntityList == null || soSaleorderBEntityList.size() == 0) {
|
||||||
Assert.state(false, "根据O销售订单主键:{},无法匹配到U8C销售订单明细行(传到U8C可能失败了!)", soSaleEntityList.get(soSaleEntityList.size() - 1).getCsaleid());
|
Assert.state(false, "根据O销售订单主键:{},无法匹配到U8C销售订单明细行!", soSaleEntityList.get(soSaleEntityList.size() - 1).getCsaleid());
|
||||||
} else if (soSaleorderBEntityList.size() >= 2) {
|
|
||||||
Assert.state(false, "根据O销售订单主键:{},无法匹配到U8C销售订单明细行(传到U8C可能失败了!)", soSaleEntityList.get(soSaleEntityList.size() - 1).getCsaleid());
|
|
||||||
}
|
}
|
||||||
|
// else if (soSaleorderBEntityList.size() >= 2) {
|
||||||
|
// Assert.state(false, "根据O销售订单主键:{},无法匹配到U8C销售订单明细行(传到U8C可能失败了!)", soSaleEntityList.get(soSaleEntityList.size() - 1).getCsaleid());
|
||||||
|
// }
|
||||||
|
|
||||||
//查询U8C销售订单对应的销售出库单表头
|
//查询U8C销售订单对应的销售出库单表头
|
||||||
IcGeneralHEntity icGeneralHEntity = new IcGeneralHEntity();
|
IcGeneralHEntity icGeneralHEntity = new IcGeneralHEntity();
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
package com.hzya.frame.plugin.lets.u8cdto;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.lets.entity.*;
|
||||||
|
import com.hzya.frame.plugin.lets.queryvo.ExtIntegrationTaskLivingDetailsQueryVo;
|
||||||
|
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
|
||||||
|
import com.hzya.frame.ttxofs.dto.passivestorage.PassiveStorageResponse;
|
||||||
|
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchData;
|
||||||
|
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:liuyang
|
||||||
|
* @Package:com.hzya.frame.plugin.lets.u8cdto
|
||||||
|
* @Project:kangarooDataCenterV3
|
||||||
|
* @name:OrderToBHeaderDto
|
||||||
|
* @Date:2024年8月15日 14:52:34
|
||||||
|
* @Filename:OrderToBHeaderDto
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderToBHeaderDtoV2 extends PassiveStorageResponse.Header {
|
||||||
|
/**
|
||||||
|
* 表头公司(销售公司)、视为发货公司
|
||||||
|
*/
|
||||||
|
private BdCorpEntity bdCorpEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货库存组织
|
||||||
|
*/
|
||||||
|
private BdCalbodyEntity bdCalbodyEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库仓库
|
||||||
|
*/
|
||||||
|
private BdStordocEntity bdStordocEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收货库存组织
|
||||||
|
*/
|
||||||
|
// private BdCalbodyEntity bdCalbodyEntity1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收货仓库
|
||||||
|
*/
|
||||||
|
// private BdStordocEntity bdStordocEntity1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售组织
|
||||||
|
*/
|
||||||
|
private BdSalestruEntity bdSalestruEntity;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务部门
|
||||||
|
*/
|
||||||
|
private BdDeptdocEntity bdDeptdocEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客商管理档案
|
||||||
|
*/
|
||||||
|
private BdCumandocEntity bdCumandocEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客商基本档案
|
||||||
|
*/
|
||||||
|
private BdCubasdocEntity bdCubasdocEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货公司
|
||||||
|
*/
|
||||||
|
private BdCorpEntity deliverGoodsCorp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* U8C平台档案
|
||||||
|
*/
|
||||||
|
private BdDefdocEntity platformArchives;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺档案
|
||||||
|
*/
|
||||||
|
private BdDefdocEntity shopArchives;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TOB无源入库单表头
|
||||||
|
*/
|
||||||
|
private PassiveStorageResponse.Header header;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TOB售后入库单表体
|
||||||
|
*/
|
||||||
|
private List<PassiveStorageResponse.Details> details;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OFS销售订单
|
||||||
|
*/
|
||||||
|
private SaleOrderMessageDto saleOrderMessageDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* U8C销售订单
|
||||||
|
*/
|
||||||
|
private SoSaleEntity soSaleEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* U8C销售出库单表头
|
||||||
|
*/
|
||||||
|
private IcGeneralHEntity icGeneralHEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* U8C销售出库单明细行
|
||||||
|
*/
|
||||||
|
private List<IcGeneralBEntity> icGeneralBEntityList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* U8C销售订单明细行
|
||||||
|
*/
|
||||||
|
private List<SoSaleorderBEntity> soSaleorderBEntityList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行情况自定义项
|
||||||
|
*/
|
||||||
|
private List<ExtIntegrationTaskLivingDetailsQueryVo> extIntegrationTaskLivingDetailsQueryVos;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OFS售后订单
|
||||||
|
*/
|
||||||
|
private RerturnGoodsOrderSearchData ofsRertunOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* O收发类别
|
||||||
|
*/
|
||||||
|
private BdRdclEntity bdRdclEntity;
|
||||||
|
}
|
|
@ -49,6 +49,9 @@
|
||||||
<!--O采购入库确认单(委外加工类型)->U8C委外入库单-->
|
<!--O采购入库确认单(委外加工类型)->U8C委外入库单-->
|
||||||
<bean name="consignmachiningCinfurmIn" class="com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningCinfurmIn"/>
|
<bean name="consignmachiningCinfurmIn" class="com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningCinfurmIn"/>
|
||||||
|
|
||||||
<!-- 无源入库单(TOC) -> 推送U8C 红字销售订单 -->
|
<!-- 无源入库单(TOC) -> 推送U8C 红字销售订单、红字应收单 -->
|
||||||
<bean name="passiveWarehouseReceiptToC" class="com.hzya.frame.plugin.lets.plugin.sales.PassiveWarehouseReceiptToC"/>
|
<bean name="passiveWarehouseReceiptToC" class="com.hzya.frame.plugin.lets.plugin.sales.PassiveWarehouseReceiptToC"/>
|
||||||
|
|
||||||
|
<!-- 无源入库单(TOB) -> 推送U8C 红字销售订单、红字销售发票 -->
|
||||||
|
<bean name="passiveWarehouseReceiptToB" class="com.hzya.frame.plugin.lets.plugin.sales.PassiveWarehouseReceiptToB"/>
|
||||||
</beans>
|
</beans>
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.hzya.frame.plugin.lets.plugin.sales;
|
||||||
|
|
||||||
|
import com.hzya.frame.WebappApplication;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:liuyang
|
||||||
|
* @Package:com.hzya.frame.plugin.lets.plugin.sales
|
||||||
|
* @Project:kangarooDataCenterV3
|
||||||
|
* @name:PassiveWarehouseReceiptToBTest
|
||||||
|
* @Date:2025/3/17 16:51
|
||||||
|
* @Filename:PassiveWarehouseReceiptToBTest
|
||||||
|
*/
|
||||||
|
@RunWith(SpringRunner.class)
|
||||||
|
@SpringBootTest(classes = WebappApplication.class)
|
||||||
|
public class PassiveWarehouseReceiptToBTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PassiveWarehouseReceiptToB passiveWarehouseReceiptToB;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void startImplementByStockTime() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void startImplementByTradeTime() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void startImplementByCode() {
|
||||||
|
try {
|
||||||
|
//TOB 无源入库
|
||||||
|
// passiveWarehouseReceiptToB.startImplementByStockTime("2025-03-16 20:20:20", "2025-03-16 20:20:20");
|
||||||
|
//TOB 无源入库退款完成
|
||||||
|
passiveWarehouseReceiptToB.startImplementByTradeTime("2025-03-16 20:20:20", "2025-03-16 20:20:20");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,6 +30,8 @@ public class DeleteU8cDataUtilTest4 {
|
||||||
// deleteU8cDataUtil.cancelSignatureIcGeneralHV2("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
// deleteU8cDataUtil.cancelSignatureIcGeneralHV2("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
||||||
//销售出库单签字 已测试
|
//销售出库单签字 已测试
|
||||||
// deleteU8cDataUtil.saleOutSign("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
// deleteU8cDataUtil.saleOutSign("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
||||||
|
|
||||||
|
deleteU8cDataUtil.abandoningReviewAccReceDoc();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,20 @@
|
||||||
|
|
||||||
<!--查询已审核的应收单-->
|
<!--查询已审核的应收单-->
|
||||||
<select id="abandonmentAccountsReceivableDoc" parameterType="com.hzya.frame.deletedata.vo.DeleteSoSaleVo" resultMap="get-SoSaleByDelete-result">
|
<select id="abandonmentAccountsReceivableDoc" parameterType="com.hzya.frame.deletedata.vo.DeleteSoSaleVo" resultMap="get-SoSaleByDelete-result">
|
||||||
|
-- SELECT
|
||||||
|
-- a.djbh,
|
||||||
|
-- a.dwbm,
|
||||||
|
-- a.vouchid,
|
||||||
|
-- b.unitname,
|
||||||
|
-- b.unitcode
|
||||||
|
-- FROM
|
||||||
|
-- arap_djzb a
|
||||||
|
-- LEFT JOIN bd_corp b ON b.pk_corp = a.DWBM
|
||||||
|
-- WHERE
|
||||||
|
-- a.dr = 0
|
||||||
|
-- AND a.XSLXBM = '0001A110000000001TH6'
|
||||||
|
-- AND a.djdl = 'ys'
|
||||||
|
-- and a.spzt = 1
|
||||||
SELECT
|
SELECT
|
||||||
a.djbh,
|
a.djbh,
|
||||||
a.dwbm,
|
a.dwbm,
|
||||||
|
@ -146,9 +160,10 @@
|
||||||
LEFT JOIN bd_corp b ON b.pk_corp = a.DWBM
|
LEFT JOIN bd_corp b ON b.pk_corp = a.DWBM
|
||||||
WHERE
|
WHERE
|
||||||
a.dr = 0
|
a.dr = 0
|
||||||
AND a.XSLXBM = '0001A110000000001TH6'
|
|
||||||
AND a.djdl = 'ys'
|
AND a.djdl = 'ys'
|
||||||
and a.spzt = 1
|
AND a.spzt = 1
|
||||||
|
and a.djbh = 'YS2503170119'
|
||||||
|
and b.unitname = '上海丽知品牌管理有限公司'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--查询自由态的应收单-->
|
<!--查询自由态的应收单-->
|
||||||
|
|
|
@ -72,5 +72,9 @@ public class PassiveStorageResponse extends ReturnMessageBasics {
|
||||||
private PassiveStorageResponse.Header header;
|
private PassiveStorageResponse.Header header;
|
||||||
//退款完成时间
|
//退款完成时间
|
||||||
private String refundedAt;
|
private String refundedAt;
|
||||||
|
//计算应收
|
||||||
|
private String def1;
|
||||||
|
//计算公式
|
||||||
|
private String def2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue