This commit is contained in:
邱贞招 2024-12-26 20:28:12 +08:00
parent febbb1777f
commit 4024a94338
4 changed files with 37 additions and 35 deletions

View File

@ -135,6 +135,9 @@ public class AppVerifyController extends BaseController
@Autowired
private RedisLock redisLock;
@Autowired
private IEtLocationLogService etLocationLogService;
/**
* 故障上报
@ -1726,6 +1729,7 @@ public class AppVerifyController extends BaseController
}
logger.info("【根据时间查询车辆轨迹】:{}",sn,startTime,endTime);
List<EtLocationLog> trajectoryDetails = asDeviceService.trajectoryDetails(sn,startTime,endTime);
etLocationLogService.analytic(trajectoryDetails);
ajax.put(AjaxResult.DATA_TAG,trajectoryDetails);
return ajax;
}

View File

@ -2775,8 +2775,8 @@ public class AsDeviceServiceImpl extends ServiceImpl<AsDeviceMapper, AsDevice> i
@Override
public List<EtLocationLog> trajectoryDetails(String sn, String startTime,String endTime) {
AsDevice device = asDeviceMapper.selectAsDeviceBySn(sn);
List<EtLocationLog> etLocationLogs = etLocationLogMapper.selectEtLocationLogListByCreateTime(device.getMac(), startTime, endTime);
return etLocationLogs;
if(device == null) throw new RuntimeException("设备不存在");
return etLocationLogMapper.selectEtLocationLogListByCreateTime(device.getMac(), startTime, endTime);
}
@ -2884,8 +2884,6 @@ public class AsDeviceServiceImpl extends ServiceImpl<AsDeviceMapper, AsDevice> i
public boolean updateLatestLocation(String sn) {
AsDevice device = asDeviceMapper.selectAsDeviceBySn(sn);
if(device!=null){
String version = device.getVersion();
if(StrUtil.isBlank(version)){
String token = Token.getToken();
DataPointRes datapoints = historyDatapoints(asDeviceMapper.selectAsDeviceBySn(sn).getMac(), token);
if(datapoints.getCode() == 0){
@ -2925,7 +2923,6 @@ public class AsDeviceServiceImpl extends ServiceImpl<AsDeviceMapper, AsDevice> i
}
}
}
}
return false;
}

View File

@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
<if test="result != null and result != ''"> and result like concat('%', #{result}, '%')</if>
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="callStatus != null and callStatus != ''"> and call_status = #{callStatus}</if>
</where>
order by create_time desc

View File

@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectEtLocationLogListByCreateTime" parameterType="EtLocationLog" resultMap="EtLocationLogResult">
<include refid="selectEtLocationLogVoNoMsg"/>
<include refid="selectEtLocationLogVo"/>
where longitude != '0E-8' and latitude != '0E-8'
<if test="mac != null and mac != ''"> and mac = #{mac}</if>
<if test="startTime != null and startTime != ''">