Commit 36f98ffb by levphon

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

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