feat: 同步的行程节点查看和同步时加入供应商规则(系统标识,公司名,差标管控)
This commit is contained in:
parent
79e03e9ca5
commit
709dddb52a
|
@ -161,26 +161,26 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync {
|
|||
dto.setStatus("1");
|
||||
|
||||
|
||||
Optional<Supplier> supplier = supplierRepository.findBySupplierName(SUPPLIER_AMAP);
|
||||
supplier.flatMap(Supplier::carSupplierProduct).ifPresent(carSupplierProduct -> {
|
||||
if (carSupplierProduct.getSupplierProductStandardLevelList()
|
||||
.stream()
|
||||
.filter(SupplierProductStandardLevel::inUse)
|
||||
.map(SupplierProductStandardLevel::getStandardLevelName)
|
||||
.anyMatch(standardLevel -> standardLevel.equals(routeRequestFields.getStandardLevel()))) {
|
||||
amapPolicyRepository.findByStandardLevel(routeRequestFields.getStandardLevel())
|
||||
.ifPresent(policy -> dto.setRegulationId(policy.getAmapPolicyCode()));
|
||||
} else {
|
||||
throw new AuthException("你目前的公司暂不支持使用高德打车");
|
||||
}
|
||||
});
|
||||
|
||||
if (routeRequestFields.getAccountCompanyName().equals("浙江正泰物联技术有限公司") ||
|
||||
routeRequestFields.getAccountCompanyName().equals("浙江正泰仪器仪表有限责任公司") ||
|
||||
routeRequestFields.getAccountCompanyName().equals("浙江正泰水务科技有限公司") ||
|
||||
routeRequestFields.getAccountCompanyName().equals("山东鲁正电子有限公司")) {
|
||||
throw new AuthException("你目前的公司暂不支持使用高德打车");
|
||||
}
|
||||
// Optional<Supplier> supplier = supplierRepository.findBySupplierName(SUPPLIER_AMAP);
|
||||
// supplier.flatMap(Supplier::carSupplierProduct).ifPresent(carSupplierProduct -> {
|
||||
// if (carSupplierProduct.getSupplierProductStandardLevelList()
|
||||
// .stream()
|
||||
// .filter(SupplierProductStandardLevel::inUse)
|
||||
// .map(SupplierProductStandardLevel::getStandardLevelName)
|
||||
// .anyMatch(standardLevel -> standardLevel.equals(routeRequestFields.getStandardLevel()))) {
|
||||
// amapPolicyRepository.findByStandardLevel(routeRequestFields.getStandardLevel())
|
||||
// .ifPresent(policy -> dto.setRegulationId(policy.getAmapPolicyCode()));
|
||||
// } else {
|
||||
// throw new AuthException("你目前的公司暂不支持使用高德打车");
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// if (routeRequestFields.getAccountCompanyName().equals("浙江正泰物联技术有限公司") ||
|
||||
// routeRequestFields.getAccountCompanyName().equals("浙江正泰仪器仪表有限责任公司") ||
|
||||
// routeRequestFields.getAccountCompanyName().equals("浙江正泰水务科技有限公司") ||
|
||||
// routeRequestFields.getAccountCompanyName().equals("山东鲁正电子有限公司")) {
|
||||
// throw new AuthException("你目前的公司暂不支持使用高德打车");
|
||||
// }
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue