驾驶舱接口开发

This commit is contained in:
hzj
2025-05-27 10:33:34 +08:00
parent e19da7ca12
commit 03a8461b1b

View File

@@ -53,8 +53,8 @@ public class ComponentServiceImpl extends ServiceImpl<ComponentMapper, Component
checkComponentParam(componentParam, false);
Component component = new Component();
BeanUtil.copyProperties(componentParam, component);
String functionGroup = componentParam.getFunctionGroup().stream().map(String::valueOf).collect(Collectors.joining(","));
component.setFunctionGroup(functionGroup);
// String functionGroup = componentParam.getFunctionGroup().stream().map(String::valueOf).collect(Collectors.joining(","));
// component.setFunctionGroup(functionGroup);
component.setState(ComponentState.ENABLE);
if (Objects.equals(componentParam.getPid(), FunctionState.FATHER_PID)) {
component.setPids(FunctionState.FATHER_PID);
@@ -79,8 +79,8 @@ public class ComponentServiceImpl extends ServiceImpl<ComponentMapper, Component
checkComponentParam(componentParam, true);
Component component = new Component();
BeanUtil.copyProperties(componentParam, component);
String functionGroup = componentParam.getFunctionGroup().stream().map(String::valueOf).collect(Collectors.joining(","));
component.setFunctionGroup(functionGroup);
// String functionGroup = componentParam.getFunctionGroup().stream().map(String::valueOf).collect(Collectors.joining(","));
// component.setFunctionGroup(functionGroup);
return this.updateById(component);
}
@@ -93,7 +93,7 @@ public class ComponentServiceImpl extends ServiceImpl<ComponentMapper, Component
componentList.forEach(item -> {
ComponentVO componentVO = new ComponentVO();
BeanUtil.copyProperties(item, componentVO);
componentVO.setFunctionGroup(Arrays.stream(item.getFunctionGroup().split(",")).map(s -> Integer.valueOf(s.trim())).collect(Collectors.toList()));
// componentVO.setFunctionGroup(Arrays.stream(item.getFunctionGroup().split(",")).map(s -> Integer.valueOf(s.trim())).collect(Collectors.toList()));
list.add(componentVO);
});
Map<String,List<ComponentVO>> map = list.stream().filter(m->!Objects.isNull(m.getSystemType())).collect(Collectors.groupingBy(ComponentVO::getSystemType));
@@ -138,7 +138,7 @@ public class ComponentServiceImpl extends ServiceImpl<ComponentMapper, Component
list.forEach(item -> {
ComponentVO componentVO = new ComponentVO();
BeanUtil.copyProperties(item, componentVO);
componentVO.setFunctionGroup(Arrays.stream(item.getFunctionGroup().split(",")).map(s -> Integer.valueOf(s.trim())).collect(Collectors.toList()));
// componentVO.setFunctionGroup(Arrays.stream(item.getFunctionGroup().split(",")).map(s -> Integer.valueOf(s.trim())).collect(Collectors.toList()));
componentVOList.add(componentVO);
});
Map<String,List<ComponentVO>> map = componentVOList.stream().collect(Collectors.groupingBy(ComponentVO::getSystemType));