修改获取技师出行方式及免费公里数

This commit is contained in:
yangjun 2024-06-23 16:59:00 +08:00
parent 1e825d0230
commit 24e0fb0dcf
1 changed files with 11 additions and 2 deletions

View File

@ -190,8 +190,17 @@ public class TravelConfServiceImpl extends ServiceImpl<TravelConfDao, TravelConf
public TravelPriceVo calcTravelPrice(Long artificerId, String toLongitude, String toLatitude) {
Artificer artificerInfo = artificerService.getById(artificerId);
Integer travelType = TravelEnum.TravelType.TAXI.getValue();//先默认出租车 TODO 现在没有字段后补
BigDecimal freeKilometers = new BigDecimal(0);//TODO 现在没有字段后补
Integer cxfs = artificerInfo.getTripWay();//1公交 2免费 3出租
Integer mfgls = artificerInfo.getTripWayNum();//免费公里数
if(cxfs==null){
cxfs = 3;
}
if(mfgls==null){
mfgls = 0;
}
Integer travelType = cxfs;//先默认免费
BigDecimal freeKilometers = new BigDecimal(mfgls);//
String longitude = artificerInfo.getLongitude();
String latitude = artificerInfo.getLatitude();
return calcTravelPrice(travelType, freeKilometers, longitude, latitude, toLongitude, toLatitude);