丽知:新增调拨订单,调拨入库单。
This commit is contained in:
parent
27b03a6628
commit
8e78c268d0
|
@ -25,4 +25,5 @@ public class ProfilesActiveConstant {
|
|||
public static final String TYPE_OTHER = "other";
|
||||
|
||||
public static final String U8C_URL = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
public static final String OFS_URL_TEST = "http://39.98.58.229/api/edi/ofs/in";
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.hzya.frame.plugin.lets.ofsvo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QueryOfsStockinOrderRequestVO {
|
||||
/** 开始时间 */
|
||||
private String created_start;
|
||||
/** 结束时间 */
|
||||
private String created_end;
|
||||
/** 组织 */
|
||||
private String clientCode;
|
||||
/** 入库单号 */
|
||||
private String code;
|
||||
/** 状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库 */
|
||||
private String status;
|
||||
/** 入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货 */
|
||||
private String internalInstructionType;
|
||||
/** 原订单类型 */
|
||||
private String refOrderType;
|
||||
/** 关联订单号 */
|
||||
private String refOrderCode;
|
||||
/** 货主 */
|
||||
private String companyCode;
|
||||
/** 库存地点 */
|
||||
private String facilityCode;
|
||||
/** 分页页数 */
|
||||
private Long pageNo;
|
||||
/** 每页条数 1-500,默认50 */
|
||||
private Long pageSize;
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.hzya.frame.plugin.lets.ofsvo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QueryOfsTransferOrderRequestVO {
|
||||
/** 开始时间 */
|
||||
private String created_start;
|
||||
/** 结束时间 */
|
||||
private String created_end;
|
||||
/** 组织 */
|
||||
private String clientCode;
|
||||
/** 调拨订单 */
|
||||
private String code;
|
||||
/** 状态 100订单池 200待出库 300已出库 400待入库 900已入库 250出库中 450入库中 */
|
||||
private String status;
|
||||
/** 订单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货 */
|
||||
private String internalOrderType;
|
||||
/** 上位系统订单号 */
|
||||
private String sourceOrderCode;
|
||||
/** 货主 */
|
||||
private String companyCode;
|
||||
/** 库存地点 */
|
||||
private String facilityCode;
|
||||
/** 分页页数 */
|
||||
private Long pageNo;
|
||||
/** 每页条数 1-500,默认50 */
|
||||
private Long pageSize;
|
||||
|
||||
}
|
|
@ -4,9 +4,13 @@ import cn.hutool.core.date.DateField;
|
|||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
@ -56,6 +60,12 @@ public class GoodsPluginInitializer extends PluginBaseEntity {
|
|||
return "1";
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
|
||||
@Autowired
|
||||
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||
@Autowired
|
||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
return null;
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
package com.hzya.frame.plugin.lets.plugin.transfer;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsTransferOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
public class TransferInPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(TransferInPluginInitializer.class);
|
||||
|
||||
private static final ReentrantLock LOCK = new ReentrantLock(true);
|
||||
|
||||
@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.transfer.TransferInPluginInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
|
||||
@Autowired
|
||||
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||
@Autowired
|
||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||
|
||||
@Autowired
|
||||
private OfsUnifiedService ofsUnifiedService;
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 默认推送
|
||||
*/
|
||||
public void start() {
|
||||
try {
|
||||
//获取当前时间
|
||||
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");
|
||||
|
||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCreated_start("2024-08-05 00:00:00");
|
||||
queryOfsStockinOrderRequestVO.setCreated_end("2024-08-09 23:59:59");
|
||||
queryOfsStockinOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> data = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(data);
|
||||
|
||||
//过滤日志
|
||||
|
||||
//推送
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start()方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 按单号
|
||||
*/
|
||||
public void start(String stockinNo) {
|
||||
try {
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start(String goodsName)方法报错:", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间区间
|
||||
*/
|
||||
public void start(String startTime, String endTime) {
|
||||
try {
|
||||
Date business_start = DateUtil.parse(startTime);
|
||||
Date business_end = DateUtil.parse(endTime);
|
||||
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
|
||||
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start(String startTime, String endTime)方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<StockinOrderSearchResponse.StockinOrder> queryOfsStockinOrder(QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO) throws Exception {
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.receipt.search");
|
||||
// queryOfsStockinOrderRequestVO.setInternalInstructionType("ADJUST");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockinOrderRequestVO.setClientCode("LETS");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockinOrderRequestVO));
|
||||
StockinOrderSearchResponse stockinOrderSearchResponse = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(stockinOrderSearchResponse);
|
||||
if(stockinOrderSearchResponse.getData()==null||stockinOrderSearchResponse.getData().size()==0){
|
||||
return null;
|
||||
}
|
||||
//过滤ADJUST调整
|
||||
List<StockinOrderSearchResponse.StockinOrder> adjustList=new ArrayList<>();
|
||||
for (StockinOrderSearchResponse.StockinOrder datum : stockinOrderSearchResponse.getData()) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = datum.getHeader();
|
||||
if("ADJUST".equals(header.getInternalInstructionType())){
|
||||
adjustList.add(datum);
|
||||
}
|
||||
}
|
||||
return adjustList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
package com.hzya.frame.plugin.lets.plugin.transfer;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.lets.constant.OverallConstant;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsTransferOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||
import com.hzya.frame.ttxofs.util.UrlTransUtil;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
/**
|
||||
* OFS->U8C调拨订单 新增,修改,删除
|
||||
* add by zyd 20240802
|
||||
*/
|
||||
public class TransferPluginInitializer extends PluginBaseEntity {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(TransferPluginInitializer.class);
|
||||
|
||||
private static final ReentrantLock LOCK = new ReentrantLock(true);
|
||||
|
||||
@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.transfer.TransferPluginInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "丽知:OFS调拨订单--->U8C调拨订单";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "丽知:OFS调拨订单--->U8C调拨订单";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
|
||||
@Autowired
|
||||
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||
@Autowired
|
||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||
|
||||
@Autowired
|
||||
private OfsUnifiedService ofsUnifiedService;
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 默认推送
|
||||
*/
|
||||
public void start() {
|
||||
try {
|
||||
//获取当前时间
|
||||
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");
|
||||
|
||||
QueryOfsTransferOrderRequestVO queryOfsTransferOrderRequestVO = new QueryOfsTransferOrderRequestVO();
|
||||
queryOfsTransferOrderRequestVO.setCreated_start(startTimeStr);
|
||||
queryOfsTransferOrderRequestVO.setCreated_end(endTimeStr);
|
||||
queryOfsTransferOrderRequestVO.setCompanyCode("SHXM");//U8c&ofs对接群:好的,我跟技术聊了,就按照这个方式来,赋值就按照赋值的货主来查,不赋值就查所有的货主数据
|
||||
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 100订单池 200待出库 300已出库 400待入库 900已入库 250出库中 450入库中
|
||||
queryOfsTransferOrderRequestVO.setPageNo(1L);
|
||||
queryOfsTransferOrderRequestVO.setPageSize(50L);
|
||||
List<OFSTranseferOrderSearchResponse.OFSTranseferOrder> ofsTranseferOrders = queryOfsTransderOrder(queryOfsTransferOrderRequestVO);
|
||||
if (ofsTranseferOrders==null||ofsTranseferOrders.size()==0) {
|
||||
return;
|
||||
}
|
||||
System.out.println(ofsTranseferOrders);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨订单--->U8C调拨订单,start()方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 按调拨订单号
|
||||
*/
|
||||
public void start(String transeferNo) {
|
||||
try {
|
||||
QueryOfsTransferOrderRequestVO queryOfsTransferOrderRequestVO = new QueryOfsTransferOrderRequestVO();
|
||||
queryOfsTransferOrderRequestVO.setCompanyCode("SHXM");//U8c&ofs对接群:好的,我跟技术聊了,就按照这个方式来,赋值就按照赋值的货主来查,不赋值就查所有的货主数据
|
||||
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 100订单池 200待出库 300已出库 400待入库 900已入库 250出库中 450入库中
|
||||
queryOfsTransferOrderRequestVO.setCode(transeferNo);
|
||||
queryOfsTransferOrderRequestVO.setPageNo(1L);
|
||||
queryOfsTransferOrderRequestVO.setPageSize(500L);
|
||||
List<OFSTranseferOrderSearchResponse.OFSTranseferOrder> ofsTranseferOrders = queryOfsTransderOrder(queryOfsTransferOrderRequestVO);
|
||||
if (ofsTranseferOrders==null||ofsTranseferOrders.size()==0) {
|
||||
return;
|
||||
}
|
||||
System.out.println(ofsTranseferOrders);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨订单--->U8C调拨订单,start(String transeferNo)方法报错:", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间区间
|
||||
*/
|
||||
public void start(String startTime, String endTime) {
|
||||
try {
|
||||
Date business_start = DateUtil.parse(startTime);
|
||||
Date business_end = DateUtil.parse(endTime);
|
||||
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00`";
|
||||
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨订单--->U8C调拨订单,start(String startTime, String endTime)方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 开始与结束时间必须小于或等于7天
|
||||
* @param queryOfsTransferOrderRequestVO
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<OFSTranseferOrderSearchResponse.OFSTranseferOrder> queryOfsTransderOrder(QueryOfsTransferOrderRequestVO queryOfsTransferOrderRequestVO) throws Exception {
|
||||
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.transferOrder.search");
|
||||
queryOfsTransferOrderRequestVO.setClientCode("LETS");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsTransferOrderRequestVO));
|
||||
OFSTranseferOrderSearchResponse ofsTranseferOrderSearchResponse =(OFSTranseferOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(ofsTranseferOrderSearchResponse);
|
||||
if (ofsTranseferOrderSearchResponse.getData().size()==0) {
|
||||
return null;
|
||||
}else {
|
||||
List<OFSTranseferOrderSearchResponse.OFSTranseferOrder> data = ofsTranseferOrderSearchResponse.getData();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -9,4 +9,8 @@
|
|||
<bean name="goodsPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsPluginInitializer"/>
|
||||
<bean name="goodsAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsAutoAllotPluginInitializer"/>
|
||||
<bean name="goodsClassPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsClassPluginInitializer"/>
|
||||
|
||||
<!--调拨-->
|
||||
<bean name="transferPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.transfer.TransferPluginInitializer"/>
|
||||
<bean name="transferInPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.transfer.TransferInPluginInitializer"/>
|
||||
</beans>
|
|
@ -0,0 +1,43 @@
|
|||
package com.hzya.frame.plugin.lets.plugin.transfer;
|
||||
|
||||
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;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = WebappApplication.class)
|
||||
public class TransferTest {
|
||||
@Autowired
|
||||
private TransferPluginInitializer transferPluginInitializer;
|
||||
|
||||
@Autowired
|
||||
private TransferInPluginInitializer transferInPluginInitializer;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////调拨订单
|
||||
@Test
|
||||
public void t00(){
|
||||
transferPluginInitializer.start();
|
||||
}
|
||||
@Test
|
||||
public void t01(){
|
||||
transferPluginInitializer.start("LETS-TH2024080800000003");
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////调拨出库单
|
||||
////////////////////////////////////////////////////////////////////////////////////调拨入库单
|
||||
@Test
|
||||
public void t20(){
|
||||
transferInPluginInitializer.start();
|
||||
}
|
||||
@Test
|
||||
public void t21(){
|
||||
transferInPluginInitializer.start("LETS-TH2024080800000003");
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package com.hzya.frame.ttxofs.basics;
|
||||
|
||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleReturnMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -22,5 +24,7 @@ public class ApiDtoCacheMap {
|
|||
static {
|
||||
apiDtoCacheMap.put("ofs.salesOrder.search", new SaleReturnMessageDto());
|
||||
apiDtoCacheMap.put("ofs.shipment.search", new SaleOutReturnMessageDto());
|
||||
apiDtoCacheMap.put("ofs.receipt.search", new StockinOrderSearchResponse());//入库单查询
|
||||
apiDtoCacheMap.put("ofs.transferOrder.search", new OFSTranseferOrderSearchResponse());//调拨订单
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
package com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch;
|
||||
|
||||
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OFSTranseferOrderSearchResponse extends ReturnMessageBasics {
|
||||
private List<OFSTranseferOrder> data;
|
||||
@Data
|
||||
public class OFSTranseferOrder{
|
||||
private OFSTranseferH header;
|
||||
private List<OFSTranseferB> details;
|
||||
|
||||
@Data
|
||||
public class OFSTranseferH{
|
||||
/** id */
|
||||
private Integer id;
|
||||
/** 组织 */
|
||||
private String clientCode;
|
||||
/** 货主编码 */
|
||||
private String companyCode;
|
||||
/** 库存地点编码 */
|
||||
private String facilityCode;
|
||||
/** 目标库存地点编码 */
|
||||
private String toFacilityCode;
|
||||
/** 订单编码 */
|
||||
private String code;
|
||||
/** 移动单类型 */
|
||||
private String orderType;
|
||||
/** 状态 */
|
||||
private Integer status;
|
||||
/** 来源平台 */
|
||||
private String sourcePlatformCode;
|
||||
/** 上位订单id */
|
||||
private String sourceOrderId;
|
||||
/** 来源订单号 */
|
||||
private String sourceOrderCode;
|
||||
/** 承运人 */
|
||||
private String carrierCode;
|
||||
/** 总行数 */
|
||||
private Integer totalLines;
|
||||
/** 总数量 */
|
||||
private Integer totalQty;
|
||||
/** 货品单位 */
|
||||
private String quantityUM;
|
||||
/** 总重量 */
|
||||
private Integer totalWeight;
|
||||
/** 总体积 */
|
||||
private Integer totalVolume;
|
||||
/** 总材积 */
|
||||
private Integer totalVolumeWeight;
|
||||
/** 重量单位 OFS数据字典WEIGHT_UM */
|
||||
private String weightUM;
|
||||
/** 体积单位 OFS数据字典VOLUME_UM */
|
||||
private String volumeUM;
|
||||
/** 异常类型 */
|
||||
private String errorCode;
|
||||
/** 异常描述 */
|
||||
private String errorDesc;
|
||||
/** 锁定原因 */
|
||||
private String holdCode;
|
||||
/** 锁定用户 */
|
||||
private String holdUser;
|
||||
/** 系统内部类型 */
|
||||
private String internalOrderType;
|
||||
/** 业务发生渠道 B2C B2C/B2B B2B/NA NA */
|
||||
private String bizChannel;
|
||||
/** */
|
||||
private Date created;
|
||||
/** */
|
||||
private String createdBy;
|
||||
/** */
|
||||
private Date lastUpdated;
|
||||
/** */
|
||||
private String lastUpdatedBy;
|
||||
}
|
||||
@Data
|
||||
public class OFSTranseferB{
|
||||
/** id */
|
||||
private Integer id;
|
||||
/** 订单ID */
|
||||
private Integer transferOrderId;
|
||||
/** 订单编号 */
|
||||
private String transferOrderCode;
|
||||
/** 企业编码 */
|
||||
private String clientCode;
|
||||
/** 商家编码 */
|
||||
private String companyCode;
|
||||
/** 库存地点编码 */
|
||||
private String facilityCode;
|
||||
/** SKU 编码 */
|
||||
private String skuCode;
|
||||
/** SKU 名称 */
|
||||
private String skuName;
|
||||
/** 要求发货数量 */
|
||||
private Integer requestQty;
|
||||
/** 发货数量 */
|
||||
private Integer shipQty;
|
||||
/** 实收数量 */
|
||||
private Integer recvQty;
|
||||
/** 来源订单id */
|
||||
private String sourceOrderId;
|
||||
/** 源订单号 */
|
||||
private String sourceOrderCode;
|
||||
/** 来源平台 */
|
||||
private String sourcePlatformCode;
|
||||
/** 原订单明细行号 */
|
||||
private String sourceLineNum;
|
||||
/** 货品单位 */
|
||||
private String quantityUM;
|
||||
/** 库存状态 */
|
||||
private String inventorySts;
|
||||
/** 总重量 */
|
||||
private Integer totalWeight;
|
||||
/** 总体积 */
|
||||
private Integer totalVolume;
|
||||
/** 总材积 */
|
||||
private Integer totalVolumeWeight;
|
||||
/** 重量单位 OFS数据字典WEIGHT_UM */
|
||||
private String weightUM;
|
||||
/** 体积单位 OFS数据字典VOLUME_UM */
|
||||
private String volumeUM;
|
||||
/** */
|
||||
private Date created;
|
||||
/** */
|
||||
private String createdBy;
|
||||
/** */
|
||||
private Date lastUpdated;
|
||||
/** */
|
||||
private String lastUpdatedBy;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.hzya.frame.ttxofs.dto.stock;
|
||||
|
||||
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class StockinOrderSearchResponse extends ReturnMessageBasics {
|
||||
private List<StockinOrder> data;
|
||||
|
||||
@Data
|
||||
public class StockinOrder {
|
||||
private StockinH header;
|
||||
private List<StockinB> details;
|
||||
|
||||
@Data
|
||||
public class StockinH {
|
||||
|
||||
private Integer id;
|
||||
private String clientCode;
|
||||
private String companyCode;
|
||||
private String facilityCode;
|
||||
private String code;
|
||||
private String internalInstructionType;
|
||||
private String bizChannel;
|
||||
private Integer refOrderId;
|
||||
private String refOrderCode;
|
||||
private String refOrderType;
|
||||
private Integer closed;
|
||||
private String closedBy;
|
||||
private Integer status;
|
||||
private Integer allowOverReceive;
|
||||
private Integer totalLines;
|
||||
private Integer totalQty;
|
||||
private Integer totalAmount;
|
||||
private Integer totalWeight;
|
||||
private Integer totalVolume;
|
||||
private Integer totalVolumeWeight;
|
||||
private Integer totalFulfillAmount;
|
||||
private Integer totalFulfillWeight;
|
||||
private Integer totalFulfillVolume;
|
||||
private Integer totalFulfillVolumeWeight;
|
||||
private Integer totalFulfillQty;
|
||||
private Integer totalCases;
|
||||
private Integer totalContainers;
|
||||
private Integer closeAtQty;
|
||||
private String quantityUM;
|
||||
private String weightUM;
|
||||
private String volumeUM;
|
||||
private Date checkInFrom;
|
||||
private Date checkInTo;
|
||||
private Date closedAt;
|
||||
private String note;
|
||||
private String sourceOrderCode;
|
||||
private Date created;
|
||||
private String createdBy;
|
||||
private Date lastUpdated;
|
||||
private String lastUpdatedBy;
|
||||
}
|
||||
|
||||
@Data
|
||||
public class StockinB {
|
||||
|
||||
private Integer id;
|
||||
private Integer receiptId;
|
||||
private String receiptCode;
|
||||
private Integer refOrderId;
|
||||
private Integer refOrderDetailId;
|
||||
private String clientCode;
|
||||
private String companyCode;
|
||||
private String facilityCode;
|
||||
private String skuCode;
|
||||
private String skuName;
|
||||
private Integer requestQty;
|
||||
private Integer receivedQty;
|
||||
private Integer openQty;
|
||||
private String quantityUM;
|
||||
private Integer totalWeight;
|
||||
private Integer totalVolume;
|
||||
private Integer totalVolumeWeight;
|
||||
private Integer totalAmount;
|
||||
private String weightUM;
|
||||
private String volumeUM;
|
||||
private String inventorySts;
|
||||
private Integer inTransInvId;
|
||||
private Integer closed;
|
||||
private Date created;
|
||||
private String createdBy;
|
||||
private Date lastUpdated;
|
||||
private String lastUpdatedBy;
|
||||
private Integer discountPrice;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue