|
@@ -7,6 +7,7 @@ import com.global.base.log.LogPrintMgr;
|
|
|
import com.shkpr.service.alambizplugin.apiparam.GisSurveyCheckParams;
|
|
|
import com.shkpr.service.alambizplugin.apiparam.GisSurveyThirdExportParams;
|
|
|
import com.shkpr.service.alambizplugin.apiparam.GisSurveyThirdImportParams;
|
|
|
+import com.shkpr.service.alambizplugin.bizservice.GisSurveyCRSBizService;
|
|
|
import com.shkpr.service.alambizplugin.bizservice.GisSurveyCadConvertBizService;
|
|
|
import com.shkpr.service.alambizplugin.bizservice.GisSurveySystemCheckBizService;
|
|
|
import com.shkpr.service.alambizplugin.bizservice.GisSurveyThirdExportBizService;
|
|
@@ -24,6 +25,7 @@ import com.shkpr.service.alambizplugin.controllervalid.CommonParamValidSK;
|
|
|
import com.shkpr.service.alambizplugin.dbdao.services.GisSurveyLayerApplyThirdCopyServiceImpl;
|
|
|
import com.shkpr.service.alambizplugin.dbdao.services.intef.GisSurveyLayerApplyService;
|
|
|
import com.shkpr.service.alambizplugin.dto.CommAsyncResult;
|
|
|
+import com.shkpr.service.alambizplugin.dto.CommCRSInfo;
|
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyThirdCopy;
|
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckResultDetail;
|
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveyThirdImportResult;
|
|
@@ -69,9 +71,12 @@ public class ApiGisSurveyController {
|
|
|
private final AtomicInteger mSeqThirdExportReq;
|
|
|
private final AtomicInteger mSeqThirdExportGetReq;
|
|
|
private final AtomicInteger mSeqCadConvertGetReq;
|
|
|
+ private final AtomicInteger mSeqCrsGetListReq;
|
|
|
+ private final AtomicInteger mSeqCrsGetInfoReq;
|
|
|
|
|
|
private final ObjectMapper objectMapper;
|
|
|
|
|
|
+ private final GisSurveyCRSBizService crsBizService;
|
|
|
private final GisSurveySystemCheckBizService systemCheckBizService;
|
|
|
private final GisSurveyThirdImportBizService thirdImportBizService;
|
|
|
private final GisSurveyThirdExportBizService thirdExportBizService;
|
|
@@ -80,6 +85,7 @@ public class ApiGisSurveyController {
|
|
|
private final GisSurveyLayerApplyThirdCopyServiceImpl layerApplyThirdCopyService;
|
|
|
|
|
|
public ApiGisSurveyController(ObjectMapper objectMapper
|
|
|
+ , GisSurveyCRSBizService crsBizService
|
|
|
, GisSurveySystemCheckBizService systemCheckBizService
|
|
|
, GisSurveyThirdImportBizService thirdImportBizService
|
|
|
, GisSurveyThirdExportBizService thirdExportBizService
|
|
@@ -99,7 +105,10 @@ public class ApiGisSurveyController {
|
|
|
mSeqThirdExportGetReq = new AtomicInteger(0);
|
|
|
mSeqCadConvertReq = new AtomicInteger(0);
|
|
|
mSeqCadConvertGetReq = new AtomicInteger(0);
|
|
|
+ mSeqCrsGetListReq = new AtomicInteger(0);
|
|
|
+ mSeqCrsGetInfoReq = new AtomicInteger(0);
|
|
|
this.objectMapper = objectMapper;
|
|
|
+ this.crsBizService = crsBizService;
|
|
|
this.systemCheckBizService = systemCheckBizService;
|
|
|
this.thirdImportBizService = thirdImportBizService;
|
|
|
this.thirdExportBizService = thirdExportBizService;
|
|
@@ -980,4 +989,136 @@ public class ApiGisSurveyController {
|
|
|
, resResult.getTimestamp() - llReqBefore));
|
|
|
return resResult;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取crs列表
|
|
|
+ *
|
|
|
+ * @param request request
|
|
|
+ * @param strClientType 客户端类型
|
|
|
+ * @param strUserAgent 用户信息
|
|
|
+ * @return crs列表
|
|
|
+ */
|
|
|
+ @GetMapping(value = ApiURI.URI_XXX_CRS_GET_LIST)
|
|
|
+ public ResponseRes<String> crsGetList(HttpServletRequest request
|
|
|
+ , @RequestHeader(value = ApiURI.HEADER_CLIENT_TYPE, required = false) String strClientType
|
|
|
+ , @RequestHeader(value = ApiURI.HEADER_USER_AGENT, required = false) String strUserAgent) {
|
|
|
+ //入参校验
|
|
|
+ final String URI_PATH = request.getRequestURI();
|
|
|
+ final String strPlatform = CommTool.getPlatformByAgent(strClientType, strUserAgent);
|
|
|
+ final String strUserId = (String) request.getAttribute(TokenAuthenticationService.HEADER_USERID);
|
|
|
+
|
|
|
+
|
|
|
+ //begin
|
|
|
+ long llReqBefore = System.currentTimeMillis();
|
|
|
+ String strRunSeq = String.format("%d-%d", llReqBefore, mSeqCrsGetListReq.incrementAndGet());
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName, strUserId
|
|
|
+ , String.format("%s:%s seq:{%s} begin====>"
|
|
|
+ , strPlatform
|
|
|
+ , URI_PATH
|
|
|
+ , strRunSeq));
|
|
|
+
|
|
|
+ //构建result
|
|
|
+ ResponseRes<String> resResult = new ResponseRes<>();
|
|
|
+ resResult.setRescode(ResponseCode.RESULT_ASYNC_TASK_FAILED.toStrCode());
|
|
|
+ resResult.setResmsg(ResponseCode.RESULT_ASYNC_TASK_FAILED.toStrMsg());
|
|
|
+
|
|
|
+ //获取crs列表
|
|
|
+ List<GisSurveyCRSBizService.Item> result = crsBizService.getCRSList();
|
|
|
+ String resultStr = null;
|
|
|
+ try {
|
|
|
+ if (result != null) resultStr = objectMapper.writeValueAsString(result);
|
|
|
+ } catch (JsonProcessingException e) {
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR, mBizType, mStrClassName
|
|
|
+ , String.format("Json序列化异常: error:%s", e));
|
|
|
+ }
|
|
|
+
|
|
|
+ //执行成功
|
|
|
+ if (resultStr != null) {
|
|
|
+ resResult.setRescode(ResponseCode.RESULT_NORMAL.toStrCode());
|
|
|
+ resResult.setResmsg(ResponseCode.RESULT_NORMAL.toStrMsg());
|
|
|
+ resResult.setResdata(resultStr);
|
|
|
+ }
|
|
|
+
|
|
|
+ //end
|
|
|
+ resResult.setTimestamp(System.currentTimeMillis());
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName, strUserId
|
|
|
+ , String.format("%s:%s seq:{%s} rescode:{%s} resmsg:{%s} time:{%d ms} end<===="
|
|
|
+ , strPlatform
|
|
|
+ , URI_PATH
|
|
|
+ , strRunSeq
|
|
|
+ , resResult.getRescode()
|
|
|
+ , resResult.getResmsg()
|
|
|
+ , resResult.getTimestamp() - llReqBefore));
|
|
|
+ return resResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取crs信息
|
|
|
+ *
|
|
|
+ * @param request request
|
|
|
+ * @param strClientType 客户端类型
|
|
|
+ * @param strUserAgent 用户信息
|
|
|
+ * @return crs信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = ApiURI.URI_XXX_CRS_GET_INFO)
|
|
|
+ public ResponseRes<String> crsGetInfo(HttpServletRequest request
|
|
|
+ , @RequestHeader(value = ApiURI.HEADER_CLIENT_TYPE, required = false) String strClientType
|
|
|
+ , @RequestHeader(value = ApiURI.HEADER_USER_AGENT, required = false) String strUserAgent
|
|
|
+ , @RequestParam(value = "code", required = false) String code) throws SelfException {
|
|
|
+ //入参校验
|
|
|
+ final String URI_PATH = request.getRequestURI();
|
|
|
+ final String strPlatform = CommTool.getPlatformByAgent(strClientType, strUserAgent);
|
|
|
+ final String strUserId = (String) request.getAttribute(TokenAuthenticationService.HEADER_USERID);
|
|
|
+ if (StringUtils.isAnyBlank(code) || StringUtils.length(code) > 64) {
|
|
|
+ throw new SelfException(ResponseCode.STATUS_ERROR_PARAM_FORMAT.toStrCode()
|
|
|
+ , String.format(ApiURI.EXCEPTION_FORMAT
|
|
|
+ , strPlatform
|
|
|
+ , URI_PATH
|
|
|
+ , ResponseCode.STATUS_ERROR_PARAM_FORMAT.toStrMsg()));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //begin
|
|
|
+ long llReqBefore = System.currentTimeMillis();
|
|
|
+ String strRunSeq = String.format("%d-%d", llReqBefore, mSeqCrsGetInfoReq.incrementAndGet());
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName, strUserId
|
|
|
+ , String.format("%s:%s seq:{%s} begin====>"
|
|
|
+ , strPlatform
|
|
|
+ , URI_PATH
|
|
|
+ , strRunSeq));
|
|
|
+
|
|
|
+ //构建result
|
|
|
+ ResponseRes<String> resResult = new ResponseRes<>();
|
|
|
+ resResult.setRescode(ResponseCode.RESULT_ASYNC_TASK_FAILED.toStrCode());
|
|
|
+ resResult.setResmsg(ResponseCode.RESULT_ASYNC_TASK_FAILED.toStrMsg());
|
|
|
+
|
|
|
+ //获取crs列表
|
|
|
+ CommCRSInfo result = crsBizService.getCRSInfo(code);
|
|
|
+ String resultStr = null;
|
|
|
+ try {
|
|
|
+ if (result != null) resultStr = objectMapper.writeValueAsString(result);
|
|
|
+ } catch (JsonProcessingException e) {
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR, mBizType, mStrClassName
|
|
|
+ , String.format("Json序列化异常: error:%s", e));
|
|
|
+ }
|
|
|
+
|
|
|
+ //执行成功
|
|
|
+ if (resultStr != null) {
|
|
|
+ resResult.setRescode(ResponseCode.RESULT_NORMAL.toStrCode());
|
|
|
+ resResult.setResmsg(ResponseCode.RESULT_NORMAL.toStrMsg());
|
|
|
+ resResult.setResdata(resultStr);
|
|
|
+ }
|
|
|
+
|
|
|
+ //end
|
|
|
+ resResult.setTimestamp(System.currentTimeMillis());
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName, strUserId
|
|
|
+ , String.format("%s:%s seq:{%s} rescode:{%s} resmsg:{%s} time:{%d ms} end<===="
|
|
|
+ , strPlatform
|
|
|
+ , URI_PATH
|
|
|
+ , strRunSeq
|
|
|
+ , resResult.getRescode()
|
|
|
+ , resResult.getResmsg()
|
|
|
+ , resResult.getTimestamp() - llReqBefore));
|
|
|
+ return resResult;
|
|
|
+ }
|
|
|
}
|