丽知:ofs的sku查询接口测试

This commit is contained in:
zhengyf 2024-08-20 21:58:46 +08:00
parent f3fd73bf8e
commit d166ca87b4
3 changed files with 29 additions and 15 deletions

View File

@ -16,9 +16,13 @@ public class QueryOfsSKURequestVO {
/** 组织 */ /** 组织 */
private String clientCode; private String clientCode;
private String lastUpdated_start;
private String lastUpdated_end;
private String companyCode; private String companyCode;
private int status; private String status;
private String code; private String code;
private int pageNo; private String pageNo;
private int pageSize; private String pageSize;
} }

View File

@ -11,6 +11,7 @@ import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao; import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics; import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
import com.hzya.frame.ttxofs.dto.InterfaceParamByU8CApiDto; import com.hzya.frame.ttxofs.dto.InterfaceParamByU8CApiDto;
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
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;
@ -98,8 +99,8 @@ public class SKUPluginInitializer extends PluginBaseEntity {
// queryOfsSKURequestVO.setCreated_start("2023-10-15 00:00:00"); // queryOfsSKURequestVO.setCreated_start("2023-10-15 00:00:00");
// queryOfsSKURequestVO.setCreated_end("2023-10-21 23:59:59"); // queryOfsSKURequestVO.setCreated_end("2023-10-21 23:59:59");
// queryOfsSKURequestVO.setCompanyCode(""); // queryOfsSKURequestVO.setCompanyCode("");
queryOfsSKURequestVO.setPageNo(1); queryOfsSKURequestVO.setPageNo("1");
queryOfsSKURequestVO.setPageSize(500); queryOfsSKURequestVO.setPageSize("500");
queryOfsSKUs(queryOfsSKURequestVO); queryOfsSKUs(queryOfsSKURequestVO);
@ -134,6 +135,14 @@ public class SKUPluginInitializer extends PluginBaseEntity {
Date business_end = DateUtil.parse(endTime); Date business_end = DateUtil.parse(endTime);
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00"; String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59"; String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO();
queryOfsSKURequestVO.setLastUpdated_start(start);
queryOfsSKURequestVO.setLastUpdated_end(end);
queryOfsSKURequestVO.setPageNo("1");
queryOfsSKURequestVO.setPageSize("500");
queryOfsSKUs(queryOfsSKURequestVO);
} catch (Exception e) { } catch (Exception e) {
logger.error("丽知丽知OFS货品档案--->U8C货品档案,start(String startTime, String endTime)方法报错:", e); logger.error("丽知丽知OFS货品档案--->U8C货品档案,start(String startTime, String endTime)方法报错:", e);
} }
@ -141,13 +150,15 @@ public class SKUPluginInitializer extends PluginBaseEntity {
/** /**
* 查询OFS SKU档案 * 查询OFS SKU档案
* status 0禁用 1启用
*/ */
public void queryOfsSKUs(QueryOfsSKURequestVO queryOfsGoodsRequestVO) throws Exception { public void queryOfsSKUs(QueryOfsSKURequestVO queryOfsGoodsRequestVO) throws Exception {
InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto(); InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
interfaceParamDto.setApi("ofs.sku.search"); interfaceParamDto.setApi("ofs.sku.search");
queryOfsGoodsRequestVO.setClientCode("LETS"); queryOfsGoodsRequestVO.setClientCode("LETS");
interfaceParamDto.setData(JSON.toJSONString(queryOfsGoodsRequestVO)); interfaceParamDto.setData(JSON.toJSONString(queryOfsGoodsRequestVO));
ReturnMessageBasics returnMessageBasics = ofsUnifiedService.unifiedByU8CApi(interfaceParamDto); OFSSKUSearchResponse ofsskuSearchResponse =(OFSSKUSearchResponse) ofsUnifiedService.unifiedByU8CApi(interfaceParamDto);
System.out.println(ofsskuSearchResponse);
} }

View File

@ -3,7 +3,6 @@ package com.hzya.frame.ttxofs.dto.ofsBaseSearch;
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics; import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
import lombok.Data; import lombok.Data;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -15,19 +14,19 @@ public class OFSSKUSearchResponse extends ReturnMessageBasics {
@Data @Data
public static class OFSSKU{ public static class OFSSKU{
private int id; private String id;
private String clientCode; private String clientCode;
private String companyCode; private String companyCode;
private String code; private String code;
private String name; private String name;
private int listPrice; private String listPrice;
private int netPrice; private String netPrice;
private int msrPrice; private String msrPrice;
private int buyPrice; private String buyPrice;
private int status; private String status;
private Date created; private String created;
private String createdBy; private String createdBy;
private Date lastUpdated; private String lastUpdated;
private String lastUpdatedBy; private String lastUpdatedBy;
} }
} }