| | |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.FacePictureCheckRequest; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentCancelRequest; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentOutRequest; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentRequest; |
| | | import com.doumee.core.haikang.model.param.respose.FacePictureCheckResponse; |
| | | import com.doumee.core.haikang.model.param.respose.VisitAppointmentResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.wx.WXConstant; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.admin.response.InterestedListVO; |
| | | import com.doumee.dao.admin.response.PCWorkPlatformDataVO; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.dao.MemberMapper; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.dto.ResetPasswordDTO; |
| | |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.dto.ResetSystemUserPwdDTO; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | |
| | | } |
| | | if (Constants.equalsInteger(Constants.ZERO, erpVisitDTO.getIdcardType()) && erpVisitDTO.getIdcardNo().length() != 18 |
| | | //&&!IdcardUtil.isValidCard(visits.getIdcardNo()) |
| | | ) { |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,身份证号码有误,请核实后重试!"); |
| | | } |
| | | |
| | | Visits visits = new Visits(); |
| | | //根据被访问人ERP主键查询系统内人员主键信息 |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda() |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer createFk(Visits visits,Boolean isERP,Integer source) { |
| | | visits.setId(null); |
| | | isValidBaseParam(visits); |
| | | //检查是否必须答题,并且符合答题要求 |
| | | ProblemLog problemLog = isValidProblemLog(visits,source); |
| | |
| | | result.setBusinessStatus(result.getStatus()); |
| | | } |
| | | |
| | | |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda() |
| | | .eq(Notices::getObjId,id) |
| | | .eq(Notices::getType,Constants.equalsInteger(result.getType(),Constants.TWO)?Constants.noticesObjectType.visitReporting:Constants.noticesObjectType.visit) |
| | | .eq(Notices::getUserId,memberId) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .orderByDesc(Notices::getId).last(" limit 1 ")); |
| | | if(Objects.nonNull(notices)){ |
| | | if(Constants.equalsInteger(notices.getStatus(),Constants.ZERO)){ |
| | | result.setInfo("待我处理"); |
| | | }else{ |
| | | result.setInfo(notices.getInfo()); |
| | | } |
| | | } |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | |
| | | memberId) |
| | | ); |
| | | // } |
| | | if(Constants.equalsInteger(visits.getStatus(),Constants.VisitStatus.waitCheck)||Constants.equalsInteger(visits.getStatus(),Constants.VisitStatus.submitCheck)){ |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda().eq(Notices::getObjId,visits.getId()) |
| | | .eq(Notices::getType,Constants.equalsInteger(visits.getType(),Constants.TWO)?Constants.noticesObjectType.visitReporting:Constants.noticesObjectType.visit) |
| | | .eq(Notices::getUserId,memberId) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .last(" limit 1 ") |
| | | ); |
| | | visitDetailVO.setInfoStatus(1); |
| | | if(Objects.nonNull(notices)){ |
| | | visitDetailVO.setInfo(notices.getInfo()); |
| | | }else{ |
| | | visitDetailVO.setInfo("暂无"); |
| | | } |
| | | }else if(Constants.equalsInteger(visits.getStatus(),Constants.VisitStatus.noPass)){ |
| | | visitDetailVO.setInfoStatus(Constants.VisitStatus.noPass); |
| | | visitDetailVO.setInfo("审批未通过"); |
| | | |
| | | }else if(Constants.equalsInteger(visits.getStatus(),Constants.VisitStatus.cancel)){ |
| | | visitDetailVO.setInfoStatus(Constants.VisitStatus.cancel); |
| | | visitDetailVO.setInfo("已取消"); |
| | | }else{ |
| | | visitDetailVO.setInfoStatus(Constants.VisitStatus.pass); |
| | | visitDetailVO.setInfo("审批已通过"); |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda() |
| | | .eq(Notices::getObjId,id) |
| | | .eq(Notices::getType,Constants.equalsInteger(visits.getType(),Constants.TWO)?Constants.noticesObjectType.visitReporting:Constants.noticesObjectType.visit) |
| | | .eq(Notices::getUserId,memberId) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .orderByDesc(Notices::getId).last(" limit 1 ")); |
| | | if(Objects.nonNull(notices)){ |
| | | if(Constants.equalsInteger(notices.getStatus(),Constants.ZERO)){ |
| | | visitDetailVO.setInfo("待我处理"); |
| | | }else{ |
| | | visitDetailVO.setInfo(notices.getInfo()); |
| | | } |
| | | } |
| | | |
| | | return visitDetailVO; |
| | | } |
| | | |
| | |
| | | VisitAppointmentOutRequest request = new VisitAppointmentOutRequest(); |
| | | request.setOrderId(visits.getHkId()); |
| | | //调用海康强制签离 |
| | | BaseResponse response = HKService.outVisitAppiontment(request); |
| | | BaseResponse response = HKService.iccmSignoff(request); |
| | | // BaseResponse response = HKService.outVisitAppiontment(request); |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.VisitStatus.signout) |
| | | .eq(Visits::getId,visitId)); |
| | | //产出在场人员信息 |
| | |
| | | if(!visits.getStatus().equals(Constants.VisitStatus.xfSuccess)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"访客记录状态错误,请刷新重试"); |
| | | } |
| | | VisitAppointmentOutRequest request = new VisitAppointmentOutRequest(); |
| | | request.setOrderId(visits.getHkId()); |
| | | VisitAppointmentCancelRequest request = new VisitAppointmentCancelRequest(); |
| | | request.setAppointRecordIds(new String[]{visits.getHkId()}); |
| | | //调用海康强制签离 |
| | | BaseResponse response = HKService.outVisitAppiontment(request); |
| | | // BaseResponse response = HKService.outVisitAppiontment(request); |
| | | BaseResponse response = HKService.iccmCancelAppointment(request); |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.VisitStatus.signout) |
| | | .eq(Visits::getId,visitId)); |
| | | //产出在场人员信息 |
| | |
| | | dto.setPassword(resetPasswordDTO.getPassword()); |
| | | dto.setId(systemUser.getId()); |
| | | dto.setOperaUserId(systemUser.getId()); |
| | | dto.setNeedChangePwd(Constants.ONE); |
| | | systemUserBiz.resetPwd(dto); |
| | | } |
| | | |
| | |
| | | .selectAll(Retention.class) |
| | | .selectAs(Company::getType,Retention::getCompanyType) |
| | | .leftJoin(Company.class,Company::getId,Retention::getCompanyId) |
| | | .eq(Retention::getIsdeleted,Constants.ZERO) |
| | | ); |
| | | |
| | | InoutDayCount inoutDayCount = inoutDayCountMapper.selectOne(new QueryWrapper<InoutDayCount>() |
| | |
| | | ); |
| | | for (Company company:companyList) { |
| | | Integer count = retentionList.stream().filter(i->Constants.equalsInteger(i.getCompanyId(),company.getId())).collect(Collectors.toList()).size(); |
| | | InterestedListVO lw = new InterestedListVO(); |
| | | lw.setNum(count); |
| | | lw.setName(company.getName()); |
| | | lwList.add(lw); |
| | | if(count>0){ |
| | | InterestedListVO lw = new InterestedListVO(); |
| | | lw.setNum(count); |
| | | lw.setName(company.getName()); |
| | | lwList.add(lw); |
| | | } |
| | | } |
| | | } |
| | | |