展连设备数据解析策略

This commit is contained in:
mi9688
2024-11-21 17:48:58 +08:00
parent db13870ffe
commit 148800d58f
26 changed files with 515 additions and 196 deletions

View File

@ -129,7 +129,11 @@ public class ProjectServiceImpl implements IProjectService
@Transactional(rollbackFor = Exception.class)
public int insertProject(Project project)
{
System.err.println("项目类型:"+project.getType());
//TODO 参数校验
if (Objects.isNull(project.getType())||!ProjectTypeConstant.isValidProjectType(project.getType())) {
throw new ServiceException("项目类型不能为空或者非法!");
}
//获取当前时间
Date nowDate = DateUtils.getNowDate();
//处理项目行政区划
@ -152,7 +156,6 @@ public class ProjectServiceImpl implements IProjectService
newSysDept.setAdministrativeLevel(3);
//设置机构所属项目id
//设置机构型行政区域信息
newSysDept.setAdministrativeAreaCode(Objects.nonNull(project.getAdministrativeAreaCode())?project.getAdministrativeAreaCode():null);
newSysDept.setAdministrativeArea(Objects.nonNull(project.getAdministrativeArea())?project.getAdministrativeArea():null);
@ -175,9 +178,7 @@ public class ProjectServiceImpl implements IProjectService
.map(SysMenu::getMenuId)
.toArray(Long[]::new);
//根据项目类型过滤菜单
if (!Objects.nonNull(project.getType())||ProjectTypeConstant.isValidProjectType(project.getType())) {
throw new ServiceException("项目类型不能为空或者非法!");
}
if (Objects.equals(project.getType(),ProjectTypeConstant.WATER)) {
List<Long> menuList=Arrays.asList(menuIdList);