Commit e272a625 by 谢海旭

用量分析接口bug修复

1 parent b68edd54
......@@ -793,6 +793,7 @@ public class RiskAssessmentService {
//每日平均里程数
String sn = vehicleDeviceMapper.getEarliestInstallDeviceSn(vehicleId);
log.info("sn:{}", sn);
Example overviewExample = new Example.Builder(DeviceJourneyOverview.class).where(WeekendSqls.<DeviceJourneyOverview>custom()
.andEqualTo(DeviceJourneyOverview::getSn, sn).andEqualTo(DeviceJourneyOverview::getDelFlag, 0)).build();
DeviceJourneyOverview overview = deviceJourneyOverviewMapper.selectOneByExample(overviewExample);
......
......@@ -356,7 +356,8 @@
select tvd.sn
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
where tv.id = #{vehicleId} and tv.del_flag = 0 and tvd.del_flag = 0 and tvd.bind_status = 1 and tvd.wire_type = 1
left join t_device td on td.sn = tvd.sn
where tv.id = #{vehicleId} and tv.del_flag = 0 and tvd.del_flag = 0 and tvd.bind_status = 1 and td.source = 1
order by tvd.id asc limit 1
</select>
<select id="getVehicleEarliestWireDeviceSnByUserIds" resultType="java.lang.String">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!