Merge remote-tracking branch 'origin/lets' into lets
This commit is contained in:
commit
6a08847659
|
@ -40,6 +40,8 @@ public class OverallConstant {
|
|||
//调拨
|
||||
prodOverPublic.put("approveqzCode", "8000370009");//调拨订单保存即审批
|
||||
prodOverPublic.put("approveqz", "/u8cloud/api/to/transorder/saveapprove");//调拨订单保存即审批
|
||||
prodOverPublic.put("approveInqzCode", "8000370054");//调拨入库保存并签字
|
||||
prodOverPublic.put("approveInqz", "/u8cloud/api/ic/allocationIn/save/sign");//调拨入库保存并签字
|
||||
|
||||
//其他出入库
|
||||
prodOverPublic.put("otherinqzCode", "8000370007");//库存其他入库保存即签字
|
||||
|
|
|
@ -16,9 +16,13 @@ public class QueryOfsSKURequestVO {
|
|||
/** 组织 */
|
||||
private String clientCode;
|
||||
|
||||
private String lastUpdated_start;
|
||||
private String lastUpdated_end;
|
||||
|
||||
|
||||
private String companyCode;
|
||||
private int status;
|
||||
private String status;
|
||||
private String code;
|
||||
private int pageNo;
|
||||
private int pageSize;
|
||||
private String pageNo;
|
||||
private String pageSize;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ 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.InterfaceParamByU8CApiDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
|
||||
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -98,8 +99,8 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
// queryOfsSKURequestVO.setCreated_start("2023-10-15 00:00:00");
|
||||
// queryOfsSKURequestVO.setCreated_end("2023-10-21 23:59:59");
|
||||
// queryOfsSKURequestVO.setCompanyCode("");
|
||||
queryOfsSKURequestVO.setPageNo(1);
|
||||
queryOfsSKURequestVO.setPageSize(500);
|
||||
queryOfsSKURequestVO.setPageNo("1");
|
||||
queryOfsSKURequestVO.setPageSize("500");
|
||||
queryOfsSKUs(queryOfsSKURequestVO);
|
||||
|
||||
|
||||
|
@ -134,6 +135,14 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
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";
|
||||
|
||||
QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO();
|
||||
queryOfsSKURequestVO.setLastUpdated_start(start);
|
||||
queryOfsSKURequestVO.setLastUpdated_end(end);
|
||||
queryOfsSKURequestVO.setPageNo("1");
|
||||
queryOfsSKURequestVO.setPageSize("500");
|
||||
queryOfsSKUs(queryOfsSKURequestVO);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:丽知:OFS货品档案--->U8C货品档案,start(String startTime, String endTime)方法报错:", e);
|
||||
}
|
||||
|
@ -141,13 +150,15 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
/**
|
||||
* 查询OFS SKU档案
|
||||
* status 0禁用 1启用
|
||||
*/
|
||||
public void queryOfsSKUs(QueryOfsSKURequestVO queryOfsGoodsRequestVO) throws Exception {
|
||||
InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
|
||||
interfaceParamDto.setApi("ofs.sku.search");
|
||||
queryOfsGoodsRequestVO.setClientCode("LETS");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsGoodsRequestVO));
|
||||
ReturnMessageBasics returnMessageBasics = ofsUnifiedService.unifiedByU8CApi(interfaceParamDto);
|
||||
OFSSKUSearchResponse ofsskuSearchResponse =(OFSSKUSearchResponse) ofsUnifiedService.unifiedByU8CApi(interfaceParamDto);
|
||||
System.out.println(ofsskuSearchResponse);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -201,6 +201,8 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
parentvo.setCustname(shopEntity.getName());
|
||||
parentvo.setCustshortname(shopEntity.getName());
|
||||
|
||||
parentvo.setDef1(shopEntity.getBizCode());
|
||||
|
||||
custdocRequestVo.setParentvo(parentvo);
|
||||
//同步u8c
|
||||
HashMap<String, Object> param = new HashMap<>();
|
||||
|
|
|
@ -202,6 +202,8 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
parentvo.setCustname(supplierEntity.getName());
|
||||
parentvo.setCustshortname(supplierEntity.getName());
|
||||
|
||||
parentvo.setDef1(supplierEntity.getBizCode());
|
||||
|
||||
CustdocEntityDto.setParentvo(parentvo);
|
||||
// 同步u8c
|
||||
HashMap<String, Object> param = new HashMap<>();
|
||||
|
|
|
@ -2,18 +2,36 @@ package com.hzya.frame.plugin.lets.plugin.transfer;
|
|||
|
||||
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.IIcGeneralBDao;
|
||||
import com.hzya.frame.plugin.lets.dao.IIcGeneralHDao;
|
||||
import com.hzya.frame.plugin.lets.dao.IToBillDao;
|
||||
import com.hzya.frame.plugin.lets.entity.IcGeneralBEntity;
|
||||
import com.hzya.frame.plugin.lets.entity.IcGeneralHEntity;
|
||||
import com.hzya.frame.plugin.lets.entity.ToBillEntity;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsTransferOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.BillVO;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO;
|
||||
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.InterfaceParamDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockoutOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -47,12 +65,12 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库)";
|
||||
return "丽知:OFS调拨入库订单--->U8C调拨入库订单(保存签字,关联U8C调拨出库单)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库)";
|
||||
return "丽知:OFS调拨入库订单--->U8C调拨入库订单(保存签字,关联U8C调拨出库单)";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -65,11 +83,22 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
@Autowired
|
||||
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||
@Autowired
|
||||
private PushU8CByApiCode pushU8CByApiCode;
|
||||
@Autowired
|
||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||
|
||||
@Autowired
|
||||
private OfsUnifiedService ofsUnifiedService;
|
||||
|
||||
@Autowired
|
||||
private IToBillDao toBillDao;
|
||||
|
||||
@Autowired
|
||||
private IIcGeneralHDao icGeneralHDao;
|
||||
@Autowired
|
||||
private IIcGeneralBDao icGeneralBDao;
|
||||
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
return null;
|
||||
|
@ -106,7 +135,7 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start()方法报错:", e);
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨入库订单(保存签字,关联U8C调拨出库单),start()方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,15 +147,25 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCode(stockinNo);
|
||||
//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setStatus("900");
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> data = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(data);
|
||||
|
||||
List<StockinOrderSearchResponse.StockinOrder> transferInOrder = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(transferInOrder);
|
||||
if (transferInOrder == null || transferInOrder.size() == 0) {
|
||||
Assert.state(false, "丽知:OFS调拨入库--->U8C调拨入库根据单据号[入库完成]:{},未查询到调拨入库单", stockinNo);
|
||||
}
|
||||
//过滤日志
|
||||
List<StockinOrderSearchResponse.StockinOrder> filterTransferInOrders = filterData(transferInOrder);
|
||||
if (filterTransferInOrders.size() == 0) {
|
||||
Assert.state(false, "丽知:OFS调拨入库--->U8C调拨入库根据单据号[入库完成]:{},该调拨入库单已被推送成功,请勿重新推送", stockinNo);
|
||||
}
|
||||
implement(filterTransferInOrders);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start(String goodsName)方法报错:", e);
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨入库订单(保存签字,关联U8C调拨出库单),start(String goodsName)方法报错:", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -152,12 +191,186 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
System.out.println(data);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start(String startTime, String endTime)方法报错:", e);
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨入库订单(保存签字,关联U8C调拨出库单),start(String startTime, String endTime)方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤成功日志
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<StockinOrderSearchResponse.StockinOrder> filterData(List<StockinOrderSearchResponse.StockinOrder> stockinOrders) {
|
||||
List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders = new ArrayList<>();
|
||||
for (StockinOrderSearchResponse.StockinOrder stockinOrder : stockinOrders) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
|
||||
String rootAppPk = header.getCode();
|
||||
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) {
|
||||
filterStockinOrders.add(stockinOrder);
|
||||
}
|
||||
}
|
||||
return filterStockinOrders;
|
||||
}
|
||||
|
||||
public List<StockinOrderSearchResponse.StockinOrder> queryOfsStockinOrder(QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO) throws Exception {
|
||||
/**
|
||||
* ofs调拨入库推送u8c调拨入库,关联调拨订单。
|
||||
*
|
||||
* 根据ofs调拨订单,可以查询到u8c调拨订单
|
||||
* u8c调拨出库单子表的来源单据号vsourcebillcode(调拨订单号)
|
||||
* @param filterTransferInOrders
|
||||
*/
|
||||
public void implement(List<StockinOrderSearchResponse.StockinOrder> filterTransferInOrders) {
|
||||
for (StockinOrderSearchResponse.StockinOrder transferInOrders : filterTransferInOrders) {
|
||||
System.out.println(transferInOrders);
|
||||
String mapStr = "";
|
||||
String format = "";
|
||||
String response = "";
|
||||
String ofsCode = "";
|
||||
try {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH ofsTransferHeader = transferInOrders.getHeader();
|
||||
|
||||
//ofs调拨订单号
|
||||
String ofsSourceOrderCode = ofsTransferHeader.getSourceOrderCode();
|
||||
//ofs调拨入库单单号
|
||||
ofsCode=ofsTransferHeader.getCode();
|
||||
//ofs最后修改时间,调入时间
|
||||
format=ofsTransferHeader.getLastUpdated();
|
||||
|
||||
GeneralBillVO generalBillVO = new GeneralBillVO();
|
||||
//主表
|
||||
GeneralBillVO.Parentvo parentvo = new GeneralBillVO.Parentvo();
|
||||
//coperatorid 制单人
|
||||
parentvo.setCoperatorid("tbadmin");
|
||||
//cwarehouseid 仓库
|
||||
parentvo.setCwarehouseid(ofsTransferHeader.getFacilityCode());
|
||||
//pk_calbody 库存组织
|
||||
parentvo.setPk_calbody(ofsTransferHeader.getCompanyCode());
|
||||
//pk_corp 公司
|
||||
parentvo.setPk_corp(ofsTransferHeader.getCompanyCode());
|
||||
//pk_defdoc19 自定义项19(ofs调拨订单号)
|
||||
parentvo.setPk_defdoc19(ofsSourceOrderCode);
|
||||
|
||||
|
||||
//U8C调拨订单信息
|
||||
// List<ToBillEntity> toBillEntityList = queryToBillByPkVdefdoc19(ofsSourceOrderCode);
|
||||
//U8C调拨出库单主表信息
|
||||
|
||||
//U8C调拨出库单子表信息
|
||||
|
||||
|
||||
|
||||
List<GeneralBillVO.Childrenvo> ChildrenList = new ArrayList<>();
|
||||
for (StockinOrderSearchResponse.StockinOrder.StockinB ofsTransferDetail : transferInOrders.getDetails()) {
|
||||
GeneralBillVO.Childrenvo childrenvo = new GeneralBillVO.Childrenvo();
|
||||
|
||||
|
||||
|
||||
ChildrenList.add(childrenvo);
|
||||
}
|
||||
generalBillVO.setParentvo(parentvo);
|
||||
generalBillVO.setChildrenvo(ChildrenList);
|
||||
|
||||
|
||||
mapStr = "{\"GeneralBillVO\":[" + JSONUtil.toJsonStr(generalBillVO) + "]}";
|
||||
ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("approveqzCode"), mapStr);
|
||||
System.out.println(ztResult);
|
||||
//两层判断,一层中台转发,一层u8c返回
|
||||
if ("false".equals(ztResult.getFlag())) {
|
||||
//转发失败
|
||||
Assert.state(false, "丽知:OFS调拨出库订单--->U8C调拨订单,自动生成调拨出库单(保存签字).中台转发失败,失败原因:{}", ztResult.getMsg());
|
||||
}
|
||||
Attribute attribute = ztResult.getAttribute();
|
||||
System.out.println(attribute);
|
||||
boolean isSuccess = false;
|
||||
String vbillcode = "";
|
||||
if ("success".equals(attribute.getStatus())) {
|
||||
isSuccess = true;
|
||||
String data = attribute.getData();
|
||||
GeneralBillVO generalBill = resultDataHandle(data);
|
||||
System.out.println(generalBill);
|
||||
vbillcode = generalBill.getParentvo().getVbillcode();
|
||||
}
|
||||
if (!isSuccess) {
|
||||
Assert.state(false, "推送U8C--> 丽知:OFS调整出库--->U8C其它出库 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
|
||||
}
|
||||
|
||||
//成功
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
||||
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
|
||||
integrationTaskLivingDetailsEntity.setNewTransmitInfo(response);
|
||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setDef1(vbillcode);
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////关联上游单据
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////关联上游单据
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.error("推送U8C,丽知:OFS调拨入库订单--->U8C调拨入库订单(保存签字,关联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(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private GeneralBillVO resultDataHandle(String resultData) {
|
||||
try {
|
||||
if (resultData != null && !"".equals(resultData)) {
|
||||
if (resultData.contains("[")) {
|
||||
resultData = resultData.substring(1, resultData.length() - 1);
|
||||
}
|
||||
return JSON.parseObject(resultData, GeneralBillVO.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("解析返回参数失败的错误", e);
|
||||
//如果解析失败,记录原因,但是不能影响结果的记录
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询ofs调拨入库单
|
||||
* @param queryOfsStockinOrderRequestVO
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<StockinOrderSearchResponse.StockinOrder> queryOfsStockinOrder(QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO) throws Exception {
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.receipt.search");
|
||||
queryOfsStockinOrderRequestVO.setInternalInstructionType("TRANSFER");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
|
@ -165,17 +378,67 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockinOrderRequestVO));
|
||||
StockinOrderSearchResponse stockinOrderSearchResponse = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(stockinOrderSearchResponse);
|
||||
if(stockinOrderSearchResponse.getData()==null||stockinOrderSearchResponse.getData().size()==0){
|
||||
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;
|
||||
return stockinOrderSearchResponse.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单号查询调拨单 to_bill 单据主表 单据
|
||||
*
|
||||
* @param vcode
|
||||
*/
|
||||
public List<ToBillEntity> queryToBillByVCode(String vcode) {
|
||||
ToBillEntity toBillEntity = new ToBillEntity();
|
||||
toBillEntity.setVcode(vcode);
|
||||
toBillEntity.setCbilltype("5X");
|
||||
List<ToBillEntity> toBillEntityList = toBillDao.queryToBillEntity(toBillEntity);
|
||||
return toBillEntityList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据自定义项19(ofs调拨订单单号),查询u8c调拨订单
|
||||
* @param pkDefdoc19
|
||||
* @return
|
||||
*/
|
||||
public List<ToBillEntity> queryToBillByPkVdefdoc19(String pkDefdoc19) {
|
||||
ToBillEntity toBillEntity = new ToBillEntity();
|
||||
toBillEntity.setPkDefdoc19(pkDefdoc19);
|
||||
toBillEntity.setCbilltype("5X");
|
||||
toBillEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
List<ToBillEntity> toBillEntityList = toBillDao.query(toBillEntity);
|
||||
return toBillEntityList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据调拨出库单主表自定义项19(ofs调拨订单号)查询调拨出库单主表
|
||||
*/
|
||||
public List<IcGeneralHEntity> queryIcGeneralHByPkVdefdoc19(String pkDefdoc19){
|
||||
IcGeneralHEntity icGeneralHEntity = new IcGeneralHEntity();
|
||||
icGeneralHEntity.setDr(0);
|
||||
icGeneralHEntity.setPkDefdoc19(pkDefdoc19);
|
||||
icGeneralHEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
List<IcGeneralHEntity> icGeneralHEntityList = icGeneralHDao.query(icGeneralHEntity);
|
||||
if (icGeneralHEntityList==null||icGeneralHEntityList.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return icGeneralHEntityList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据调拨出库单主表主键,查询调拨出库单子表
|
||||
*/
|
||||
public List<IcGeneralBEntity> queryIcGeneralBByVsourcebillcode(String vsourcebillcode){
|
||||
IcGeneralBEntity icGeneralBEntity = new IcGeneralBEntity();
|
||||
icGeneralBEntity.setDr(0);
|
||||
icGeneralBEntity.setVsourcebillcode(vsourcebillcode);
|
||||
icGeneralBEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
List<IcGeneralBEntity> icGeneralBEntityList = icGeneralBDao.query(icGeneralBEntity);
|
||||
if (icGeneralBEntityList==null||icGeneralBEntityList.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return icGeneralBEntityList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
////////////////////////////////////////////////////////////////////////////////ofs调拨订单
|
||||
|
||||
|
||||
//创建日期
|
||||
//创建日期,调拨出库创建时间
|
||||
String created = stockoutH.getCreated();
|
||||
format = created;
|
||||
//dbilldate 单据日期
|
||||
|
@ -271,7 +271,7 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
parentvo.setVnote(ofsTranseferOrder.getHeader().getNotes());
|
||||
|
||||
//pk_defdoc19
|
||||
parentvo.setPk_defdoc19(StringUtils.substring(ofsTranseferOrder.getHeader().getCode(),5));
|
||||
parentvo.setPk_defdoc19(ofsTranseferOrder.getHeader().getCode());
|
||||
|
||||
//子表
|
||||
List<OFSTranseferOrderSearchResponse.OFSTranseferOrder.OFSTranseferB> ofsDetails = ofsTranseferOrder.getDetails();
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
package com.hzya.frame.plugin.lets.u8cdto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入库单实体
|
||||
*
|
||||
* @Author zyd
|
||||
*/
|
||||
@Data
|
||||
public class GeneralBillVO {
|
||||
private Parentvo parentvo;
|
||||
private List<Childrenvo> childrenvo;
|
||||
|
||||
public static class Parentvo{
|
||||
@Data
|
||||
public static class Parentvo {
|
||||
/**
|
||||
* 单据号
|
||||
*/
|
||||
|
@ -49,80 +54,30 @@ public class GeneralBillVO {
|
|||
* 备注
|
||||
*/
|
||||
private String vnote;
|
||||
|
||||
public String getVbillcode() {
|
||||
return vbillcode;
|
||||
}
|
||||
|
||||
public void setVbillcode(String vbillcode) {
|
||||
this.vbillcode = vbillcode;
|
||||
}
|
||||
|
||||
public String getCbilltypecode() {
|
||||
return cbilltypecode;
|
||||
}
|
||||
|
||||
public void setCbilltypecode(String cbilltypecode) {
|
||||
this.cbilltypecode = cbilltypecode;
|
||||
}
|
||||
|
||||
public String getPk_calbody() {
|
||||
return pk_calbody;
|
||||
}
|
||||
|
||||
public void setPk_calbody(String pk_calbody) {
|
||||
this.pk_calbody = pk_calbody;
|
||||
}
|
||||
|
||||
public String getIsautopick() {
|
||||
return isautopick;
|
||||
}
|
||||
|
||||
public void setIsautopick(String isautopick) {
|
||||
this.isautopick = isautopick;
|
||||
}
|
||||
|
||||
public String getPk_corp() {
|
||||
return pk_corp;
|
||||
}
|
||||
|
||||
public void setPk_corp(String pk_corp) {
|
||||
this.pk_corp = pk_corp;
|
||||
}
|
||||
|
||||
public String getCoperatorid() {
|
||||
return coperatorid;
|
||||
}
|
||||
|
||||
public void setCoperatorid(String coperatorid) {
|
||||
this.coperatorid = coperatorid;
|
||||
}
|
||||
|
||||
public String getCdispatcherid() {
|
||||
return cdispatcherid;
|
||||
}
|
||||
|
||||
public void setCdispatcherid(String cdispatcherid) {
|
||||
this.cdispatcherid = cdispatcherid;
|
||||
}
|
||||
|
||||
public String getCwarehouseid() {
|
||||
return cwarehouseid;
|
||||
}
|
||||
|
||||
public void setCwarehouseid(String cwarehouseid) {
|
||||
this.cwarehouseid = cwarehouseid;
|
||||
}
|
||||
|
||||
public String getVnote() {
|
||||
return vnote;
|
||||
}
|
||||
|
||||
public void setVnote(String vnote) {
|
||||
this.vnote = vnote;
|
||||
}
|
||||
private String pk_defdoc1;
|
||||
private String pk_defdoc10;
|
||||
private String pk_defdoc11;
|
||||
private String pk_defdoc12;
|
||||
private String pk_defdoc13;
|
||||
private String pk_defdoc14;
|
||||
private String pk_defdoc15;
|
||||
private String pk_defdoc16;
|
||||
private String pk_defdoc17;
|
||||
private String pk_defdoc18;
|
||||
private String pk_defdoc19;
|
||||
private String pk_defdoc2;
|
||||
private String pk_defdoc20;
|
||||
private String pk_defdoc3;
|
||||
private String pk_defdoc4;
|
||||
private String pk_defdoc5;
|
||||
private String pk_defdoc6;
|
||||
private String pk_defdoc7;
|
||||
private String pk_defdoc8;
|
||||
private String pk_defdoc9;
|
||||
}
|
||||
public static class Childrenvo{
|
||||
|
||||
@Data
|
||||
public static class Childrenvo {
|
||||
/**
|
||||
* 存货ID
|
||||
*/
|
||||
|
@ -176,125 +131,6 @@ public class GeneralBillVO {
|
|||
*/
|
||||
private String vnotebody;
|
||||
|
||||
public String getNshouldinnum() {
|
||||
return nshouldinnum;
|
||||
}
|
||||
|
||||
public void setNshouldinnum(String nshouldinnum) {
|
||||
this.nshouldinnum = nshouldinnum;
|
||||
}
|
||||
|
||||
public String getCsourcebillhid() {
|
||||
return csourcebillhid;
|
||||
}
|
||||
|
||||
public void setCsourcebillhid(String csourcebillhid) {
|
||||
this.csourcebillhid = csourcebillhid;
|
||||
}
|
||||
|
||||
public String getCsourcebillbid() {
|
||||
return csourcebillbid;
|
||||
}
|
||||
|
||||
public void setCsourcebillbid(String csourcebillbid) {
|
||||
this.csourcebillbid = csourcebillbid;
|
||||
}
|
||||
|
||||
public String getVbatchcode() {
|
||||
return vbatchcode;
|
||||
}
|
||||
|
||||
public void setVbatchcode(String vbatchcode) {
|
||||
this.vbatchcode = vbatchcode;
|
||||
}
|
||||
|
||||
public String getNoutnum() {
|
||||
return noutnum;
|
||||
}
|
||||
|
||||
public void setNoutnum(String noutnum) {
|
||||
this.noutnum = noutnum;
|
||||
}
|
||||
|
||||
public String getCinventoryid() {
|
||||
return cinventoryid;
|
||||
}
|
||||
|
||||
public String getCrowno() {
|
||||
return crowno;
|
||||
}
|
||||
|
||||
public String getVsourcerowno() {
|
||||
return vsourcerowno;
|
||||
}
|
||||
|
||||
public void setVsourcerowno(String vsourcerowno) {
|
||||
this.vsourcerowno = vsourcerowno;
|
||||
}
|
||||
|
||||
public String getNinnum() {
|
||||
return ninnum;
|
||||
}
|
||||
|
||||
public void setNinnum(String ninnum) {
|
||||
this.ninnum = ninnum;
|
||||
}
|
||||
|
||||
public void setCrowno(String crowno) {
|
||||
this.crowno = crowno;
|
||||
|
||||
}
|
||||
|
||||
public void setCinventoryid(String cinventoryid) {
|
||||
this.cinventoryid = cinventoryid;
|
||||
}
|
||||
|
||||
public String getVsourcebillcode() {
|
||||
return vsourcebillcode;
|
||||
}
|
||||
|
||||
public void setVsourcebillcode(String vsourcebillcode) {
|
||||
this.vsourcebillcode = vsourcebillcode;
|
||||
}
|
||||
|
||||
public String getCsourcetype() {
|
||||
return csourcetype;
|
||||
}
|
||||
|
||||
public void setCsourcetype(String csourcetype) {
|
||||
this.csourcetype = csourcetype;
|
||||
}
|
||||
|
||||
public String getNshouldoutnum() {
|
||||
return nshouldoutnum;
|
||||
}
|
||||
|
||||
public void setNshouldoutnum(String nshouldoutnum) {
|
||||
this.nshouldoutnum = nshouldoutnum;
|
||||
}
|
||||
|
||||
public String getVnotebody() {
|
||||
return vnotebody;
|
||||
}
|
||||
|
||||
public void setVnotebody(String vnotebody) {
|
||||
this.vnotebody = vnotebody;
|
||||
}
|
||||
}
|
||||
|
||||
public Parentvo getParentvo() {
|
||||
return parentvo;
|
||||
}
|
||||
|
||||
public void setParentvo(Parentvo parentvo) {
|
||||
this.parentvo = parentvo;
|
||||
}
|
||||
|
||||
public List<Childrenvo> getChildrenvo() {
|
||||
return childrenvo;
|
||||
}
|
||||
|
||||
public void setChildrenvo(List<Childrenvo> childrenvo) {
|
||||
this.childrenvo = childrenvo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,10 @@ public class BaseTest {
|
|||
public void t00(){
|
||||
skuPluginInitializer.start();
|
||||
}
|
||||
@Test
|
||||
public void t01(){
|
||||
skuPluginInitializer.start("2024-08-20","2024-08-20");
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////SKU自动分配
|
||||
@Test
|
||||
public void t10(){
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TransferTest {
|
|||
|
||||
@Test
|
||||
public void t10(){
|
||||
transferOutPluginInitializer.start("LETS-SH2024081400000001");
|
||||
transferOutPluginInitializer.start("LETS-SH2024082000000005");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -55,7 +55,7 @@ public class TransferTest {
|
|||
}
|
||||
@Test
|
||||
public void t21(){
|
||||
transferInPluginInitializer.start("LETS-RE2024081900000002");
|
||||
transferInPluginInitializer.start("LETS-RE2024082000000006");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.hzya.frame.ttxofs.dto.ofsBaseSearch;
|
|||
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -15,19 +14,19 @@ public class OFSSKUSearchResponse extends ReturnMessageBasics {
|
|||
|
||||
@Data
|
||||
public static class OFSSKU{
|
||||
private int id;
|
||||
private String id;
|
||||
private String clientCode;
|
||||
private String companyCode;
|
||||
private String code;
|
||||
private String name;
|
||||
private int listPrice;
|
||||
private int netPrice;
|
||||
private int msrPrice;
|
||||
private int buyPrice;
|
||||
private int status;
|
||||
private Date created;
|
||||
private String listPrice;
|
||||
private String netPrice;
|
||||
private String msrPrice;
|
||||
private String buyPrice;
|
||||
private String status;
|
||||
private String created;
|
||||
private String createdBy;
|
||||
private Date lastUpdated;
|
||||
private String lastUpdated;
|
||||
private String lastUpdatedBy;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue