|
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.global.base.log.LogLevelFlag;
|
|
|
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.GisSurveyCadConvertBizService;
|
|
|
import com.shkpr.service.alambizplugin.bizservice.GisSurveySystemCheckBizService;
|
|
@@ -634,26 +635,25 @@ public class ApiGisSurveyController {
|
|
|
* @param request request
|
|
|
* @param strClientType 客户端类型
|
|
|
* @param strUserAgent 用户信息
|
|
|
- * @param jobId 任务id
|
|
|
- * @param fileType 导出文件类型
|
|
|
+ * @param oJsonParam 入参
|
|
|
* @return cad转换结果
|
|
|
*/
|
|
|
- @GetMapping(value = ApiURI.URI_XXX_THIRD_EXPORT)
|
|
|
+ @PostMapping(value = ApiURI.URI_XXX_THIRD_EXPORT)
|
|
|
public ResponseRes<String> thirdExport(HttpServletRequest request
|
|
|
, @RequestHeader(value = ApiURI.HEADER_CLIENT_TYPE, required = false) String strClientType
|
|
|
, @RequestHeader(value = ApiURI.HEADER_USER_AGENT, required = false) String strUserAgent
|
|
|
- , @RequestParam(value = "jobId", required = false) String jobId
|
|
|
- , @RequestParam(value = "fileType", required = false) String fileType) throws SelfException {
|
|
|
+ , @RequestBody(required = false) @Validated(value = {CommonParamValidSK.class}) GisSurveyThirdExportParams oJsonParam
|
|
|
+ , BindingResult bindRes) 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(jobId, fileType) || StringUtils.length(jobId) > 64 || StringUtils.length(fileType) > 64) {
|
|
|
- throw new SelfException(ResponseCode.STATUS_ERROR_PARAM_FORMAT.toStrCode()
|
|
|
+ if (oJsonParam == null || bindRes.hasErrors()) {
|
|
|
+ throw new SelfException(ResponseCode.STATUS_ERROR_JSON_FORMAT.toStrCode()
|
|
|
, String.format(ApiURI.EXCEPTION_FORMAT
|
|
|
, strPlatform
|
|
|
, URI_PATH
|
|
|
- , ResponseCode.STATUS_ERROR_PARAM_FORMAT.toStrMsg()));
|
|
|
+ , ResponseCode.STATUS_ERROR_JSON_FORMAT.toStrMsg()));
|
|
|
}
|
|
|
|
|
|
//begin
|
|
@@ -664,7 +664,7 @@ public class ApiGisSurveyController {
|
|
|
, strPlatform
|
|
|
, URI_PATH
|
|
|
, strRunSeq
|
|
|
- , jobId));
|
|
|
+ , oJsonParam));
|
|
|
|
|
|
//构建result
|
|
|
ResponseRes<String> resResult = new ResponseRes<>();
|
|
@@ -672,11 +672,11 @@ public class ApiGisSurveyController {
|
|
|
resResult.setResmsg(ResponseCode.RESULT_ASYNC_TASK_FAILED.toStrMsg());
|
|
|
|
|
|
//导出类型枚举
|
|
|
- FileTypeEnum fileTypeEnum = FileTypeEnum.getFileType(fileType);
|
|
|
+ FileTypeEnum fileTypeEnum = FileTypeEnum.getFileType(oJsonParam.getFileType());
|
|
|
if (fileTypeEnum == null) fileTypeEnum = FileTypeEnum.EXCEL;
|
|
|
|
|
|
//执行第三方导出
|
|
|
- CommAsyncResult<Map<String, String>> result = thirdExportBizService.thirdExport(jobId, fileTypeEnum);
|
|
|
+ CommAsyncResult<Map<String, String>> result = thirdExportBizService.thirdExport(oJsonParam.getJobId(), fileTypeEnum, oJsonParam.getOperator());
|
|
|
String resultStr = null;
|
|
|
try {
|
|
|
if (result != null) resultStr = objectMapper.writeValueAsString(result);
|
|
@@ -798,6 +798,7 @@ public class ApiGisSurveyController {
|
|
|
* @param file 文件
|
|
|
* @param convertId 转换id
|
|
|
* @param outputExtension 输出扩展名
|
|
|
+ * @param operator 操作人
|
|
|
* @return cad转换结果
|
|
|
*/
|
|
|
@PostMapping(value = ApiURI.URI_XXX_CAD_CONVERT)
|
|
@@ -806,7 +807,8 @@ public class ApiGisSurveyController {
|
|
|
, @RequestHeader(value = ApiURI.HEADER_USER_AGENT, required = false) String strUserAgent
|
|
|
, @RequestParam(value = "file", required = false) MultipartFile file
|
|
|
, @RequestParam(value = "convertId", required = false) String convertId
|
|
|
- , @RequestParam(value = "outputExtension", required = false) String outputExtension) throws SelfException {
|
|
|
+ , @RequestParam(value = "outputExtension", required = false) String outputExtension
|
|
|
+ , @RequestParam(value = "operator", required = false, defaultValue = "") String operator) throws SelfException {
|
|
|
//入参校验
|
|
|
final String URI_PATH = request.getRequestURI();
|
|
|
final String strPlatform = CommTool.getPlatformByAgent(strClientType, strUserAgent);
|
|
@@ -866,7 +868,7 @@ public class ApiGisSurveyController {
|
|
|
resResult.setResmsg(ResponseCode.RESULT_ASYNC_TASK_FAILED.toStrMsg());
|
|
|
|
|
|
//执行cad转换
|
|
|
- CommAsyncResult<String> result = cadConvertBizService.cadConvert(file, convertId, outCadEnum);
|
|
|
+ CommAsyncResult<String> result = cadConvertBizService.cadConvert(file, convertId, outCadEnum, operator);
|
|
|
String resultStr = null;
|
|
|
try {
|
|
|
if (result != null) resultStr = objectMapper.writeValueAsString(result);
|