Commit 36f98ffb by levphon

工单标准接口-激活工单位置查询

1 parent f1f2a8fd
......@@ -921,36 +921,38 @@ public class WorkOrderService {
Map<String, GpsBsData> gpsBsDataMap = getLastGpsBsBatchBySns(snList);
snList.forEach(sn -> {
WorkOrderDeviceAddressItem addressItem = new WorkOrderDeviceAddressItem();
R<DeviceDTO> deviceDTOR = deviceFeignService.getDeviceBySn(sn);
DeviceDTO deviceDTO = deviceDTOR.getData(DeviceDTO.class);
addressItem.setSn(sn);
addressItem.setSim(deviceDTO.getSim());
addressItem.setDeviceType(deviceDTO.getSource() == 1 ? "有线设备" : "无线设备");
GpsBsData gpsBsData = gpsBsDataMap.get(sn);
if (gpsBsData != null) {
WorkOrderDeviceAddressItem addressItem = new WorkOrderDeviceAddressItem();
// 获取 Gps 定位数据
GpsLocation gpsLocation = gpsBsData.getGpsLocation();
// 获取基站定位数据
GpsLocation bsLocation = gpsBsData.getBsLocation();
R<DeviceDTO> deviceDTOR = deviceFeignService.getDeviceBySn(sn);
DeviceDTO deviceDTO = deviceDTOR.getData(DeviceDTO.class);
addressItem.setSn(sn);
addressItem.setSim(deviceDTO.getSim());
if (gpsLocation != null) {
addressItem.setGpsLat(gpsLocation.getLat());
addressItem.setGpsLng(gpsLocation.getLng());
addressItem.setGpsPosition(gpsLocation.getAddress());
addressItem.setGpsTime(gpsLocation.getDateTime());
}
// 获取基站定位数据
GpsLocation bsLocation = gpsBsData.getBsLocation();
if (bsLocation != null) {
addressItem.setBsPosition(bsLocation.getAddress());
addressItem.setBsTime(bsLocation.getDateTime());
}
addressItem.setDeviceType(deviceDTO.getSource() == 1 ? "有线设备" : "无线设备");
addressItem.setType(0);
addressItem.setStatus(0);
}
list.add(addressItem);
});
verifyDTO.setList(list);
}
return verifyDTO;
}
......
......@@ -90,16 +90,15 @@
</select>
<select id="selectCompletedPartnerWorkOrdersByVin" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_workorder
where del_flag = 0
and status = 2
and order_source = #{orderSource}
and service_type = #{serviceType}
and partner_order_no = #{partnerOrderNo}
and vin = #{vin}
order by id desc
limit 1
select tw.*
from t_workorder tw
left join t_workorder_vehicle twv on twv.workorder_id = tw.id
where tw.del_flag = 0
and tw.status = 2
and tw.order_source = #{orderSource}
and tw.service_type = #{serviceType}
and tw.partner_order_no = #{partnerOrderNo}
and twv.vin = #{vin}
order by tw.id desc limit 1
</select>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!