Merge remote-tracking branch 'origin/lets' into lets
This commit is contained in:
commit
3cad1b92db
|
@ -28,17 +28,22 @@ public class OverallConstant {
|
|||
private static void loadPublic() {
|
||||
|
||||
//存货分类
|
||||
prodOverPublic.put("bdinvclSaveCode", "8000370025");//存货分类新增
|
||||
prodOverPublic.put("bdinvclSave", "/u8cloud/api/uapbd/bdinvcl/save");//存货分类新增
|
||||
prodOverPublic.put("bdinvclUpdateCode", "8000370026");//存货分类修改
|
||||
prodOverPublic.put("bdinvclUpdate", "/u8cloud/api/uapbd/bdinvcl/update");//存货分类修改
|
||||
prodOverPublic.put("bdinvclDeleteCode", "8000370027");//存货分类删除
|
||||
prodOverPublic.put("bdinvclDelete", "/u8cloud/api/uapbd/bdinvcl/delete");//存货分类删除
|
||||
prodOverPublic.put("bdinvSaveCode", "8000370025");//存货分类新增
|
||||
prodOverPublic.put("bdinvSave", "/u8cloud/api/uapbd/bdinvcl/save");//存货分类新增
|
||||
prodOverPublic.put("bdinvUpdateCode", "8000370026");//存货分类修改
|
||||
prodOverPublic.put("bdinvUpdate", "/u8cloud/api/uapbd/bdinvcl/update");//存货分类修改
|
||||
prodOverPublic.put("bdinvDeleteCode", "8000370027");//存货分类删除
|
||||
prodOverPublic.put("bdinvDelete", "/u8cloud/api/uapbd/bdinvcl/delete");//存货分类删除
|
||||
//存货基本档案
|
||||
prodOverPublic.put("bdinvclSaveCode", "8000370002");//存货基本档案新增
|
||||
prodOverPublic.put("bdinvclSave", "/u8cloud/api/uapbd/bdinvcl/save");//存货基本档案新增
|
||||
prodOverPublic.put("bdinvclUpdateCode", "8000370046");//存货基本档案修改
|
||||
prodOverPublic.put("bdinvclUpdate", "/u8cloud/api/uapbd/invbasdoc/update");//存货基本档案修改
|
||||
prodOverPublic.put("bdinvclSealCode", "8000370058");//存货基本档案封存
|
||||
prodOverPublic.put("bdinvclSeal", "/u8cloud/api/uapbd/invbasdoc/seal");//存货基本档案封存
|
||||
prodOverPublic.put("bdinvclUnsealCode", "8000370059");//存货基本档案取消封存
|
||||
prodOverPublic.put("bdinvclUnseal", "/u8cloud/api/uapbd/invbasdoc/unseal");//存货基本档案取消封存
|
||||
prodOverPublic.put("bdinvclAllotCode", "8000370003");//存货基本档案自动分配
|
||||
prodOverPublic.put("bdinvclAllot", "/u8cloud/api/uapbd/invbasdoc/assign");//存货基本档案自动分配
|
||||
//调拨
|
||||
prodOverPublic.put("approveqzCode", "8000370009");//调拨订单保存即审批
|
||||
|
|
|
@ -142,9 +142,6 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCreated_start(startTimeStr);
|
||||
queryOfsStockinOrderRequestVO.setCreated_end(endTimeStr);
|
||||
queryOfsStockinOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(stockinOrders);
|
||||
|
||||
|
@ -174,10 +171,6 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCode(stockinNo);
|
||||
// queryOfsStockinOrderRequestVO.setCompanyCode("SHLZ");
|
||||
queryOfsStockinOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(stockinOrders);
|
||||
|
||||
|
@ -212,9 +205,6 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCreated_start(start);
|
||||
queryOfsStockinOrderRequestVO.setCreated_end(end);
|
||||
queryOfsStockinOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(stockinOrders);
|
||||
|
||||
|
@ -408,17 +398,37 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
|
||||
public List<StockinOrderSearchResponse.StockinOrder> queryOfsStockinOrder(QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO) throws Exception {
|
||||
Long pageNo = 1L;
|
||||
List<StockinOrderSearchResponse.StockinOrder> all = new ArrayList<>();
|
||||
|
||||
|
||||
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");
|
||||
queryOfsStockinOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(pageNo);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
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;
|
||||
}
|
||||
return stockinOrderSearchResponse.getData();
|
||||
|
||||
all.addAll(stockinOrderSearchResponse.getData());
|
||||
int count = stockinOrderSearchResponse.getData().size();
|
||||
while (count >= 500) {//>=500,可能还有下一页。
|
||||
//还有下一页
|
||||
pageNo++;
|
||||
queryOfsStockinOrderRequestVO.setPageNo(pageNo);
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockinOrderRequestVO));
|
||||
StockinOrderSearchResponse stockinOrderSearchResponse1 = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
|
||||
all.addAll(stockinOrderSearchResponse1.getData());
|
||||
|
||||
count=stockinOrderSearchResponse1.getData().size();
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -149,10 +149,6 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO();
|
||||
queryOfsStockoutOrderRequestVO.setClosedAt_start(startTimeStr);
|
||||
queryOfsStockoutOrderRequestVO.setClosedAt_end(endTimeStr);
|
||||
// queryOfsStockoutOrderRequestVO.setCompanyCode("SHXM");
|
||||
queryOfsStockoutOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockoutOrderRequestVO.setPageSize(500L);
|
||||
List<StockoutOrderSearchResponse.StockoutOrder> stockoutOrders = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO);
|
||||
if (stockoutOrders == null || stockoutOrders.size() == 0) {
|
||||
return;
|
||||
|
@ -179,9 +175,6 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO();
|
||||
queryOfsStockoutOrderRequestVO.setCode(stockoutNo);
|
||||
queryOfsStockoutOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockoutOrderRequestVO.setPageSize(500L);
|
||||
List<StockoutOrderSearchResponse.StockoutOrder> stockoutOrders = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO);
|
||||
if (stockoutOrders == null || stockoutOrders.size() == 0) {
|
||||
Assert.state(false, "丽知:OFS调整出库--->U8C其它出库根据单据号[出库完成]:{},未查询到调整出库单", stockoutNo);
|
||||
|
@ -214,9 +207,6 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO();
|
||||
queryOfsStockoutOrderRequestVO.setShipAt_start(start);
|
||||
queryOfsStockoutOrderRequestVO.setShipAt_end(end);
|
||||
queryOfsStockoutOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockoutOrderRequestVO.setPageSize(500L);
|
||||
List<StockoutOrderSearchResponse.StockoutOrder> stockoutOrders = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO);
|
||||
if (stockoutOrders == null || stockoutOrders.size() == 0) {
|
||||
Assert.state(false, "丽知:OFS调整出库--->U8C其它出库根据日期期间[开始时间]-[结束时间]:{}-{},未查询到调整出库单[出库完成]", startTime, endTime);
|
||||
|
@ -314,7 +304,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
String u8ShipmentType = ofsAdjustOrders.get(0).getHeader().getU8ShipmentType();//出库类型
|
||||
|
||||
// BdRdclEntity bdRdclEntity = new BdRdclEntity();
|
||||
//// bdRdclEntity.setRdname("调整出库");
|
||||
// bdRdclEntity.setRdname("调整出库");
|
||||
// bdRdclEntity.setRdcode(u8ShipmentType);
|
||||
// bdRdclEntity.setDr(0);
|
||||
// bdRdclEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
|
@ -387,7 +377,8 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setDef1(vbillcode);//u8c其他出库单号
|
||||
integrationTaskLivingDetailsEntity.setNewSystemNumber(vbillcode);//u8c其他出库单号
|
||||
integrationTaskLivingDetailsEntity.setNewSystemPrimary(vbillcode);//u8c其他出库单号
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
|
||||
|
@ -406,8 +397,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);//u8c其他出库单号
|
||||
// integrationTaskLivingDetailsEntity.setRootAppBill(null);//u8c其他出库单号
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
}
|
||||
|
@ -416,20 +406,37 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
public List<StockoutOrderSearchResponse.StockoutOrder> queryOfsStockoutOrder(QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO) throws Exception {
|
||||
Long pageNo = 1L;
|
||||
List<StockoutOrderSearchResponse.StockoutOrder> all=new ArrayList<>();
|
||||
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.shipment.search");
|
||||
queryOfsStockoutOrderRequestVO.setInternalInstructionType("ADJUST");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockoutOrderRequestVO.setClientCode("LETS");
|
||||
//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockoutOrderRequestVO.setStatus("900");
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(pageNo);
|
||||
queryOfsStockoutOrderRequestVO.setPageSize(500L);
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockoutOrderRequestVO));
|
||||
SaleOutReturnMessageDto saleOutReturnMessageDto = (SaleOutReturnMessageDto) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(saleOutReturnMessageDto);
|
||||
StockoutOrderSearchResponse stockoutOrderSearchResponse = SaleOutReturnMessageDto2StockoutOrderSearchResponse(saleOutReturnMessageDto);
|
||||
System.out.println(stockoutOrderSearchResponse);
|
||||
|
||||
if (stockoutOrderSearchResponse.getData() == null || stockoutOrderSearchResponse.getData().size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return stockoutOrderSearchResponse.getData();
|
||||
all.addAll(stockoutOrderSearchResponse.getData());
|
||||
int count = stockoutOrderSearchResponse.getData().size();
|
||||
while (count >= 500) {//>=500,可能还有下一页。
|
||||
//还有下一页
|
||||
pageNo++;
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(pageNo);
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockoutOrderRequestVO));
|
||||
SaleOutReturnMessageDto saleOutReturnMessageDto1 = (SaleOutReturnMessageDto) ofsUnifiedService.unified(interfaceParamDto);
|
||||
StockoutOrderSearchResponse stockoutOrderSearchResponse1 = SaleOutReturnMessageDto2StockoutOrderSearchResponse(saleOutReturnMessageDto1);
|
||||
all.addAll(stockoutOrderSearchResponse1.getData());
|
||||
count=stockoutOrderSearchResponse1.getData().size();
|
||||
}
|
||||
|
||||
return all;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -288,15 +288,15 @@ public class SKUClassPluginInitializer extends PluginBaseEntity {
|
|||
System.out.println(bdInvclEntityList1);
|
||||
if (bdInvclEntityList1.size()==1) {
|
||||
//修改
|
||||
url = OverallConstant.getOverAllValue("bdinvclUpdateCode");
|
||||
url = OverallConstant.getOverAllValue("bdinvUpdateCode");
|
||||
bdInvclEntity.setPk_invcl(bdInvclEntityList1.get(0).getPkInvcl());
|
||||
}else if (bdInvclEntityList1.size()==0) {
|
||||
//新增
|
||||
url = OverallConstant.getOverAllValue("bdinvclSaveCode");
|
||||
url = OverallConstant.getOverAllValue("bdinvSaveCode");
|
||||
}
|
||||
} else if (bdInvclEntityList.size() == 1) {
|
||||
//修改
|
||||
url = OverallConstant.getOverAllValue("bdinvclUpdateCode");
|
||||
url = OverallConstant.getOverAllValue("bdinvUpdateCode");
|
||||
bdInvclEntity.setPk_invcl(bdInvclEntityList.get(0).getPkInvcl());
|
||||
} else {
|
||||
Assert.state(false, "");
|
||||
|
@ -315,9 +315,7 @@ public class SKUClassPluginInitializer extends PluginBaseEntity {
|
|||
//推送
|
||||
bdInvclEntities.add(bdInvclEntity);
|
||||
String jsonStr = JSONUtil.toJsonStr(bdInvclEntities);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("invcl", jsonStr);
|
||||
mapStr = JSONUtil.toJsonStr(map);
|
||||
mapStr="{\"invcl\":"+jsonStr+"}";
|
||||
ZTResult ztResult = pushU8CByApiCode.pushByCode(url, mapStr);
|
||||
//两层判断,一层中台转发,一层u8c返回
|
||||
Attribute attribute = ztResult.getAttribute();
|
||||
|
|
|
@ -2,13 +2,26 @@ package com.hzya.frame.plugin.lets.plugin.base;
|
|||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
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.constant.ProfilesActiveConstant;
|
||||
import com.hzya.frame.plugin.lets.dao.IBdInvbasdocDao;
|
||||
import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity;
|
||||
import com.hzya.frame.plugin.lets.entity.BdInvclEntity;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSKURequestVO;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.InvBasDocVO;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||
import com.hzya.frame.plugin.lets.util.pushData.Attribute;
|
||||
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
||||
import com.hzya.frame.plugin.lets.util.pushData.ZTResult;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||
import com.hzya.frame.ttxofs.dto.InterfaceParamByU8CApiDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
|
||||
|
@ -18,10 +31,10 @@ 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.*;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* OFS->U8C货品档案 新增,修改,删除
|
||||
|
@ -73,13 +86,50 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
@Autowired
|
||||
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||
@Autowired
|
||||
private PushU8CByApiCode pushU8CByApiCode;
|
||||
@Autowired
|
||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||
|
||||
@Autowired
|
||||
private OfsUnifiedService ofsUnifiedService;
|
||||
|
||||
@Autowired
|
||||
private IBdInvbasdocDao bdInvbasdocDao;
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
try {
|
||||
logger.info("调用:" + getPluginName() + "-插件");
|
||||
String prod = "prod";
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (requestJson != null && ProfilesActiveConstant.TYPE_DATE.equals(requestJson.get("type"))) {
|
||||
//按日期
|
||||
if (param != null && !"".equals(param)) {
|
||||
String[] split = param.split("/");
|
||||
if (!(split.length == 2)) {
|
||||
Assert.state(false, "时间格式传递不正确");
|
||||
}
|
||||
Assert.notNull(split[0], "开始时间不能为空");
|
||||
Assert.notNull(split[1], "结束时间不能为空");
|
||||
start(split[0], split[1]);
|
||||
}
|
||||
} else if (requestJson != null && ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
if (param != null && !"".equals(param)) {
|
||||
start(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
|
||||
String integrationTaskLivingDetails = (String) requestJson.get("integration_task_living_details_id");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integrationTaskLivingDetails);
|
||||
start(integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||
} else if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(prod)) {
|
||||
//默认
|
||||
start();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("executeBusiness方法抛出异常", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -99,7 +149,20 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO();
|
||||
queryOfsSKURequestVO.setLastUpdated_start(startTimeStr);
|
||||
queryOfsSKURequestVO.setLastUpdated_end(endTimeStr);
|
||||
queryOfsSKUs(queryOfsSKURequestVO);
|
||||
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
||||
if(ofsskuList.size()==0){
|
||||
return;
|
||||
}
|
||||
//分组排序,
|
||||
List<OFSSKUSearchResponse.OFSSKU> sortSkuList = groupAndSort(ofsskuList);
|
||||
|
||||
//过滤日志
|
||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
||||
if(filterSkus.size()==0){
|
||||
return;
|
||||
}
|
||||
//具体实现
|
||||
implement(filterSkus);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -108,17 +171,33 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
/**
|
||||
* 按分类名称
|
||||
* 按sku名称
|
||||
* 存在 编码相同,名称不一样的情况
|
||||
* 先根据code分组,在根据修改时间倒排
|
||||
* 按修改时间倒排,取最新的修改时间
|
||||
*/
|
||||
public void start(String goodsCode) {
|
||||
String[] split = goodsCode.split("_");
|
||||
try {
|
||||
QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO();
|
||||
queryOfsSKURequestVO.setCode(goodsCode);
|
||||
queryOfsSKURequestVO.setCode(split[0]);
|
||||
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
||||
System.out.println(ofsskuList);
|
||||
if(ofsskuList.size()==0){
|
||||
Assert.state(false, "根据OFS SKU主档编码:{},未查询到SKU主档,请检查入参或者OFS SKU主档。", split[0]);
|
||||
}
|
||||
//分组排序,
|
||||
List<OFSSKUSearchResponse.OFSSKU> sortSkuList = groupAndSort(ofsskuList);
|
||||
|
||||
//过滤日志
|
||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
||||
if(filterSkus.size()==0){
|
||||
Assert.state(false, "根据OFS SKU主档编码:{},已被推送成功,请勿重新推送。", split[0]);
|
||||
}
|
||||
//具体实现
|
||||
implement(filterSkus);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:丽知:OFS货品档案--->U8C货品档案,start(String goodsName)方法报错:", e);
|
||||
logger.error("丽知:OFS货品档案--->U8C货品档案,start(String goodsName)方法报错:", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -137,13 +216,246 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
queryOfsSKURequestVO.setLastUpdated_start(start);
|
||||
queryOfsSKURequestVO.setLastUpdated_end(end);
|
||||
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
||||
System.out.println(ofsskuList);
|
||||
if(ofsskuList.size()==0){
|
||||
Assert.state(false,"根据期间:{} - {} 内,未查询到OFS系统中SKU主档信息,请检查。");
|
||||
}
|
||||
//分组排序,
|
||||
List<OFSSKUSearchResponse.OFSSKU> sortSkuList = groupAndSort(ofsskuList);
|
||||
|
||||
//过滤日志
|
||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
||||
if(filterSkus.size()==0){
|
||||
Assert.state(false,"根据期间:{} - {} 内询到OFS系统中SKU主档信息已全部推送,请勿重新推送。");
|
||||
}
|
||||
//具体实现
|
||||
implement(filterSkus);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:丽知:OFS货品档案--->U8C货品档案,start(String startTime, String endTime)方法报错:", e);
|
||||
logger.error("丽知:OFS货品档案--->U8C货品档案,start(String startTime, String endTime)方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤成功日志
|
||||
* rootAppPk
|
||||
* [code]_[lastUpdated]
|
||||
* @param ofsskuList
|
||||
* @return
|
||||
*/
|
||||
public List<OFSSKUSearchResponse.OFSSKU> filterData(List<OFSSKUSearchResponse.OFSSKU> ofsskuList){
|
||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = new ArrayList<>();
|
||||
for (OFSSKUSearchResponse.OFSSKU ofssku : ofsskuList) {
|
||||
String rootAppPk = ofssku.getCode()+"_"+ofssku.getLastUpdated();
|
||||
boolean isExis = true;
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk);
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = iIntegrationTaskLivingDetailsDao.query(integrationTaskLivingDetailsEntity);
|
||||
if (integrationTaskLivingDetailsEntities == null || integrationTaskLivingDetailsEntities.size() == 0) {
|
||||
isExis = false;
|
||||
}
|
||||
if (!isExis) {
|
||||
filterSkus.add(ofssku);
|
||||
}
|
||||
|
||||
}
|
||||
return filterSkus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送
|
||||
* 注意:
|
||||
* 可能一家公司封存则,则取消分配这家公司的存货管理档案
|
||||
*/
|
||||
public void implement(List<OFSSKUSearchResponse.OFSSKU> filterSkus){
|
||||
for (OFSSKUSearchResponse.OFSSKU sku : filterSkus) {
|
||||
|
||||
String PkInvbasdoc= "";
|
||||
String url = "";
|
||||
String mapStr = "";
|
||||
String format = sku.getLastUpdated();
|
||||
String response = "";
|
||||
|
||||
try {
|
||||
InvBasDocVO invbasdoc = new InvBasDocVO();
|
||||
//主表
|
||||
InvBasDocVO.Parent parentvo = new InvBasDocVO.Parent();
|
||||
|
||||
//查询是否存在,返回pkInvbasdoc,如果有则是修改,null则为新增
|
||||
//查询该id再u8c是否有数据,没有则是新增,有则是修改 存货基本档案:def2-》ofs主键
|
||||
PkInvbasdoc=queryInvbasDocIsExist(sku);
|
||||
if (PkInvbasdoc != null) {
|
||||
//修改
|
||||
parentvo.setPk_invbasdoc(PkInvbasdoc);
|
||||
url=OverallConstant.getOverAllValue("bdinvclUpdateCode");
|
||||
} else if (PkInvbasdoc == null) {
|
||||
//新增
|
||||
url=OverallConstant.getOverAllValue("bdinvclSaveCode");
|
||||
}
|
||||
|
||||
//def2 ofs id
|
||||
parentvo.setDef2(sku.getId());
|
||||
//invcode 存货编码
|
||||
parentvo.setInvcode(sku.getCode());
|
||||
//invmnecode 助记码
|
||||
parentvo.setInvmnecode(sku.getCode());
|
||||
//invname 存货名称
|
||||
parentvo.setInvname(sku.getName());
|
||||
//invshortname 存货简称
|
||||
parentvo.setInvshortname(sku.getName());
|
||||
//pk_invcl 分类
|
||||
parentvo.setPk_invcl(sku.getCInvCCode());
|
||||
|
||||
//def1 ofs品牌
|
||||
parentvo.setDef1(sku.getBrandCode());
|
||||
|
||||
//pk_measdoc 主计量单位,ofs没有单位,默认个,20240830万万同意
|
||||
parentvo.setPk_measdoc("EA");
|
||||
|
||||
//pk_taxitems 税率 4001 商业(13 % ) 13.00000000
|
||||
parentvo.setPk_taxitems("4001");
|
||||
|
||||
//creator 创建人
|
||||
parentvo.setCreator("tbadmin");
|
||||
|
||||
//memo 备注
|
||||
parentvo.setMemo(sku.getRemark());
|
||||
|
||||
invbasdoc.setParentvo(parentvo);
|
||||
//子表,暂时没有要传的值
|
||||
String jsonStr = JSONUtil.toJsonStr(invbasdoc);
|
||||
mapStr= "{\"invbasdoc\":" + jsonStr + "}";
|
||||
ZTResult ztResult = pushU8CByApiCode.pushByCode(url, mapStr);
|
||||
//两层判断,一层中台转发,一层u8c返回
|
||||
Attribute attribute = ztResult.getAttribute();
|
||||
|
||||
if ("false".equals(ztResult.getFlag())) {
|
||||
//转发失败
|
||||
response=JSONUtil.toJsonStr(ztResult.getAttribute());
|
||||
Assert.state(false, "丽知:OFS货品档案--->U8C货品档案,中台转发失败,失败原因:{}", ztResult.getAttribute());
|
||||
}
|
||||
boolean isSuccess = false;
|
||||
String invbascode = "";
|
||||
if ("success".equals(attribute.getStatus())) {
|
||||
isSuccess = true;
|
||||
String data = attribute.getData();
|
||||
InvBasDocVO resInvBasDocVO = resultDataHandle(data);
|
||||
invbascode = resInvBasDocVO.getParentvo().getInvcode();
|
||||
}
|
||||
if (!isSuccess) {
|
||||
Assert.state(false, "丽知:OFS货品档案--->U8C货品档案 失败 接口返回结果:{} 接口入参:{}", attribute.getErrormsg(), mapStr);
|
||||
}
|
||||
|
||||
//成功
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
||||
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
|
||||
integrationTaskLivingDetailsEntity.setNewTransmitInfo(attribute.getData());
|
||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk(sku.getCode()+"_"+sku.getLastUpdated());
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(sku.getCode());
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
integrationTaskLivingDetailsEntity.setDef1(sku.getId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.error("推送U8C,丽知:OFS货品档案--->U8C货品档案失败,失败原因:" + e);
|
||||
//失败
|
||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
||||
String ErrMessage = "推送U8C,丽知:OFS货品档案--->U8C货品档案失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
//失败
|
||||
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(sku.getCode()+"_"+sku.getLastUpdated());
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(sku.getCode());
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
integrationTaskLivingDetailsEntity.setDef1(sku.getId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public String queryInvbasDocIsExist(OFSSKUSearchResponse.OFSSKU sku){
|
||||
String PkInvbasdoc="";
|
||||
BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity();
|
||||
bdInvbasdocEntity.setDr(0L);
|
||||
bdInvbasdocEntity.setDef2(sku.getId());
|
||||
bdInvbasdocEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
List<BdInvbasdocEntity> bdInvbasdocEntityList = bdInvbasdocDao.query(bdInvbasdocEntity);//根据ofs id
|
||||
if(bdInvbasdocEntityList.size()==0){
|
||||
bdInvbasdocEntity.setDef2(null);
|
||||
bdInvbasdocEntity.setInvcode(sku.getCode());
|
||||
bdInvbasdocEntity.setInvname(sku.getName());
|
||||
List<BdInvbasdocEntity> bdInvbasdocEntityList1 = bdInvbasdocDao.query(bdInvbasdocEntity);//根据编码+名称
|
||||
if(bdInvbasdocEntityList1.size()==0){
|
||||
bdInvbasdocEntity.setInvname(null);
|
||||
List<BdInvbasdocEntity> bdInvbasdocEntityList2 = bdInvbasdocDao.query(bdInvbasdocEntity);//进查询编码
|
||||
if (bdInvbasdocEntityList2.size() == 0) {//编码不存在
|
||||
return null;
|
||||
} else if (bdInvbasdocEntityList2.size() == 1) {//编码存在
|
||||
PkInvbasdoc=bdInvbasdocEntityList2.get(0).getPkInvbasdoc();//主键
|
||||
}
|
||||
}else if(bdInvbasdocEntityList1.size()==1){
|
||||
//修改
|
||||
PkInvbasdoc=bdInvbasdocEntityList1.get(0).getPkInvbasdoc();//主键
|
||||
}
|
||||
}else if(bdInvbasdocEntityList.size()==1){
|
||||
//修改
|
||||
PkInvbasdoc=bdInvbasdocEntityList.get(0).getPkInvbasdoc();//主键
|
||||
}else {
|
||||
//异常,存在多个
|
||||
Assert.state(false,"SKU主档编码:{},id:{}。U8C存货基本档案def2(OFS中SKU主档id)存在多个,请检查。",sku.getCode(),sku.getId());
|
||||
}
|
||||
return PkInvbasdoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按code分组,并按lastUpdated排序
|
||||
* @param ofsskuList
|
||||
* @return
|
||||
*/
|
||||
public List<OFSSKUSearchResponse.OFSSKU> groupAndSort(List<OFSSKUSearchResponse.OFSSKU> ofsskuList){
|
||||
List<OFSSKUSearchResponse.OFSSKU> sortSkus=new ArrayList<>();
|
||||
|
||||
//根据code进行分组
|
||||
Map<String, List<OFSSKUSearchResponse.OFSSKU>> collectMapByCode =
|
||||
ofsskuList.stream().collect(Collectors.groupingBy(OFSSKUSearchResponse.OFSSKU::getCode));
|
||||
|
||||
collectMapByCode.forEach((k,v)->{
|
||||
//降序排序 (从新到旧),根据最后修改时间倒排
|
||||
List<OFSSKUSearchResponse.OFSSKU> sorted =
|
||||
v.stream().sorted(Comparator.comparing(OFSSKUSearchResponse.OFSSKU::getLastUpdated).reversed()).collect(Collectors.toList());
|
||||
|
||||
//排除status==0的
|
||||
for (int i = 0; i < sorted.size(); i++) {
|
||||
if("0".equals(sorted.get(i).getStatus())){
|
||||
sorted.remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
if(sorted.size()!=0){
|
||||
sortSkus.add(sorted.get(0));//只取最后修改的一个
|
||||
}
|
||||
});
|
||||
return sortSkus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 封存存货基本档案
|
||||
*/
|
||||
public void sealImplement(String code){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询OFS SKU档案
|
||||
* status 0禁用 1启用
|
||||
|
@ -181,6 +493,20 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
private InvBasDocVO resultDataHandle(String resultData) {
|
||||
try {
|
||||
if (resultData != null && !"".equals(resultData)) {
|
||||
if (resultData.contains("[")) {
|
||||
resultData = resultData.substring(1, resultData.length() - 1);
|
||||
}
|
||||
return JSON.parseObject(resultData, InvBasDocVO.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("解析返回参数失败的错误", e);
|
||||
//如果解析失败,记录原因,但是不能影响结果的记录
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -454,7 +454,9 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockinOrderRequestVO));
|
||||
StockinOrderSearchResponse stockinOrderSearchResponse = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
|
||||
if (stockinOrderSearchResponse.getData() == null || stockinOrderSearchResponse.getData().size() == 0) {
|
||||
return null;
|
||||
}
|
||||
all.addAll(stockinOrderSearchResponse.getData());
|
||||
|
||||
int count = stockinOrderSearchResponse.getData().size();
|
||||
|
@ -469,10 +471,8 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
count=stockinOrderSearchResponse1.getData().size();
|
||||
}
|
||||
if (stockinOrderSearchResponse.getData() == null || stockinOrderSearchResponse.getData().size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return stockinOrderSearchResponse.getData();
|
||||
|
||||
return all;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -424,7 +424,9 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockoutOrderRequestVO));
|
||||
SaleOutReturnMessageDto saleOutReturnMessageDto = (SaleOutReturnMessageDto) ofsUnifiedService.unified(interfaceParamDto);
|
||||
StockoutOrderSearchResponse stockoutOrderSearchResponse = SaleOutReturnMessageDto2StockoutOrderSearchResponse(saleOutReturnMessageDto);
|
||||
|
||||
if (stockoutOrderSearchResponse.getData() == null || stockoutOrderSearchResponse.getData().size() == 0) {
|
||||
return null;
|
||||
}
|
||||
all.addAll(stockoutOrderSearchResponse.getData());
|
||||
|
||||
int count = stockoutOrderSearchResponse.getData().size();
|
||||
|
@ -439,9 +441,7 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
all.addAll(stockoutOrderSearchResponse1.getData());
|
||||
count=stockoutOrderSearchResponse1.getData().size();
|
||||
}
|
||||
if (stockoutOrderSearchResponse.getData() == null || stockoutOrderSearchResponse.getData().size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return all;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
package com.hzya.frame.plugin.lets.u8cdto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存货基本档案,推送实体类
|
||||
*/
|
||||
@Data
|
||||
public class InvBasDocVO {
|
||||
private Parent parentvo;
|
||||
private List<Children> childrenvo;
|
||||
|
||||
@Data
|
||||
public static class Parent {
|
||||
private String asset;//设备卡片管理
|
||||
private String assistunit;//辅计量管理
|
||||
private String autobalancemeas;//自动平衡主辅计量
|
||||
private String creator;//创建人
|
||||
private String def1;//自定义项1
|
||||
private String def10;//自定义项10
|
||||
private String def11;//自定义项11
|
||||
private String def12;//自定义项12
|
||||
private String def13;//自定义项13
|
||||
private String def14;//自定义项14
|
||||
private String def15;//自定义项15
|
||||
private String def16;//自定义项16
|
||||
private String def17;//自定义项17
|
||||
private String def18;//自定义项18
|
||||
private String def19;//自定义项19
|
||||
private String def2;//自定义项2
|
||||
private String def20;//自定义项20
|
||||
private String def3;//自定义项3
|
||||
private String def4;//自定义项4
|
||||
private String def5;//自定义项5
|
||||
private String def6;//自定义项6
|
||||
private String def7;//自定义项7
|
||||
private String def8;//自定义项8
|
||||
private String def9;//自定义项9
|
||||
private String discountflag;//价格折扣
|
||||
private String faset;//固定资产管理
|
||||
private String forinvname;//外文名称
|
||||
private String free1;//自由项1
|
||||
private String free2;//自由项2
|
||||
private String free3;//自由项3
|
||||
private String free4;//自由项4
|
||||
private String free5;//自由项5
|
||||
private String graphid;//图号
|
||||
private String height;//高度
|
||||
private String invbarcode;//条形码
|
||||
private String invcode;//存货编码
|
||||
private String invmnecode;//助记码
|
||||
private String invname;//存货名称
|
||||
private String invpinpai;//品牌
|
||||
private String invshortname;//存货简称
|
||||
private String invspec;//规格
|
||||
private String invtype;//型号
|
||||
private String iselectrans;//电子采购
|
||||
private String ismngstockbygrswt;//按毛重管理库存
|
||||
private String isretail;//零售
|
||||
private String isstorebyconvert;//按换算率记结存
|
||||
private String laborflag;//应税劳务
|
||||
private String length;//长度
|
||||
private String memo;//备注
|
||||
private String modifier;//修改人(不传默认 openapi)
|
||||
private String pk_invbasdoc;//存货档案主键pk(修改接口必填)
|
||||
private String pk_invcl;//存货分类
|
||||
private String pk_measdoc;//主计量单位
|
||||
private String pk_measdoc1;//销售默认单位
|
||||
private String pk_measdoc2;//采购默认单位
|
||||
private String pk_measdoc3;//库存默认单位
|
||||
private String pk_measdoc5;//生产默认单位
|
||||
private String pk_measdoc6;//零售计量单位
|
||||
private String pk_prodline;//产品线
|
||||
private String pk_taxitems;//税目
|
||||
private String setpartsflag;//成套件
|
||||
private String shipunitnum;//多少标准运输单位
|
||||
private String storeunitnum;//多少标准存储单位
|
||||
private String unitvolume;//单位体积0
|
||||
private String unitweight;//单位重量0
|
||||
private String weitunitnum;//多少标准重量单位
|
||||
private String width;//宽度
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Children {
|
||||
private String fixedflag;//是否固定换算
|
||||
private String mainmeasrate ;//与主计量单位换算系数
|
||||
private String pk_measdoc;//计量单位
|
||||
private String pk_measdoc_sub;//拆解单位名称
|
||||
private String showorder;//辅计量拆解显示顺序号
|
||||
}
|
||||
}
|
|
@ -25,13 +25,17 @@ public class BaseTest {
|
|||
}
|
||||
@Test
|
||||
public void t01(){
|
||||
skuPluginInitializer.start("6970872643657");
|
||||
}
|
||||
@Test
|
||||
public void t02(){
|
||||
skuPluginInitializer.start("2024-08-28","2024-08-29");
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////SKU自动分配
|
||||
@Test
|
||||
public void t10(){
|
||||
// goodsAutoAllotPluginInitializer.start("0001A210000000000U4C");
|
||||
goodsAutoAllotPluginInitializer.start("SKU001");
|
||||
goodsAutoAllotPluginInitializer.start("6971229882248");
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////SKU分类
|
||||
@Test
|
||||
|
|
|
@ -19,6 +19,7 @@ public class OFSSKUSearchResponse extends ReturnMessageBasics {
|
|||
private String companyCode;
|
||||
private String code;
|
||||
private String name;
|
||||
private String cInvCCode;
|
||||
private String listPrice;
|
||||
private String netPrice;
|
||||
private String msrPrice;
|
||||
|
@ -28,5 +29,36 @@ public class OFSSKUSearchResponse extends ReturnMessageBasics {
|
|||
private String createdBy;
|
||||
private String lastUpdated;
|
||||
private String lastUpdatedBy;
|
||||
private String trackSN;
|
||||
private String brandCode;
|
||||
private String fulfillFacilityCode;
|
||||
private String shelfLife;
|
||||
private String acceptancePeriod;
|
||||
private String daysOfSale;
|
||||
private String shortName;
|
||||
private String StringDesc;
|
||||
private String englishName;
|
||||
private String spuCode;
|
||||
private String color;
|
||||
private String size;
|
||||
private String style;
|
||||
private String daysToExpire;
|
||||
private String daysBeforeExpire;
|
||||
private String skuClass;
|
||||
private String remark;
|
||||
private String countryOfOrigin;
|
||||
private String addressOfOrigin;
|
||||
private String manufacturer;
|
||||
private String hsCode;
|
||||
private String bonded;
|
||||
private String postalTaxRate;
|
||||
private String packType;
|
||||
private String arrivalCycle;
|
||||
private String procurementCycle;
|
||||
private String outsourcedGoods;
|
||||
private String registerCode;
|
||||
private String msrPriceUs;
|
||||
private String auditStatus;
|
||||
private String productionLicense;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue