代码优化

This commit is contained in:
xy
2025-07-29 16:10:15 +08:00
parent 02f8008482
commit 9f9baa9991

View File

@@ -184,14 +184,15 @@ public class EventDetailServiceImpl extends ServiceImpl<EventDetailMapper, RmpEv
}
private void pushEvent(RmpEventDetailPO po) {
String id = po.getLineId();
//根据监测点获取部门
DeptLine deptLine = deptLineFeignClient.getLineByLineIds(po.getMeasurementPointId()).getData();
DeptLine deptLine = deptLineFeignClient.getLineByLineIds(id).getData();
if(Objects.nonNull(deptLine)){
String id = deptLine.getId();
String deptLineId = deptLine.getId();
Set<String> dept = new HashSet<>();
dept.add(id);
dept.add(deptLineId);
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
deptGetLineParam.setDeptId(id);
deptGetLineParam.setDeptId(deptLineId);
List<DeptGetBase> deptList = commTerminalGeneralClient.getDeptChildrenByParent(deptGetLineParam).getData();
if (CollectionUtil.isNotEmpty(deptList)) {
deptList.forEach(item->{