|
@ -232,12 +232,14 @@ public class AiTaskService {
|
232
|
232
|
@Post
|
233
|
233
|
public String insert(@JdbcConn(true) Connection con, @LoginUser SessionUser user, final int taskType,String[] file) throws IOException, SQLException {
|
234
|
234
|
File path;
|
|
235
|
String taskId;
|
235
|
236
|
do{
|
236
|
237
|
path = new File(this.dstPath, StringUtil.buildUUID());
|
237
|
238
|
}while(path.exists());
|
238
|
239
|
if(!path.mkdir()){
|
239
|
240
|
throw new RuntimeException("mkdir["+path.getAbsolutePath()+"] error");
|
240
|
241
|
}
|
|
242
|
taskId = path.getName();
|
241
|
243
|
path = new File(path,"data");
|
242
|
244
|
if(!path.mkdir()){
|
243
|
245
|
throw new RuntimeException("mkdir["+path.getAbsolutePath()+"] error");
|
|
@ -263,7 +265,7 @@ public class AiTaskService {
|
263
|
265
|
}
|
264
|
266
|
}
|
265
|
267
|
|
266
|
|
final String id = path.getName();
|
|
268
|
final String id = taskId;
|
267
|
269
|
AiTask task = new AiTask();
|
268
|
270
|
task.setDataNum(id.substring(24));
|
269
|
271
|
task.setTaskType(taskType);
|