|
@@ -1,8 +1,11 @@
|
|
package com.fdkankan.contro.service.impl;
|
|
package com.fdkankan.contro.service.impl;
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
import com.fdkankan.common.constant.CommonSuccessStatus;
|
|
import com.fdkankan.common.constant.CommonSuccessStatus;
|
|
|
|
+import com.fdkankan.common.constant.ErrorCode;
|
|
import com.fdkankan.common.constant.SceneStatus;
|
|
import com.fdkankan.common.constant.SceneStatus;
|
|
|
|
+import com.fdkankan.common.exception.BusinessException;
|
|
import com.fdkankan.common.util.CmdUtils;
|
|
import com.fdkankan.common.util.CmdUtils;
|
|
import com.fdkankan.contro.dto.UploadSceneDTO;
|
|
import com.fdkankan.contro.dto.UploadSceneDTO;
|
|
import com.fdkankan.contro.entity.SceneOrigBd;
|
|
import com.fdkankan.contro.entity.SceneOrigBd;
|
|
@@ -38,9 +41,15 @@ public class HaixinServiceImpl implements IHaixinService {
|
|
@Override
|
|
@Override
|
|
public ResultData uploadScene(UploadSceneDTO dto) {
|
|
public ResultData uploadScene(UploadSceneDTO dto) {
|
|
|
|
|
|
|
|
+ String taskId = dto.getTaskId();
|
|
|
|
+ String kNo = dto.getKNo();
|
|
|
|
+ if(StrUtil.isEmpty(taskId) && StrUtil.isEmpty(taskId)){
|
|
|
|
+ throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "taskId和kNo不能同时为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
SceneOrigBd sceneOrigBd = new SceneOrigBd();
|
|
SceneOrigBd sceneOrigBd = new SceneOrigBd();
|
|
sceneOrigBd.setFileUrl(dto.getFileUrl());
|
|
sceneOrigBd.setFileUrl(dto.getFileUrl());
|
|
- sceneOrigBd.setTaskId(sceneOrigBd.getTaskId());
|
|
|
|
|
|
+ sceneOrigBd.setTaskId(dto.getKNo());
|
|
sceneOrigBd.setKNo(dto.getKNo());
|
|
sceneOrigBd.setKNo(dto.getKNo());
|
|
|
|
|
|
sceneOrigBdService.save(sceneOrigBd);
|
|
sceneOrigBdService.save(sceneOrigBd);
|