|
|
|
@ -147,7 +147,7 @@ public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl<BasicdataPri
|
|
|
|
|
// 最低计费
|
|
|
|
|
if (ObjectUtil.isNotEmpty(vo.getMinCost())) { |
|
|
|
|
List<BasicdataPriceGeneralEntity> 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<BasicdataPri
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void biuldGeneral(Long priceId, Integer code, Double minCost, Double additionalCost, List<BasicdataPriceGeneralEntity> generalList) { |
|
|
|
|
private void biuldGeneral(BasicdataPriceRouteEntity routeEntity, Integer code, Double minCost, Double additionalCost, List<BasicdataPriceGeneralEntity> generalList) { |
|
|
|
|
// 1 最低计费一个价格体系一个服务类型只存在一条
|
|
|
|
|
BasicdataPriceGeneralEntity generalEntity = generalService.getOne(Wrappers.<BasicdataPriceGeneralEntity>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); |
|
|
|
|
} |
|
|
|
|
// 设置最低计费和加算价格
|
|
|
|
|