jiangping
2024-03-04 d495e97e5f55c02486d8bb205e23aea5760c359f
整理
已修改2个文件
8 ■■■■■ 文件已修改
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceEventServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceEventServiceImpl.java
@@ -402,18 +402,18 @@
        List<DeviceEventDTO> newDeviceEventDTOS = new ArrayList<>();
        List<String> codes = Arrays.asList(Constants.FTP_RESOURCE_PATH,Constants.DEVICE_EVENT_IMG);
        List<SystemDictData> list = systemDictDataMapper.list(codes);
        Map<String,SystemDictData> dataMap = list.stream().collect(Collectors.toMap(SystemDictData::getLabel, Function.identity()));
        for (DeviceEventDTO dto:DeviceEventDTOList) {
           if(StringUtils.isNotBlank(dto.getExtEventPictureURL())
                   && !dto.getExtEventPictureURL().startsWith(HKConstants.IMG_INDEX)
                   && !dto.getExtEventPictureURL().startsWith(HKConstants.IMG_INDEX_ERROR)) {
                   if(null != list && list.size() > 0) {
                       Map<String,SystemDictData> dataMap = list.stream().collect(Collectors.toMap(SystemDictData::getLabel, Function.identity()));
                       if(StringUtils.isNotBlank(dto.getExtEventPictureURL())){
                           dto.setExtEventPictureURL(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode()
                                   +dataMap.get(Constants.DEVICE_EVENT_IMG).getCode()
                                   +dto.getExtEventPictureURL());
                       }
                   }
           }else{
               dto.setExtEventPictureURL(null);
           }
            dto.setEventTypeName(HKConstants.EventTypes.getName(dto.getEventType())) ;
            try {
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -949,7 +949,6 @@
        List<DeviceRole> roles = null;
        if(StringUtils.equals(mustSelectDoors,Constants.ZERO+"")){
            //如果设置不选择门禁,则提供默认门禁组信息
            if(StringUtils.isBlank(visits.getDoors())){
                throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,请选择访问门禁!");
            }
@@ -962,7 +961,6 @@
            if(roles.size() ==0){
                throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,暂不存在可访问的访客门禁,无法进行申请操作!");
            }
        }else{
            //如果必须选择门禁,但未选择
            String[] dIds = visits.getDoors().split(",");