优化OFS销售出库单处理逻辑
- 移除了不必要的注释代码,提高了代码的可读性 - 优化了OFS销售订单和销售出库单的关联逻辑 - 改进了店铺编码的处理方式,增加了去重逻辑 - 调整了部门信息的获取逻辑,提供了默认值处理 - 优化了存货和客商档案的查询逻辑
This commit is contained in:
parent
772e07467d
commit
467120fa5e
|
@ -887,7 +887,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
* @author liuyang
|
* @author liuyang
|
||||||
*/
|
*/
|
||||||
private String createGenerateBusinessDateStock(com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header) {
|
private String createGenerateBusinessDateStock(com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header) {
|
||||||
//TODO 测试
|
//测试
|
||||||
// header.setShipAt("2024-09-14");
|
// header.setShipAt("2024-09-14");
|
||||||
if (header != null && header.getShipAt() != null) {
|
if (header != null && header.getShipAt() != null) {
|
||||||
//TOC以出库日期作为业务日期
|
//TOC以出库日期作为业务日期
|
||||||
|
@ -960,20 +960,20 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
HeaderDto header = headerDetailsDto.getHeader();
|
HeaderDto header = headerDetailsDto.getHeader();
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto> details = headerDetailsDto.getDetails();
|
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto> details = headerDetailsDto.getDetails();
|
||||||
try {
|
try {
|
||||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = header.getHeaderDetailsDto();
|
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = header.getHeaderDetailsDto();
|
||||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = headerDetailsDto1.getHeader();
|
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = headerDetailsDto1.getHeader();
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.DetailsDto> details1 = headerDetailsDto1.getDetails();
|
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.DetailsDto> details1 = headerDetailsDto1.getDetails();
|
||||||
|
|
||||||
//OFS销售订单
|
//OFS销售订单
|
||||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto2 = header.getHeaderDetailsDto();
|
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto2 = header.getHeaderDetailsDto();
|
||||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header2 = headerDetailsDto2.getHeader();
|
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header2 = headerDetailsDto2.getHeader();
|
||||||
|
|
||||||
//TOC、TOB业务已经和万确认,如果没有,则默认为「SALES销售」
|
//TOC、TOB业务已经和万确认,如果没有,则默认为「SALES销售」
|
||||||
if (header2.getSubOrderType() == null || "".equals(header2.getSubOrderType())) {
|
// if (header2.getSubOrderType() == null || "".equals(header2.getSubOrderType())) {
|
||||||
header2.setSubOrderType("SALES");
|
// header2.setSubOrderType("SALES");
|
||||||
}
|
// }
|
||||||
BdRdclEntity bdRdclEntity = cacheTocMapVo.getStringBdRdclEntityMap().get(header2.getSubOrderType());
|
// BdRdclEntity bdRdclEntity = cacheTocMapVo.getStringBdRdclEntityMap().get(header2.getSubOrderType());
|
||||||
Assert.notNull(bdRdclEntity, "根据业务类型({})没有匹配到U8C业务类型", header2.getSubOrderType());
|
// Assert.notNull(bdRdclEntity, "根据业务类型({})没有匹配到U8C业务类型", header2.getSubOrderType());
|
||||||
|
|
||||||
//表头公司:通过名称匹配U8C公司
|
//表头公司:通过名称匹配U8C公司
|
||||||
// String corpName = "上海丽知品牌管理有限公司";
|
// String corpName = "上海丽知品牌管理有限公司";
|
||||||
|
@ -1006,6 +1006,62 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
Assert.notNull(bdSalestruEntity, "无匹配到销售组织 表头公司名称:{}", bdCorpEntity.getUnitname());
|
Assert.notNull(bdSalestruEntity, "无匹配到销售组织 表头公司名称:{}", bdCorpEntity.getUnitname());
|
||||||
|
|
||||||
//业务部门:暂定的部门名称:业务部门,2024年8月5日 15:39:42 已经和妮姐确认
|
//业务部门:暂定的部门名称:业务部门,2024年8月5日 15:39:42 已经和妮姐确认
|
||||||
|
// BdDeptdocEntity bdDeptdocEntity = null;
|
||||||
|
// if (header2.getDepartmentType() == null || "".equals(header2.getDepartmentType().trim())) {
|
||||||
|
// //默认业务部门
|
||||||
|
// logger.info("OFS销售订单号:{} 不存在部门字段!", header2.getCode());
|
||||||
|
// bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMap().get(bdCorpEntity.getPkCorp());
|
||||||
|
// Assert.notNull(bdDeptdocEntity, "无法匹配到业务部门 部门名称:业务部门 对应公司主键:{}", bdCorpEntity.getPkCorp());
|
||||||
|
// } else {
|
||||||
|
// //使用O选定的部门字段
|
||||||
|
// logger.info("OFS销售订单号:{} 存在部门字段:{}!", header2.getCode(), header2.getDepartmentType());
|
||||||
|
// String deptCode = header2.getDepartmentType().trim();
|
||||||
|
// bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMapByDeptCode().get(deptCode);
|
||||||
|
// Assert.notNull(bdDeptdocEntity, "无法匹配到U8C部门档案 OFS销售订单-部门编码:{}", deptCode);
|
||||||
|
// }
|
||||||
|
|
||||||
|
//客商基本档案
|
||||||
|
// 2024年8月8日 12:05:10 O店铺的业务编码=U8C客商自定义项1,O没有店铺信息查询接口,因此无法通过出库单的店铺编码,查询到O店铺档案对应的业务编码,接口上线之后需要补充这一部分逻辑
|
||||||
|
// String custName = "天猫intoyou旗舰店-自营";
|
||||||
|
String storeCode = header.getStoreCode();
|
||||||
|
//测试
|
||||||
|
// storeCode = "dy-off-01";
|
||||||
|
Assert.notNull(storeCode, "O店铺编码不能为空,没有办法完成业务逻辑!");
|
||||||
|
Assert.state(!"".equals(storeCode.trim()), "O店铺编码不能为空,没有办法完成业务逻辑!");
|
||||||
|
BdCubasdocEntity bdCubasdocEntity = cacheTocMapVo.getStringBdCubasdocEntityMap().get(storeCode);
|
||||||
|
Assert.notNull(bdCubasdocEntity, "根据U8C客商基本档案def1(记录o店铺编码),无法匹配到客户档案 o店铺编码:{}", storeCode);
|
||||||
|
|
||||||
|
//客商管理档案:2024年8月5日 15:41:54 TOC店铺名称查询U8C客商档案,已经和妮姐确认
|
||||||
|
//2024年8月5日 15:49:49 先根据O店铺编码,得到店铺档案信息,取到名称,通过U8C接口查询出来
|
||||||
|
//目前O店铺信息查询接口还没有,等待开发,所以我这里先写所一个名字
|
||||||
|
BdCumandocEntity bdCumandocEntity = cacheTocMapVo.getStringBdCumandocEntityMap().get(bdCubasdocEntity.getPkCubasdoc() + bdCorpEntity.getPkCorp());
|
||||||
|
Assert.notNull(bdCumandocEntity, "无法匹配到客商管理档案 店铺编码:{}", storeCode);
|
||||||
|
|
||||||
|
//查找平台
|
||||||
|
BdDefdocEntity bdDefdocEntity = cacheTocMapVo.getStringBdDefdocPlatformEntityMap().get(header.getSourcePlatformCode());
|
||||||
|
Assert.notNull(bdDefdocEntity, "根据O平台编码({})无法匹配到U8C平台自定义档案", header.getSourcePlatformCode());
|
||||||
|
|
||||||
|
//查找店铺
|
||||||
|
BdDefdocEntity bdDefdocEntity1 = cacheTocMapVo.getStringBdDefdocShopEntityMap().get(header.getStoreCode());
|
||||||
|
Assert.notNull(bdDefdocEntity1, "根据O店铺编码({})无法匹配到U8C店铺自定义档案", header.getStoreCode());
|
||||||
|
|
||||||
|
//字段拷贝
|
||||||
|
for (int j = 0; j < details.size(); j++) {
|
||||||
|
DetailsDto detailsDto = details.get(j);
|
||||||
|
|
||||||
|
//OFS销售订单
|
||||||
|
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto2 = detailsDto.getHeaderDetailsDto();
|
||||||
|
Assert.notNull(headerDetailsDto2, "根据出库单明细行对应的refOrderCode(OFS销售订单号)无法匹配到OFS销售订单", detailsDto.getRefOrderCode());
|
||||||
|
|
||||||
|
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header2 = headerDetailsDto2.getHeader();
|
||||||
|
|
||||||
|
//TOC、TOB业务已经和万确认,如果没有,则默认为「SALES销售」
|
||||||
|
if (header2.getSubOrderType() == null || "".equals(header2.getSubOrderType())) {
|
||||||
|
header2.setSubOrderType("SALES");
|
||||||
|
}
|
||||||
|
BdRdclEntity bdRdclEntity = cacheTocMapVo.getStringBdRdclEntityMap().get(header2.getSubOrderType());
|
||||||
|
Assert.notNull(bdRdclEntity, "根据业务类型({})没有匹配到U8C业务类型", header2.getSubOrderType());
|
||||||
|
|
||||||
BdDeptdocEntity bdDeptdocEntity = null;
|
BdDeptdocEntity bdDeptdocEntity = null;
|
||||||
if (header2.getDepartmentType() == null || "".equals(header2.getDepartmentType().trim())) {
|
if (header2.getDepartmentType() == null || "".equals(header2.getDepartmentType().trim())) {
|
||||||
//默认业务部门
|
//默认业务部门
|
||||||
|
@ -1020,33 +1076,6 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
Assert.notNull(bdDeptdocEntity, "无法匹配到U8C部门档案 OFS销售订单-部门编码:{}", deptCode);
|
Assert.notNull(bdDeptdocEntity, "无法匹配到U8C部门档案 OFS销售订单-部门编码:{}", deptCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
//客商基本档案
|
|
||||||
// 2024年8月8日 12:05:10 O店铺的业务编码=U8C客商自定义项1,O没有店铺信息查询接口,因此无法通过出库单的店铺编码,查询到O店铺档案对应的业务编码,接口上线之后需要补充这一部分逻辑
|
|
||||||
// String custName = "天猫intoyou旗舰店-自营";
|
|
||||||
String storeCode = header.getStoreCode();
|
|
||||||
Assert.notNull(storeCode, "O店铺编码不能为空,没有办法完成业务逻辑!");
|
|
||||||
Assert.state(!"".equals(storeCode.trim()), "O店铺编码不能为空,没有办法完成业务逻辑!");
|
|
||||||
BdCubasdocEntity bdCubasdocEntity = cacheTocMapVo.getStringBdCubasdocEntityMap().get(storeCode);
|
|
||||||
Assert.notNull(bdCubasdocEntity, "根据U8C客商基本档案def1(记录o店铺编码),无法匹配到客户档案 o店铺编码:{}", storeCode);
|
|
||||||
|
|
||||||
//客商管理档案:2024年8月5日 15:41:54 TOC店铺名称查询U8C客商档案,已经和妮姐确认
|
|
||||||
//2024年8月5日 15:49:49 先根据O店铺编码,得到店铺档案信息,取到名称,通过U8C接口查询出来
|
|
||||||
//目前O店铺信息查询接口还没有,等待开发,所以我这里先写所一个名字
|
|
||||||
BdCumandocEntity bdCumandocEntity = cacheTocMapVo.getStringBdCumandocEntityMap().get(bdCubasdocEntity.getPkCubasdoc() + bdCorpEntity.getPkCorp());
|
|
||||||
Assert.notNull(bdCumandocEntity, "无法匹配到客商档案 店铺名称:{}", "天猫intoyou旗舰店-自营");
|
|
||||||
|
|
||||||
//查找平台
|
|
||||||
BdDefdocEntity bdDefdocEntity = cacheTocMapVo.getStringBdDefdocPlatformEntityMap().get(header.getSourcePlatformCode());
|
|
||||||
Assert.notNull(bdDefdocEntity, "根据O平台编码({})无法匹配到U8C平台自定义档案", header.getSourcePlatformCode());
|
|
||||||
|
|
||||||
//查找店铺
|
|
||||||
BdDefdocEntity bdDefdocEntity1 = cacheTocMapVo.getStringBdDefdocShopEntityMap().get(header.getStoreCode());
|
|
||||||
Assert.notNull(bdDefdocEntity1, "根据O店铺编码({})无法匹配到U8C店铺自定义档案", header.getStoreCode());
|
|
||||||
|
|
||||||
//字段拷贝
|
|
||||||
for (int j = 0; j < details.size(); j++) {
|
|
||||||
DetailsDto detailsDto = details.get(j);
|
|
||||||
|
|
||||||
//存货基本档案
|
//存货基本档案
|
||||||
BdInvbasdocEntity bdInvbasdocEntity = cacheTocMapVo.getStringBdInvbasdocEntityMap().get(detailsDto.getSkuCode());
|
BdInvbasdocEntity bdInvbasdocEntity = cacheTocMapVo.getStringBdInvbasdocEntityMap().get(detailsDto.getSkuCode());
|
||||||
Assert.notNull(bdInvbasdocEntity, "无法匹配到存货基本档案 存货管理主键:{} 公司:{}", detailsDto.getSkuCode(), bdCorpEntity.getPkCorp());
|
Assert.notNull(bdInvbasdocEntity, "无法匹配到存货基本档案 存货管理主键:{} 公司:{}", detailsDto.getSkuCode(), bdCorpEntity.getPkCorp());
|
||||||
|
@ -1076,7 +1105,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
sonDetailsDto.setBdInvmandocEntity(bdInvmandocEntity);
|
sonDetailsDto.setBdInvmandocEntity(bdInvmandocEntity);
|
||||||
sonDetailsDto.setBdInvbasdocEntity(bdInvbasdocEntity);
|
sonDetailsDto.setBdInvbasdocEntity(bdInvbasdocEntity);
|
||||||
sonDetailsDto.setBdTaxitemsEntity(bdTaxitemsEntity);
|
sonDetailsDto.setBdTaxitemsEntity(bdTaxitemsEntity);
|
||||||
sonDetailsDto.setHeaderDetailsDto(headerDetailsDto1);
|
sonDetailsDto.setHeaderDetailsDto(detailsDto.getHeaderDetailsDto());
|
||||||
sonDetailsDto.setBdRdclEntity(bdRdclEntity);
|
sonDetailsDto.setBdRdclEntity(bdRdclEntity);
|
||||||
|
|
||||||
BeanUtil.copyPropertiesV2(detailsDto, sonDetailsDto);
|
BeanUtil.copyPropertiesV2(detailsDto, sonDetailsDto);
|
||||||
|
@ -1335,8 +1364,10 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
|
|
||||||
for (int i = 0; i < sonDetailsDtoList.size(); i++) {
|
for (int i = 0; i < sonDetailsDtoList.size(); i++) {
|
||||||
SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(i);
|
SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(i);
|
||||||
|
|
||||||
//实付金额/实发数量
|
//实付金额/实发数量
|
||||||
|
//OFS销售订单实付金额:totalPayAmount
|
||||||
|
//OFS销售出库单实付金额:totalPayAmount
|
||||||
|
//是一样的字段,目前暂时取销售出库单对应的totalPayAmount
|
||||||
Assert.notNull(sonDetailsDto.getTotalPayAmount(), "实付金额不能为空 明细行对象:{}", JSON.toJSONString(sonDetailsDto));
|
Assert.notNull(sonDetailsDto.getTotalPayAmount(), "实付金额不能为空 明细行对象:{}", JSON.toJSONString(sonDetailsDto));
|
||||||
Assert.notNull(sonDetailsDto.getShipQty(), "实发数量不能为空 明细行对象:{}", JSON.toJSONString(sonDetailsDto));
|
Assert.notNull(sonDetailsDto.getShipQty(), "实发数量不能为空 明细行对象:{}", JSON.toJSONString(sonDetailsDto));
|
||||||
BigDecimal totalPayAmountBigDecimal = new BigDecimal(sonDetailsDto.getTotalPayAmount());
|
BigDecimal totalPayAmountBigDecimal = new BigDecimal(sonDetailsDto.getTotalPayAmount());
|
||||||
|
@ -2215,27 +2246,39 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
for (int i = 0; i < splitListByCount.size(); i++) {
|
for (int i = 0; i < splitListByCount.size(); i++) {
|
||||||
List<HeaderDetailsDto> headerDetailsDtos = splitListByCount.get(i);
|
List<HeaderDetailsDto> headerDetailsDtos = splitListByCount.get(i);
|
||||||
|
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
Set<String> refOrderCodeSet = new HashSet<>();
|
||||||
|
// StringBuffer stringBuffer = new StringBuffer();
|
||||||
if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) {
|
if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) {
|
||||||
for (int j = 0; j < headerDetailsDtos.size(); j++) {
|
for (int j = 0; j < headerDetailsDtos.size(); j++) {
|
||||||
HeaderDetailsDto headerDetailsDto = headerDetailsDtos.get(j);
|
HeaderDetailsDto headerDetailsDto = headerDetailsDtos.get(j);
|
||||||
HeaderDto header = headerDetailsDto.getHeader();
|
HeaderDto header = headerDetailsDto.getHeader();
|
||||||
// List<DetailsDto> details = headerDetailsDto.getDetails();
|
List<DetailsDto> details = headerDetailsDto.getDetails();
|
||||||
|
for (int k = 0; k < details.size(); k++) {
|
||||||
|
DetailsDto detailsDto = details.get(k);
|
||||||
|
//考虑refOrderCode去除重复,提升查询的效率
|
||||||
// stringBuffer.append("'");
|
// stringBuffer.append("'");
|
||||||
stringBuffer.append(header.getRefOrderCode());
|
// stringBuffer.append(detailsDto.getRefOrderCode());
|
||||||
// stringBuffer.append("'");
|
// stringBuffer.append("'");
|
||||||
stringBuffer.append(",");
|
// stringBuffer.append(",");
|
||||||
|
refOrderCodeSet.add(detailsDto.getRefOrderCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String substring = stringBuffer.substring(0, stringBuffer.length());
|
}
|
||||||
|
if (refOrderCodeSet.size() > 0) {
|
||||||
|
//转换为逗号
|
||||||
|
StringJoiner joiner = new StringJoiner(",");
|
||||||
|
for (String str : refOrderCodeSet) {
|
||||||
|
joiner.add(str);
|
||||||
|
}
|
||||||
|
// String substring = stringBuffer.substring(0, stringBuffer.length());
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
||||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
queryOfsSoSaleOutVo.setCode(substring);
|
queryOfsSoSaleOutVo.setCode(joiner.toString());
|
||||||
ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L);
|
ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L);
|
||||||
allHeaderDetailsDtoArrayList.addAll(headerDetailsDtoArrayList);
|
allHeaderDetailsDtoArrayList.addAll(headerDetailsDtoArrayList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("queryOfsOrder方法抛出异常", e);
|
logger.error("queryOfsOrder方法抛出异常", e);
|
||||||
}
|
}
|
||||||
|
@ -2257,16 +2300,29 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
HeaderDto header = headerDetailsDto.getHeader();
|
HeaderDto header = headerDetailsDto.getHeader();
|
||||||
List<DetailsDto> details = headerDetailsDto.getDetails();
|
List<DetailsDto> details = headerDetailsDto.getDetails();
|
||||||
|
|
||||||
String targetRefOrderCode = header.getRefOrderCode();
|
for (int j = 0; j < details.size(); j++) {
|
||||||
for (int j = 0; j < ofsSaleOrder.size(); j++) {
|
DetailsDto detailsDto = details.get(j);
|
||||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = ofsSaleOrder.get(j);
|
String refOrderCode = detailsDto.getRefOrderCode();
|
||||||
|
|
||||||
|
for (int k = 0; k < ofsSaleOrder.size(); k++) {
|
||||||
|
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = ofsSaleOrder.get(k);
|
||||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = headerDetailsDto1.getHeader();
|
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = headerDetailsDto1.getHeader();
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.DetailsDto> details1 = headerDetailsDto1.getDetails();
|
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.DetailsDto> details1 = headerDetailsDto1.getDetails();
|
||||||
if (header1.getCode().equals(targetRefOrderCode)) {
|
if (header1.getCode().equals(refOrderCode)) {
|
||||||
header.setHeaderDetailsDto(headerDetailsDto1);
|
detailsDto.setHeaderDetailsDto(headerDetailsDto1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// String targetRefOrderCode = header.getRefOrderCode();
|
||||||
|
// for (int j = 0; j < ofsSaleOrder.size(); j++) {
|
||||||
|
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = ofsSaleOrder.get(j);
|
||||||
|
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = headerDetailsDto1.getHeader();
|
||||||
|
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.DetailsDto> details1 = headerDetailsDto1.getDetails();
|
||||||
|
// if (header1.getCode().equals(targetRefOrderCode)) {
|
||||||
|
// header.setHeaderDetailsDto(headerDetailsDto1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("findMatchingOfsOrder方法抛出异常", e);
|
logger.error("findMatchingOfsOrder方法抛出异常", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1550,8 +1550,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
||||||
for (int j = 0; j < stockinOrderList.size(); j++) {
|
for (int j = 0; j < stockinOrderList.size(); j++) {
|
||||||
StockinOrderSearchResponse.StockinOrder stockinOrder = stockinOrderList.get(j);
|
StockinOrderSearchResponse.StockinOrder stockinOrder = stockinOrderList.get(j);
|
||||||
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
|
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
|
||||||
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = stockinOrder.getDetails();
|
// List<StockinOrderSearchResponse.StockinOrder.StockinB> details = stockinOrder.getDetails();
|
||||||
|
|
||||||
idStr.append(header.getRefOrderCode());
|
idStr.append(header.getRefOrderCode());
|
||||||
idStr.append(",");
|
idStr.append(",");
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,8 @@ public class TocOrderBasicArchivesCacheUtil {
|
||||||
for (int i = 0; i < splitListByCount.size(); i++) {
|
for (int i = 0; i < splitListByCount.size(); i++) {
|
||||||
List<HeaderDto> headerDtoList1 = splitListByCount.get(i);
|
List<HeaderDto> headerDtoList1 = splitListByCount.get(i);
|
||||||
String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(","));
|
String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(","));
|
||||||
|
//测试
|
||||||
|
// codesStr = "'dy-off-01'";
|
||||||
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
|
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
|
||||||
bdCubasdocEntity.setDataSourceCode("lets_u8c");
|
bdCubasdocEntity.setDataSourceCode("lets_u8c");
|
||||||
bdCubasdocEntity.setDr(0L);
|
bdCubasdocEntity.setDr(0L);
|
||||||
|
@ -281,6 +282,8 @@ public class TocOrderBasicArchivesCacheUtil {
|
||||||
for (int i = 0; i < splitListByCount.size(); i++) {
|
for (int i = 0; i < splitListByCount.size(); i++) {
|
||||||
List<HeaderDto> headerDtoList1 = splitListByCount.get(i);
|
List<HeaderDto> headerDtoList1 = splitListByCount.get(i);
|
||||||
String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(","));
|
String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(","));
|
||||||
|
//测试
|
||||||
|
// codesStr = "'dy-off-01'";
|
||||||
|
|
||||||
BdCumandocEntity bdCumandocEntity = new BdCumandocEntity();
|
BdCumandocEntity bdCumandocEntity = new BdCumandocEntity();
|
||||||
bdCumandocEntity.setDataSourceCode("lets_u8c");
|
bdCumandocEntity.setDataSourceCode("lets_u8c");
|
||||||
|
|
|
@ -87,10 +87,14 @@ class SoSaleOutPluginInitializerToCTest {
|
||||||
|
|
||||||
// soSaleOutPluginInitializerToC.startImplementStockByTime("2024-09-24 16:35:43","2024-09-24 16:35:45");
|
// soSaleOutPluginInitializerToC.startImplementStockByTime("2024-09-24 16:35:43","2024-09-24 16:35:45");
|
||||||
|
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
||||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
queryOfsSoSaleOutVo.setCode("LETS-SO2024092500000018");
|
// queryOfsSoSaleOutVo.setCode("LETS-SO2024092500000018");
|
||||||
ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L);
|
// ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L);
|
||||||
System.out.println(headerDetailsDtoArrayList.get(0).getHeader().getDepartmentType());
|
// System.out.println(headerDetailsDtoArrayList.get(0).getHeader().getDepartmentType());
|
||||||
|
|
||||||
|
|
||||||
|
String s = "LETS-SH2024092900000029";
|
||||||
|
soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -53,4 +53,8 @@ public class DetailsDto {
|
||||||
* (销售)交易成功(TOB发票)是否成功
|
* (销售)交易成功(TOB发票)是否成功
|
||||||
*/
|
*/
|
||||||
private String newState4;
|
private String newState4;
|
||||||
|
/**
|
||||||
|
* OFS销售订单
|
||||||
|
*/
|
||||||
|
private com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto;
|
||||||
}
|
}
|
|
@ -78,5 +78,5 @@ public class HeaderDto {
|
||||||
// private String subOrderType;
|
// private String subOrderType;
|
||||||
|
|
||||||
//OFS销售订单
|
//OFS销售订单
|
||||||
private com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto;
|
// private com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto;
|
||||||
}
|
}
|
Loading…
Reference in New Issue