perf(sales): 优化销售订单处理性能
- 移除不必要的日志记录,减少日志对性能的影响 - 注释掉部分未使用的代码,提高代码可读性 - 优化部门匹配逻辑,提高处理效率 - 移除冗余的检查逻辑,简化代码结构
This commit is contained in:
parent
6d246b79ae
commit
ceac1d668a
|
@ -424,7 +424,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtos = filterDataTran(headerDetailsDtoList);
|
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtos = filterDataTran(headerDetailsDtoList);
|
||||||
//保存到mysql底表
|
//保存到mysql底表
|
||||||
batchInsert(headerDetailsDtos);
|
batchInsert(headerDetailsDtos);
|
||||||
//执行推送采购主逻辑
|
//执行推送主逻辑
|
||||||
implementTran(headerDetailsDtos);
|
implementTran(headerDetailsDtos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1311,13 +1311,13 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
|
|
||||||
BdDeptdocEntity bdDeptdocEntity = null;
|
BdDeptdocEntity bdDeptdocEntity = null;
|
||||||
if (header2.getDepartmentType() == null || "".equals(header2.getDepartmentType().trim())) {
|
if (header2.getDepartmentType() == null || "".equals(header2.getDepartmentType().trim())) {
|
||||||
//默认业务部门
|
//默认业务部门,logger太影响性能
|
||||||
logger.info("OFS销售订单号:{} 不存在部门字段!", header2.getCode());
|
// logger.info("OFS销售订单号:{} 不存在部门字段!", header2.getCode());
|
||||||
bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMap().get(bdCorpEntity.getPkCorp());
|
bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMap().get(bdCorpEntity.getPkCorp());
|
||||||
Assert.notNull(bdDeptdocEntity, "无法匹配到业务部门 部门名称:业务部门 对应公司主键:{}", bdCorpEntity.getPkCorp());
|
Assert.notNull(bdDeptdocEntity, "无法匹配到业务部门 部门名称:业务部门 对应公司主键:{}", bdCorpEntity.getPkCorp());
|
||||||
} else {
|
} else {
|
||||||
//使用O选定的部门字段
|
//使用O选定的部门字段,logger太影响性能
|
||||||
logger.info("OFS销售订单号:{} 存在部门字段:{}!", header2.getCode(), header2.getDepartmentType());
|
// logger.info("OFS销售订单号:{} 存在部门字段:{}!", header2.getCode(), header2.getDepartmentType());
|
||||||
String deptCode = header2.getDepartmentType().trim();
|
String deptCode = header2.getDepartmentType().trim();
|
||||||
bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMapByDeptCode().get(deptCode);
|
bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMapByDeptCode().get(deptCode);
|
||||||
Assert.notNull(bdDeptdocEntity, "无法匹配到U8C部门档案 OFS销售订单-部门编码:{}", deptCode);
|
Assert.notNull(bdDeptdocEntity, "无法匹配到U8C部门档案 OFS销售订单-部门编码:{}", deptCode);
|
||||||
|
@ -1841,7 +1841,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
if (!"Y".equals(newState2)) {
|
if (!"Y".equals(newState2)) {
|
||||||
//验证数据完整性
|
//验证数据完整性
|
||||||
// checkArchives(oldValue.get(0));
|
// checkArchives(oldValue.get(0));
|
||||||
checkAllFail(oldValue, newState2, "1");
|
// checkAllFail(oldValue, newState2, "1");
|
||||||
//取交易成功时间,生成业务日期
|
//取交易成功时间,生成业务日期
|
||||||
String generateBusinessDate = createGenerateBusinessDateTran(header);
|
String generateBusinessDate = createGenerateBusinessDateTran(header);
|
||||||
|
|
||||||
|
@ -2057,7 +2057,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
logger.info("开始第二阶段:销售订单 ->(自动生成) 销售出库单 ->(自动生成) 销售发票");
|
logger.info("开始第二阶段:销售订单 ->(自动生成) 销售出库单 ->(自动生成) 销售发票");
|
||||||
try {
|
try {
|
||||||
//验证数据完整性
|
//验证数据完整性
|
||||||
checkAllFail(oldValue, newState3, "2");
|
// checkAllFail(oldValue, newState3, "2");
|
||||||
//取交易成功时间,生成业务日期
|
//取交易成功时间,生成业务日期
|
||||||
String generateBusinessDate = createGenerateBusinessDateTran(header);
|
String generateBusinessDate = createGenerateBusinessDateTran(header);
|
||||||
|
|
||||||
|
@ -2827,7 +2827,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
if (ofsOrderDetail.getShareTargetPayDiscounts() != null) {
|
if (ofsOrderDetail.getShareTargetPayDiscounts() != null) {
|
||||||
totalShareTargetPayDiscounts = totalShareTargetPayDiscounts.add(ofsOrderDetail.getShareTargetPayDiscounts());
|
totalShareTargetPayDiscounts = totalShareTargetPayDiscounts.add(ofsOrderDetail.getShareTargetPayDiscounts());
|
||||||
}
|
}
|
||||||
logger.info("对应的销售订单明细行主键:{}", ofsOrderDetail.getId());
|
// logger.info("对应的销售订单明细行主键:{}", ofsOrderDetail.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(0);
|
SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(0);
|
||||||
|
|
Loading…
Reference in New Issue