文件不存在不加入上传列表

master
chengqf 2 years ago
parent 5f091a1882
commit 2a11c65a79

@ -16,7 +16,9 @@ public interface IdcService {
BaseResponse receive(HttpServletRequest request,
String content,MultipartFile[] files);
BaseResponse receiveJson(HttpServletRequest request,Map<String, Object> params);
BaseResponse uploadFile(HttpServletRequest request,
String content,MultipartFile[] files);
BaseResponse send(Map<String,Object> params);
BaseResponse send(String messageType,String tableName,Map<String,Object> params);
@ -26,10 +28,12 @@ public interface IdcService {
public void asyncFetchTask();
public void asyncFetchUdiTask();
BaseResponse downlaodSuccess(HttpServletRequest request,Map<String,Object> params);
public void asyncIdcTask();
void asyncUdiTask();
void asyncSpsTask();
void downloadFile(String fileName,HttpServletResponse response) ;
}

@ -119,7 +119,7 @@ public class IdcServiceImpl implements IdcService {
BaseResponse response = JSON.parseObject(json, BaseResponse.class);
return response;
}
logger.info("json-->" + json);
return ResultVOUtils.success(object);
}
@ -348,6 +348,17 @@ public class IdcServiceImpl implements IdcService {
return ResultVOUtils.success();
}
@Override
public BaseResponse receiveJson(HttpServletRequest request,Map<String, Object> params) {
return ResultVOUtils.success();
}
@Override
public BaseResponse uploadFile(HttpServletRequest request,
String content,MultipartFile[] files) {
return ResultVOUtils.success();
}
/****/
@Override
public BaseResponse receive(HttpServletRequest request,
@ -573,7 +584,7 @@ public class IdcServiceImpl implements IdcService {
String fileNames = list.get(m).get(filePathColumn).toString();
String[] str = fileNames.split(",");
for (int r = 0; r < str.length; r++) {
if (!StringUtils.isEmpty(str[r]))
if (!StringUtils.isEmpty(str[r])&&FileUtils.isFileExist(filePath + filePathSlash + "register/file/image2/" + str[r]))
files.add(filePath + filePathSlash + "register/file/image2/" + str[r]);
}
}
@ -596,7 +607,8 @@ public class IdcServiceImpl implements IdcService {
if (childList.get(i).get(chidTnames[7]) != null) {
String[] str = childList.get(i).get(chidTnames[7]).toString().split(",");
for (int s = 0; s < str.length; s++) {
files.add(filePath + filePathSlash + "register/file/image2/" + str[s]);
if (!StringUtils.isEmpty(str[s])&&FileUtils.isFileExist(filePath + filePathSlash + "register/file/image2/" + str[s]))
files.add(filePath + filePathSlash + "register/file/image2/" + str[s]);
}
}
}
@ -927,7 +939,7 @@ public class IdcServiceImpl implements IdcService {
try {
Response response = client.newCall(req).execute();
result = response.body().string();
log.debug("result--->" + result);
log.info("result--->" + result);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@ -1161,10 +1173,13 @@ public class IdcServiceImpl implements IdcService {
alterTable("idc_log", "create table idc_log (id varchar(36),orderNum int,taskId varchar(60),type varchar(60),content varchar(2000),offset int,total int,createTime datetime,PRIMARY KEY (id))");
dbDao.delete("delete from idc_record where createTime<date_sub(now(),interval 2 day) and isEnd='0'");
try {
jdbcTemplate.execute("alter table basic_export_status add column cacheFilePath varchar(255)");
jdbcTemplate.execute("alter table basic_upload_status add column cacheFilePath varchar(255)");
jdbcTemplate.execute("alter table idc_status modify column id varchar(100)");
jdbcTemplate.execute("delete from idc_log where createTime<date_sub(now(),interval 3 day)");
executeSql("alter table basic_export_status add column cacheFilePath varchar(255)");
executeSql("alter table basic_upload_status add column cacheFilePath varchar(255)");
executeSql("alter table idc_status modify column id varchar(100)");
executeSql("delete from idc_log where createTime<date_sub(now(),interval 3 day)");
executeSql("alter table basic_export_status add column msg varchar(255)");
executeSql("alter table basic_upload_status add column msg varchar(255)");
executeSql("alter table basic_download_status add column msg varchar(255)");
} catch (Exception e) {
}
@ -1173,10 +1188,19 @@ public class IdcServiceImpl implements IdcService {
private void alterTable(String tableName, String sql) {
Map<String, String> map = dbDao.getMysql(tableName);
if (!(map != null && map.get("tableName") != null)) {
jdbcTemplate.execute(sql);
executeSql(sql);
}
}
private void executeSql(String sql) {
try {
jdbcTemplate.execute(sql);
} catch (Exception e) {
}
}
}

@ -3,7 +3,10 @@ spring:
active: dev
jmx:
enabled: false
servlet:
multipart:
max-file-size: 200MB
max-request-size: 200MB
mybatis-plus:
mapper-locations: classpath:mybatis/mapper/*/*.xml
configuration:
@ -23,4 +26,11 @@ pagehelper:
returnPageInfo: none
auto-dialect: true
auto-runtime-dialect: true
server:
tomcat:
max-http-form-post-size: 100MB
max-http-post-size: 100MB
max-http-header-size: 100MB

Loading…
Cancel
Save