| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.FtpUtil; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private PlatformEventMapper platformEventMapper; |
| | | @Autowired |
| | | private DeviceEventMapper deviceEventMapper; |
| | | @Autowired |
| | | private VisitEventMapper visitEventMapper; |
| | |
| | | startDealDeviceImg(); |
| | | //查询所有人员人脸照片 |
| | | startDealMemberImg(); |
| | | //查询所有月台事件中抓拍图照片 |
| | | startDealPlatformEventImg(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | |
| | | } |
| | | } |
| | | memberMapper.updateById(event); |
| | | } |
| | | } |
| | | |
| | | } |
| | | private void startDealPlatformEventImg() { |
| | | List<PlatformEvent> list = platformEventMapper.selectList(new QueryWrapper<PlatformEvent>().lambda() |
| | | .eq(PlatformEvent::getIsdeleted,Constants.ZERO) |
| | | .isNotNull(PlatformEvent::getBackgroundImageContent) |
| | | .notLikeRight(PlatformEvent::getBackgroundImageContent, HKConstants.IMG_INDEX_ERROR) |
| | | .isNull(PlatformEvent::getBackgroundImageDown)); |
| | | Date date= new Date(); |
| | | if(list !=null && list.size()>0){ |
| | | for(PlatformEvent model:list){ |
| | | String rs1 = null; |
| | | PlatformEvent event = new PlatformEvent(); |
| | | event.setId(model.getId()); |
| | | event.setEditDate(date); |
| | | if(StringUtils.isNotBlank(model.getBackgroundImageContent())){ |
| | | String img1 = model.getBackgroundImageContent(); |
| | | rs1 = downHkImgToFtp(img1,"",Constants.PLATFORM_EVENT_IMG); |
| | | if(StringUtils.isNotBlank(rs1)){ |
| | | event.setBackgroundImageDown(rs1); |
| | | }else{ |
| | | event.setBackgroundImageContent(HKConstants.IMG_INDEX_ERROR+model.getBackgroundImageContent()); |
| | | } |
| | | } |
| | | platformEventMapper.updateById(event); |
| | | } |
| | | } |
| | | |
| | |
| | | param.setPicUri(img1.replace(HKConstants.IMG_INDEX_ERROR,"").replace(HKConstants.IMG_INDEX,"")); |
| | | param.setServerIndexCode(serverIndex); |
| | | is = HKService.getFaceInputStream(param); |
| | | }else if(StringUtils.equals(folder_code,Constants.PLATFORM_EVENT_IMG)){ |
| | | //月台事件图片 |
| | | is = HttpsUtil.connectionInputsteam(img1,"GET",null,null); |
| | | } |
| | | if(is ==null){ |
| | | return null; |
| | | } |
| | | |
| | | try { |
| | | if(ftp == null){ |
| | | ftp = new FtpUtil(systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_HOST).getCode(), |