| | |
| | | bookings.setEditDate(new Date()); |
| | | bookings.setEditor(user.getId()); |
| | | bookingsMapper.updateById(bookings); |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getCreator()); |
| | | |
| | | bookings.setManagerInfo(systemUser.getRealname()); |
| | | //取消会议 发送取消通知 |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, 3); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ONE); |
| | | |
| | | } |
| | |
| | | } |
| | | bookingsMapper.updateById(bookings); |
| | | //取消会议 发送取消通知 |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, 3); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | // if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | // this.sendNotice(bookings, 3); |
| | | // } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getCreator()); |
| | | bookings.setManagerInfo(systemUser.getRealname()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ONE); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.MEETING_START; |
| | | if (sendType.equals(MeetConstants.THREE)){ |
| | | noticeObjectType = Constants.NoticeObjectType.MEETING_CACEL; |
| | | smsConfig = smsConfigMapper.selectOne(new QueryWrapper<SmsConfig>().lambda().eq(SmsConfig::getCode, |
| | | SmsConstants.meetingContent.meetingBookCancel) |
| | | .eq(SmsConfig::getIsdeleted,Constants.ZERO) |
| | | .last(" limit 1 ")); |
| | | }else if (sendType.equals(MeetConstants.TWO)){ |
| | | noticeObjectType = Constants.NoticeObjectType.MEETING_BOOK_SUCCESS; |
| | | smsConfig = smsConfigMapper.selectOne(new QueryWrapper<SmsConfig>().lambda().eq(SmsConfig::getCode, |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(openIds)){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | if(Constants.equalsInteger(sendType,Constants.ZERO)){ |
| | | wxPlatNotice.sendMeetingBookTemplateNotice(bookings,"CuoDoxOl6SFwi4NhNgOQgKSJVjDD4VCIaPYlnbv_zdY", |
| | | wxPlatNotice.sendMeetingBookTemplateNotice(systemDictDataBiz,bookings,"CuoDoxOl6SFwi4NhNgOQgKSJVjDD4VCIaPYlnbv_zdY", |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),openIds); |
| | | }else{ |
| | | |
| | | wxPlatNotice.sendMeetingBookCancelTemplateNotice(bookings,"CiB6vCT2InovAoQfudY-lvzLSV0-3lfz3a5GsSFCzd8", |
| | | wxPlatNotice.sendMeetingBookCancelTemplateNotice(systemDictDataBiz,bookings,"CiB6vCT2InovAoQfudY-lvzLSV0-3lfz3a5GsSFCzd8", |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),openIds); |
| | | } |
| | | } |
| | |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | 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.respose.FacePictureCheckResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.FtpUtil; |
| | |
| | | @ApiOperation(value = "上传文件到FTP") |
| | | @RequestMapping(method= RequestMethod.POST,value="/upload") |
| | | @ResponseBody |
| | | public void upload(HttpServletRequest request, HttpServletResponse response, String folder) throws Exception { |
| | | public void upload(HttpServletRequest request, HttpServletResponse response, String folder,Integer isFace) throws Exception { |
| | | // folder = systemDictDataBiz.queryByCode(Constants.FTP,folder).getCode(); |
| | | Date d1 = new Date(); |
| | | log.error("总得上传文件成功=============开始========="+DateUtil.getPlusTime2(d1)); |
| | |
| | | String fileName = folder+"/"+fName; |
| | | boolean r = ftp.uploadInputstream(is,fileName); |
| | | if(r){ |
| | | if(Constants.equalsInteger(isFace,Constants.ZERO)){ |
| | | //验证人脸评分 |
| | | //人脸评分 |
| | | FacePictureCheckRequest param = new FacePictureCheckRequest(); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_LOCAL_RESOURCE_PATH).getCode(); |
| | | param.setFacePicUrl(prefixUrl + fileName); |
| | | BaseResponse<FacePictureCheckResponse> responseBaseResponse = HKService.facePictureCheck(param); |
| | | if(responseBaseResponse == null || !StringUtils.equals(responseBaseResponse.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | context.put("code", 0); |
| | | context.put("message", "对不起,人脸评分获取数据失败~"); |
| | | context.put("errno",0); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | FacePictureCheckResponse facePictureCheckResponse = responseBaseResponse.getData(); |
| | | if(Objects.isNull(facePictureCheckResponse) || Objects.isNull(facePictureCheckResponse.getCheckResult())){ |
| | | context.put("code", 0); |
| | | context.put("message", "对不起,人脸评分获取数据失败~"); |
| | | context.put("errno",0); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | if(!facePictureCheckResponse.getCheckResult()){ |
| | | context.put("code", 0); |
| | | context.put("message", facePictureCheckResponse.getStatusMessage()); |
| | | context.put("errno",0); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | context.put("success", true); |
| | | context.put("code", 200); |
| | | context.put("errno",0); |
| | |
| | | }else if(Constants.equalsInteger(platformBooks.getStatus(),Constants.TWO)){ |
| | | const9.put("value","申请已审核通过"); |
| | | }else{ |
| | | const9.put("value","申请已被驳回"); |
| | | const9.put("value","申请未通过"); |
| | | } |
| | | } |
| | | //车牌号 |
| | |
| | | null,Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | //公众号通知 |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice( |
| | | if(StringUtils.isNotBlank(member.getSystemOpenid())){ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, |
| | | platformBooksMapper.selectById(businessId), |
| | | WxPlatConstants.platformBookContent.platformBookWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getOpenid().split(",")), |
| | | Arrays.asList(member.getSystemOpenid().split(",")), |
| | | Constants.ONE); |
| | | } |
| | | }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)){ |
| | |
| | | ); |
| | | //公众号通知 |
| | | if(StringUtils.isNotBlank(member.getSystemOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitContent.visitWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getSystemOpenid().split(",")) |
| | |
| | | ); |
| | | //公众号通知 |
| | | if(StringUtils.isNotBlank(member.getSystemOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitReportContent.visitReportWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getSystemOpenid().split(",")) |
| | |
| | | SystemUser systemUser = systemUserMapper.selectById(carUseBook.getCreator()); |
| | | if(Objects.nonNull(systemUser)){ |
| | | carUseBook.setMemberName(systemUser.getRealname()); |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, |
| | | carUseBookMapper.selectById(businessId), |
| | | WxPlatConstants.carUseBookContent.carUseBookWaitAudit, |
| | |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | approveDTO.getCheckInfo(),memberPhone |
| | | ); |
| | | //TODO 发送下级的待审批的通知 |
| | | |
| | | //公众号通知 |
| | | if(CollectionUtils.isNotEmpty(openIdList)){ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, |
| | | platformBooksMapper.selectById(approveDTO.getObjId()), |
| | | WxPlatConstants.platformBookContent.platformBookWaitAudit, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | openIdList, |
| | | Constants.ONE); |
| | | } |
| | | |
| | | } else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar) |
| | | || approveDTO.getObjType().equals(Constants.approveObjectType.unCityUseCar)){ |
| | |
| | | if(Objects.nonNull(systemUser)){ |
| | | carUseBook.setMemberName(systemUser.getRealname()); |
| | | //发送微信公众号通知 |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,carUseBook, |
| | | WxPlatConstants.carUseBookContent.carUseBookWaitAudit, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | |
| | | ); |
| | | //公众号通知 |
| | | if(CollectionUtils.isNotEmpty(openIdList)){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visitsMapper.selectById(approveDTO.getObjId()), |
| | | approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)?WxPlatConstants.visitReportContent.visitReportWaitAudit:WxPlatConstants.visitContent.visitWaitAudit, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | |
| | | //发送微信公众号 |
| | | if(StringUtils.isNotBlank(objCode)){ |
| | | if(Objects.nonNull(visits) && StringUtils.isNotBlank(visits.getOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visits, objCode, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(visits.getOpenid().split(",")) |
| | |
| | | if(Objects.nonNull(systemUser)&&StringUtils.isNotBlank(systemUser.getOpenid())){ |
| | | carUseBook.setMemberName(systemUser.getRealname()); |
| | | //发送微信公众号通知 |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,carUseBook, |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.carUseBookContent.carUseBookAuditSuccess: WxPlatConstants.carUseBookContent.carUseBookAuditFail, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | |
| | | ); |
| | | |
| | | //发送微信公众号消息 |
| | | Member member = memberMapper.selectById(platformBooks.getDriverId() ); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted, Constants.ZERO) |
| | | .eq(SystemUser::getType, Constants.ZERO) |
| | | .eq(SystemUser::getMobile,platformBooks.getDriverPhone()) |
| | | .last(" limit 1 ")); |
| | | if(Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())){ |
| | | //发送微信公众号通知 |
| | | wxPlatNotice.sendPlatformBookTemplateNotice( |
| | | wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,platformBooks, |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.platformBookContent.platformBookAuditSuccess: WxPlatConstants.platformBookContent.platformBookAuditFail, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | Arrays.asList(driver.getOpenid().split(",")),0); |
| | | } |
| | | |
| | | }else{ |