南岐GPS接口
This commit is contained in:
@@ -15,12 +15,17 @@ import com.mhd.bi.domain.biWarehouseTransport.service.BiWarehouseTransportReport
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.dto.BiApiResult;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.gps.NanqiGpsLocationVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.feign.ThirdPartyServiceFeign;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@@ -72,6 +77,12 @@ public class BiReportApi extends BaseController {
|
||||
@Autowired
|
||||
private BiReportSnapshotSyncService biReportSnapshotSyncService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyServiceFeign thirdPartyServiceFeign;
|
||||
|
||||
@Autowired
|
||||
private ObjectMapper objectMapper;
|
||||
|
||||
|
||||
@ApiOperation(value = "手动触发快照同步", notes = "立即写入各 BI 快照表(综合、仓储运输、月台监测、总体运营、仓储运营专区、运输运营专区、港澳服务专区);须带 X-BI-Access-Token")
|
||||
@PostMapping("/snapshotSync/run")
|
||||
@@ -139,6 +150,29 @@ public class BiReportApi extends BaseController {
|
||||
List<RealPlatformInfoPO> data = biPlatformRealDataService.queryPlatformInfoList();
|
||||
return BiApiResult.ok(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 南岐GPS:根据车牌号查询车辆实时定位
|
||||
* (内部经 ThirdPartyServiceFeign 转发到 mhd_thrid_party 的 /nanqiGps/queryByPlate,逻辑仍在 mhd_thrid_party)
|
||||
*/
|
||||
@ApiOperation(value = "根据车牌号查询车辆实时定位(南岐GPS)", notes = "按车牌号查询南岐GPS车辆实时定位,实时转发到三方服务")
|
||||
@GetMapping("/nanqiGps/queryByPlate")
|
||||
public BiApiResult<NanqiGpsLocationVO> nanqiQueryByPlate(
|
||||
@ApiParam(value = "车牌号")
|
||||
@RequestParam(value = "carPlate") String carPlate) {
|
||||
if (carPlate == null || carPlate.trim().isEmpty()) {
|
||||
throw new ServiceException("车牌号不能为空");
|
||||
}
|
||||
AjaxResult result = thirdPartyServiceFeign.nanqiQueryByPlate(carPlate);
|
||||
Object codeObj = result == null ? null : result.get("code");
|
||||
if (codeObj == null || !"200".equals(String.valueOf(codeObj))) {
|
||||
String msg = result == null ? "南岐GPS查询失败" : String.valueOf(result.get("msg"));
|
||||
throw new ServiceException(msg);
|
||||
}
|
||||
Object data = result.get("data");
|
||||
NanqiGpsLocationVO vo = objectMapper.convertValue(data, NanqiGpsLocationVO.class);
|
||||
return BiApiResult.ok(vo);
|
||||
}
|
||||
//园区物流大屏接口----------------------------------------------------------------------
|
||||
/**
|
||||
* 总体运营态势
|
||||
|
||||
Reference in New Issue
Block a user