展连设备数据解析策略
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user