@@ -144,20 +144,26 @@ private <Q extends BaseQueryBO> void getDataAndUpload(ExportRecord record, Strin
144144 var zipPath = srcPath + ".zip" ;
145145 File zipFile ;
146146 var path = String .format ("%s/%s" , rootPath , FileUtil .getName (zipPath ));
147+
147148 if (DataFormatEnum .COCO .equals (query .getDataFormat ())) {
148149 var basePath = String .format ("%s/%s" , tempPath , IdUtil .fastSimpleUUID ());
149150 var respPath = String .format ("%s/resp.json" , basePath );
150151 var baseOutPath = String .format ("%s/%s" , basePath , FileUtil .getPrefix (zipPath ));
151152 var outPathNew = String .format ("%s/result" , baseOutPath );
152- FileUtil .move (Path .of (String .format ("%s/image" , srcPath )), Path .of (String .format ("%s/image" , baseOutPath )), true );
153+ // FileUtil.move(Path.of(String.format("%s/image", srcPath)), Path.of(String.format("%s/image", baseOutPath)), true);
153154 ZipUtil .zip (srcPath , zipPath , true );
154155 FileUtil .mkdir (outPathNew );
155156 DataFormatUtil .convert (Constants .CONVERT_EXPORT , zipPath , outPathNew , respPath );
156157 if (FileUtil .exist (respPath ) && UsecaseCode .OK .equals (DefaultConverter .convert (JSONUtil .readJSONObject (FileUtil .file (respPath ), Charset .defaultCharset ()), ApiResult .class ).getCode ())) {
157158 zipFile = ZipUtil .zip (baseOutPath , zipPath , true );
158159 } else {
159160 FileUtil .del (basePath );
160- throw new UsecaseException ("convert coco error" );
161+ var exportRecordBO = exportRecordBOBuilder
162+ .status (ExportStatusEnum .FAILED )
163+ .updatedAt (OffsetDateTime .now ())
164+ .build ();
165+ exportRecordUsecase .saveOrUpdate (exportRecordBO );
166+ return ;
161167 }
162168 FileUtil .del (basePath );
163169 } else {
0 commit comments