This commit is contained in:
parent
4e9040915a
commit
5016194652
|
|
@ -70,12 +70,7 @@ public class UserFaceHandle {
|
|||
//验证用户是否入场
|
||||
BmWorkerEinUserVo vo=service.getOnUserInfo(userId,proId);
|
||||
if(vo==null){
|
||||
vo=new BmWorkerEinUserVo();
|
||||
vo.setAttPhoto(bast64);
|
||||
vo.setAttTime(time);
|
||||
vo.setDevCode(devCode);
|
||||
vo.setDevName(deviceVo.getDeviceName());
|
||||
vo.setUserId(userId);
|
||||
vo=createAttendanceVo(deviceVo,userId,devCode,time,bast64);
|
||||
service.addWrcUser(vo);
|
||||
}else {
|
||||
vo.setAttPhoto(bast64);
|
||||
|
|
@ -86,12 +81,7 @@ public class UserFaceHandle {
|
|||
//数据返回
|
||||
}
|
||||
}else{
|
||||
BmWorkerEinUserVo vo=new BmWorkerEinUserVo();
|
||||
vo.setAttPhoto(bast64);
|
||||
vo.setAttTime(time);
|
||||
vo.setDevCode(devCode);
|
||||
vo.setDevName(deviceVo.getDeviceName());
|
||||
vo.setUserId(userId);
|
||||
BmWorkerEinUserVo vo=createAttendanceVo(deviceVo,userId,devCode,time,bast64);
|
||||
service.addWrcUser(vo);
|
||||
}
|
||||
resp.addHeader(Constant.DEVICE_HEADER_RESPONSE_CODE, Constant.OK);
|
||||
|
|
@ -102,6 +92,16 @@ public class UserFaceHandle {
|
|||
|
||||
}
|
||||
|
||||
private BmWorkerEinUserVo createAttendanceVo(DeviceVo deviceVo, String userId, String devCode,
|
||||
String time, String base64Photo) {
|
||||
BmWorkerEinUserVo vo = new BmWorkerEinUserVo();
|
||||
vo.setAttPhoto(base64Photo);
|
||||
vo.setAttTime(time);
|
||||
vo.setDevCode(devCode);
|
||||
vo.setDevName(deviceVo.getDeviceName());
|
||||
vo.setUserId(userId);
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
private String getRequestBody(HttpServletRequest req) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue