Merge remote-tracking branch 'origin/lets' into lets

This commit is contained in:
sx 2024-08-16 17:37:12 +08:00
commit d37e3d4b6f
32 changed files with 841 additions and 761 deletions

View File

@ -41,7 +41,9 @@ public class OverallConstant {
prodOverPublic.put("approveqz", "/u8cloud/api/to/transorder/saveapprove");//调拨订单保存即审批 prodOverPublic.put("approveqz", "/u8cloud/api/to/transorder/saveapprove");//调拨订单保存即审批
//其他出入库 //其他出入库
prodOverPublic.put("otherinqzCode", "8000370007");//库存其他入库保存即签字
prodOverPublic.put("otherinqz", "/u8cloud/api/ic/otherin/save/sign");//库存其他入库保存即签字 prodOverPublic.put("otherinqz", "/u8cloud/api/ic/otherin/save/sign");//库存其他入库保存即签字
prodOverPublic.put("otheroutqzCode", "8000370008");//库存其他出库保存即签字
prodOverPublic.put("otheroutqz", "/u8cloud/api/ic/otherout/save/sign");//库存其他出库保存即签字 prodOverPublic.put("otheroutqz", "/u8cloud/api/ic/otherout/save/sign");//库存其他出库保存即签字
@ -58,12 +60,12 @@ public class OverallConstant {
} }
private static void loadDev() { private static void loadDev() {
devOverAll.put("u8cApiUrl", "http://39.170.109.90:9099");//测试U8C
devOverAll.put("u8cApiUsercodePK", "admin"); devOverAll.put("u8cApiUsercodePK", "admin");
devOverAll.put("u8cApiPasswordPK", "21232f297a57a5a743894a0e4a801fc3"); devOverAll.put("u8cApiPasswordPK", "21232f297a57a5a743894a0e4a801fc3");
devOverAll.put("u8cApiTrantypePK", "pk"); devOverAll.put("u8cApiTrantypePK", "pk");
devOverAll.put("u8cApiSystemPK", "lz"); devOverAll.put("u8cApiSystemPK", "lz");
devOverAll.put("u8cApiServiceNamePK", "http://39.170.109.90:9099");//测试U8C
devOverAll.put("u8cApiNeedStackTracePK", "Y"); devOverAll.put("u8cApiNeedStackTracePK", "Y");
devOverAll.put("u8cApiZdrPK", "0001A210000000000GVS");//单据制单人---测试环境郑一凡 devOverAll.put("u8cApiZdrPK", "0001A210000000000GVS");//单据制单人---测试环境郑一凡
@ -71,7 +73,6 @@ public class OverallConstant {
devOverAll.put("u8cApiPasswordCode", "e00cf25ad42683b3df678c61f42c6bda"); devOverAll.put("u8cApiPasswordCode", "e00cf25ad42683b3df678c61f42c6bda");
devOverAll.put("u8cApiTrantypeCode", "code"); devOverAll.put("u8cApiTrantypeCode", "code");
devOverAll.put("u8cApiSystemCode", "lz1"); devOverAll.put("u8cApiSystemCode", "lz1");
devOverAll.put("u8cApiServiceNameCode", "http://39.170.109.90:9099");//测试U8C
devOverAll.put("u8cApiNeedStackTraceCode", "Y"); devOverAll.put("u8cApiNeedStackTraceCode", "Y");
devOverAll.put("u8cApiZdrCode", "15932295350");//单据制单人---测试环境郑一凡 devOverAll.put("u8cApiZdrCode", "15932295350");//单据制单人---测试环境郑一凡

View File

@ -1,6 +1,8 @@
package com.hzya.frame.plugin.lets.ofs.entity; package com.hzya.frame.plugin.lets.ofs.entity;
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchHeaderDto;
import com.hzya.frame.web.entity.BaseEntity; import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/** /**
* root(TocofsReturngoodsDetailed)实体类 * root(TocofsReturngoodsDetailed)实体类
@ -8,6 +10,7 @@ import com.hzya.frame.web.entity.BaseEntity;
* @author makejava * @author makejava
* @since 2024-08-09 13:45:47 * @since 2024-08-09 13:45:47
*/ */
@Data
public class TocofsReturngoodsDetailedEntity extends BaseEntity { public class TocofsReturngoodsDetailedEntity extends BaseEntity {
/** /**
* 81159 * 81159
@ -156,301 +159,4 @@ public class TocofsReturngoodsDetailedEntity extends BaseEntity {
// private String returngoodsId; // private String returngoodsId;
private String businessType; private String businessType;
public String getBusinessType() {
return businessType;
}
public void setBusinessType(String businessType) {
this.businessType = businessType;
}
public String getReceiptId() {
return receiptId;
}
public void setReceiptId(String receiptId) {
this.receiptId = receiptId;
}
public String getReceiptCode() {
return receiptCode;
}
public void setReceiptCode(String receiptCode) {
this.receiptCode = receiptCode;
}
public String getRefOrderId() {
return refOrderId;
}
public void setRefOrderId(String refOrderId) {
this.refOrderId = refOrderId;
}
public String getRefOrderDetailId() {
return refOrderDetailId;
}
public void setRefOrderDetailId(String refOrderDetailId) {
this.refOrderDetailId = refOrderDetailId;
}
public String getSourceOrderCode() {
return sourceOrderCode;
}
public void setSourceOrderCode(String sourceOrderCode) {
this.sourceOrderCode = sourceOrderCode;
}
public String getClientCode() {
return clientCode;
}
public void setClientCode(String clientCode) {
this.clientCode = clientCode;
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getFacilityCode() {
return facilityCode;
}
public void setFacilityCode(String facilityCode) {
this.facilityCode = facilityCode;
}
public String getSkuCode() {
return skuCode;
}
public void setSkuCode(String skuCode) {
this.skuCode = skuCode;
}
public String getSkuName() {
return skuName;
}
public void setSkuName(String skuName) {
this.skuName = skuName;
}
public String getRequestQty() {
return requestQty;
}
public void setRequestQty(String requestQty) {
this.requestQty = requestQty;
}
public String getReceivedQty() {
return receivedQty;
}
public void setReceivedQty(String receivedQty) {
this.receivedQty = receivedQty;
}
public String getOpenQty() {
return openQty;
}
public void setOpenQty(String openQty) {
this.openQty = openQty;
}
public String getQuantityUM() {
return quantityUM;
}
public void setQuantityUM(String quantityUM) {
this.quantityUM = quantityUM;
}
public String getTotalWeight() {
return totalWeight;
}
public void setTotalWeight(String totalWeight) {
this.totalWeight = totalWeight;
}
public String getTotalVolume() {
return totalVolume;
}
public void setTotalVolume(String totalVolume) {
this.totalVolume = totalVolume;
}
public String getTotalVolumeWeight() {
return totalVolumeWeight;
}
public void setTotalVolumeWeight(String totalVolumeWeight) {
this.totalVolumeWeight = totalVolumeWeight;
}
public String getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(String totalAmount) {
this.totalAmount = totalAmount;
}
public String getWeightUM() {
return weightUM;
}
public void setWeightUM(String weightUM) {
this.weightUM = weightUM;
}
public String getVolumeUM() {
return volumeUM;
}
public void setVolumeUM(String volumeUM) {
this.volumeUM = volumeUM;
}
public String getInventorySts() {
return inventorySts;
}
public void setInventorySts(String inventorySts) {
this.inventorySts = inventorySts;
}
public String getInTransInvId() {
return inTransInvId;
}
public void setInTransInvId(String inTransInvId) {
this.inTransInvId = inTransInvId;
}
public String getClosed() {
return closed;
}
public void setClosed(String closed) {
this.closed = closed;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getLastUpdated() {
return lastUpdated;
}
public void setLastUpdated(String lastUpdated) {
this.lastUpdated = lastUpdated;
}
public String getLastUpdatedBy() {
return lastUpdatedBy;
}
public void setLastUpdatedBy(String lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy;
}
public String getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(String discountPrice) {
this.discountPrice = discountPrice;
}
public String getNewTransmitinfo() {
return newTransmitinfo;
}
public void setNewTransmitinfo(String newTransmitinfo) {
this.newTransmitinfo = newTransmitinfo;
}
public String getNewPushdate() {
return newPushdate;
}
public void setNewPushdate(String newPushdate) {
this.newPushdate = newPushdate;
}
public String getNewState() {
return newState;
}
public void setNewState(String newState) {
this.newState = newState;
}
public String getNewSystemNumber() {
return newSystemNumber;
}
public void setNewSystemNumber(String newSystemNumber) {
this.newSystemNumber = newSystemNumber;
}
public String getNewSystemPrimary() {
return newSystemPrimary;
}
public void setNewSystemPrimary(String newSystemPrimary) {
this.newSystemPrimary = newSystemPrimary;
}
public String getPrimaryKey() {
return primaryKey;
}
public void setPrimaryKey(String primaryKey) {
this.primaryKey = primaryKey;
}
public String getBusinessDate() {
return businessDate;
}
public void setBusinessDate(String businessDate) {
this.businessDate = businessDate;
}
// public String getReturngoodsId() {
// return returngoodsId;
// }
//
// public void setReturngoodsId(String returngoodsId) {
// this.returngoodsId = returngoodsId;
// }
} }

View File

@ -0,0 +1,23 @@
package com.hzya.frame.plugin.lets.ofsvo;
import lombok.Data;
/**
* OFS SKU分类查询请求类
*/
@Data
public class QueryOfsSKUClassRequestVO {
/** 开始时间 */
private String created_start;
/** 结束时间 */
private String created_end;
/** 组织 */
private String clientCode;
private String companyCode;
private String cInvCCode;
private String status;
private String code;
private int pageNo;
private int pageSize;
}

View File

@ -34,4 +34,8 @@ public class QueryOfsSoSaleOutVo {
private String shipAt_start; private String shipAt_start;
private String shipAt_end; private String shipAt_end;
private String closedAt_start;
private String closedAt_end;
} }

View File

@ -14,6 +14,8 @@ public class QueryOfsStockoutOrderRequestVO {
private String closedAt_start; private String closedAt_start;
private String closedAt_end; private String closedAt_end;
private String shipAt_start;
private String shipAt_end;
/** 组织 */ /** 组织 */
private String clientCode; private String clientCode;

View File

@ -14,15 +14,20 @@ import com.hzya.frame.plugin.lets.entity.BdRdclEntity;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
import com.hzya.frame.plugin.lets.u8cdto.BillVO; import com.hzya.frame.plugin.lets.u8cdto.BillVO;
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4ADto; import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4ADto;
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto;
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto; import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil; import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil; 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.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
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.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -72,6 +77,8 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
@Autowired @Autowired
private PushDataByU8cUtil pushDataByU8cUtil; private PushDataByU8cUtil pushDataByU8cUtil;
@Autowired @Autowired
private PushU8CByApiCode pushU8CByApiCode;
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil; private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Autowired @Autowired
@ -82,6 +89,38 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { 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; return null;
} }
@ -101,8 +140,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO(); QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
queryOfsStockinOrderRequestVO.setCreated_start(startTimeStr); queryOfsStockinOrderRequestVO.setCreated_start(startTimeStr);
queryOfsStockinOrderRequestVO.setCreated_end(endTimeStr); queryOfsStockinOrderRequestVO.setCreated_end(endTimeStr);
queryOfsStockinOrderRequestVO.setCompanyCode("SHLZ"); queryOfsStockinOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
queryOfsStockinOrderRequestVO.setPageNo(1L); queryOfsStockinOrderRequestVO.setPageNo(1L);
queryOfsStockinOrderRequestVO.setPageSize(500L); queryOfsStockinOrderRequestVO.setPageSize(500L);
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO); List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
@ -133,23 +171,21 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
try { try {
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO(); QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
queryOfsStockinOrderRequestVO.setCreated_start("2024-08-12 00:00:00");
queryOfsStockinOrderRequestVO.setCreated_end("2024-08-13 23:59:59");
queryOfsStockinOrderRequestVO.setCode(stockinNo); queryOfsStockinOrderRequestVO.setCode(stockinNo);
queryOfsStockinOrderRequestVO.setCompanyCode("SHLZ"); // queryOfsStockinOrderRequestVO.setCompanyCode("SHLZ");
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库 queryOfsStockinOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
queryOfsStockinOrderRequestVO.setPageNo(1L); queryOfsStockinOrderRequestVO.setPageNo(1L);
queryOfsStockinOrderRequestVO.setPageSize(500L); queryOfsStockinOrderRequestVO.setPageSize(500L);
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO); List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
System.out.println(stockinOrders); System.out.println(stockinOrders);
if (stockinOrders.size() == 0) { if (stockinOrders.size() == 0) {
return; Assert.state(false, "丽知OFS调整入库--->U8C其它入库根据单据号[入库完成]{},未查询到调整出库单", stockinNo);
} }
//过滤日志 //过滤日志
List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders = filterData(stockinOrders); List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders = filterData(stockinOrders);
if (filterStockinOrders.size() == 0) { if (filterStockinOrders.size() == 0) {
return; Assert.state(false, "丽知OFS调整入库--->U8C其它入库根据单据号[入库完成]{},该调整出库单已被推送成功,请勿重新推送", stockinNo);
} }
//推送 //推送
@ -174,20 +210,19 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO(); QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
queryOfsStockinOrderRequestVO.setCreated_start(start); queryOfsStockinOrderRequestVO.setCreated_start(start);
queryOfsStockinOrderRequestVO.setCreated_end(end); queryOfsStockinOrderRequestVO.setCreated_end(end);
queryOfsStockinOrderRequestVO.setCompanyCode("SHOFF"); queryOfsStockinOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
queryOfsStockinOrderRequestVO.setPageNo(1L); queryOfsStockinOrderRequestVO.setPageNo(1L);
queryOfsStockinOrderRequestVO.setPageSize(500L); queryOfsStockinOrderRequestVO.setPageSize(500L);
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO); List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
System.out.println(stockinOrders); System.out.println(stockinOrders);
if (stockinOrders.size() == 0) { if (stockinOrders.size() == 0) {
return; Assert.state(false, "丽知OFS调整入库--->U8C其它入库根据日期期间[开始时间]-[结束时间]{}-{},未查询到调整入库单[入库完成]", startTime, endTime);
} }
//过滤日志 //过滤日志
List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders = filterData(stockinOrders); List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders = filterData(stockinOrders);
if (filterStockinOrders.size() == 0) { if (filterStockinOrders.size() == 0) {
return; Assert.state(false, "丽知OFS调整入库--->U8C其它入库根据日期期间[开始时间]-[结束时间]{}-{},该调期间整入库单[入库完成]已被推送成功,请勿重新推送", startTime, endTime);
} }
//推送 //推送
@ -227,6 +262,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
/** /**
* 推送U8C其它入库单 * 推送U8C其它入库单
*
* @param filterStockinOrders * @param filterStockinOrders
*/ */
public void implement(List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders) { public void implement(List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders) {
@ -255,14 +291,15 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
//vnote--备注 //vnote--备注
parentvo.setVnote(ofsHeader.getNote()); parentvo.setVnote(ofsHeader.getNote());
//dbilldate--单据日期--oms入库时间 //dbilldate--单据日期--oms入库时间
Date created = ofsHeader.getCreated(); // Date created = ofsHeader.getCreated();
format = DateUtil.format(created, "yyyy-MM-dd HH:mm:ss"); // format = DateUtil.format(created, "yyyy-MM-dd HH:mm:ss");
parentvo.setDbilldate(format); format = ofsHeader.getCreated();
parentvo.setDbilldate(StringUtils.substring(format, 0, 10));
//coperatorid--制单人 //coperatorid--制单人
String createdBy = ofsHeader.getCreatedBy(); String createdBy = ofsHeader.getCreatedBy();
parentvo.setCoperatorid("tbadmin"); parentvo.setCoperatorid("tbadmin");
//审核时间dauditdate //审核时间dauditdate
parentvo.setDauditdate(format); parentvo.setDauditdate(StringUtils.substring(format, 0, 10));
//cdispatcherid--收发类别ofs过来的写死20240813妮姐+万万就是调整出库调整入库 //cdispatcherid--收发类别ofs过来的写死20240813妮姐+万万就是调整出库调整入库
BdRdclEntity bdRdclEntity = new BdRdclEntity(); BdRdclEntity bdRdclEntity = new BdRdclEntity();
@ -302,20 +339,26 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
mapStr = "{\"GeneralBillVO_4A\":[" + dataJson + "]}"; mapStr = "{\"GeneralBillVO_4A\":[" + dataJson + "]}";
//推送 //推送
response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otherinqz"), mapStr); // response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otherinqz"), mapStr);
System.out.println(response); ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("otherinqzCode"), mapStr);
//两层判断,一层中台转发,一层u8c返回
if ("false".equals(ztResult.getFlag())) {
//转发失败
Assert.state(false, "丽知OFS调整入库--->U8C其它入库.中台转发失败,失败原因:{}", ztResult.getMsg());
}
Attribute attribute = ztResult.getAttribute();
System.out.println(attribute);
boolean isSuccess = false; boolean isSuccess = false;
String vbillcode = ""; String vbillcode = "";
if (response != null && !"".equals(response)) { if ("success".equals(attribute.getStatus())) {
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
if ("success".equals(reusltStrDto.getStatus())) {
isSuccess = true; isSuccess = true;
String data = reusltStrDto.getData(); String data = attribute.getData();
GeneralBillVO_4ADto resGeneralBillVO = resultDataHandle(data); GeneralBillVO_4ADto resGeneralBillVO = resultDataHandle(data);
System.out.println(resGeneralBillVO); System.out.println(resGeneralBillVO);
vbillcode = resGeneralBillVO.getParentvo().getVbillcode(); vbillcode = resGeneralBillVO.getParentvo().getVbillcode();
} }
}
if (!isSuccess) { if (!isSuccess) {
Assert.state(false, "推送U8C--> 丽知OFS调整入库--->U8C其它入库 失败 接口返回结果:{} 接口入参:{}", response, mapStr); Assert.state(false, "推送U8C--> 丽知OFS调整入库--->U8C其它入库 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
} }
@ -328,7 +371,9 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
integrationTaskLivingDetailsEntity.setNewPushDate(new Date()); integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(format); integrationTaskLivingDetailsEntity.setBusinessDate(format);
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode); integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
integrationTaskLivingDetailsEntity.setRootAppBill(vbillcode);//u8c调拨订单号 integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
integrationTaskLivingDetailsEntity.setRootAppBill(vbillcode);
integrationTaskLivingDetailsEntity.setDef1(vbillcode);
integrationTaskLivingDetailsEntity.setPluginId(getPluginId()); integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity); saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
@ -347,7 +392,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
integrationTaskLivingDetailsEntity.setNewPushDate(new Date()); integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(format); integrationTaskLivingDetailsEntity.setBusinessDate(format);
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode); integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
integrationTaskLivingDetailsEntity.setRootAppBill(null);//u8c调拨订单号 integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
integrationTaskLivingDetailsEntity.setPluginId(getPluginId()); integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity); saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} }

View File

@ -13,10 +13,14 @@ import com.hzya.frame.plugin.lets.dao.IBdRdclDao;
import com.hzya.frame.plugin.lets.entity.BdRdclEntity; import com.hzya.frame.plugin.lets.entity.BdRdclEntity;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockoutOrderRequestVO; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockoutOrderRequestVO;
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4ADto;
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto; import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto;
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto; import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil; import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil; 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.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
@ -27,7 +31,9 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import com.hzya.frame.ttxofs.dto.stock.StockoutOrderSearchResponse; import com.hzya.frame.ttxofs.dto.stock.StockoutOrderSearchResponse;
import com.hzya.frame.ttxofs.service.OfsUnifiedService; import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.u8c.ax.entity.Ass;
import com.hzya.frame.web.entity.JsonResultEntity; import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -78,6 +84,8 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
@Autowired @Autowired
private PushDataByU8cUtil pushDataByU8cUtil; private PushDataByU8cUtil pushDataByU8cUtil;
@Autowired @Autowired
private PushU8CByApiCode pushU8CByApiCode;
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil; private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Autowired @Autowired
@ -87,6 +95,38 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { 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; return null;
} }
@ -104,10 +144,10 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss"); String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO(); QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO();
queryOfsStockoutOrderRequestVO.setCreated_start("2024-08-08 00:00:00"); queryOfsStockoutOrderRequestVO.setClosedAt_start(startTimeStr);
queryOfsStockoutOrderRequestVO.setCreated_end("2024-08-10 23:59:59"); queryOfsStockoutOrderRequestVO.setClosedAt_end(endTimeStr);
queryOfsStockoutOrderRequestVO.setCompanyCode("SHXM"); // queryOfsStockoutOrderRequestVO.setCompanyCode("SHXM");
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库 queryOfsStockoutOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
queryOfsStockoutOrderRequestVO.setPageNo(1L); queryOfsStockoutOrderRequestVO.setPageNo(1L);
queryOfsStockoutOrderRequestVO.setPageSize(500L); queryOfsStockoutOrderRequestVO.setPageSize(500L);
List<StockoutOrderSearchResponse.StockoutOrder> stockoutOrders = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO); List<StockoutOrderSearchResponse.StockoutOrder> stockoutOrders = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO);
@ -133,6 +173,25 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
*/ */
public void start(String stockoutNo) { public void start(String stockoutNo) {
try { try {
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);
}
//过滤日志
List<StockoutOrderSearchResponse.StockoutOrder> filterStockoutOrders = filterData(stockoutOrders);
if (filterStockoutOrders == null || filterStockoutOrders.size() == 0) {
Assert.state(false, "丽知OFS调整出库--->U8C其它出库根据单据号[出库完成]{},该调整出库单已被推送成功,请勿重新推送", stockoutNo);
}
//推送
implement(filterStockoutOrders);
} catch (Exception e) { } catch (Exception e) {
logger.error("丽知OFS调整出库--->U8C其它出库,start(String goodsName)方法报错:", e); logger.error("丽知OFS调整出库--->U8C其它出库,start(String goodsName)方法报错:", e);
} }
@ -140,7 +199,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
} }
/** /**
* 按时间区间 * 按时间区间,ofs接口最大显示7天时间计算7天分段
*/ */
public void start(String startTime, String endTime) { public void start(String startTime, String endTime) {
try { try {
@ -148,6 +207,27 @@ public class AdjustOutPluginInitializer 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";
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);
}
//过滤日志
List<StockoutOrderSearchResponse.StockoutOrder> filterStockoutOrders = filterData(stockoutOrders);
if (filterStockoutOrders == null || filterStockoutOrders.size() == 0) {
Assert.state(false, "丽知OFS调整出库--->U8C其它出库根据日期期间[开始时间]-[结束时间]{}-{},该调期间整出库单[出库完成]已被推送成功,请勿重新推送", startTime, endTime);
}
//推送
implement(filterStockoutOrders);
} 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);
} }
@ -181,6 +261,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
/** /**
* 丽知OFS调整出库--->U8C其它出库 * 丽知OFS调整出库--->U8C其它出库
*
* @param filterStockoutOrders * @param filterStockoutOrders
*/ */
public void implement(List<StockoutOrderSearchResponse.StockoutOrder> filterStockoutOrders) { public void implement(List<StockoutOrderSearchResponse.StockoutOrder> filterStockoutOrders) {
@ -212,15 +293,15 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
//vnote--备注 //vnote--备注
parentvo.setVnote(ofsHeader.getShipmentNote()); parentvo.setVnote(ofsHeader.getShipmentNote());
//dbilldate--单据日期--oms入库时间 //dbilldate--单据日期--oms入库时间
String created1 = stockoutOrder.getDetails().get(0).getCreated(); String created1 = ofsHeader.getCreated();
// Date created = ofsHeader.getCreated(); // Date created = ofsHeader.getCreated();
// format = DateUtil.format(created, "yyyy-MM-dd HH:mm:ss"); // format = DateUtil.format(created, "yyyy-MM-dd HH:mm:ss");
format = created1; format = created1;
parentvo.setDbilldate(format); parentvo.setDbilldate(StringUtils.substring(format, 0, 10));
//coperatorid--制单人 //coperatorid--制单人
parentvo.setCoperatorid("tbadmin"); parentvo.setCoperatorid("tbadmin");
//审核时间dauditdate //审核时间dauditdate
parentvo.setDauditdate(format); parentvo.setDauditdate(StringUtils.substring(format, 0, 10));
//cdispatcherid--收发类别ofs过来的写死20240813妮姐+万万就是调整出库调整入库 //cdispatcherid--收发类别ofs过来的写死20240813妮姐+万万就是调整出库调整入库
BdRdclEntity bdRdclEntity = new BdRdclEntity(); BdRdclEntity bdRdclEntity = new BdRdclEntity();
@ -263,18 +344,61 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
generalBillVO_4I.setChildrenvo(childrenvo); generalBillVO_4I.setChildrenvo(childrenvo);
String dataJson = JSONUtil.toJsonStr(generalBillVO_4I); String dataJson = JSONUtil.toJsonStr(generalBillVO_4I);
mapStr = "{\"GeneralBillVO_4I\":[" + dataJson + "]}"; mapStr = "{\"GeneralBillVO_4I\":[" + dataJson + "]}";
response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otheroutqz"), mapStr); // response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otheroutqz"), mapStr);
System.out.println(response); ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("otheroutqzCode"), mapStr);
//两层判断,一层中台转发,一层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_4IDto resGeneralBillVO = resultDataHandle(data);
System.out.println(resGeneralBillVO);
vbillcode = resGeneralBillVO.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);//u8c其他出库单号
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
logger.error("推送U8C丽知OFS调整出库--->U8C其它出库失败失败原因" + e); logger.error("推送U8C丽知OFS调整出库--->U8C其它出库失败失败原因" + e);
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class); ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
String ErrMessage ="推送U8C丽知OFS调整入库--->U8C其它入库失败失败原因"+ reusltStrDto.getErrormsg(); 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);//u8c其他出库单号
// integrationTaskLivingDetailsEntity.setRootAppBill(null);//u8c其他出库单号
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} }
} }
@ -283,7 +407,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
public List<StockoutOrderSearchResponse.StockoutOrder> queryOfsStockoutOrder(QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO) throws Exception { public List<StockoutOrderSearchResponse.StockoutOrder> queryOfsStockoutOrder(QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO) throws Exception {
InterfaceParamDto interfaceParamDto = new InterfaceParamDto(); InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
interfaceParamDto.setApi("ofs.shipment.search"); interfaceParamDto.setApi("ofs.shipment.search");
// queryOfsStockinOrderRequestVO.setInternalInstructionType("ADJUST");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货 queryOfsStockoutOrderRequestVO.setInternalInstructionType("ADJUST");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
queryOfsStockoutOrderRequestVO.setClientCode("LETS"); queryOfsStockoutOrderRequestVO.setClientCode("LETS");
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockoutOrderRequestVO)); interfaceParamDto.setData(JSON.toJSONString(queryOfsStockoutOrderRequestVO));
SaleOutReturnMessageDto saleOutReturnMessageDto = (SaleOutReturnMessageDto) ofsUnifiedService.unified(interfaceParamDto); SaleOutReturnMessageDto saleOutReturnMessageDto = (SaleOutReturnMessageDto) ofsUnifiedService.unified(interfaceParamDto);
@ -294,19 +418,12 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
if (stockoutOrderSearchResponse.getData() == null || stockoutOrderSearchResponse.getData().size() == 0) { if (stockoutOrderSearchResponse.getData() == null || stockoutOrderSearchResponse.getData().size() == 0) {
return null; return null;
} }
//过滤ADJUST调整 return stockoutOrderSearchResponse.getData();
List<StockoutOrderSearchResponse.StockoutOrder> adjustList=new ArrayList<>();
for (StockoutOrderSearchResponse.StockoutOrder datum : stockoutOrderSearchResponse.getData()) {
StockoutOrderSearchResponse.StockoutOrder.StockoutH header = datum.getHeader();
if("ADJUST".equals(header.getRefOrderType())){
adjustList.add(datum);
}
}
return adjustList;
} }
/** /**
* 只是命名不一样为了方便区分顾转换为stockout * 只是命名不一样为了方便区分顾转换为stockout
*
* @param saleOutReturnMessageDto * @param saleOutReturnMessageDto
* @return * @return
*/ */
@ -324,6 +441,13 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
BeanUtils.copyProperties(saleOutDetail, stockoutB); BeanUtils.copyProperties(saleOutDetail, stockoutB);
stockoutBList.add(stockoutB); stockoutBList.add(stockoutB);
} }
//创建时间修改时间创建人修改人赋给表头
StockoutOrderSearchResponse.StockoutOrder.StockoutB stockoutB = stockoutBList.get(0);
stockoutH.setCreated(stockoutB.getCreated());
stockoutH.setCreatedBy(stockoutB.getCreatedBy());
stockoutH.setLastUpdated(stockoutB.getLastUpdated());
stockoutH.setLastUpdatedBy(stockoutB.getLastUpdatedBy());
BeanUtils.copyProperties(saleOutHeader, stockoutH); BeanUtils.copyProperties(saleOutHeader, stockoutH);
stockoutOrder.setHeader(stockoutH); stockoutOrder.setHeader(stockoutH);
stockoutOrder.setDetails(stockoutBList); stockoutOrder.setDetails(stockoutBList);
@ -333,4 +457,20 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
System.out.println(stockoutOrderSearchResponse); System.out.println(stockoutOrderSearchResponse);
return stockoutOrderSearchResponse; return stockoutOrderSearchResponse;
} }
private GeneralBillVO_4IDto resultDataHandle(String resultData) {
try {
if (resultData != null && !"".equals(resultData)) {
if (resultData.contains("[")) {
resultData = resultData.substring(1, resultData.length() - 1);
}
return JSON.parseObject(resultData, GeneralBillVO_4IDto.class);
}
} catch (Exception e) {
e.printStackTrace();
logger.error("解析返回参数失败的错误", e);
//如果解析失败记录原因但是不能影响结果的记录
}
return null;
}
} }

View File

@ -10,14 +10,17 @@ import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.lets.constant.OverallConstant; import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant; import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.entity.BdInvclEntity; import com.hzya.frame.plugin.lets.entity.BdInvclEntity;
import com.hzya.frame.plugin.lets.plugin.sales.SoSaleOutPluginInitializerToC; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSKUClassRequestVO;
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto; import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil; import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil; 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.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; 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.OFSSKUClassSearchResponse;
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity; import com.hzya.frame.web.entity.JsonResultEntity;
import com.zaxxer.hikari.util.FastList;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -37,13 +40,12 @@ import org.springframework.beans.factory.annotation.Autowired;
* 三级AA00101自动识别为AA001的下级 * 三级AA00101自动识别为AA001的下级
*/ */
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*; import java.util.*;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
public class GoodsClassPluginInitializer extends PluginBaseEntity { public class SKUClassPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(GoodsClassPluginInitializer.class); Logger logger = LoggerFactory.getLogger(SKUClassPluginInitializer.class);
private static final ReentrantLock LOCK = new ReentrantLock(true); private static final ReentrantLock LOCK = new ReentrantLock(true);
@ -59,7 +61,7 @@ public class GoodsClassPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.base.GoodsClassPluginInitializer"; return "com.hzya.frame.plugin.lets.plugin.base.SKUClassPluginInitializer";
} }
@Override @Override
@ -83,6 +85,8 @@ public class GoodsClassPluginInitializer extends PluginBaseEntity {
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao; private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
@Autowired @Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil; private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Autowired
private OfsUnifiedService ofsUnifiedService;
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
@ -99,8 +103,19 @@ public class GoodsClassPluginInitializer extends PluginBaseEntity {
Date currentDate = new Date(); Date currentDate = new Date();
Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10); Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10);
Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -2); Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -2);
String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss" + ".000"); String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss");
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss" + ".000"); String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
QueryOfsSKUClassRequestVO queryOfsSKUClassRequestVO = new QueryOfsSKUClassRequestVO();
// queryOfsSKUClassRequestVO.setCreated_start(start);
// queryOfsSKUClassRequestVO.setCreated_end(end);
queryOfsSKUClassRequestVO.setClientCode("LETS");
queryOfsSKUClassRequestVO.setPageNo(1);
queryOfsSKUClassRequestVO.setPageSize(500);
List<OFSSKUClassSearchResponse.SKUClass> skuClasses = querySkuClass(queryOfsSKUClassRequestVO);
System.out.println(skuClasses);
} catch (Exception e) { } catch (Exception e) {
logger.error("丽知OFS货品档案分类--->U8C货品档案分类,start()方法报错:", e); logger.error("丽知OFS货品档案分类--->U8C货品档案分类,start()方法报错:", e);
} }
@ -126,6 +141,16 @@ public class GoodsClassPluginInitializer 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";
QueryOfsSKUClassRequestVO queryOfsSKUClassRequestVO = new QueryOfsSKUClassRequestVO();
queryOfsSKUClassRequestVO.setCreated_start(start);
queryOfsSKUClassRequestVO.setCreated_end(end);
queryOfsSKUClassRequestVO.setClientCode("LETS");
queryOfsSKUClassRequestVO.setPageNo(1);
queryOfsSKUClassRequestVO.setPageSize(500);
querySkuClass(queryOfsSKUClassRequestVO);
} 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);
} }
@ -228,5 +253,23 @@ public class GoodsClassPluginInitializer extends PluginBaseEntity {
} }
/**
* OFS存货分类查询
*/
public List<OFSSKUClassSearchResponse.SKUClass> querySkuClass(QueryOfsSKUClassRequestVO queryOfsSKUClassRequestVO) throws Exception {
InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
interfaceParamDto.setApi("ofs.inventory.class.search");
queryOfsSKUClassRequestVO.setClientCode("LETS");
interfaceParamDto.setData(JSON.toJSONString(queryOfsSKUClassRequestVO));
OFSSKUClassSearchResponse ofsskuClassSearchResponse =(OFSSKUClassSearchResponse) ofsUnifiedService.unifiedByU8CApi(interfaceParamDto);
System.out.println(ofsskuClassSearchResponse);
List<OFSSKUClassSearchResponse.SKUClass> data = ofsskuClassSearchResponse.getData();
if(data==null||data.size()==0){
return null;
}
return data;
}
} }

View File

@ -11,7 +11,6 @@ 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.InterfaceParamDto;
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;
@ -30,9 +29,9 @@ import java.util.concurrent.locks.ReentrantLock;
* 存货基本档案封存 /u8cloud/api/uapbd/invbasdoc/seal * 存货基本档案封存 /u8cloud/api/uapbd/invbasdoc/seal
* 存货基本档案取消封存 /u8cloud/api/uapbd/invbasdoc/unseal * 存货基本档案取消封存 /u8cloud/api/uapbd/invbasdoc/unseal
*/ */
public class GoodsPluginInitializer extends PluginBaseEntity { public class SKUPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(GoodsPluginInitializer.class); Logger logger = LoggerFactory.getLogger(SKUPluginInitializer.class);
private static final ReentrantLock LOCK = new ReentrantLock(true); private static final ReentrantLock LOCK = new ReentrantLock(true);
@ -94,11 +93,11 @@ public class GoodsPluginInitializer extends PluginBaseEntity {
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss"); String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO(); QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO();
queryOfsSKURequestVO.setCreated_start(startTimeStr); // queryOfsSKURequestVO.setCreated_start(startTimeStr);
queryOfsSKURequestVO.setCreated_end(endTimeStr); // queryOfsSKURequestVO.setCreated_end(endTimeStr);
queryOfsSKURequestVO.setCreated_start("2023-10-17 00:00:00"); // queryOfsSKURequestVO.setCreated_start("2023-10-15 00:00:00");
queryOfsSKURequestVO.setCreated_end("2023-10-17 23:59:59"); // queryOfsSKURequestVO.setCreated_end("2023-10-21 23:59:59");
queryOfsSKURequestVO.setCompanyCode("YX"); // queryOfsSKURequestVO.setCompanyCode("");
queryOfsSKURequestVO.setPageNo(1); queryOfsSKURequestVO.setPageNo(1);
queryOfsSKURequestVO.setPageSize(500); queryOfsSKURequestVO.setPageSize(500);
queryOfsSKUs(queryOfsSKURequestVO); queryOfsSKUs(queryOfsSKURequestVO);

View File

@ -29,6 +29,7 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
import com.hzya.frame.ttxofs.service.OfsUnifiedService; import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity; import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -148,15 +149,15 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setCreated_start("2024-01-02 11:58:20"); queryOfsSoSaleOutVo.setShipAt_start("2024-07-05 16:38:00");
queryOfsSoSaleOutVo.setCreated_end("2024-01-02 11:58:22"); queryOfsSoSaleOutVo.setShipAt_end("2024-07-05 16:50:30");
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
// queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
// queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004"); // queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004");
queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L); queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L);
logger.info("数据返回行数:{}", headerDetailsDtoList.size()); logger.info("数据返回行数:{}", headerDetailsDtoList.size());
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
@ -210,12 +211,17 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
HeaderDto header = index.getHeader();// 主表 HeaderDto header = index.getHeader();// 主表
List<DetailsDto> details = index.getDetails();//明细表 List<DetailsDto> details = index.getDetails();//明细表
for (int i = 0; i < details.size(); i++) {
DetailsDto detailsDto = details.get(i);
detailsDto.setHeaderDto(header);
}
headerDetailsDtoList1.add(header); headerDetailsDtoList1.add(header);
headerDetailsDtoList2.addAll(details); headerDetailsDtoList2.addAll(details);
} }
//每250作为一个批次插入主表根据主键id判断是否重复如果重复的则不进行插入 //每250作为一个批次插入主表根据主键id判断是否重复如果重复的则不进行插入
List<List<HeaderDto>> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 250); List<List<HeaderDto>> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 100);
for (int i = 0; i < ofssaleorderoutsearchList.size(); i++) { for (int i = 0; i < ofssaleorderoutsearchList.size(); i++) {
List<HeaderDto> headerDtoList = ofssaleorderoutsearchList.get(i); List<HeaderDto> headerDtoList = ofssaleorderoutsearchList.get(i);
List<TocofsSaleoutEntity> tocofsSaleoutEntityList = copyHeaderDto(headerDtoList); List<TocofsSaleoutEntity> tocofsSaleoutEntityList = copyHeaderDto(headerDtoList);
@ -228,7 +234,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
} }
//插入明细表 //插入明细表
List<List<DetailsDto>> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 250); List<List<DetailsDto>> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 100);
for (int i = 0; i < detailsDtoList.size(); i++) { for (int i = 0; i < detailsDtoList.size(); i++) {
List<DetailsDto> detailsDtos = detailsDtoList.get(i); List<DetailsDto> detailsDtos = detailsDtoList.get(i);
List<TocofsSaleoutDetailedEntity> tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos); List<TocofsSaleoutDetailedEntity> tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos);
@ -570,6 +576,11 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
} }
//客商基本档案 //客商基本档案
//查询OFS对应的销售订单得到会员id
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
// queryOfsSoSaleOutVo.setCode();
SaleOrderMessageDto ofsOrder = getOfsOrder(queryOfsSoSaleOutVo, 1L);
String custName = "天猫intoyou旗舰店-自营"; String custName = "天猫intoyou旗舰店-自营";
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity(); BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
bdCubasdocEntity.setDataSourceCode("lets_u8c"); bdCubasdocEntity.setDataSourceCode("lets_u8c");
@ -626,6 +637,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
orderOutTobHeaderDto.setDeliverGoodsCorp(bdCorpEntityList.get(0)); orderOutTobHeaderDto.setDeliverGoodsCorp(bdCorpEntityList.get(0));
orderOutTobHeaderDto.setPlatformArchives(bdDefdocEntityList.get(0)); orderOutTobHeaderDto.setPlatformArchives(bdDefdocEntityList.get(0));
orderOutTobHeaderDto.setShopArchives(bdDefdocEntityList2.get(0)); orderOutTobHeaderDto.setShopArchives(bdDefdocEntityList2.get(0));
orderOutTobHeaderDto.setOfsOrder(ofsOrder);
orderOutTobHeaderDto.setHeader(header); orderOutTobHeaderDto.setHeader(header);
orderOutTobHeaderDto.setDetails(details); orderOutTobHeaderDto.setDetails(details);
@ -672,9 +684,10 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
for (int i = 0; i < detailsDtos.size(); i++) { for (int i = 0; i < detailsDtos.size(); i++) {
DetailsDto detailsDto = detailsDtos.get(i); DetailsDto detailsDto = detailsDtos.get(i);
TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = new TocofsSaleoutDetailedEntity(); TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = new TocofsSaleoutDetailedEntity();
tocofsSaleoutDetailedEntity.setBusinessType("TOB_ORDER"); // tocofsSaleoutDetailedEntity.setBusinessType("TOB_ORDER");
// BeanUtils.copyProperties(detailsDto, tocofsSaleoutDetailedEntity); // BeanUtils.copyProperties(detailsDto, tocofsSaleoutDetailedEntity);
BeanUtil.copyPropertiesV2(detailsDto, tocofsSaleoutDetailedEntity); BeanUtil.copyPropertiesV2(detailsDto, tocofsSaleoutDetailedEntity);
createPrimaryKeyAndBusinessDateAndBusinessType(tocofsSaleoutDetailedEntity, detailsDto);
tocofsSaleoutDetailedEntityArrayList.add(tocofsSaleoutDetailedEntity); tocofsSaleoutDetailedEntityArrayList.add(tocofsSaleoutDetailedEntity);
} }
} }
@ -820,5 +833,36 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
return null; return null;
} }
/**
* 查询OFS销售订单
*
* @author liuyang
*/
public SaleOrderMessageDto getOfsOrder(QueryOfsSoSaleOutVo queryOfsSoSaleOutVo, Long pageNo) throws Exception {
Long pageSize = 200L;
queryOfsSoSaleOutVo.setPageNo(pageNo);
queryOfsSoSaleOutVo.setPageSize(pageSize);
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
interfaceParamDto.setApi("ofs.salesOrder.search");
interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo));
SaleOrderMessageDto saleOrderMessageDto = (SaleOrderMessageDto) ofsUnifiedService.unified(interfaceParamDto);
return saleOrderMessageDto;
}
/**
* 2024年8月15日 17:08:42
* 填充主表主键业务日期业务类型
*/
private void createPrimaryKeyAndBusinessDateAndBusinessType(TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity, DetailsDto detailsDto) {
if (tocofsSaleoutDetailedEntity != null && detailsDto != null && detailsDto.getHeaderDto() != null) {
HeaderDto headerDto = detailsDto.getHeaderDto();
tocofsSaleoutDetailedEntity.setPrimaryKey(headerDto.getId());//主表主键
tocofsSaleoutDetailedEntity.setBusinessDate(headerDto.getShipAt());//业务日期
tocofsSaleoutDetailedEntity.setBusinessType("TOB_ORDER");//业务类型
} else {
logger.info("createPrimaryKeyAndBusinessDateAndBusinessType方法存在false");
}
}
} }

View File

@ -27,6 +27,7 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
import com.hzya.frame.ttxofs.service.OfsUnifiedService; import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity; import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -131,7 +132,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
queryOfsSoSaleOutVo.setStatus(510L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003"); // queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
@ -195,33 +196,38 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header = index.getHeader();// 主表 com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header = index.getHeader();// 主表
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto> details = index.getDetails();//明细表 List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto> details = index.getDetails();//明细表
for (int i = 0; i < details.size(); i++) {
DetailsDto detailsDto = details.get(i);
detailsDto.setHeaderDto(header);
}
headerDetailsDtoList1.add(header); headerDetailsDtoList1.add(header);
headerDetailsDtoList2.addAll(details); headerDetailsDtoList2.addAll(details);
} }
//每250作为一个批次插入主表根据主键id判断是否重复如果重复的则不进行插入 //每250作为一个批次插入主表根据主键id判断是否重复如果重复的则不进行插入
List<List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto>> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 250); List<List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto>> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 100);
for (int i = 0; i < ofssaleorderoutsearchList.size(); i++) { for (int i = 0; i < ofssaleorderoutsearchList.size(); i++) {
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto> headerDtoList = ofssaleorderoutsearchList.get(i); List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto> headerDtoList = ofssaleorderoutsearchList.get(i);
List<TocofsSaleoutEntity> tocofsSaleoutEntityList = copyHeaderDto(headerDtoList); List<TocofsSaleoutEntity> tocofsSaleoutEntityList = copyHeaderDto(headerDtoList);
if (tocofsSaleoutEntityList.size() > 0) { if (tocofsSaleoutEntityList.size() > 0) {
logger.info("tocofsSaleoutDetailedEntities:插入底表{}个对象(表头)", tocofsSaleoutEntityList.size()); logger.info("TocofsSaleoutEntity:插入底表{}个对象(表头)", tocofsSaleoutEntityList.size());
iTocofsSaleoutDao.entityInsertBatchV2(tocofsSaleoutEntityList); iTocofsSaleoutDao.entityInsertBatchV2(tocofsSaleoutEntityList);
} else { } else {
logger.info("tocofsSaleoutEntityList:没有对象被插入表头底表"); logger.info("TocofsSaleoutEntity:没有对象被插入表头底表");
} }
} }
//插入明细表 //插入明细表
List<List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto>> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 250); List<List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto>> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 100);
for (int i = 0; i < detailsDtoList.size(); i++) { for (int i = 0; i < detailsDtoList.size(); i++) {
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto> detailsDtos = detailsDtoList.get(i); List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto> detailsDtos = detailsDtoList.get(i);
List<TocofsSaleoutDetailedEntity> tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos); List<TocofsSaleoutDetailedEntity> tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos);
if (tocofsSaleoutDetailedEntities.size() > 0) { if (tocofsSaleoutDetailedEntities.size() > 0) {
logger.info("tocofsSaleoutDetailedEntities:插入底表{}个对象(表体)", tocofsSaleoutDetailedEntities.size()); logger.info("TocofsSaleoutDetailedEntity:插入底表{}个对象(表体)", tocofsSaleoutDetailedEntities.size());
iTocofsSaleoutDetailedDao.entityInsertBatchV2(tocofsSaleoutDetailedEntities); iTocofsSaleoutDetailedDao.entityInsertBatchV2(tocofsSaleoutDetailedEntities);
} else { } else {
logger.info("tocofsSaleoutDetailedEntities:没有对象被插入表头底表"); logger.info("TocofsSaleoutDetailedEntity:没有对象被插入表头底表");
} }
} }
} }
@ -603,9 +609,11 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
for (int i = 0; i < detailsDtos.size(); i++) { for (int i = 0; i < detailsDtos.size(); i++) {
com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto detailsDto = detailsDtos.get(i); com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto detailsDto = detailsDtos.get(i);
TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = new TocofsSaleoutDetailedEntity(); TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = new TocofsSaleoutDetailedEntity();
tocofsSaleoutDetailedEntity.setBusinessType("TOC_ORDER"); // tocofsSaleoutDetailedEntity.setBusinessType("TOC_ORDER");
// BeanUtils.copyProperties(detailsDto, tocofsSaleoutDetailedEntity); // BeanUtils.copyProperties(detailsDto, tocofsSaleoutDetailedEntity);
BeanUtil.copyPropertiesV2(detailsDto, tocofsSaleoutDetailedEntity); BeanUtil.copyPropertiesV2(detailsDto, tocofsSaleoutDetailedEntity);
createPrimaryKeyAndBusinessDateAndBusinessType(tocofsSaleoutDetailedEntity, detailsDto);
tocofsSaleoutDetailedEntityArrayList.add(tocofsSaleoutDetailedEntity); tocofsSaleoutDetailedEntityArrayList.add(tocofsSaleoutDetailedEntity);
} }
} }
@ -848,4 +856,20 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
} }
return null; return null;
} }
/**
* 2024年8月15日 17:08:42
* 填充主表主键业务日期业务类型
*/
private void createPrimaryKeyAndBusinessDateAndBusinessType(TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity, DetailsDto detailsDto) {
if (tocofsSaleoutDetailedEntity != null && detailsDto != null && detailsDto.getHeaderDto() != null) {
HeaderDto headerDto = detailsDto.getHeaderDto();
tocofsSaleoutDetailedEntity.setPrimaryKey(headerDto.getId());//主表主键
tocofsSaleoutDetailedEntity.setBusinessDate(headerDto.getShipAt());//业务日期
tocofsSaleoutDetailedEntity.setBusinessType("TOC_ORDER");//业务类型
} else {
logger.info("createPrimaryKeyAndBusinessDateAndBusinessType方法存在false");
}
}
} }

View File

@ -17,7 +17,6 @@ import com.hzya.frame.plugin.lets.ofs.dao.ITocofsReturngoodsDetailedDao;
import com.hzya.frame.plugin.lets.ofs.dao.ITocofsSaleoutDetailedDao; import com.hzya.frame.plugin.lets.ofs.dao.ITocofsSaleoutDetailedDao;
import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsDetailedEntity; import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsDetailedEntity;
import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsEntity; import com.hzya.frame.plugin.lets.ofs.entity.TocofsReturngoodsEntity;
import com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo;
import com.hzya.frame.plugin.lets.u8cdto.*; import com.hzya.frame.plugin.lets.u8cdto.*;
@ -25,13 +24,11 @@ import com.hzya.frame.plugin.lets.util.DateStrUtil;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil; import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.split.SplitListByCountUtil; import com.hzya.frame.split.SplitListByCountUtil;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.returngoodsearch.RertunGoodsRootBean; import com.hzya.frame.ttxofs.dto.returngoodsearch.RertunGoodsRootBean;
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodHeaderDetailsDataDto; import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodHeaderDetailsDataDto;
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto; import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto;
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchHeaderDto; import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchHeaderDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
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;
@ -40,7 +37,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* OFS售后入库单(TOB)生成U8C红字销售订单 * OFS售后入库单(TOB)生成U8C红字销售订单
@ -155,26 +151,26 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
// TODO 注意过滤TOB店铺 // TODO 注意过滤TOB店铺
CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
List<ReturnGoodHeaderDetailsDataDto> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setCreated_start("2024-07-16 15:35:35"); queryOfsSoSaleOutVo.setClosedAt_start("2024-07-16 16:44:00");
queryOfsSoSaleOutVo.setCreated_end("2024-07-16 15:35:37"); queryOfsSoSaleOutVo.setClosedAt_end("2024-07-16 16:44:02");
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
// queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); // queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
// queryOfsSoSaleOutVo.setStatus(900L); // queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setCode("LETS-RE2024071600000001"); // queryOfsSoSaleOutVo.setCode("LETS-RE2024071600000001");
queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L); queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L);
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size()); logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//保存到mysql //保存到mysql
batchInsert(returnGoodHeaderDetailsDataDtoArrayList); batchInsert(returnGoodHeaderDetailsDataDtoArrayList);
//过滤成功的数据 //过滤成功的数据
List<ReturnGoodHeaderDetailsDataDto> returnGoodHeaderDetailsDataDtoList = filterData(returnGoodHeaderDetailsDataDtoArrayList); List<StockinOrderSearchResponse.StockinOrder> stockinOrderList = filterData(returnGoodHeaderDetailsDataDtoArrayList);
//执行推送主逻辑 //执行推送主逻辑
implement(returnGoodHeaderDetailsDataDtoList); implement(stockinOrderList);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
} }
@ -196,11 +192,11 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
private List<ReturnGoodHeaderDetailsDataDto> filterData(List<ReturnGoodHeaderDetailsDataDto> headerDetailsDtoList) { private List<StockinOrderSearchResponse.StockinOrder> filterData(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) {
List<ReturnGoodHeaderDetailsDataDto> headerDetailsDtoList1 = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>();
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求 //TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(headerDetailsDtoList); headerDetailsDtoList1.addAll(returnGoodHeaderDetailsDataDtoArrayList);
} }
return headerDetailsDtoList1; return headerDetailsDtoList1;
} }
@ -210,24 +206,29 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* *
* @param returnGoodHeaderDetailsDataDtoArrayList 数据行 * @param returnGoodHeaderDetailsDataDtoArrayList 数据行
*/ */
private void batchInsert(List<ReturnGoodHeaderDetailsDataDto> returnGoodHeaderDetailsDataDtoArrayList) throws Exception { private void batchInsert(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) throws Exception {
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
List<ReturnGoodSearchHeaderDto> headerDetailsDtoList1 = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder.StockinH> headerDetailsDtoList1 = new ArrayList<>();
List<ReturnGoodSearchDetailsDto> headerDetailsDtoList2 = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder.StockinB> headerDetailsDtoList2 = new ArrayList<>();
for (ReturnGoodHeaderDetailsDataDto index : returnGoodHeaderDetailsDataDtoArrayList) { for (StockinOrderSearchResponse.StockinOrder index : returnGoodHeaderDetailsDataDtoArrayList) {
ReturnGoodSearchHeaderDto header = index.getHeader();// 主表 StockinOrderSearchResponse.StockinOrder.StockinH header = index.getHeader();// 主表
List<ReturnGoodSearchDetailsDto> details = index.getDetails();//明细表 List<StockinOrderSearchResponse.StockinOrder.StockinB> details = index.getDetails();//明细表
for (int i = 0; i < details.size(); i++) {
StockinOrderSearchResponse.StockinOrder.StockinB stockinB = details.get(i);
stockinB.setReturnGoodSearchHeaderDto(header);
}
headerDetailsDtoList1.add(header); headerDetailsDtoList1.add(header);
headerDetailsDtoList2.addAll(details); headerDetailsDtoList2.addAll(details);
} }
//每100作为一个批次插入主表根据主键id判断是否重复如果重复的则不进行插入 //每100作为一个批次插入主表根据主键id判断是否重复如果重复的则不进行插入
List<List<ReturnGoodSearchHeaderDto>> lists = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 100); List<List<StockinOrderSearchResponse.StockinOrder.StockinH>> lists = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 100);
for (int i = 0; i < lists.size(); i++) { for (int i = 0; i < lists.size(); i++) {
List<ReturnGoodSearchHeaderDto> returnGoodSearchHeaderDtos = lists.get(i); List<StockinOrderSearchResponse.StockinOrder.StockinH> stockinHS = lists.get(i);
List<TocofsReturngoodsEntity> tocofsReturngoodsEntities = copyHeaderDto(returnGoodSearchHeaderDtos); List<TocofsReturngoodsEntity> tocofsReturngoodsEntities = copyHeaderDto(stockinHS);
if (tocofsReturngoodsEntities.size() > 0) { if (tocofsReturngoodsEntities.size() > 0) {
logger.info("TocofsReturngoodsEntity插入底表{}个对象(表头)", tocofsReturngoodsEntities.size()); logger.info("TocofsReturngoodsEntity插入底表{}个对象(表头)", tocofsReturngoodsEntities.size());
iTocofsReturngoodsDao.entityInsertBatchV2(tocofsReturngoodsEntities); iTocofsReturngoodsDao.entityInsertBatchV2(tocofsReturngoodsEntities);
@ -237,10 +238,10 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
} }
//插入明细表 //插入明细表
List<List<ReturnGoodSearchDetailsDto>> lists1 = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 100); List<List<StockinOrderSearchResponse.StockinOrder.StockinB>> lists1 = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 100);
for (int i = 0; i < lists1.size(); i++) { for (int i = 0; i < lists1.size(); i++) {
List<ReturnGoodSearchDetailsDto> returnGoodSearchDetailsDtos = lists1.get(i); List<StockinOrderSearchResponse.StockinOrder.StockinB> stockinBS = lists1.get(i);
List<TocofsReturngoodsDetailedEntity> tocofsReturngoodsDetailedEntities = copyDetailsDto(returnGoodSearchDetailsDtos); List<TocofsReturngoodsDetailedEntity> tocofsReturngoodsDetailedEntities = copyDetailsDto(stockinBS);
if (tocofsReturngoodsDetailedEntities.size() > 0) { if (tocofsReturngoodsDetailedEntities.size() > 0) {
logger.info("TocofsReturngoodsDetailedEntity插入底表{}个对象(表体)", tocofsReturngoodsDetailedEntities.size()); logger.info("TocofsReturngoodsDetailedEntity插入底表{}个对象(表体)", tocofsReturngoodsDetailedEntities.size());
iTocofsReturngoodsDetailedDao.entityInsertBatchV2(tocofsReturngoodsDetailedEntities); iTocofsReturngoodsDetailedDao.entityInsertBatchV2(tocofsReturngoodsDetailedEntities);
@ -258,7 +259,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* @param headerDetailsDtoList 查询结果集 * @param headerDetailsDtoList 查询结果集
* @param pageNo 从第pageNo页开始查询 * @param pageNo 从第pageNo页开始查询
*/ */
private void queryOfsReturnGoods(QueryOfsSoSaleOutVo queryOfsSoSaleOutVo, List<ReturnGoodHeaderDetailsDataDto> headerDetailsDtoList, Long pageNo) throws Exception { private void queryOfsReturnGoods(QueryOfsSoSaleOutVo queryOfsSoSaleOutVo, List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList, Long pageNo) throws Exception {
Long pageSize = 200L; Long pageSize = 200L;
queryOfsSoSaleOutVo.setPageNo(pageNo); queryOfsSoSaleOutVo.setPageNo(pageNo);
queryOfsSoSaleOutVo.setPageSize(pageSize); queryOfsSoSaleOutVo.setPageSize(pageSize);
@ -266,12 +267,12 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
InterfaceParamDto interfaceParamDto = new InterfaceParamDto(); InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
interfaceParamDto.setApi("ofs.receipt.search"); interfaceParamDto.setApi("ofs.receipt.search");
interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo)); interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo));
RertunGoodsRootBean rertunGoodsRootBean = (RertunGoodsRootBean) ofsUnifiedService.unified(interfaceParamDto); StockinOrderSearchResponse rertunGoodsRootBean = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
if (rertunGoodsRootBean != null) { if (rertunGoodsRootBean != null) {
if ("false".equals(rertunGoodsRootBean.getError()) && "0".equals(rertunGoodsRootBean.getCode()) && "Success".equals(rertunGoodsRootBean.getMsg())) { if ("false".equals(rertunGoodsRootBean.getError()) && "0".equals(rertunGoodsRootBean.getCode()) && "Success".equals(rertunGoodsRootBean.getMsg())) {
List<ReturnGoodHeaderDetailsDataDto> returnGoodHeaderDetailsDataDtoList = rertunGoodsRootBean.getData(); List<StockinOrderSearchResponse.StockinOrder> stockinOrderList = rertunGoodsRootBean.getData();
if (returnGoodHeaderDetailsDataDtoList != null && returnGoodHeaderDetailsDataDtoList.size() > 0) { if (stockinOrderList != null && stockinOrderList.size() > 0) {
headerDetailsDtoList.addAll(returnGoodHeaderDetailsDataDtoList); headerDetailsDtoList.addAll(stockinOrderList);
//TODO OFS没有提供分页字段等待开发 //TODO OFS没有提供分页字段等待开发
} }
@ -289,7 +290,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* @param returnGoodHeaderDetailsDataDtoList 查询得到的O出库单对象 * @param returnGoodHeaderDetailsDataDtoList 查询得到的O出库单对象
* @author liuyang * @author liuyang
*/ */
private void implement(List<ReturnGoodHeaderDetailsDataDto> returnGoodHeaderDetailsDataDtoList) throws Exception { private void implement(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList) throws Exception {
if (returnGoodHeaderDetailsDataDtoList != null && returnGoodHeaderDetailsDataDtoList.size() > 0) { if (returnGoodHeaderDetailsDataDtoList != null && returnGoodHeaderDetailsDataDtoList.size() > 0) {
try { try {
// 查询基本档案 // 查询基本档案
@ -300,8 +301,8 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
try { try {
for (int i = 0; i < orderToBHeaderDtos.size(); i++) { for (int i = 0; i < orderToBHeaderDtos.size(); i++) {
OrderToBHeaderDto orderOutTobHeaderDto = orderToBHeaderDtos.get(i); OrderToBHeaderDto orderOutTobHeaderDto = orderToBHeaderDtos.get(i);
ReturnGoodSearchHeaderDto header = orderOutTobHeaderDto.getHeader(); StockinOrderSearchResponse.StockinOrder.StockinH header = orderOutTobHeaderDto.getHeader();
List<ReturnGoodSearchDetailsDto> details = orderOutTobHeaderDto.getDetails(); List<StockinOrderSearchResponse.StockinOrder.StockinB> details = orderOutTobHeaderDto.getDetails();
//销售公司发货公司 //销售公司发货公司
BdCorpEntity bdCorpEntity = orderOutTobHeaderDto.getBdCorpEntity(); BdCorpEntity bdCorpEntity = orderOutTobHeaderDto.getBdCorpEntity();
@ -359,9 +360,9 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
//把汇总好的出库单明细行合并成一行 //把汇总好的出库单明细行合并成一行
for (int j = 0; j < details.size(); j++) { for (int j = 0; j < details.size(); j++) {
ReturnGoodSearchDetailsDto returnGoodSearchDetailsDto = details.get(j); StockinOrderSearchResponse.StockinOrder.StockinB stockinB = details.get(j);
//存货管理档案取发货公司的存货管理档案 //存货管理档案取发货公司的存货管理档案
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(returnGoodSearchDetailsDto, bdCalbodyEntity.getPkCorp()); BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(stockinB, bdCalbodyEntity.getPkCorp());
//存货基础档案 //存货基础档案
BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp()); BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp());
//根据存货基础档案编码查询当前存货的税率 //根据存货基础档案编码查询当前存货的税率
@ -381,13 +382,13 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
BigDecimal noriginalcursummny = null;//价税合计 BigDecimal noriginalcursummny = null;//价税合计
BigDecimal noriginalcurtaxmny = null;//税额 BigDecimal noriginalcurtaxmny = null;//税额
try { try {
Assert.notNull(returnGoodSearchDetailsDto.getTotalAmount(), "退货入库单总金额不能为空 明细行对象:{}", JSON.toJSONString(returnGoodSearchDetailsDto)); Assert.notNull(stockinB.getTotalAmount(), "退货入库单总金额不能为空 明细行对象:{}", JSON.toJSONString(stockinB));
Assert.notNull(returnGoodSearchDetailsDto.getReceivedQty(), "实收数量不能为空 明细行对象:{}", JSON.toJSONString(returnGoodSearchDetailsDto)); Assert.notNull(stockinB.getReceivedQty(), "实收数量不能为空 明细行对象:{}", JSON.toJSONString(stockinB));
noriginalcurtaxprice = new BigDecimal(returnGoodSearchDetailsDto.getTotalAmount()).divide(new BigDecimal(returnGoodSearchDetailsDto.getReceivedQty()), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP); noriginalcurtaxprice = new BigDecimal(stockinB.getTotalAmount()).divide(new BigDecimal(stockinB.getReceivedQty()), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
noriginalcurprice = noriginalcurtaxprice.divide(new BigDecimal(1).add(new BigDecimal(tax)), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP); noriginalcurprice = noriginalcurtaxprice.divide(new BigDecimal(1).add(new BigDecimal(tax)), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
noriginalcurmny = noriginalcurprice.multiply(new BigDecimal(returnGoodSearchDetailsDto.getReceivedQty())).setScale(2, BigDecimal.ROUND_HALF_UP); noriginalcurmny = noriginalcurprice.multiply(new BigDecimal(stockinB.getReceivedQty())).setScale(2, BigDecimal.ROUND_HALF_UP);
noriginalcursummny = noriginalcurtaxprice.multiply(new BigDecimal(returnGoodSearchDetailsDto.getReceivedQty())).setScale(2, BigDecimal.ROUND_HALF_UP); noriginalcursummny = noriginalcurtaxprice.multiply(new BigDecimal(stockinB.getReceivedQty())).setScale(2, BigDecimal.ROUND_HALF_UP);
noriginalcurtaxmny = noriginalcursummny.subtract(noriginalcurmny).setScale(2, BigDecimal.ROUND_HALF_UP); noriginalcurtaxmny = noriginalcursummny.subtract(noriginalcurmny).setScale(2, BigDecimal.ROUND_HALF_UP);
} catch (Exception e) { } catch (Exception e) {
logger.error("TOB金额计算错误", e); logger.error("TOB金额计算错误", e);
@ -412,7 +413,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
saleorderRequestChildrenDto.setDdeliverdate(generateBusinessDate);// 要求收货日期 saleorderRequestChildrenDto.setDdeliverdate(generateBusinessDate);// 要求收货日期
saleorderRequestChildrenDto.setNexchangeotobrate("1.00000000");//折本汇率 saleorderRequestChildrenDto.setNexchangeotobrate("1.00000000");//折本汇率
saleorderRequestChildrenDto.setNitemdiscountrate("100.000000");//单品折扣 saleorderRequestChildrenDto.setNitemdiscountrate("100.000000");//单品折扣
saleorderRequestChildrenDto.setNnumber("-" + returnGoodSearchDetailsDto.getReceivedQty());//数量 saleorderRequestChildrenDto.setNnumber("-" + stockinB.getReceivedQty());//数量
saleorderRequestChildrenDto.setNoriginalcurdiscountmny("0");//折扣额 saleorderRequestChildrenDto.setNoriginalcurdiscountmny("0");//折扣额
saleorderRequestChildrenDto.setNoriginalcurmny("-" + noriginalcurmny.stripTrailingZeros().toPlainString());//无税金额 saleorderRequestChildrenDto.setNoriginalcurmny("-" + noriginalcurmny.stripTrailingZeros().toPlainString());//无税金额
// saleorderRequestChildrenDto.setNoriginalcurnetprice(noriginalcurprice.stripTrailingZeros().toPlainString());//无税净价 // saleorderRequestChildrenDto.setNoriginalcurnetprice(noriginalcurprice.stripTrailingZeros().toPlainString());//无税净价
@ -453,7 +454,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
*/ */
private String createGenerateBusinessDate(OrderToBHeaderDto orderOutTobHeaderDto) { private String createGenerateBusinessDate(OrderToBHeaderDto orderOutTobHeaderDto) {
if (orderOutTobHeaderDto != null && orderOutTobHeaderDto.getHeader() != null && orderOutTobHeaderDto.getHeader().getCheckInFrom() != null) { if (orderOutTobHeaderDto != null && orderOutTobHeaderDto.getHeader() != null && orderOutTobHeaderDto.getHeader().getCheckInFrom() != null) {
ReturnGoodSearchHeaderDto header = orderOutTobHeaderDto.getHeader(); StockinOrderSearchResponse.StockinOrder.StockinH header = orderOutTobHeaderDto.getHeader();
String checkInFrom = header.getCheckInFrom(); String checkInFrom = header.getCheckInFrom();
String businessFormat = null; String businessFormat = null;
try { try {
@ -475,15 +476,15 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
private List<OrderToBHeaderDto> queryBasicArchives(List<ReturnGoodHeaderDetailsDataDto> returnGoodHeaderDetailsDataDtoList) { private List<OrderToBHeaderDto> queryBasicArchives(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList) {
List<OrderToBHeaderDto> orderToBHeaderDtoArrayList = new ArrayList<>(); List<OrderToBHeaderDto> orderToBHeaderDtoArrayList = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoList != null && returnGoodHeaderDetailsDataDtoList.size() > 0) { if (returnGoodHeaderDetailsDataDtoList != null && returnGoodHeaderDetailsDataDtoList.size() > 0) {
try { try {
for (int i = 0; i < returnGoodHeaderDetailsDataDtoList.size(); i++) { for (int i = 0; i < returnGoodHeaderDetailsDataDtoList.size(); i++) {
ReturnGoodHeaderDetailsDataDto returnGoodHeaderDetailsDataDto = returnGoodHeaderDetailsDataDtoList.get(i); StockinOrderSearchResponse.StockinOrder stockinOrder = returnGoodHeaderDetailsDataDtoList.get(i);
ReturnGoodSearchHeaderDto header = returnGoodHeaderDetailsDataDto.getHeader(); StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
List<ReturnGoodSearchDetailsDto> details = returnGoodHeaderDetailsDataDto.getDetails(); List<StockinOrderSearchResponse.StockinOrder.StockinB> details = stockinOrder.getDetails();
// 销售公司发货公司 // 销售公司发货公司
String companyCode = header.getCompanyCode(); String companyCode = header.getCompanyCode();
@ -632,18 +633,18 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* bean copy * bean copy
* 2024年8月15日 14:19:36 * 2024年8月15日 14:19:36
*/ */
private List<TocofsReturngoodsEntity> copyHeaderDto(List<ReturnGoodSearchHeaderDto> returnGoodSearchHeaderDtos) { private List<TocofsReturngoodsEntity> copyHeaderDto(List<StockinOrderSearchResponse.StockinOrder.StockinH> stockinHS) {
List<TocofsReturngoodsEntity> tocofsReturngoodsEntityArrayList = new ArrayList<>(); List<TocofsReturngoodsEntity> tocofsReturngoodsEntityArrayList = new ArrayList<>();
if (returnGoodSearchHeaderDtos != null && returnGoodSearchHeaderDtos.size() > 0) { if (stockinHS != null && stockinHS.size() > 0) {
for (int i = 0; i < returnGoodSearchHeaderDtos.size(); i++) { for (int i = 0; i < stockinHS.size(); i++) {
ReturnGoodSearchHeaderDto headerDto = returnGoodSearchHeaderDtos.get(i); StockinOrderSearchResponse.StockinOrder.StockinH stockinH = stockinHS.get(i);
TocofsReturngoodsEntity tocofsReturngoodsEntity = new TocofsReturngoodsEntity(); TocofsReturngoodsEntity tocofsReturngoodsEntity = new TocofsReturngoodsEntity();
BeanUtil.copyPropertiesV2(headerDto, tocofsReturngoodsEntity); BeanUtil.copyPropertiesV2(stockinH, tocofsReturngoodsEntity);
tocofsReturngoodsEntityArrayList.add(tocofsReturngoodsEntity); tocofsReturngoodsEntityArrayList.add(tocofsReturngoodsEntity);
} }
} else { } else {
logger.info("需要复制{}个bean对象(O表头)", returnGoodSearchHeaderDtos.size()); logger.info("需要复制{}个bean对象(O表头)", stockinHS.size());
} }
return tocofsReturngoodsEntityArrayList; return tocofsReturngoodsEntityArrayList;
} }
@ -652,15 +653,20 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* bean copy * bean copy
* 2024年8月15日 14:24:38 * 2024年8月15日 14:24:38
*/ */
private List<TocofsReturngoodsDetailedEntity> copyDetailsDto(List<ReturnGoodSearchDetailsDto> headerDetailsDtoList2) { private List<TocofsReturngoodsDetailedEntity> copyDetailsDto(List<StockinOrderSearchResponse.StockinOrder.StockinB> stockinBS) {
List<TocofsReturngoodsDetailedEntity> tocofsSaleoutDetailedEntityArrayList = new ArrayList<>(); List<TocofsReturngoodsDetailedEntity> tocofsSaleoutDetailedEntityArrayList = new ArrayList<>();
if (headerDetailsDtoList2 != null && headerDetailsDtoList2.size() > 0) { if (stockinBS != null && stockinBS.size() > 0) {
for (int i = 0; i < headerDetailsDtoList2.size(); i++) { for (int i = 0; i < stockinBS.size(); i++) {
ReturnGoodSearchDetailsDto returnGoodSearchDetailsDto = headerDetailsDtoList2.get(i); StockinOrderSearchResponse.StockinOrder.StockinB stockinB = stockinBS.get(i);
//明细行中引用的表头
StockinOrderSearchResponse.StockinOrder.StockinH returnGoodSearchHeaderDto = stockinB.getReturnGoodSearchHeaderDto();
TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity = new TocofsReturngoodsDetailedEntity(); TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity = new TocofsReturngoodsDetailedEntity();
tocofsReturngoodsDetailedEntity.setBusinessType("TOB_RETURN"); // tocofsReturngoodsDetailedEntity.setBusinessType("TOB_RETURN");
BeanUtil.copyPropertiesV2(returnGoodSearchDetailsDto, tocofsReturngoodsDetailedEntity); BeanUtil.copyPropertiesV2(returnGoodSearchHeaderDto, tocofsReturngoodsDetailedEntity);
createPrimaryKeyAndBusinessDateAndBusinessType(tocofsReturngoodsDetailedEntity, returnGoodSearchHeaderDto);
tocofsSaleoutDetailedEntityArrayList.add(tocofsReturngoodsDetailedEntity); tocofsSaleoutDetailedEntityArrayList.add(tocofsReturngoodsDetailedEntity);
} }
} else { } else {
@ -690,7 +696,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* @param detailsDto 出库单存货明细行 * @param detailsDto 出库单存货明细行
* @author liuyang * @author liuyang
*/ */
private BdInvmandocEntity queryInventoryMan(ReturnGoodSearchDetailsDto detailsDto, String pkCorp) throws Exception { private BdInvmandocEntity queryInventoryMan(StockinOrderSearchResponse.StockinOrder.StockinB detailsDto, String pkCorp) throws Exception {
Assert.notNull(detailsDto, "sonDetailsDto不能为空"); Assert.notNull(detailsDto, "sonDetailsDto不能为空");
Assert.notNull(detailsDto.getSkuCode(), "O存货商家编码不能为空"); Assert.notNull(detailsDto.getSkuCode(), "O存货商家编码不能为空");
Assert.notNull(pkCorp, "发货公司主键不能为空"); Assert.notNull(pkCorp, "发货公司主键不能为空");
@ -807,4 +813,16 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
} }
return null; return null;
} }
/**
* 填充主表主键业务日期业务类型
* 2024年8月15日 17:31:54
*/
private void createPrimaryKeyAndBusinessDateAndBusinessType(TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity, StockinOrderSearchResponse.StockinOrder.StockinH returnGoodSearchHeaderDto) {
if (tocofsReturngoodsDetailedEntity != null && returnGoodSearchHeaderDto != null) {
tocofsReturngoodsDetailedEntity.setPrimaryKey(returnGoodSearchHeaderDto.getId());//主表主键
tocofsReturngoodsDetailedEntity.setBusinessDate(returnGoodSearchHeaderDto.getCheckInFrom());//业务日期
tocofsReturngoodsDetailedEntity.setBusinessType("TOC_RETURN");//业务类型
}
}
} }

View File

@ -191,6 +191,12 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
for (ReturnGoodHeaderDetailsDataDto index : returnGoodHeaderDetailsDataDtoList) { for (ReturnGoodHeaderDetailsDataDto index : returnGoodHeaderDetailsDataDtoList) {
ReturnGoodSearchHeaderDto header = index.getHeader();// 主表 ReturnGoodSearchHeaderDto header = index.getHeader();// 主表
List<ReturnGoodSearchDetailsDto> details = index.getDetails();//明细表 List<ReturnGoodSearchDetailsDto> details = index.getDetails();//明细表
for (int i = 0; i < details.size(); i++) {
ReturnGoodSearchDetailsDto returnGoodSearchDetailsDto = details.get(i);
returnGoodSearchDetailsDto.setReturnGoodSearchHeaderDto(header);
}
headerDetailsDtoList1.add(header); headerDetailsDtoList1.add(header);
headerDetailsDtoList2.addAll(details); headerDetailsDtoList2.addAll(details);
} }
@ -594,9 +600,13 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
for (int i = 0; i < headerDetailsDtoList2.size(); i++) { for (int i = 0; i < headerDetailsDtoList2.size(); i++) {
ReturnGoodSearchDetailsDto returnGoodSearchDetailsDto = headerDetailsDtoList2.get(i); ReturnGoodSearchDetailsDto returnGoodSearchDetailsDto = headerDetailsDtoList2.get(i);
//表头
ReturnGoodSearchHeaderDto returnGoodSearchHeaderDto = returnGoodSearchDetailsDto.getReturnGoodSearchHeaderDto();
TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity = new TocofsReturngoodsDetailedEntity(); TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity = new TocofsReturngoodsDetailedEntity();
tocofsReturngoodsDetailedEntity.setBusinessType("TOC_RETURN"); // tocofsReturngoodsDetailedEntity.setBusinessType("TOC_RETURN");
BeanUtil.copyPropertiesV2(returnGoodSearchDetailsDto, tocofsReturngoodsDetailedEntity); BeanUtil.copyPropertiesV2(returnGoodSearchDetailsDto, tocofsReturngoodsDetailedEntity);
createPrimaryKeyAndBusinessDateAndBusinessType(tocofsReturngoodsDetailedEntity, returnGoodSearchHeaderDto);
tocofsSaleoutDetailedEntityArrayList.add(tocofsReturngoodsDetailedEntity); tocofsSaleoutDetailedEntityArrayList.add(tocofsReturngoodsDetailedEntity);
} }
} else { } else {
@ -843,4 +853,15 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
return null; return null;
} }
/**
* 填充主表主键业务日期业务类型
* 2024年8月15日 17:31:54
*/
private void createPrimaryKeyAndBusinessDateAndBusinessType(TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity, ReturnGoodSearchHeaderDto returnGoodSearchHeaderDto) {
if (tocofsReturngoodsDetailedEntity != null && returnGoodSearchHeaderDto != null) {
tocofsReturngoodsDetailedEntity.setPrimaryKey(tocofsReturngoodsDetailedEntity.getId());//主表主键
tocofsReturngoodsDetailedEntity.setBusinessDate(returnGoodSearchHeaderDto.getCheckInFrom());//业务日期
tocofsReturngoodsDetailedEntity.setBusinessType("TOC_RETURN");//业务类型
}
}
} }

View File

@ -2,6 +2,7 @@ package com.hzya.frame.plugin.lets.u8cdto;
import com.hzya.frame.plugin.lets.entity.*; import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
import lombok.Data; import lombok.Data;
/** /**
@ -75,4 +76,9 @@ public class OrderOutTobHeaderDto extends HeaderDetailsDto {
* 店铺档案 * 店铺档案
*/ */
private BdDefdocEntity shopArchives; private BdDefdocEntity shopArchives;
/**
* OFS销售订单
*/
private SaleOrderMessageDto ofsOrder;
} }

View File

@ -5,6 +5,7 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto; import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchDetailsDto;
import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchHeaderDto; import com.hzya.frame.ttxofs.dto.returngoodsearch.ReturnGoodSearchHeaderDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
@ -84,10 +85,10 @@ public class OrderToBHeaderDto {
/** /**
* TOB售后入库单表头 * TOB售后入库单表头
*/ */
private ReturnGoodSearchHeaderDto header; private StockinOrderSearchResponse.StockinOrder.StockinH header;
/** /**
* TOB售后入库单表体 * TOB售后入库单表体
*/ */
private List<ReturnGoodSearchDetailsDto> details; private List<StockinOrderSearchResponse.StockinOrder.StockinB> details;
} }

View File

@ -40,7 +40,7 @@ public class PushDataByU8cUtil {
.setSocketTimeout(300000) // 读取超时时间为60秒 .setSocketTimeout(300000) // 读取超时时间为60秒
.build(); .build();
HttpPost post = new HttpPost(OverallConstant.getOverAllValue("u8cApiServiceNamePK") + url); HttpPost post = new HttpPost(OverallConstant.getOverAllValue("u8cApiUrl") + url);
post.setHeader("Content-Type", "application/json;charset=UTF-8"); post.setHeader("Content-Type", "application/json;charset=UTF-8");
post.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")); post.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK"));
post.setHeader("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")); post.setHeader("password", OverallConstant.getOverAllValue("u8cApiPasswordPK"));
@ -100,7 +100,7 @@ public class PushDataByU8cUtil {
.setSocketTimeout(300000) // 读取超时时间为60秒 .setSocketTimeout(300000) // 读取超时时间为60秒
.build(); .build();
HttpPost post = new HttpPost(OverallConstant.getOverAllValue("u8cApiServiceNameCode") + url); HttpPost post = new HttpPost(OverallConstant.getOverAllValue("u8cApiUrl") + url);
post.setHeader("Content-Type", "application/json;charset=UTF-8"); post.setHeader("Content-Type", "application/json;charset=UTF-8");
post.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodeCode")); post.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodeCode"));
post.setHeader("password", OverallConstant.getOverAllValue("u8cApiPasswordCode")); post.setHeader("password", OverallConstant.getOverAllValue("u8cApiPasswordCode"));

View File

@ -0,0 +1,17 @@
package com.hzya.frame.plugin.lets.util.pushData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* U8C返回参数
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Attribute {
private String status;
private String taskNumber;
private String data;
}

View File

@ -0,0 +1,107 @@
package com.hzya.frame.plugin.lets.util.pushData;
import cn.hutool.core.lang.Assert;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.stereotype.Component;
/**
* 通过中台推送U8C推送工具类.
*/
@Component
public class PushU8CByApiCode {
private static String appId = "800037";
private static String publicKey = "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj";//用安中台
private static String secretKey = "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=";//用安中台
/**
* 发起post请求传递json类型
*
* @param apicode 地址
* @param data 请求参数
* @return 返回消息
*/
public ZTResult pushByPK(String apicode, String data) throws Exception {
Assert.notNull(apicode, "请求地址不能为空");
Assert.notNull(data, "请求参数不能为空(需要JSON格式)");
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(OverallConstant.getOverAllValue("u8cApiUrl"));
httpPost.setHeader("Content-Type", "application/json");
//u8c
httpPost.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK"));
httpPost.setHeader("password", OverallConstant.getOverAllValue("u8cApiPasswordPK"));
httpPost.setHeader("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK"));
httpPost.setHeader("system", OverallConstant.getOverAllValue("u8cApiSystemPK"));
httpPost.setHeader("needStackTrace", OverallConstant.getOverAllValue("u8cApiNeedStackTracePK"));
//中台
httpPost.setHeader("publicKey", publicKey);
httpPost.setHeader("secretKey", secretKey);
//app
httpPost.setHeader("appId", appId);
httpPost.setHeader("apicode", apicode);
//data
httpPost.setEntity(new StringEntity(data, "UTF-8"));
CloseableHttpResponse response = httpclient.execute(httpPost);
HttpEntity entity = response.getEntity();
String result = EntityUtils.toString(entity);
EntityUtils.consume(entity);
ZTResult ztResult = JSON.parseObject(result).toJavaObject(ZTResult.class);
return ztResult;
}
/**
* 发起post请求传递json类型
* <p>
* u8c code模式
*
* @param apicode
* @param data 请求参数
* @return 返回消息
*/
public ZTResult pushByCode(String apicode, String data) throws Exception {
Assert.notNull(apicode, "请求地址不能为空");
Assert.notNull(data, "请求参数不能为空(需要JSON格式)");
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(ProfilesActiveConstant.U8C_URL);
httpPost.setHeader("Content-Type", "application/json");
//u8c
httpPost.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodeCode"));
httpPost.setHeader("password", OverallConstant.getOverAllValue("u8cApiPasswordCode"));
httpPost.setHeader("trantype", OverallConstant.getOverAllValue("u8cApiTrantypeCode"));
httpPost.setHeader("system", OverallConstant.getOverAllValue("u8cApiSystemCode"));
httpPost.setHeader("needStackTrace", OverallConstant.getOverAllValue("u8cApiNeedStackTraceCode"));
//中台
httpPost.setHeader("publicKey", publicKey);
httpPost.setHeader("secretKey", secretKey);
//app
httpPost.setHeader("appId", appId);
httpPost.setHeader("apicode", apicode);
//data
httpPost.setEntity(new StringEntity(data, "UTF-8"));
CloseableHttpResponse response = httpclient.execute(httpPost);
HttpEntity entity = response.getEntity();
String result = EntityUtils.toString(entity);
EntityUtils.consume(entity);
ZTResult ztResult = JSON.parseObject(result).toJavaObject(ZTResult.class);
return ztResult;
}
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.lets.util.pushData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ZTResult {
private String msg;
private String type;
private String flag;
private String status;
private Attribute attribute;
private String headMsg;
}

View File

@ -6,9 +6,9 @@
<bean name="soSaleReturnPluginInitializerToC" class="com.hzya.frame.plugin.lets.plugin.sales.SoSaleReturnPluginInitializerToC"/> <bean name="soSaleReturnPluginInitializerToC" class="com.hzya.frame.plugin.lets.plugin.sales.SoSaleReturnPluginInitializerToC"/>
<!--基础档案--> <!--基础档案-->
<bean name="goodsPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsPluginInitializer"/> <bean name="skuPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SKUPluginInitializer"/>
<bean name="goodsAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsAutoAllotPluginInitializer"/> <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="skuClassPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SKUClassPluginInitializer"/>
<bean name="CustdocAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.CustdocAutoAllotPluginInitializer"/> <bean name="CustdocAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.CustdocAutoAllotPluginInitializer"/>
<bean name="CustmandocPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.CustmandocPluginInitializer"/> <bean name="CustmandocPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.CustmandocPluginInitializer"/>
<bean name="ShopPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.ShopPluginInitializer"/> <bean name="ShopPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.ShopPluginInitializer"/>

View File

@ -12,24 +12,31 @@ import org.springframework.test.context.junit4.SpringRunner;
public class BaseTest { public class BaseTest {
@Autowired @Autowired
private GoodsPluginInitializer goodsPluginInitializer; private SKUPluginInitializer skuPluginInitializer;
@Autowired @Autowired
private GoodsClassPluginInitializer goodsClassPluginInitializer; private SKUClassPluginInitializer skuClassPluginInitializer;
@Autowired @Autowired
private GoodsAutoAllotPluginInitializer goodsAutoAllotPluginInitializer; private GoodsAutoAllotPluginInitializer goodsAutoAllotPluginInitializer;
////////////////////////////////////////////////////////////////////////////////////SKU
@Test @Test
public void t00(){ public void t00(){
goodsClassPluginInitializer.start("666"); skuPluginInitializer.start();
} }
////////////////////////////////////////////////////////////////////////////////////SKU自动分配
@Test @Test
public void t01(){ public void t10(){
goodsAutoAllotPluginInitializer.start("0001A210000000000U4C"); goodsAutoAllotPluginInitializer.start("0001A210000000000U4C");
} }
////////////////////////////////////////////////////////////////////////////////////SKU分类
@Test @Test
public void t02(){ public void t20(){
goodsPluginInitializer.start(); skuClassPluginInitializer.start();
} }
@Test
public void t21(){
skuClassPluginInitializer.start("2024-08-15","2024-08-16");
}
} }

View File

@ -1,6 +1,7 @@
package com.hzya.frame.plugin.lets.plugin.sales; package com.hzya.frame.plugin.lets.plugin.sales;
import com.hzya.frame.WebappApplication; import com.hzya.frame.WebappApplication;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -26,7 +27,15 @@ class SoSaleOutPluginInitializerToCTest {
@Test @Test
void startImplement() throws Exception { void startImplement() throws Exception {
soSaleOutPluginInitializerToC.startImplement(null, null); // soSaleOutPluginInitializerToC.startImplement(null, null);
// soSaleOutPluginInitializerToC.queryOfsSaleOrder(); // soSaleOutPluginInitializerToC.queryOfsSaleOrder();
try {
// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
// queryOfsSoSaleOutVo.setCode("LETS-SO2024070500000001");
// soSaleOutPluginInitializerToC.getOfsOrder(queryOfsSoSaleOutVo, 1L);
} catch (Exception e) {
e.printStackTrace();
}
} }
} }

View File

@ -0,0 +1,35 @@
package com.hzya.frame.plugin.lets.plugin.sales;
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;
import static org.junit.Assert.*;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.plugin.sales
* @ProjectkangarooDataCenterV3
* @nameSoSaleReturnPluginInitializerToBTest
* @Date2024/8/16 13:56
* @FilenameSoSaleReturnPluginInitializerToBTest
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = WebappApplication.class)
public class SoSaleReturnPluginInitializerToBTest {
@Autowired
private SoSaleReturnPluginInitializerToB soSaleReturnPluginInitializerToB;
@Test
public void startImplement() {
try {
soSaleReturnPluginInitializerToB.startImplement(null, null);
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -82,11 +82,11 @@ public class TransferTest {
} }
@Test @Test
public void t41(){ public void t41(){
adjustOutPluginInitializer.start("LETS-AH2024081300000003"); adjustOutPluginInitializer.start("LETS-SH2024080900000001");
} }
@Test @Test
public void t42(){ public void t42(){
adjustOutPluginInitializer.start("2024-08-14","2024-08-14"); adjustOutPluginInitializer.start("2024-08-08","2024-08-13");
} }
} }

View File

@ -5,7 +5,7 @@ import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OfsShopReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OfsShopReturnMessageDto;
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse; import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import java.util.HashMap; import java.util.HashMap;
@ -26,7 +26,7 @@ public class ApiDtoCacheMap {
public static final Map<String, ReturnMessageBasics> apiDtoCacheMap = new HashMap(); public static final Map<String, ReturnMessageBasics> apiDtoCacheMap = new HashMap();
static { static {
apiDtoCacheMap.put("ofs.salesOrder.search", new SaleReturnMessageDto()); apiDtoCacheMap.put("ofs.salesOrder.search", new SaleOrderMessageDto());
apiDtoCacheMap.put("ofs.shipment.search", new SaleOutReturnMessageDto()); apiDtoCacheMap.put("ofs.shipment.search", new SaleOutReturnMessageDto());
apiDtoCacheMap.put("ofs.receipt.search", new StockinOrderSearchResponse());//入库单查询 apiDtoCacheMap.put("ofs.receipt.search", new StockinOrderSearchResponse());//入库单查询
apiDtoCacheMap.put("ofs.transferOrder.search", new OFSTranseferOrderSearchResponse());//调拨订单 apiDtoCacheMap.put("ofs.transferOrder.search", new OFSTranseferOrderSearchResponse());//调拨订单

View File

@ -3,9 +3,25 @@ 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;
/** /**
* OFS SKU查询返回 * OFS SKU查询返回
*/ */
@Data @Data
public class OFSSKUClassSearchResponse extends ReturnMessageBasics { public class OFSSKUClassSearchResponse extends ReturnMessageBasics {
List<SKUClass> data;
@Data
public static class SKUClass {
private String id;
private String clientCode;
private String cInvCCode;
private String cInvCName;
private Date created;
private String createdBy;
private Date lastUpdated;
private String lastUpdatedBy;
}
} }

View File

@ -11,7 +11,7 @@ import java.util.List;
*/ */
@Data @Data
public class OFSSKUSearchResponse extends ReturnMessageBasics { public class OFSSKUSearchResponse extends ReturnMessageBasics {
private List<OFSSKU> skuList; private List<OFSSKU> data;
@Data @Data
public static class OFSSKU{ public static class OFSSKU{

View File

@ -1,5 +1,8 @@
package com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch; package com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch;
import lombok.Data;
@Data
public class DetailsDto { public class DetailsDto {
private String clientCode; private String clientCode;
@ -31,227 +34,8 @@ public class DetailsDto {
private String lastUpdated; private String lastUpdated;
private String lastUpdatedBy; private String lastUpdatedBy;
public String getClientCode() { /**
return clientCode; * 表头对象
} */
private HeaderDto headerDto;
public void setClientCode(String clientCode) {
this.clientCode = clientCode;
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getFacilityCode() {
return facilityCode;
}
public void setFacilityCode(String facilityCode) {
this.facilityCode = facilityCode;
}
public String getShipmentCode() {
return shipmentCode;
}
public void setShipmentCode(String shipmentCode) {
this.shipmentCode = shipmentCode;
}
public String getRefOrderId() {
return refOrderId;
}
public void setRefOrderId(String refOrderId) {
this.refOrderId = refOrderId;
}
public String getRefOrderDetailId() {
return refOrderDetailId;
}
public void setRefOrderDetailId(String refOrderDetailId) {
this.refOrderDetailId = refOrderDetailId;
}
public String getRefOrderCode() {
return refOrderCode;
}
public void setRefOrderCode(String refOrderCode) {
this.refOrderCode = refOrderCode;
}
public String getAllocInvId() {
return allocInvId;
}
public void setAllocInvId(String allocInvId) {
this.allocInvId = allocInvId;
}
public String getSkuCode() {
return skuCode;
}
public void setSkuCode(String skuCode) {
this.skuCode = skuCode;
}
public String getSkuName() {
return skuName;
}
public void setSkuName(String skuName) {
this.skuName = skuName;
}
public String getSourceOrderCode() {
return sourceOrderCode;
}
public void setSourceOrderCode(String sourceOrderCode) {
this.sourceOrderCode = sourceOrderCode;
}
public String getInventorySts() {
return inventorySts;
}
public void setInventorySts(String inventorySts) {
this.inventorySts = inventorySts;
}
public String getIsGift() {
return isGift;
}
public void setIsGift(String isGift) {
this.isGift = isGift;
}
public String getRequestQty() {
return requestQty;
}
public void setRequestQty(String requestQty) {
this.requestQty = requestQty;
}
public String getShipQty() {
return shipQty;
}
public void setShipQty(String shipQty) {
this.shipQty = shipQty;
}
public String getQuantityUM() {
return quantityUM;
}
public void setQuantityUM(String quantityUM) {
this.quantityUM = quantityUM;
}
public String getListPrice() {
return listPrice;
}
public void setListPrice(String listPrice) {
this.listPrice = listPrice;
}
public String getItemTotalAmount() {
return itemTotalAmount;
}
public void setItemTotalAmount(String itemTotalAmount) {
this.itemTotalAmount = itemTotalAmount;
}
public String getTotalPayAmount() {
return totalPayAmount;
}
public void setTotalPayAmount(String totalPayAmount) {
this.totalPayAmount = totalPayAmount;
}
public String getTotalWeight() {
return totalWeight;
}
public void setTotalWeight(String totalWeight) {
this.totalWeight = totalWeight;
}
public String getTotalVolume() {
return totalVolume;
}
public void setTotalVolume(String totalVolume) {
this.totalVolume = totalVolume;
}
public String getTotalVolumeWeight() {
return totalVolumeWeight;
}
public void setTotalVolumeWeight(String totalVolumeWeight) {
this.totalVolumeWeight = totalVolumeWeight;
}
public String getWeightUM() {
return weightUM;
}
public void setWeightUM(String weightUM) {
this.weightUM = weightUM;
}
public String getVolumeUM() {
return volumeUM;
}
public void setVolumeUM(String volumeUM) {
this.volumeUM = volumeUM;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getLastUpdated() {
return lastUpdated;
}
public void setLastUpdated(String lastUpdated) {
this.lastUpdated = lastUpdated;
}
public String getLastUpdatedBy() {
return lastUpdatedBy;
}
public void setLastUpdatedBy(String lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy;
}
} }

View File

@ -13,7 +13,7 @@ import java.util.List;
* @author bejson.com (i@bejson.com) * @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/ * @website http://www.bejson.com/java2pojo/
*/ */
public class SaleReturnMessageDto extends ReturnMessageBasics { public class SaleOrderMessageDto extends ReturnMessageBasics {
private List<HeaderDetailsDto> data; private List<HeaderDetailsDto> data;

View File

@ -43,4 +43,6 @@ public class ReturnGoodSearchDetailsDto {
private String lastUpdated; private String lastUpdated;
private String lastUpdatedBy; private String lastUpdatedBy;
private String discountPrice; private String discountPrice;
private ReturnGoodSearchHeaderDto returnGoodSearchHeaderDto;
} }

View File

@ -3,7 +3,6 @@ package com.hzya.frame.ttxofs.dto.stock;
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;
/** /**
@ -21,79 +20,84 @@ public class StockinOrderSearchResponse extends ReturnMessageBasics {
@Data @Data
public class StockinH { public class StockinH {
private Integer id; private String id;
private String clientCode; private String clientCode;
private String companyCode; private String companyCode;
private String facilityCode; private String facilityCode;
private String code; private String code;
private String internalInstructionType; private String internalInstructionType;
private String bizChannel; private String bizChannel;
private Integer refOrderId; private String refOrderId;
private String refOrderCode; private String refOrderCode;
private String refOrderType; private String refOrderType;
private Integer closed; private String closed;
private String closedBy; private String closedBy;
private Integer status; private String status;
private Integer allowOverReceive; private String allowOverReceive;
private Integer totalLines; private String totalLines;
private Integer totalQty; private String totalQty;
private Integer totalAmount; private String totalAmount;
private Integer totalWeight; private String totalWeight;
private Integer totalVolume; private String totalVolume;
private Integer totalVolumeWeight; private String totalVolumeWeight;
private Integer totalFulfillAmount; private String totalFulfillAmount;
private Integer totalFulfillWeight; private String totalFulfillWeight;
private Integer totalFulfillVolume; private String totalFulfillVolume;
private Integer totalFulfillVolumeWeight; private String totalFulfillVolumeWeight;
private Integer totalFulfillQty; private String totalFulfillQty;
private Integer totalCases; private String totalCases;
private Integer totalContainers; private String totalContainers;
private Integer closeAtQty; private String closeAtQty;
private String quantityUM; private String quantityUM;
private String weightUM; private String weightUM;
private String volumeUM; private String volumeUM;
private Date checkInFrom; private String checkInFrom;
private Date checkInTo; private String checkInTo;
private Date closedAt; private String closedAt;
private String note; private String note;
private String sourceOrderCode; private String sourceOrderCode;
private Date created; private String created;
private String createdBy; private String createdBy;
private Date lastUpdated; private String lastUpdated;
private String lastUpdatedBy; private String lastUpdatedBy;
private String sourcePlatformCode;
private String storeCode;
} }
@Data @Data
public class StockinB { public class StockinB {
private Integer id; private String id;
private Integer receiptId; private String receiptId;
private String receiptCode; private String receiptCode;
private Integer refOrderId; private String refOrderId;
private Integer refOrderDetailId; private String refOrderDetailId;
private String clientCode; private String clientCode;
private String companyCode; private String companyCode;
private String facilityCode; private String facilityCode;
private String skuCode; private String skuCode;
private String skuName; private String skuName;
private Integer requestQty; private String requestQty;
private Integer receivedQty; private String receivedQty;
private Integer openQty; private String openQty;
private String quantityUM; private String quantityUM;
private Integer totalWeight; private String totalWeight;
private Integer totalVolume; private String totalVolume;
private Integer totalVolumeWeight; private String totalVolumeWeight;
private Integer totalAmount; private String totalAmount;
private String weightUM; private String weightUM;
private String volumeUM; private String volumeUM;
private String inventorySts; private String inventorySts;
private Integer inTransInvId; private String inTransInvId;
private Integer closed; private String closed;
private Date created; private String created;
private String createdBy; private String createdBy;
private Date lastUpdated; private String lastUpdated;
private String lastUpdatedBy; private String lastUpdatedBy;
private Integer discountPrice; private String discountPrice;
//表头对象
private StockinH returnGoodSearchHeaderDto;
} }
} }

View File

@ -84,6 +84,10 @@ public class StockoutOrderSearchResponse extends ReturnMessageBasics {
private String shipAt; private String shipAt;
private String shipmentType; private String shipmentType;
private String shipmentNote; private String shipmentNote;
private String created;
private String createdBy;
private String lastUpdated;
private String lastUpdatedBy;
} }
@Data @Data
public static class StockoutB { public static class StockoutB {