人员考勤入场图片存储修改

This commit is contained in:
haozq 2025-12-30 15:16:39 +08:00
parent fb8c9f3625
commit 634cde031c
1 changed files with 16 additions and 10 deletions

View File

@ -69,11 +69,15 @@ public class UserFaceHandleService {
mapper.insertAttPerson(vo);
}
}
UploadFileVo uploadFileVo=fileService.upload("bm_att_record",vo.getId(),"考勤照片","attr",vo.getAttPhoto(),null);
if(uploadFileVo!=null){
vo.setImage(uploadFileVo.getPath());
mapper.insertAttRecord(vo);
}
if(StringUtils.isEmpty(vo.getImage())){
vo.setImage("不记录");
}
mapper.insertAttRecord(vo);
// UploadFileVo uploadFileVo=fileService.upload("bm_att_record",vo.getId(),"考勤照片","attr",vo.getAttPhoto(),null);
// if(uploadFileVo!=null){
// vo.setImage(uploadFileVo.getPath());
//
// }
}catch (Exception e){
log.error(e.toString(),e);
}
@ -91,11 +95,13 @@ public class UserFaceHandleService {
Integer num=mapper.getTodayNoRootIsExit(vo);
//每日新增一条考勤信息
if(num==null || num ==0){
UploadFileVo uploadFileVo=fileService.upload("bm_att_record_no_ru",vo.getId(),"考勤照片","noattr",vo.getAttPhoto(),null);
if(uploadFileVo!=null){
vo.setImage(uploadFileVo.getPath());
mapper.addWrcUser(vo);
}
vo.setImage("不记录");
mapper.addWrcUser(vo);
// UploadFileVo uploadFileVo=fileService.upload("bm_att_record_no_ru",vo.getId(),"考勤照片","noattr",vo.getAttPhoto(),null);
// if(uploadFileVo!=null){
// vo.setImage(uploadFileVo.getPath());
//
// }
}
}catch (Exception e){
log.error(e.toString(),e);