|
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
+import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.contro.entity.OrigFileUpload;
|
|
|
import com.fdkankan.contro.entity.OrigFileUploadBatch;
|
|
|
import com.fdkankan.contro.service.IJmgaService;
|
|
@@ -98,10 +99,18 @@ public class JmgaServiceImpl implements IJmgaService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Set<String> checkLackFile(String dataSource) {
|
|
|
+ public void checkLackFile(String dataSource) {
|
|
|
|
|
|
String dataFdagePath = dataSource.concat(File.separator).concat("data.fdage");
|
|
|
- JSONObject fdageData = JSON.parseObject(FileUtil.readUtf8String(dataFdagePath));
|
|
|
+ if(!FileUtil.exist(dataFdagePath)){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_4001.code(), ErrorCode.FAILURE_CODE_4001.formatMessage("data.fdage"));
|
|
|
+ }
|
|
|
+ JSONObject fdageData = null;
|
|
|
+ try {
|
|
|
+ fdageData = JSON.parseObject(FileUtil.readUtf8String(dataFdagePath));
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_4001.code(), ErrorCode.FAILURE_CODE_4001.formatMessage("data.fdage"));
|
|
|
+ }
|
|
|
|
|
|
int camType = fdageData.getJSONObject("cam").getIntValue("type");
|
|
|
|