查询原始文件信息接口

This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-16 10:40:25 +08:00
parent 3bbbc90900
commit a642c5eaa5
4 changed files with 38 additions and 1 deletions
@@ -49,6 +49,7 @@ public class FileMaterialController extends BaseController<FileMaterial> {
// SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
material.setId(UUIDUtils.randomUUID20());
material.setDataUploadTime(new Date());
material.setDelFlag("0");
boolean save = iFileMaterialService.save(material);
return Result.success(save);
@@ -140,7 +140,7 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
}
@ApiOperation(value = "查询文本信息")
@ApiOperation(value = "查询转换后文本信息")
@GetMapping("/queryFileInfo")
public ResponseMessage<List<SarStandFileEO>> queryFileInfo(String standId){
@@ -156,4 +156,13 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
return Result.success(sarStandFileEOS);
}
@ApiOperation(value = "查询转原始文件信息")
@GetMapping("/querySourceFileInfo")
public ResponseMessage<List<SarStandFileEO>> querySourceFileInfo(String standId){
List<SarStandFileEO> sarStandFileEOS = sarStandFileEOService.selectFileByStandId(standId);
return Result.success(sarStandFileEOS);
}
}
@@ -23,8 +23,21 @@ public interface SarStandFileEOService {
List<SarStandFileEO> selectFileByAttId(String attId) throws Exception;
/**
* 查询转换后文件的文本信息
* @param standId
* @return
*/
List<SarStandFileEO> selectFileByStandId(String standId);
List<SarStandFileEO> selectFileByStandIdOCR(String standId,String type) throws Exception;
/**
* 查询转原始文件的信息
* @param standId
* @return
*/
List<SarStandFileEO> querySourceFileInfo(String standId);
}
@@ -78,6 +78,9 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
queryWrapper.eq("STAND_ID",standId).eq("USE_MODEL","WEB_FILE");
List<SarStandFileEO> sarStandFileEOS = sarStandFileEODao.selectList(queryWrapper);
/**
* 询转换后文件信息 因为文件转换成pdf后会出现文件名位路径的情况,遍历查询文件的原始文件信息从中取出正确的文件名
*/
//开耀这地方我把selectOne改成了批量因为 查单个数据里面出了问题你看看给改一下
sarStandFileEOS.forEach(item->{
QueryWrapper<SarStandFileEO> wrapper = new QueryWrapper<>();
@@ -142,4 +145,15 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
return sarStandFileEOS;
}
@Override
public List<SarStandFileEO> querySourceFileInfo(String standId){
QueryWrapper<SarStandFileEO> queryWrapper= new QueryWrapper<>();
queryWrapper.eq("STAND_ID",standId).eq("USE_MODEL","SOURCE_FILE");
return sarStandFileEODao.selectList(queryWrapper);
}
}