|
|
@@ -2,6 +2,7 @@ package org.dromara.system.service.impl;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.thread.ThreadUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.cron.timingwheel.SystemTimer;
|
|
|
import cn.hutool.cron.timingwheel.TimerTask;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
@@ -116,6 +117,7 @@ public class TblDzbcOrderServiceImpl implements ITblDzbcOrderService {
|
|
|
validEntityBeforeSave(add);
|
|
|
Assert.isTrue(bo.getSchedulingId()!=null,"缺少路线班次");
|
|
|
TblDzbcPathSchedulingVo scheduling = pathSchedulingMapper.selectVoById(bo.getSchedulingId());
|
|
|
+ Assert.isTrue(scheduling!=null,"路线未查询到排班");
|
|
|
TblDzbcPathVo pathVo = pathMapper.selectVoById(scheduling.getPathId());
|
|
|
//Ext1 { zw:2,usersInfos:[user1,{lx:'成人','name':'张三','cardNo':'1234567890','cardType':'身份证'}] }
|
|
|
Assert.isTrue(scheduling!=null,"路线排班不存在");
|
|
|
@@ -136,6 +138,8 @@ public class TblDzbcOrderServiceImpl implements ITblDzbcOrderService {
|
|
|
//查询起点区域到目前区域的距离
|
|
|
List<TblDzbcAreaVo> areas = areaMapper.selectVoBatchIds(List.of(startSite.getAreaId(),endSite.getAreaId()), TblDzbcAreaVo.class);
|
|
|
Assert.isTrue(areas.size()==2,"站点信息错误");
|
|
|
+ Assert.isTrue(StrUtil.isNotEmpty(areas.get(0).getLocation()) ,areas.get(0).getName()+"区域未设置经纬度");
|
|
|
+ Assert.isTrue(StrUtil.isNotEmpty(areas.get(1).getLocation()),areas.get(1).getName()+"区域未设置经纬度");
|
|
|
double distanceArea = DistanceCalculator.calculateDistance(areas.get(0).getLocation(),areas.get(1).getLocation());
|
|
|
double distanceSite = DistanceCalculator.calculateDistance(startSite.getLocation(),endSite.getLocation());
|
|
|
Assert.isTrue(pathVo.getPrice()!=null,"路线价格未设置");
|