package cn.sikey.tools.controller.app.hisi;


import cn.sikey.tools.controller.app.hisi.vo.AssistedPositioningReqVO;
import cn.sikey.tools.service.hisi.HisiService;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/tools/hisi")
@Slf4j
public class HisiController {

    @Resource
    private HisiService hisiService;

    /**
     * 辅助定位
     *
     * @param assistedPositioningReqVO 参数
     * @param response                 返回数据
     * @return
     */
    @PostMapping("/agnss")
    public void agnss(@Validated @RequestBody AssistedPositioningReqVO assistedPositioningReqVO, HttpServletResponse response) {
        try {
            hisiService.agnss(assistedPositioningReqVO, response);
        } catch (Exception e) {
            log.error("[辅助定位]失败：{0}", e);
        }
    }

}
