diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java index 469c224f7..4bacbfd67 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java @@ -147,7 +147,7 @@ public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl priceGeneralEntities = new ArrayList<>(); - biuldGeneral(route.getId(), generalServiceTypeEnums.getCode(), vo.getMinCost(), vo.getAdditionalCost(), priceGeneralEntities); + biuldGeneral(route, generalServiceTypeEnums.getCode(), vo.getMinCost(), vo.getAdditionalCost(), priceGeneralEntities); generalService.saveOrUpdateBatch(priceGeneralEntities); } return route.getId(); @@ -263,16 +263,16 @@ public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl generalList) { + private void biuldGeneral(BasicdataPriceRouteEntity routeEntity, Integer code, Double minCost, Double additionalCost, List generalList) { // 1 最低计费一个价格体系一个服务类型只存在一条 BasicdataPriceGeneralEntity generalEntity = generalService.getOne(Wrappers.lambdaQuery() - .eq(BasicdataPriceGeneralEntity::getBoId, priceId) + .eq(BasicdataPriceGeneralEntity::getBoId, routeEntity.getId()) .eq(BasicdataPriceGeneralEntity::getServiceType, code) ); if (ObjectUtil.isEmpty(generalEntity)) { generalEntity = new BasicdataPriceGeneralEntity(); - generalEntity.setBoId(priceId); - generalEntity.setPriceId(priceId); + generalEntity.setBoId(routeEntity.getId()); + generalEntity.setPriceId(routeEntity.getPriceId()); generalEntity.setServiceType(code); } // 设置最低计费和加算价格