| | |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"访客答题主题 字典不存在"); |
| | | } |
| | | visitConfigDTO.setTheme(theme.getCode()); |
| | | |
| | | SystemDictData description = systemDictList.stream().filter(m->m.getLabel().equals(Constants.DESCRIPTION)).findFirst().get(); |
| | | if(Objects.isNull(description)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"访客答题说明 字典不存在"); |
| | | } |
| | | visitConfigDTO.setDescription(description.getCode()); |
| | | |
| | | SystemDictData visitNotice = systemDictList.stream().filter(m->m.getLabel().equals(Constants.VISIT_NOTICE)).findFirst().get(); |
| | | if(Objects.isNull(visitNotice)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"入厂须知 字典不存在"); |
| | | } |
| | | visitConfigDTO.setVisitNotice(visitNotice.getCode()); |
| | | SystemDictData doorsVisitRequired = systemDictList.stream().filter(m->m.getLabel().equals(Constants.SELECT_DOORS_VISIT_REQUIRED)).findFirst().get(); |
| | | if(Objects.isNull(doorsVisitRequired)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"自选门禁配置 字典不存在"); |
| | | } |
| | | visitConfigDTO.setDoorsVisitRequired(Integer.valueOf(doorsVisitRequired.getCode())); |
| | | return visitConfigDTO; |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"访客答题主题 字典不存在"); |
| | | } |
| | | theme.setCode(visitConfigDTO.getTheme()); |
| | | |
| | | SystemDictData description = systemDictList.stream().filter(m->m.getLabel().equals(Constants.DESCRIPTION)).findFirst().get(); |
| | | if(Objects.isNull(description)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"访客答题说明 字典不存在"); |
| | | } |
| | | description.setCode(visitConfigDTO.getDescription()); |
| | | |
| | | SystemDictData visitNotice = systemDictList.stream().filter(m->m.getLabel().equals(Constants.VISIT_NOTICE)).findFirst().get(); |
| | | if(Objects.isNull(visitNotice)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"入厂须知 字典不存在"); |
| | | } |
| | | visitNotice.setCode(visitConfigDTO.getVisitNotice()); |
| | | |
| | | SystemDictData doorsVisitRequired = systemDictList.stream().filter(m->m.getLabel().equals(Constants.SELECT_DOORS_VISIT_REQUIRED)).findFirst().get(); |
| | | if(Objects.isNull(doorsVisitRequired)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"自选门禁配置 字典不存在"); |
| | | } |
| | | doorsVisitRequired.setCode(visitConfigDTO.getDoorsVisitRequired().toString()); |
| | | |
| | | systemDictDataMapper.updateById(reservationWay); |
| | | systemDictDataMapper.updateById(checkVisit); |
| | |
| | | systemDictDataMapper.updateById(isAnswer); |
| | | systemDictDataMapper.updateById(theme); |
| | | systemDictDataMapper.updateById(description); |
| | | systemDictDataMapper.updateById(visitNotice); |
| | | systemDictDataMapper.updateById(doorsVisitRequired); |
| | | |
| | | } |
| | | |