feat(lets): 新增 O采购入库确认单处理功能
- 新增 ConsignmachiningCinfurmIn 类处理 O 采购入库确认单 - 新增 PurchaseReceiptConfirmationSonDto 类用于 O 采购入库确认单的数据传输 - 修改 ConsignmachiningIn 类,支持 O 采购入库单的处理- 更新应用配置文件,添加O 正式环境的 API 地址 - 新增单元测试用例,验证 O 采购入库确认单处理功能
This commit is contained in:
parent
61c7a8aaca
commit
e5c0bf0933
|
@ -83,7 +83,8 @@ public class OverallConstant {
|
|||
}
|
||||
|
||||
private static void loadDev() {
|
||||
devOverAll.put("u8cApiUrl", "http://39.170.109.90:9099");//测式U8C
|
||||
//测式U8C
|
||||
devOverAll.put("u8cApiUrl", "http://39.170.109.90:9099");
|
||||
|
||||
devOverAll.put("u8cApiUsercodePK", "admin");
|
||||
devOverAll.put("u8cApiPasswordPK", "cbc3df059791996e4cce8e4ac51f4f8e");
|
||||
|
@ -111,15 +112,15 @@ public class OverallConstant {
|
|||
devOverAll.put("u8c自定义项档案-单据红字标识-N主键", "0001A1100000000027LQ");
|
||||
devOverAll.put("u8c自定义项档案-单据红字标识-N名称", "N");
|
||||
|
||||
//中台地址
|
||||
//本地中台地址
|
||||
prodOverAll.put("u8c_url", "http://127.0.0.1:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
|
||||
}
|
||||
|
||||
private static void loadProd() {
|
||||
//正式U8C
|
||||
//内网正式U8C
|
||||
prodOverAll.put("u8cApiUrl", "http://192.168.10.118:8088");
|
||||
//测试U8C
|
||||
// prodOverAll.put("u8cApiUrl", "http://192.168.10.118:9099");
|
||||
//外网正式U8C地址
|
||||
// devOverAll.put("u8cApiUrl", "http://39.170.109.90:8088");
|
||||
|
||||
//主键
|
||||
prodOverAll.put("u8cApiUsercodePK", "admin");
|
||||
|
@ -151,10 +152,10 @@ public class OverallConstant {
|
|||
prodOverAll.put("u8c自定义项档案-单据红字标识-N主键", "0001A1100000000027LQ");
|
||||
prodOverAll.put("u8c自定义项档案-单据红字标识-N名称", "N");
|
||||
|
||||
//正式中台地址
|
||||
//内网中台地址
|
||||
prodOverAll.put("u8c_url", "http://127.0.0.1:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
|
||||
//测试中台地址
|
||||
// prodOverAll.put("u8c_url", "http://127.0.0.1:8082/kangarooDataCenterV3/entranceController/externalCallInterface");
|
||||
//外网中台地址
|
||||
// prodOverAll.put("u8c_url", "http://39.170.109.90:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
* @since 2024-08-23 15:29:40
|
||||
*/
|
||||
public class ScOrderEntity extends BaseEntity {
|
||||
|
||||
private String caccountbankid;
|
||||
private String caccountyear;
|
||||
private String cauditpsn;
|
||||
|
@ -79,7 +78,6 @@ public class ScOrderEntity extends BaseEntity {
|
|||
private String vmemo;
|
||||
private String vordercode;
|
||||
|
||||
|
||||
public String getCaccountbankid() {
|
||||
return caccountbankid;
|
||||
}
|
||||
|
|
|
@ -56,4 +56,12 @@ public class QueryOfsSoSaleOutVo {
|
|||
private String refundedAt_end;
|
||||
//退款成功状态
|
||||
private String refundStatus;
|
||||
//确认单收货时间-开始
|
||||
private String receivedAt_start;
|
||||
//确认单收货时间-结束
|
||||
private String receivedAt_end;
|
||||
//售后入库确认单关联时间-开始
|
||||
private String relatedAt_start;
|
||||
//售后入库确认单关联时间-结束
|
||||
private String relatedAt_end;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -38,7 +38,7 @@ import java.util.function.Predicate;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* O采购入库(委外加工类型)->U8C委外订单
|
||||
* O采购入库单(委外加工类型)->U8C委外订单
|
||||
*
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame.plugin.lets.plugin.outsourc
|
||||
|
@ -224,13 +224,15 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
try {
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClosedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setClosedAt_end(endTime);
|
||||
// queryOfsSoSaleOutVo.setClosedAt_start(startTime);
|
||||
// queryOfsSoSaleOutVo.setClosedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setCreated_start(startTime);
|
||||
queryOfsSoSaleOutVo.setCreated_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("PURCHASE");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
// queryOfsSoSaleOutVo.setStatus(900L);
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("插件:{} O接口返回行数:{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
|
||||
printOfsDocCode(returnGoodHeaderDetailsDataDtoArrayList, startTime, endTime);
|
||||
|
@ -468,7 +470,9 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
poOrderParentDto.setVdef17(ProfilesActiveConstant.sourceSystem1);//来源系统
|
||||
poOrderParentDto.setVdef19(consignmachiningInSonDto.getCode());//原单单号,O采购入库单单号
|
||||
// poOrderParentDto.setVdef20(consignmachiningInSonDto.getId());//原单主键,O采购入库单主键
|
||||
//2025年1月22日 17:33:43 原单主键,使用OFS采购订单主键
|
||||
//2025年1月22日 17:33:43 原单主键,使用OFS采购订单主键,主要是为委外退货的联查提供条件,
|
||||
//因为 O 采退出库单 -> O 采退订单 -> O 采购订单
|
||||
//目前无法通过 O 采购订单 关联查询 O 采购入库单,所以把 vdef20改为了 O 采购订单主键
|
||||
poOrderParentDto.setVdef20(ofsPoOrderDataHeader.getId());
|
||||
|
||||
//委外入库表头明细行
|
||||
|
@ -487,27 +491,42 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
List<BdBomEntity> bomVersion = getBomVersion(bdCalbodyEntity.getPkCalbody(), bdInvbasdocEntity.getPkInvbasdoc(), bdInvbasdocEntity.getInvcode());
|
||||
|
||||
//计算含税单价
|
||||
BigDecimal noriginalcurprice = null;
|
||||
String receivedQty = stockinB.getReceivedQty();//实收数量
|
||||
String fulfillAmount = ofsPoOrderDetailRowTraget.getFulfillAmount();//实收累计总金额
|
||||
try {
|
||||
noriginalcurprice = new BigDecimal(fulfillAmount).divide(new BigDecimal(receivedQty), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
|
||||
} catch (Exception e) {
|
||||
logger.error("计算委外订单原币含税单价失败", e);
|
||||
Assert.state(false, "计算采购入库单原币含税单价失败 原因:{}", e.getMessage());
|
||||
// BigDecimal noriginalcurprice = null;
|
||||
// String receivedQty = stockinB.getReceivedQty();//实收数量
|
||||
// String fulfillAmount = ofsPoOrderDetailRowTraget.getFulfillAmount();//实收累计总金额
|
||||
// try {
|
||||
// noriginalcurprice = new BigDecimal(fulfillAmount).divide(new BigDecimal(receivedQty), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
|
||||
// } catch (Exception e) {
|
||||
// logger.error("计算委外订单原币含税单价失败", e);
|
||||
// Assert.state(false, "计算采购入库单原币含税单价失败 原因:{}", e.getMessage());
|
||||
// }
|
||||
BigDecimal discountPriceBigDecimal = null;
|
||||
String discountPrice = stockinB.getDiscountPrice();
|
||||
if (discountPrice == null || "".equals(discountPrice.trim())) {
|
||||
//如果为null 这默认为 0
|
||||
discountPrice = "0";
|
||||
}
|
||||
|
||||
discountPriceBigDecimal = new BigDecimal(discountPrice).setScale(4, BigDecimal.ROUND_HALF_UP);
|
||||
ScorderBodyDto scorderBodyDto = new ScorderBodyDto();
|
||||
scorderBodyDto.setCmangid(bdInvmandocEntity.getPkInvmandoc());//存货
|
||||
scorderBodyDto.setNordernum(stockinB.getReceivedQty());//数量
|
||||
scorderBodyDto.setNoriginalnetprice(noriginalcurprice.stripTrailingZeros().toPlainString());//净单价
|
||||
scorderBodyDto.setNordernum(stockinB.getRequestQty());//数量
|
||||
//已经和妮姐确认:净单价=含税单价,净单价是数据字典的叫法
|
||||
scorderBodyDto.setNoriginalnetprice(discountPriceBigDecimal.stripTrailingZeros().toPlainString());//净单价
|
||||
scorderBodyDto.setCwarehouseid(bdStordocEntity.getPkStordoc());//仓库
|
||||
// scorderBodyDto.setBomversion(bomVersion.get(0).getVersion());//BOM版本
|
||||
scorderBodyDto.setBomversion(null);//BOM版本
|
||||
scorderBodyDto.setDplanarrvdate(generateBusinessDate);//计划到货日期
|
||||
// scorderBodyDto.setVdef16(bomVersion.get(0).getVersion());//版本号
|
||||
// scorderBodyDto.setVdef16(null);//版本号
|
||||
scorderBodyDto.setVdef20(stockinB.getRefOrderDetailId());//O采购订单明细行主键
|
||||
//这个参数很关键,用于生成委外入库单时,明细行匹配
|
||||
//为什么要有vdef20这个参数?"委外订单明细行vdef20=O采购订单明细行主键",U8C委外入库单每一行明细行需要关联U8C委外订单每一行明细行
|
||||
//当委外退货业务发生时,通过联查O采退出库单->O采退订单->O采购订单,从而通过O采退出库单明细行得到O采购订单明细行,最后把O采购订单明细行主键,用于匹配U8C委外订单明细行
|
||||
//所以O采退出库单明细行,才能关联U8C委外订单明细行,这部分是旧逻辑兼容,因为可能会出现一张采购订单存在多张采购入库单
|
||||
scorderBodyDto.setVdef20(stockinB.getRefOrderDetailId());
|
||||
//2025 年 3 月 10 日 14:09:17 存储 U8C 采购入库单明细行主机
|
||||
//为什么要有vdef18这个参数?"委外订单明细行vdef18=O采购入库单明细行主键",当发生O入库确认单推送 U8C 委外入库单业务时,U8C 委外入库单的每一行需要关联委外订单的明细行
|
||||
//通过O确认单明细行 关联 O采购入库单明细行(明细单一一对应),再去U8C委外订单明细行匹配定位
|
||||
scorderBodyDto.setVdef18(stockinB.getId());
|
||||
scorderBodyDtoArrayList.add(scorderBodyDto);
|
||||
}
|
||||
|
||||
|
@ -523,15 +542,15 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
|
||||
String cgeneralhid = null;
|
||||
String vbillcode = null;
|
||||
String pkCorp = null;
|
||||
ScOrderResultHeadDto parentvo = scOrderResultDto.getParentvo();
|
||||
List<ScOrderResultDetailDto> childrenvo = scOrderResultDto.getChildrenvo();
|
||||
if (parentvo != null) {
|
||||
cgeneralhid = parentvo.getCorderid();
|
||||
}
|
||||
if (parentvo != null) {
|
||||
vbillcode = parentvo.getVordercode();
|
||||
pkCorp = parentvo.getPk_corp();
|
||||
}
|
||||
logger.info("推送U8C委外订单成功!委外订单主键:{} 委外订单编码:{}", cgeneralhid, vbillcode);
|
||||
logger.info("推送U8C委外订单成功!委外订单主键:{} 委外订单编码:{} 公司:{}", cgeneralhid, vbillcode, pkCorp);
|
||||
|
||||
// 成功记录日志
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
|
@ -835,24 +854,25 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
/**
|
||||
* 2024年8月20日 15:46:10
|
||||
* 生成业务日期,以发货时间作为业务日期
|
||||
* 2025 年 3 月 10 日 09:36:43 修改为业务日期取创建时间,因为查询范围根据创建时间
|
||||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
private String createGenerateBusinessDate(ConsignmachiningInSonDto consignmachiningInSonDto) {
|
||||
if (consignmachiningInSonDto != null && consignmachiningInSonDto.getClosedAt() != null) {
|
||||
String closedAt = consignmachiningInSonDto.getClosedAt();
|
||||
if (consignmachiningInSonDto != null && consignmachiningInSonDto.getCreated() != null) {
|
||||
String created = consignmachiningInSonDto.getCreated();
|
||||
|
||||
String businessFormat = null;
|
||||
try {
|
||||
Date dbill = DateUtil.parse(closedAt);
|
||||
Date dbill = DateUtil.parse(created);
|
||||
businessFormat = DateUtil.format(dbill, "yyyy-MM-dd");
|
||||
} catch (Exception e) {
|
||||
logger.error("业务日期生成失败", e);
|
||||
}
|
||||
return businessFormat;
|
||||
} else {
|
||||
logger.error("生成采购订单入库日期失败,或者checkInFrom为空! json:{}", JSON.toJSON(consignmachiningInSonDto));
|
||||
Assert.state(false, "生成采购订单入库日期失败,或者checkInFrom为空! json:{}", JSON.toJSON(consignmachiningInSonDto));
|
||||
logger.error("生成采购订单日期失败,或者created为空! json:{}", JSON.toJSON(consignmachiningInSonDto));
|
||||
Assert.state(false, "生成采购订单日期失败,或者created为空! json:{}", JSON.toJSON(consignmachiningInSonDto));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -864,19 +884,19 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
* @author liuyang
|
||||
*/
|
||||
private String createGenerateBusinessDateV2(StockinOrderSearchResponse.StockinOrder.StockinH header) {
|
||||
if (header != null && header.getClosedAt() != null) {
|
||||
String closedAt = header.getClosedAt();
|
||||
if (header != null && header.getCreated() != null) {
|
||||
String created = header.getCreated();
|
||||
String businessFormat = null;
|
||||
try {
|
||||
Date dbill = DateUtil.parse(closedAt);
|
||||
Date dbill = DateUtil.parse(created);
|
||||
businessFormat = DateUtil.format(dbill, "yyyy-MM-dd");
|
||||
} catch (Exception e) {
|
||||
logger.error("业务日期生成失败", e);
|
||||
}
|
||||
return businessFormat;
|
||||
} else {
|
||||
logger.error("closedAt为空! json:{}", JSON.toJSON(header));
|
||||
Assert.state(false, "closedAt为空! json:{}", JSON.toJSON(header));
|
||||
logger.error("created为空! json:{}", JSON.toJSON(header));
|
||||
Assert.state(false, "created为空! json:{}", JSON.toJSON(header));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -698,7 +698,6 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
|
|||
//成功
|
||||
} catch (Exception e) {
|
||||
logger.error("委外入库OFS档案转换", e);
|
||||
//失败
|
||||
}
|
||||
} else {
|
||||
logger.info("queryBasicArchives对应returnGoodHeaderDetailsDataDtoList.size为0");
|
||||
|
@ -1075,8 +1074,8 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
/**
|
||||
* 匹配U8C采购订单明细行
|
||||
* 通过O采退出库单明细行,匹配到O采退订单明细行,再匹配到O采购订单明细行,最后匹配到U8C采购订单明细行
|
||||
* 匹配U8C委外订单明细行
|
||||
* 通过O采退出库单明细行,匹配到O采退订单明细行,再匹配到O采购订单明细行,最后匹配到U8C委外订单明细行
|
||||
*
|
||||
* @param detailsDto OFS采退出库单明细行
|
||||
* @param purchaseReturnOrder O采退订单
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,92 @@
|
|||
package com.hzya.frame.plugin.lets.u8cdto;
|
||||
|
||||
import com.hzya.frame.plugin.lets.entity.*;
|
||||
import com.hzya.frame.ttxofs.dto.ofsReceiptConfirmSearch.OFSReceiptConfirmSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
|
||||
import com.hzya.frame.ttxofs.dto.ofswareconfirma.OfsWareConfirmaDetails;
|
||||
import com.hzya.frame.ttxofs.dto.ofswareconfirma.OfsWareConfirmaHeader;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame.plugin.lets.u8cdto
|
||||
* @Project:kangarooDataCenterV3
|
||||
* @name:PurchaseReceiptConfirmationSonDto
|
||||
* @Date:2025/3/10 11:14
|
||||
* @Filename:PurchaseReceiptConfirmationSonDto
|
||||
*/
|
||||
@Data
|
||||
public class PurchaseReceiptConfirmationSonDto extends OfsWareConfirmaHeader {
|
||||
/**
|
||||
* OFS采购订单
|
||||
*/
|
||||
private OfsPoOrderData ofsPoOrderData;
|
||||
|
||||
/**
|
||||
* OFS采购入库单
|
||||
*/
|
||||
private StockinOrderSearchResponse.StockinOrder stockinOrder;
|
||||
|
||||
/**
|
||||
* U8C委外订单
|
||||
*/
|
||||
private ScOrderEntity scOrderEntity;
|
||||
|
||||
/**
|
||||
* U8C委外订单明细行
|
||||
*/
|
||||
// private List<ScOrderBEntity> scOrderBEntityList;
|
||||
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
private BdCorpEntity bdCorpEntity;
|
||||
|
||||
/**
|
||||
* 库存组织
|
||||
*/
|
||||
private BdCalbodyEntity bdCalbodyEntity;
|
||||
|
||||
/**
|
||||
* 仓库
|
||||
*/
|
||||
private BdStordocEntity bdStordocEntity;
|
||||
|
||||
/**
|
||||
* OFS采购入库单表头
|
||||
*/
|
||||
// private StockinOrderSearchResponse.StockinOrder.StockinH header;
|
||||
|
||||
/**
|
||||
* OFS采购入库确认单表体
|
||||
*/
|
||||
private List<OFSReceiptConfirmSearchResponse.Detail> details;
|
||||
|
||||
/**
|
||||
* U8C委外订单明细行
|
||||
*/
|
||||
private List<ScOrderBEntity> scOrderBEntityList;
|
||||
|
||||
/**
|
||||
* 采购组织
|
||||
*/
|
||||
private BdPurorgEntity bdPurorgEntity;
|
||||
|
||||
/**
|
||||
* 客商基本档案
|
||||
*/
|
||||
private BdCubasdocEntity bdCubasdocEntity;
|
||||
|
||||
/**
|
||||
* 客商管理档案
|
||||
*/
|
||||
private BdCumandocEntity bdCumandocEntity;
|
||||
|
||||
/**
|
||||
* 采购部门
|
||||
*/
|
||||
private BdDeptdocEntity bdDeptdocEntity;
|
||||
}
|
|
@ -78,6 +78,7 @@ public class ScorderBodyDto {
|
|||
private String vdef19;
|
||||
private String vdef2;
|
||||
private String vdef20;
|
||||
private String vdef21;
|
||||
private String vdef3;
|
||||
private String vdef4;
|
||||
private String vdef5;
|
||||
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
|
||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsReceiptConfirmSearch.OFSReceiptConfirmSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean;
|
||||
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
|
||||
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
|
||||
|
@ -13,6 +14,7 @@ import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderBean;
|
|||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofswareconfirma.OfsWareConfirmaResponse;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -54,7 +56,7 @@ public class OfsStandardUtil {
|
|||
Assert.notNull(headerDetailsDtoList, "headerDetailsDtoList不能为空");
|
||||
Assert.notNull(pageNo, "pageNo不能为空");
|
||||
Assert.notNull(api, "api不能为空");
|
||||
|
||||
|
||||
Long pageSize = 500L;
|
||||
queryOfsSoSaleOutVo.setPageNo(pageNo);
|
||||
queryOfsSoSaleOutVo.setPageSize(pageSize);
|
||||
|
@ -283,4 +285,42 @@ public class OfsStandardUtil {
|
|||
logger.error("ofsPoOrderBean为空!interfaceParamDto接口入参:{}", JSON.toJSON(interfaceParamDto));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* OFS入库确认单查询,入库完成状态
|
||||
*
|
||||
* @param queryOfsSoSaleOutVo 接口入参
|
||||
* @param headerDetailsDtoList 收集对象
|
||||
* @param pageNo 从第几页开始查询
|
||||
* @param api api接口名称
|
||||
* @author liuyang
|
||||
*/
|
||||
public void queryOfsWarehouseConfirOrder(QueryOfsSoSaleOutVo queryOfsSoSaleOutVo, List<OFSReceiptConfirmSearchResponse.Order> headerDetailsDtoList, Long pageNo, String api) throws Exception {
|
||||
Assert.notNull(queryOfsSoSaleOutVo, "queryOfsSoSaleOutVo不能为空!");
|
||||
Assert.notNull(headerDetailsDtoList, "headerDetailsDtoList不能为空");
|
||||
Assert.notNull(pageNo, "pageNo不能为空");
|
||||
Assert.notNull(api, "api不能为空");
|
||||
|
||||
Long pageSize = 200L;
|
||||
queryOfsSoSaleOutVo.setPageNo(pageNo);
|
||||
queryOfsSoSaleOutVo.setPageSize(pageSize);
|
||||
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi(api);
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo));
|
||||
OFSReceiptConfirmSearchResponse rertunGoodsRootBean = (OFSReceiptConfirmSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
if (rertunGoodsRootBean != null) {
|
||||
if ("false".equals(rertunGoodsRootBean.getError()) && "0".equals(rertunGoodsRootBean.getCode()) && "Success".equals(rertunGoodsRootBean.getMsg())) {
|
||||
List<OFSReceiptConfirmSearchResponse.Order> data = rertunGoodsRootBean.getData();
|
||||
if (data != null && data.size() > 0) {
|
||||
headerDetailsDtoList.addAll(data);
|
||||
queryOfsWarehouseConfirOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, ++pageNo, api);
|
||||
}
|
||||
} else {
|
||||
logger.error("查询失败,失败请求参数:{}", JSON.toJSON(interfaceParamDto));
|
||||
}
|
||||
} else {
|
||||
logger.error("rertunGoodsRootBean为空!interfaceParamDto对象的结果集json:{}", JSON.toJSON(interfaceParamDto));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -44,7 +44,6 @@ OA:
|
|||
# appKey: 1023142858
|
||||
# secret: 382e4a2584027a36ac9431103
|
||||
|
||||
|
||||
#O正式
|
||||
letsofs:
|
||||
url: http://39.98.168.188:30002/api/edi/u8c/ofs/in
|
||||
|
|
|
@ -46,4 +46,9 @@
|
|||
<!--新增采购订单同步-->
|
||||
<bean name="proxyPurchaseWarehousOrder" class="com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseWarehousOrder"/>
|
||||
|
||||
<!--O采购入库确认单(委外加工类型)->U8C委外入库单-->
|
||||
<bean name="consignmachiningCinfurmIn" class="com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningCinfurmIn"/>
|
||||
|
||||
<!-- 无源入库单(TOC) -> 推送U8C 红字销售订单 -->
|
||||
<bean name="passiveWarehouseReceiptToC" class="com.hzya.frame.plugin.lets.plugin.sales.PassiveWarehouseReceiptToC"/>
|
||||
</beans>
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package com.hzya.frame.plugin.lets.plugin.outsourc;
|
||||
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame.plugin.lets.plugin.outsourc
|
||||
* @Project:kangarooDataCenterV3
|
||||
* @name:ConsignmachiningCinfurmInTest
|
||||
* @Date:2025/3/6 17:06
|
||||
* @Filename:ConsignmachiningCinfurmInTest
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = WebappApplication.class)
|
||||
public class ConsignmachiningCinfurmInTest {
|
||||
|
||||
@Autowired
|
||||
private ConsignmachiningCinfurmIn consignmachiningCinfurmIn;
|
||||
|
||||
@Test
|
||||
public void startImplement() {
|
||||
try {
|
||||
// consignmachiningCinfurmIn.startImplementByTime("2024-01-02 00:00:00", "2024-01-02 23:59:59");
|
||||
|
||||
String code = "LETS-RE2025030400002411-confirm";
|
||||
consignmachiningCinfurmIn.startImplementByCode(code);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,9 +27,9 @@ public class ConsignmachiningInTest {
|
|||
@Test
|
||||
public void startImplement() {
|
||||
// String code = "LETS-RE2024082300000007";
|
||||
String code = "LETS-RE2025012000001264";
|
||||
String code = "LETS-RE2025030400002411";
|
||||
consignmachiningIn.startImplement(code);
|
||||
|
||||
// consignmachiningIn.startImplement("2024-09-24 13:49:15", "2024-09-24 13:49:17");
|
||||
// consignmachiningIn.startImplement("2025-03-04 18:07:47", "2025-03-04 18:07:47");
|
||||
}
|
||||
}
|
|
@ -26,6 +26,6 @@ public class ProxyPurchaseWarehousWarehouseTest {
|
|||
|
||||
@Test
|
||||
public void startImplementByCode() {
|
||||
proxyPurchaseWarehousWarehouse.startImplementByCode("LETS-RE2024120300000525");
|
||||
proxyPurchaseWarehousWarehouse.startImplementByCode("LETS-RE2025030700002906");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
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.*;
|
||||
|
||||
/**
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame.plugin.lets.plugin.sales
|
||||
* @Project:kangarooDataCenterV3
|
||||
* @name:PassiveWarehouseReceiptTest
|
||||
* @Date:2025/3/6 17:58
|
||||
* @Filename:PassiveWarehouseReceiptTest
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = WebappApplication.class)
|
||||
public class PassiveWarehouseReceiptTest {
|
||||
|
||||
@Autowired
|
||||
private PassiveWarehouseReceiptToC passiveWarehouseReceiptToC;
|
||||
|
||||
@Test
|
||||
public void startImplementStockByTime() {
|
||||
try {
|
||||
// passiveWarehouseReceiptToC.startImplementStockByTime("2025-02-27 00:00:00", "2025-02-27 23:59:59", "0");
|
||||
|
||||
|
||||
passiveWarehouseReceiptToC.startImplementByTradeTime("2024-12-28 00:00:00", "2024-12-28 23:59:59", "0");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,9 +27,9 @@ public class DeleteU8cDataUtilTest4 {
|
|||
public void deleteSoSaleinvoice() {
|
||||
try {
|
||||
//取消签字销售出库单 已测试
|
||||
deleteU8cDataUtil.cancelSignatureIcGeneralHV2("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
||||
// deleteU8cDataUtil.cancelSignatureIcGeneralHV2("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
||||
//销售出库单签字 已测试
|
||||
deleteU8cDataUtil.saleOutSign("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
||||
// deleteU8cDataUtil.saleOutSign("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
package com.hzya.frame.plugin.lets.util;
|
||||
|
||||
/**
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame.plugin.lets.util
|
||||
* @Project:kangarooDataCenterV3
|
||||
* @name:MyTest1
|
||||
* @Date:2025/3/7 22:50
|
||||
* @Filename:MyTest1
|
||||
*/
|
||||
public class MyTest1 {
|
||||
public static void main(String[] args) {
|
||||
//测试 1
|
||||
// System.out.println(MyChild1.str);
|
||||
//测试 2
|
||||
System.out.println(MyChild1.str2);
|
||||
}
|
||||
}
|
||||
|
||||
class MyParent1 {
|
||||
|
||||
public static String str = "hello world";
|
||||
|
||||
static {
|
||||
System.out.println("MyParent1");
|
||||
}
|
||||
}
|
||||
|
||||
class MyChild1 extends MyParent1 {
|
||||
|
||||
public static String str2 = "welcome";
|
||||
|
||||
static {
|
||||
System.out.println("MyChild1");
|
||||
}
|
||||
}
|
|
@ -5,12 +5,14 @@ import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUClassSearchResponse;
|
|||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OfsShopReturnMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OfsSupplierReturnMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsReceiptConfirmSearch.OFSReceiptConfirmSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSAdjustOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean;
|
||||
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderBean;
|
||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofswareconfirma.OfsWareConfirmaResponse;
|
||||
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchJsonRootBean;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
|
||||
|
@ -51,8 +53,8 @@ public class ApiDtoCacheMap {
|
|||
apiDtoCacheMap.put("ofs.purchaseReturnOrder.search", new PurchaseReturnOrderBean());//采退订单
|
||||
apiDtoCacheMap.put("ofs.adjustOrder.search", new OFSAdjustOrderSearchResponse());//调整单
|
||||
|
||||
apiDtoCacheMap.put("ofs.receipt.confirm.search", new OFSReceiptConfirmSearchResponse());//调整单
|
||||
apiDtoCacheMap.put("ofs.receipt.confirm.search", new OFSReceiptConfirmSearchResponse());//入库确认单
|
||||
|
||||
apiDtoCacheMap.put("ofs.receipt.confirm.search", new OfsWareConfirmaResponse());//入库确认单
|
||||
// apiDtoCacheMap.put("ofs.receipt.confirm.search", new OfsWareConfirmaResponse());//入库确认单
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue