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

master
chengqf 2 years ago
parent f168489ac7
commit 233ca8601c

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

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

@ -36,12 +36,12 @@ public class AsyncFetchUdiTask implements SchedulingConfigurer {
scheduledRequest.setCronName("syncFetch"); scheduledRequest.setCronName("syncFetch");
logger.info("syncFetch----------------"); logger.info("syncFetch----------------");
ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest);
String cron = scheduledEntity!=null ? scheduledEntity.getCron() : "0 0/1 * * * ?"; String cron = scheduledEntity!=null ? scheduledEntity.getCron() : "0 0/3 * * * ?";
if (cron.isEmpty()) { if (cron.isEmpty()) {
logger.error("cron is null"); logger.error("cron is null");
} }
logger.info("syncFetch----------------"); logger.info("syncFetch----------------"+cron);
return new CronTrigger(cron).nextExecutionTime(triggerContext); return new CronTrigger(cron).nextExecutionTime(triggerContext);
}); });
} }

@ -3,7 +3,10 @@ spring:
active: dev active: dev
jmx: jmx:
enabled: false enabled: false
servlet:
multipart:
max-file-size: 200MB
max-request-size: 200MB
mybatis-plus: mybatis-plus:
mapper-locations: classpath:mybatis/mapper/*/*.xml mapper-locations: classpath:mybatis/mapper/*/*.xml
configuration: configuration:
@ -24,3 +27,10 @@ pagehelper:
auto-dialect: true auto-dialect: true
auto-runtime-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