update===>:修改筛查问题。
This commit is contained in:
parent
e3099218b1
commit
7b9d49cf1b
@ -106,10 +106,13 @@ public class AppletScreeningRecordController extends BaseController {
|
||||
public R<ScreeningRecordVo> detail(@PathVariable String screeningId) {
|
||||
ScreeningRecordVo screeningRecordVo = screeningRecordService.detail(screeningId);
|
||||
if (screeningRecordVo != null) {
|
||||
File file = new File(screeningRecordVo.getAttachment());
|
||||
if (file.exists() && file.isFile()) {
|
||||
String fileName = file.getName();
|
||||
screeningRecordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1));
|
||||
if (StringUtils.isNotBlank(screeningRecordVo.getAttachment())){
|
||||
String fileDir = XinELuConfig.getProfile() + screeningRecordVo.getAttachment().replaceAll("/profile", "");
|
||||
File file = new File(fileDir);
|
||||
if (file.exists() && file.isFile()) {
|
||||
String fileName = file.getName();
|
||||
screeningRecordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1));
|
||||
}
|
||||
}
|
||||
|
||||
if (!StringUtils.contains(screeningRecordVo.getProjectName(), ScreeningProjectConstants.ALZHEIMER)) {
|
||||
|
||||
@ -286,10 +286,13 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
if(recordVo == null) {
|
||||
return null;
|
||||
}
|
||||
File file = new File(recordVo.getAttachment());
|
||||
if (file.exists() && file.isFile()) {
|
||||
String fileName = file.getName();
|
||||
recordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1));
|
||||
if(StringUtils.isNotBlank(recordVo.getAttachment())) {
|
||||
String fileDir = XinELuConfig.getProfile() + recordVo.getAttachment().replaceAll("/profile", "");
|
||||
File file = new File(fileDir);
|
||||
if (file.exists() && file.isFile()) {
|
||||
String fileName = file.getName();
|
||||
recordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1));
|
||||
}
|
||||
}
|
||||
if (!StringUtils.contains(recordVo.getProjectName(), ScreeningProjectConstants.ALZHEIMER)) {
|
||||
getRecordDetail(recordVo);
|
||||
@ -432,16 +435,18 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
|
||||
/** 获取图片附件转base64 */
|
||||
private void setAttachment(ScreeningRecordVo record) {
|
||||
if(!StringUtils.isBlank(record.getAttachment())) {
|
||||
File file = new File(record.getAttachment());
|
||||
if(file.exists()) {
|
||||
record.setAttachment(FileUtils.PicToBase64(record.getAttachment()));
|
||||
if(StringUtils.isNotBlank(record.getAttachment())) {
|
||||
String fileDir = XinELuConfig.getProfile() + record.getAttachment().replaceAll("/profile", "");
|
||||
File file = new File(fileDir);
|
||||
if(file.exists() && file.isFile()) {
|
||||
record.setAttachment(FileUtils.PicToBase64(fileDir));
|
||||
}
|
||||
}
|
||||
if(!StringUtils.isBlank(record.getAttachmentTwo())) {
|
||||
File file = new File(record.getAttachmentTwo());
|
||||
if (file.exists()) {
|
||||
record.setAttachmentTwo(FileUtils.PicToBase64(record.getAttachmentTwo()));
|
||||
if(StringUtils.isNotBlank(record.getAttachmentTwo())) {
|
||||
String fileDir = XinELuConfig.getProfile() + record.getAttachmentTwo().replaceAll("/profile", "");
|
||||
File file = new File(fileDir);
|
||||
if (file.exists() && file.isFile()) {
|
||||
record.setAttachmentTwo(FileUtils.PicToBase64(fileDir));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user