优化TOC、TOB代码逻辑
This commit is contained in:
parent
bfb2049fe8
commit
aeeee1335b
|
@ -29,6 +29,7 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
|
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
|
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
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.ttxofs.service.OfsUnifiedService;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -148,15 +149,15 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
||||||
|
|
||||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
queryOfsSoSaleOutVo.setCreated_start("2024-01-02 11:58:20");
|
queryOfsSoSaleOutVo.setShipAt_start("2024-07-05 16:38:00");
|
||||||
queryOfsSoSaleOutVo.setCreated_end("2024-01-02 11:58:22");
|
queryOfsSoSaleOutVo.setShipAt_end("2024-07-05 16:50:30");
|
||||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||||
// queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||||
queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
|
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
|
||||||
// queryOfsSoSaleOutVo.setStatus(900L);
|
queryOfsSoSaleOutVo.setStatus(900L);
|
||||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||||
queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004");
|
// queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004");
|
||||||
queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L);
|
queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L);
|
||||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||||
if (headerDetailsDtoList.size() > 0) {
|
if (headerDetailsDtoList.size() > 0) {
|
||||||
|
@ -570,6 +571,11 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
//客商基本档案
|
//客商基本档案
|
||||||
|
//查询OFS对应的销售订单,得到会员id
|
||||||
|
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
|
// queryOfsSoSaleOutVo.setCode();
|
||||||
|
SaleOrderMessageDto ofsOrder = getOfsOrder(queryOfsSoSaleOutVo, 1L);
|
||||||
|
|
||||||
String custName = "天猫intoyou旗舰店-自营";
|
String custName = "天猫intoyou旗舰店-自营";
|
||||||
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
|
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
|
||||||
bdCubasdocEntity.setDataSourceCode("lets_u8c");
|
bdCubasdocEntity.setDataSourceCode("lets_u8c");
|
||||||
|
@ -626,6 +632,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
||||||
orderOutTobHeaderDto.setDeliverGoodsCorp(bdCorpEntityList.get(0));
|
orderOutTobHeaderDto.setDeliverGoodsCorp(bdCorpEntityList.get(0));
|
||||||
orderOutTobHeaderDto.setPlatformArchives(bdDefdocEntityList.get(0));
|
orderOutTobHeaderDto.setPlatformArchives(bdDefdocEntityList.get(0));
|
||||||
orderOutTobHeaderDto.setShopArchives(bdDefdocEntityList2.get(0));
|
orderOutTobHeaderDto.setShopArchives(bdDefdocEntityList2.get(0));
|
||||||
|
orderOutTobHeaderDto.setOfsOrder(ofsOrder);
|
||||||
|
|
||||||
orderOutTobHeaderDto.setHeader(header);
|
orderOutTobHeaderDto.setHeader(header);
|
||||||
orderOutTobHeaderDto.setDetails(details);
|
orderOutTobHeaderDto.setDetails(details);
|
||||||
|
@ -820,5 +827,20 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询OFS销售订单
|
||||||
|
*
|
||||||
|
* @author liuyang
|
||||||
|
*/
|
||||||
|
public SaleOrderMessageDto getOfsOrder(QueryOfsSoSaleOutVo queryOfsSoSaleOutVo, Long pageNo) throws Exception {
|
||||||
|
Long pageSize = 200L;
|
||||||
|
queryOfsSoSaleOutVo.setPageNo(pageNo);
|
||||||
|
queryOfsSoSaleOutVo.setPageSize(pageSize);
|
||||||
|
|
||||||
|
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||||
|
interfaceParamDto.setApi("ofs.salesOrder.search");
|
||||||
|
interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo));
|
||||||
|
SaleOrderMessageDto saleOrderMessageDto = (SaleOrderMessageDto) ofsUnifiedService.unified(interfaceParamDto);
|
||||||
|
return saleOrderMessageDto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
|
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
|
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
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.ttxofs.service.OfsUnifiedService;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -131,7 +132,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||||
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
|
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
|
||||||
queryOfsSoSaleOutVo.setStatus(510L);
|
queryOfsSoSaleOutVo.setStatus(900L);
|
||||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
||||||
|
|
|
@ -17,7 +17,6 @@ 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.dao.ITocofsSaleoutDetailedDao;
|
||||||
import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsDetailedEntity;
|
import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsDetailedEntity;
|
||||||
import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsEntity;
|
import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsEntity;
|
||||||
import com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity;
|
|
||||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
|
||||||
import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo;
|
import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.*;
|
import com.hzya.frame.plugin.lets.u8cdto.*;
|
||||||
|
@ -25,9 +24,6 @@ import com.hzya.frame.plugin.lets.util.DateStrUtil;
|
||||||
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
|
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
|
||||||
import com.hzya.frame.split.SplitListByCountUtil;
|
import com.hzya.frame.split.SplitListByCountUtil;
|
||||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||||
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.returngoodsearch.RertunGoodsRootBean;
|
import com.hzya.frame.ttxofs.dto.returngoodsearch.RertunGoodsRootBean;
|
||||||
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodHeaderDetailsDataDto;
|
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodHeaderDetailsDataDto;
|
||||||
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto;
|
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto;
|
||||||
|
@ -40,7 +36,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OFS售后入库单(TOB)生成U8C红字销售订单
|
* OFS售后入库单(TOB)生成U8C红字销售订单
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.hzya.frame.plugin.lets.u8cdto;
|
||||||
|
|
||||||
import com.hzya.frame.plugin.lets.entity.*;
|
import com.hzya.frame.plugin.lets.entity.*;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
|
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
|
||||||
|
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,4 +76,9 @@ public class OrderOutTobHeaderDto extends HeaderDetailsDto {
|
||||||
* 店铺档案
|
* 店铺档案
|
||||||
*/
|
*/
|
||||||
private BdDefdocEntity shopArchives;
|
private BdDefdocEntity shopArchives;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OFS销售订单
|
||||||
|
*/
|
||||||
|
private SaleOrderMessageDto ofsOrder;
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package com.hzya.frame.plugin.lets.plugin.sales;
|
package com.hzya.frame.plugin.lets.plugin.sales;
|
||||||
|
|
||||||
import com.hzya.frame.WebappApplication;
|
import com.hzya.frame.WebappApplication;
|
||||||
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -26,7 +27,15 @@ class SoSaleOutPluginInitializerToCTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void startImplement() throws Exception {
|
void startImplement() throws Exception {
|
||||||
soSaleOutPluginInitializerToC.startImplement(null, null);
|
// soSaleOutPluginInitializerToC.startImplement(null, null);
|
||||||
// soSaleOutPluginInitializerToC.queryOfsSaleOrder();
|
// soSaleOutPluginInitializerToC.queryOfsSaleOrder();
|
||||||
|
|
||||||
|
try {
|
||||||
|
// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
|
// queryOfsSoSaleOutVo.setCode("LETS-SO2024070500000001");
|
||||||
|
// soSaleOutPluginInitializerToC.getOfsOrder(queryOfsSoSaleOutVo, 1L);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@ import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUClassSearchResponse;
|
||||||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
|
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
|
||||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleReturnMessageDto;
|
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
|
||||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -25,7 +25,7 @@ public class ApiDtoCacheMap {
|
||||||
public static final Map<String, ReturnMessageBasics> apiDtoCacheMap = new HashMap();
|
public static final Map<String, ReturnMessageBasics> apiDtoCacheMap = new HashMap();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
apiDtoCacheMap.put("ofs.salesOrder.search", new SaleReturnMessageDto());
|
apiDtoCacheMap.put("ofs.salesOrder.search", new SaleOrderMessageDto());
|
||||||
apiDtoCacheMap.put("ofs.shipment.search", new SaleOutReturnMessageDto());
|
apiDtoCacheMap.put("ofs.shipment.search", new SaleOutReturnMessageDto());
|
||||||
apiDtoCacheMap.put("ofs.receipt.search", new StockinOrderSearchResponse());//入库单查询
|
apiDtoCacheMap.put("ofs.receipt.search", new StockinOrderSearchResponse());//入库单查询
|
||||||
apiDtoCacheMap.put("ofs.transferOrder.search", new OFSTranseferOrderSearchResponse());//调拨订单
|
apiDtoCacheMap.put("ofs.transferOrder.search", new OFSTranseferOrderSearchResponse());//调拨订单
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||||
* @author bejson.com (i@bejson.com)
|
* @author bejson.com (i@bejson.com)
|
||||||
* @website http://www.bejson.com/java2pojo/
|
* @website http://www.bejson.com/java2pojo/
|
||||||
*/
|
*/
|
||||||
public class SaleReturnMessageDto extends ReturnMessageBasics {
|
public class SaleOrderMessageDto extends ReturnMessageBasics {
|
||||||
|
|
||||||
private List<HeaderDetailsDto> data;
|
private List<HeaderDetailsDto> data;
|
||||||
|
|
Loading…
Reference in New Issue