refactor(lets): 重构公司代码匹配逻辑
- 移除原有的简单字符串包含判断 - 新增 QueryU8CEntityUtil 类中的 companyMatch 方法进行精确匹配- 更新多个类中的公司代码过滤逻辑,使用新的匹配方法 - 优化测试用例,调整时间参数和订单编号
This commit is contained in:
parent
aba3955046
commit
41f69e8c5e
|
@ -243,7 +243,11 @@ public class ConsignmachiningCinfurmIn extends PluginBaseEntity {
|
|||
public boolean test(OFSReceiptConfirmSearchResponse.Order headerDetailsDto) {
|
||||
OFSReceiptConfirmSearchResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +310,11 @@ public class ConsignmachiningCinfurmIn extends PluginBaseEntity {
|
|||
public boolean test(OFSReceiptConfirmSearchResponse.Order headerDetailsDto) {
|
||||
OFSReceiptConfirmSearchResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -247,7 +247,11 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
public boolean test(StockinOrderSearchResponse.StockinOrder headerDetailsDto) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +310,11 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
public boolean test(StockinOrderSearchResponse.StockinOrder headerDetailsDto) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,7 +246,11 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -305,7 +309,11 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -236,7 +236,11 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -294,7 +298,11 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,7 +235,11 @@ public class ProxyPurchaseWarehousOrder extends PluginBaseEntity {
|
|||
public boolean test(OfsPoOrderData headerDetailsDto) {
|
||||
OfsPoOrderHeader header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
//2025年5月23日17:51:14
|
||||
|
@ -299,7 +303,11 @@ public class ProxyPurchaseWarehousOrder extends PluginBaseEntity {
|
|||
public boolean test(OfsPoOrderData headerDetailsDto) {
|
||||
OfsPoOrderHeader header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,7 +241,11 @@ public class ProxyPurchaseWarehousWarehouse extends PluginBaseEntity {
|
|||
public boolean test(OFSReceiptConfirmSearchResponse.Order headerDetailsDto) {
|
||||
OFSReceiptConfirmSearchResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -301,7 +305,11 @@ public class ProxyPurchaseWarehousWarehouse extends PluginBaseEntity {
|
|||
public boolean test(OFSReceiptConfirmSearchResponse.Order headerDetailsDto) {
|
||||
OFSReceiptConfirmSearchResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -287,7 +287,11 @@ public class PassiveWarehouseReceiptToB extends PluginBaseEntity {
|
|||
public boolean test(PassiveStorageResponse.Data headerDetailsDto) {
|
||||
PassiveStorageResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +346,11 @@ public class PassiveWarehouseReceiptToB extends PluginBaseEntity {
|
|||
public boolean test(PassiveStorageResponse.Data headerDetailsDto) {
|
||||
PassiveStorageResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -395,7 +403,11 @@ public class PassiveWarehouseReceiptToB extends PluginBaseEntity {
|
|||
public boolean test(PassiveStorageResponse.Data headerDetailsDto) {
|
||||
PassiveStorageResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -268,7 +268,11 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
|||
public boolean test(PassiveStorageResponse.Data headerDetailsDto) {
|
||||
PassiveStorageResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -320,7 +324,11 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
|||
PassiveStorageResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
//过滤掉业务上不需要的公司
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +350,7 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
/**
|
||||
* 交易采购,按指定时间拉取
|
||||
* 交易成功,按指定时间拉取
|
||||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
|
@ -375,7 +383,11 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
|||
PassiveStorageResponse.Header header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
//过滤掉不需要的公司
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,7 +293,11 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -354,7 +358,11 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -409,7 +417,11 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -283,7 +283,11 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -398,7 +402,11 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -488,7 +496,11 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
public boolean test(HeaderDetailsDto headerDetailsDto) {
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,7 +286,11 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
public boolean test(StockinOrderSearchResponse.StockinOrder headerDetailsDto) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +353,11 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
public boolean test(StockinOrderSearchResponse.StockinOrder headerDetailsDto) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -408,7 +416,11 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
public boolean test(StockinOrderSearchResponse.StockinOrder headerDetailsDto) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,7 +263,11 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
public boolean test(StockinOrderSearchResponse.StockinOrder headerDetailsDto) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +321,11 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
public boolean test(StockinOrderSearchResponse.StockinOrder headerDetailsDto) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
//2025 年 3 月 20 日 18:25:25 改为生成红字应收单,不过滤先退款后退款的场景
|
||||
|
@ -399,7 +407,11 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
StockinOrderSearchResponse.StockinOrder.StockinH header = headerDetailsDto.getHeader();
|
||||
if (header != null && header.getCompanyCode() != null) {
|
||||
//过滤掉不需要的公司
|
||||
if (filter_company.contains(header.getCompanyCode().trim())) {
|
||||
// if (filter_company.contains(header.getCompanyCode().trim() + ",")) {
|
||||
// return true;
|
||||
// }
|
||||
if (queryU8CEntityUtil.companyMatch(filter_company, header.getCompanyCode().trim())) {
|
||||
//如果为true则返回true,如果为false则移交给后续逻辑处理,后续逻辑可能还有判断
|
||||
return true;
|
||||
}
|
||||
//过滤掉入库日期为空的单据
|
||||
|
|
|
@ -734,4 +734,20 @@ public class QueryU8CEntityUtil {
|
|||
.collect(Collectors.joining(","));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司匹配逻辑
|
||||
*/
|
||||
public boolean companyMatch(String filterCompany, String targetCompany) {
|
||||
if (filterCompany != null && !"".equals(filterCompany)) {
|
||||
String[] split = filterCompany.split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
String s = split[i];
|
||||
if (s.equals(targetCompany)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class ConsignmachiningCinfurmInTest {
|
|||
// consignmachiningCinfurmIn.startImplementByTime("2024-01-02 00:00:00", "2024-01-02 23:59:59");
|
||||
|
||||
// String code = "LETS-RE2024111400002771-confirm";
|
||||
String code = "LETS-RE2025040700001976-confirm";
|
||||
String code = "LETS-RE2025052600002368-confirm";
|
||||
consignmachiningCinfurmIn.startImplementByCode(code);
|
||||
|
||||
// if ("HZYX,YD,NMNS,YX,KS,YNS,HJ".contains("121212")) {
|
||||
|
|
|
@ -30,9 +30,9 @@ public class PassiveWarehouseReceiptToCTest {
|
|||
//测试O无源件入库
|
||||
// passiveWarehouseReceiptToC.startImplementStockByTime("2025-03-11 22:27:02", "2025-03-11 22:27:02");
|
||||
//测试O无源生成红字应收
|
||||
passiveWarehouseReceiptToC.startImplementStockByTime("2025-04-07 13:10:01", "2025-04-07 13:10:01");
|
||||
// passiveWarehouseReceiptToC.startImplementStockByTime("2025-04-07 13:10:01", "2025-04-07 13:10:01");
|
||||
|
||||
// passiveWarehouseReceiptToC.startImplementByCode("RH20250403000841", "stock");
|
||||
passiveWarehouseReceiptToC.startImplementByCode("RH20250403000841", "stock");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
|||
import com.hzya.frame.plugin.lets.u8cdto.SoSaleResultRootDto;
|
||||
import com.hzya.frame.plugin.lets.util.OfsStandardUtil;
|
||||
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
|
||||
import com.hzya.frame.plugin.lets.util.ShopTobOrToCUtil;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -53,8 +54,13 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
@Autowired
|
||||
private QueryBdBusitypeUtil queryBdBusitypeUtil;
|
||||
|
||||
@Autowired
|
||||
private ShopTobOrToCUtil shopTobOrToCUtil;
|
||||
|
||||
@Test
|
||||
void startImplement() throws Exception {
|
||||
// String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
// System.out.println(tocShop);
|
||||
// soSaleOutPluginInitializerToC.startImplement(null, null);
|
||||
// soSaleOutPluginInitializerToC.queryOfsSaleOrder();
|
||||
|
||||
|
@ -74,8 +80,8 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
// errorHeaderDetailsDtoDto.
|
||||
|
||||
|
||||
String aaa = "LETS-SH2025032600025120";
|
||||
soSaleOutPluginInitializerToC.startImplementStockByCode(aaa, "tran");
|
||||
String aaa = "LETS-SH2025061500020655";
|
||||
soSaleOutPluginInitializerToC.startImplementStockByCode(aaa, "stock");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -103,7 +109,7 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
// String s = "LETS-SH2025032200027982";
|
||||
// soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
|
||||
|
||||
// soSaleOutPluginInitializerToC.startImplementTranByTime("2025-05-08 00:00:00", "2025-05-08 23:59:59", "2");
|
||||
// soSaleOutPluginInitializerToC.startImplementTranByTime("2025-05-08 00:00:00", "2025-05-08 23:59:59", "0");
|
||||
|
||||
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
||||
// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
|
@ -146,6 +152,12 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
// String processName = "TOC确认收入";
|
||||
// BdBusitypeEntity bdBusitypeEntity = queryBdBusitypeUtil.queryBdBusitype(processName);
|
||||
// System.out.println(bdBusitypeEntity.getPkBusitype());
|
||||
|
||||
|
||||
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
||||
// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2025061500020655");
|
||||
// ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -173,6 +185,15 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
// while (true) {
|
||||
// Thread.currentThread().sleep(1000);
|
||||
// System.out.println(thread.getName());
|
||||
// }
|
||||
|
||||
// String filter_company = "aaaa,bbbb,";
|
||||
// if (filter_company.contains("aa,")) {
|
||||
// System.out.println("可以匹配 " + filter_company);
|
||||
// } else {
|
||||
// System.out.println("无法匹配");
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -65,11 +65,11 @@ public class SoSaleReturnPluginInitializerToCTest {
|
|||
// soSaleReturnPluginInitializerToC.startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
|
||||
try {
|
||||
// soSaleReturnPluginInitializerToC.startImplementByTradeTime("2025-04-28 00:00:00", "2025-04-28 23:59:59", "2");
|
||||
soSaleReturnPluginInitializerToC.startImplementByTradeTime("2025-04-28 00:00:00", "2025-04-28 23:59:59", "0");
|
||||
|
||||
// soSaleReturnPluginInitializerToC.startImplementByCode("LETS-RE2025010900002384", "tran");
|
||||
|
||||
// soSaleReturnPluginInitializerToC.startImplementStockByTime("2025-01-31 00:00:00", "2025-01-31 23:59:59", "1");
|
||||
// soSaleReturnPluginInitializerToC.startImplementStockByTime("2025-01-31 00:00:00", "2025-01-31 23:59:59", "0");
|
||||
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// soSaleReturnPluginInitializerToC.executeBusiness(jsonObject);
|
||||
|
|
|
@ -104,9 +104,9 @@ public class OfsOrderAfterSalesAmountAllocationUtilTest {
|
|||
// header.setExpertDiscounts("4.22");
|
||||
// header.setPayDiscounts("1.96");
|
||||
|
||||
ofsOrderAfterSalesAmountAllocationUtil.tocSalesAmountAllocation(rerturnGoodsOrderSearchDataList.get(0));
|
||||
// ofsOrderAfterSalesAmountAllocationUtil.tocSalesAmountAllocation(rerturnGoodsOrderSearchDataList.get(0));
|
||||
//打印结果
|
||||
ofsOrderAfterSalesAmountAllocationUtil.printAmountOfMoneyNum(rerturnGoodsOrderSearchDataList);
|
||||
// ofsOrderAfterSalesAmountAllocationUtil.printAmountOfMoneyNum(rerturnGoodsOrderSearchDataList);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue