From 931e45f5f78494c7af4cab75053da49b57f22fbe Mon Sep 17 00:00:00 2001 From: rk <94314517@qq.com> Date: 星期一, 13 十月 2025 14:31:43 +0800 Subject: [PATCH] 定时自动叫号 与 WMS获取车辆是否在园接口开发 --- server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 53 insertions(+), 4 deletions(-) diff --git a/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java b/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java index 77e2238..51532ce 100644 --- a/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java +++ b/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java @@ -4,12 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.doumee.core.constants.ResponseStatus; import com.doumee.core.exception.BusinessException; -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.Constants; import com.doumee.dao.system.SystemDictDataMapper; import com.doumee.dao.system.SystemDictMapper; +import com.doumee.dao.system.dto.PlatformConfigDTO; import com.doumee.dao.system.dto.QuerySystemDictDataDTO; import com.doumee.dao.system.dto.VisitConfigDTO; import com.doumee.dao.system.model.SystemDict; @@ -18,7 +19,6 @@ import com.doumee.service.system.SystemDictDataService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import lombok.extern.java.Log; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -173,6 +173,55 @@ } return ""; } + @Override + public PlatformConfigDTO getPlatformConfigDTO(){ + PlatformConfigDTO visitConfigDTO = new PlatformConfigDTO(); + SystemDict systemDict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda().eq(SystemDict::getCode,Constants.PLATFORM)); + if(Objects.isNull(systemDict)){ + throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"瀛楀吀绫讳笉瀛樺湪"); + } + List<SystemDictData> systemDictList = systemDictDataMapper.selectList( + new QueryWrapper<SystemDictData>().lambda().eq(SystemDictData::getDictId,systemDict.getId())); + if(!com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictList)){ + throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"瀛楀吀涓嶅瓨鍦�"); + } + visitConfigDTO.setBookTips( setDataByLabel(systemDictList,Constants.PLATFORM_BOOKING_TIPS)); + visitConfigDTO.setTipsImg( setDataByLabel(systemDictList,Constants.PLATFORM_GUIDEMAP)); + return visitConfigDTO; + } + @Override + @Transactional + public void updatePlatformConfig(PlatformConfigDTO visitConfigDTO) { + if(Objects.isNull(visitConfigDTO) + && Objects.isNull(visitConfigDTO.getBookTips()) + && Objects.isNull(visitConfigDTO.getTipsImg()) + ){ + throw new BusinessException(ResponseStatus.BAD_REQUEST); + } + LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); + if(loginUserInfo == null){ + loginUserInfo = visitConfigDTO.getLoginUserInfo(); + } + SystemDict systemDict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda().eq(SystemDict::getCode,Constants.PLATFORM)); + if(Objects.isNull(systemDict)){ + systemDict = new SystemDict(); + systemDict.setCreateUser(loginUserInfo.getId()); + systemDict.setCreateTime(new Date()); + systemDict.setUpdateUser(systemDict.getCreateUser()); + systemDict.setUpdateTime(systemDict.getCreateTime()); + systemDict.setCode(Constants.PLATFORM); + systemDict.setRemark("鏈堝彴鐩稿叧閰嶇疆"); + systemDict.setDeleted(Boolean.FALSE); + systemDictMapper.insert(systemDict); + } + List<SystemDictData> systemDictList = systemDictDataMapper.selectList( + new QueryWrapper<SystemDictData>().lambda().eq(SystemDictData::getDictId,systemDict.getId())); + if(!com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictList)){ + throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"瀛楀吀涓嶅瓨鍦�"); + } + dealDictData(systemDictList,systemDict.getId(),Constants.PLATFORM_GUIDEMAP,"鐗╂祦杞﹀洯鍖哄瑙堝浘",loginUserInfo, visitConfigDTO.getTipsImg()==null?"":visitConfigDTO.getTipsImg().toString()); + dealDictData(systemDictList,systemDict.getId(),Constants.PLATFORM_BOOKING_TIPS,"鐗╂祦杞﹂绾︽寚鍗�",loginUserInfo, visitConfigDTO.getBookTips()==null?"":visitConfigDTO.getBookTips().toString()); + } @Override @Transactional -- Gitblit v1.9.3