| | |
| | | if(!Constants.equalsInteger(c.getStatus(),Constants.VisitStatus.signout)){ |
| | | Visits update = new Visits(); |
| | | //已失效 |
| | | update.setStatus(Constants.VisitStatus.invalid); |
| | | update.setStatus(Constants.VisitStatus.signout); |
| | | update.setEditDate(date); |
| | | update.setId(c.getId()); |
| | | update.setInDate(DateUtil.getISO8601DateByStr2(model.getVisitStartTime())); |
| | |
| | | request.setVisitStartTime(DateUtil.getISO8601Timestamp2(c.getStarttime())); |
| | | request.setVisitEndTime(DateUtil.getISO8601Timestamp2(c.getEndtime())); |
| | | request.setReceptionistId(c.getReceptMemberHkId());//被访人海康编码 |
| | | request.setVisitPurpose(c.getReason()); |
| | | if(StringUtils.isNotBlank(c.getReason())){ |
| | | char[] charArray = c.getReason().toCharArray(); |
| | | int length = charArray.length; |
| | | if(length>32){ |
| | | request.setVisitPurpose(c.getReason().substring(0,32)); |
| | | }else{ |
| | | request.setVisitPurpose(c.getReason()); |
| | | } |
| | | } |
| | | request.setVisitorInfo(info); |
| | | request.setVisitorPermissionSet(getVisitPermissonRequest(roleList,c)); |
| | | return request; |
| | |
| | | if(info.getVisitorPhoto() == null){ |
| | | return null; |
| | | } |
| | | info.setVisitorName(c.getName()); |
| | | if(StringUtils.isNotBlank(c.getName())){ |
| | | char[] charArray = c.getName().toCharArray(); |
| | | int length = charArray.length; |
| | | if(length>32){ |
| | | info.setVisitorName(c.getName().substring(0,32)); |
| | | }else{ |
| | | info.setVisitorName(c.getName()); |
| | | } |
| | | } |
| | | |
| | | if(StringUtils.isNotBlank(c.getCompanyName())){ |
| | | char[] charArray = c.getCompanyName().toCharArray(); |
| | | int length = charArray.length; |