master
chengqf 2 years ago
parent 61a2ccf88a
commit ee0615c7c3

@ -31,7 +31,6 @@ public interface IdcService {
BaseResponse downlaodSuccess(HttpServletRequest request,Map<String,Object> params);
public void asyncIdcTask();
void asyncUdiTask();
void asyncSpsTask();

@ -70,7 +70,7 @@ public class IdcServiceImpl implements IdcService {
@Value("${API_SECRET}")
private String apiSecret;
private int orderNum = 0;
@Resource
@ -185,16 +185,6 @@ public class IdcServiceImpl implements IdcService {
}
}
@Async
@Override
public void asyncIdcTask() {
initTable();
Map<String, Object> map = dbDao.get("select * from idc_var where code='system_type'");
if (map == null) {
dbDao.save("insert into idc_var (code,content) values ('system_type','IDC')");
}
}
private void asyncDataTask(boolean isUpload) {
initTable();
@ -318,7 +308,7 @@ public class IdcServiceImpl implements IdcService {
return result;
}
public BaseResponse downlaodSuccess(HttpServletRequest request, Map<String, Object> params) {
String sql = "update basic_export_status set receiveStatus='1',endTime=now() where id='" + params.get("taskId") + "'";
@ -326,16 +316,16 @@ public class IdcServiceImpl implements IdcService {
return ResultVOUtils.success();
}
@Override
public BaseResponse receiveJson(HttpServletRequest request,Map<String, Object> params) {
return ResultVOUtils.success();
return ResultVOUtils.success();
}
@Override
public BaseResponse uploadFile(HttpServletRequest request,
String content,MultipartFile[] files) {
return ResultVOUtils.success();
String content,MultipartFile[] files) {
return ResultVOUtils.success();
}
/****/
@Override
@ -562,7 +552,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])&&FileUtils.isFileExist(filePath + filePathSlash + "register/file/image2/" + 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]);
}
}
@ -585,8 +575,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++) {
if (!StringUtils.isEmpty(str[s])&&FileUtils.isFileExist(filePath + filePathSlash + "register/file/image2/" + str[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]);
}
}
}
@ -1151,13 +1141,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 {
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)");
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) {
}
@ -1166,15 +1156,15 @@ 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)) {
executeSql(sql);
executeSql(sql);
}
}
private void executeSql(String sql) {
try {
try {
jdbcTemplate.execute(sql);
} catch (Exception e) {
}

Loading…
Cancel
Save