事件处理逻辑完善
This commit is contained in:
@@ -34,4 +34,10 @@ public interface RemoteDeptService {
|
|||||||
*/
|
*/
|
||||||
List<RemoteDeptVo> selectDeptsByList();
|
List<RemoteDeptVo> selectDeptsByList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据部门id查询部门信息
|
||||||
|
* @param deptId 部门id
|
||||||
|
* @return 返回部门信息
|
||||||
|
*/
|
||||||
|
RemoteDeptVo selectDeptVoById(Long deptId);
|
||||||
}
|
}
|
||||||
|
@@ -120,7 +120,6 @@ public class AttendanceUserGroupController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @return 返回排班人员信息
|
* @return 返回排班人员信息
|
||||||
*/
|
*/
|
||||||
@RepeatSubmit()
|
|
||||||
@GetMapping("/query/currentDay")
|
@GetMapping("/query/currentDay")
|
||||||
public R<List<AttendanceUserGroupVo>> queryCurrentSchedu() {
|
public R<List<AttendanceUserGroupVo>> queryCurrentSchedu() {
|
||||||
return R.ok(attendanceUserGroupService.queryAttendPersonInfo(new Date()));
|
return R.ok(attendanceUserGroupService.queryAttendPersonInfo(new Date()));
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package org.dromara.property.dubbo;
|
package org.dromara.property.dubbo;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.dubbo.config.annotation.DubboService;
|
import org.apache.dubbo.config.annotation.DubboService;
|
||||||
@@ -28,10 +29,9 @@ public class RemoteAttendanceServiceImpl implements RemoteAttendanceService {
|
|||||||
public List<RemoteAttendanceUserGroupVo> queryAttendPersonInfo(Date date) {
|
public List<RemoteAttendanceUserGroupVo> queryAttendPersonInfo(Date date) {
|
||||||
List<AttendanceUserGroupVo> ls = attendanceUserGroupService.queryAttendPersonInfo(date);
|
List<AttendanceUserGroupVo> ls = attendanceUserGroupService.queryAttendPersonInfo(date);
|
||||||
if (CollUtil.isNotEmpty(ls)) {
|
if (CollUtil.isNotEmpty(ls)) {
|
||||||
return MapstructUtils.convert(ls, RemoteAttendanceUserGroupVo.class);
|
return BeanUtil.copyToList(ls, RemoteAttendanceUserGroupVo.class);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package org.dromara.property.service.impl;
|
package org.dromara.property.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -17,6 +18,7 @@ import org.dromara.property.mapper.*;
|
|||||||
import org.dromara.property.service.IAttendanceUserGroupService;
|
import org.dromara.property.service.IAttendanceUserGroupService;
|
||||||
import org.dromara.system.api.RemoteDeptService;
|
import org.dromara.system.api.RemoteDeptService;
|
||||||
import org.dromara.system.api.RemoteUserService;
|
import org.dromara.system.api.RemoteUserService;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteDeptVo;
|
||||||
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -164,7 +166,18 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
|
|||||||
lqw.le(AttendanceUserGroup::getStartDate, date)
|
lqw.le(AttendanceUserGroup::getStartDate, date)
|
||||||
.ge(AttendanceUserGroup::getEndDate, date);
|
.ge(AttendanceUserGroup::getEndDate, date);
|
||||||
// 如果今天存在排班信息。那么处理排班人员信息
|
// 如果今天存在排班信息。那么处理排班人员信息
|
||||||
return this.baseMapper.selectVoList(lqw);
|
List<AttendanceUserGroupVo> attendanceUserGroupVos = this.baseMapper.selectVoList(lqw);
|
||||||
|
if (CollUtil.isNotEmpty(attendanceUserGroupVos)) {
|
||||||
|
attendanceUserGroupVos.forEach(attendanceUserGroupVo -> {
|
||||||
|
// 查询排班人员信息
|
||||||
|
RemoteUserVo remoteUserVo = remoteUserService.getUserInfoById(attendanceUserGroupVo.getEmployeeId());
|
||||||
|
attendanceUserGroupVo.setRemoteUserVo(remoteUserVo);
|
||||||
|
// todo 当表冗余了部门信息,以下反查操作可以去掉
|
||||||
|
RemoteDeptVo dept = remoteDeptService.selectDeptVoById(attendanceUserGroupVo.getDeptId());
|
||||||
|
attendanceUserGroupVo.setDeptName(dept.getDeptName());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return attendanceUserGroupVos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -14,12 +14,14 @@ import org.dromara.common.log.annotation.Log;
|
|||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.sis.domain.bo.SisAlarmEventsBo;
|
import org.dromara.sis.domain.bo.SisAlarmEventsBo;
|
||||||
import org.dromara.sis.domain.bo.alarm.AlarmAssignmentBo;
|
import org.dromara.sis.domain.bo.alarm.AlarmAssignmentBo;
|
||||||
import org.dromara.sis.domain.bo.alarm.AlarmCompleteBo;
|
import org.dromara.sis.domain.bo.alarm.AlarmCompleteBo;
|
||||||
import org.dromara.sis.domain.vo.SisAlarmEventsVo;
|
import org.dromara.sis.domain.vo.SisAlarmEventsVo;
|
||||||
import org.dromara.sis.service.ISisAlarmEventsService;
|
import org.dromara.sis.service.ISisAlarmEventsService;
|
||||||
|
import org.dromara.system.api.model.LoginUser;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -49,6 +51,18 @@ public class SisAlarmEventsController extends BaseController {
|
|||||||
return sisAlarmEventsService.queryPageList(bo, pageQuery);
|
return sisAlarmEventsService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询告警列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("sis:alarmEvents:list")
|
||||||
|
@GetMapping("/list/curr")
|
||||||
|
public TableDataInfo<SisAlarmEventsVo> listCurr(SisAlarmEventsBo bo, PageQuery pageQuery) {
|
||||||
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
|
bo.setSolveId(loginUser.getUserId());
|
||||||
|
return sisAlarmEventsService.queryPageListCurr(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出告警列表
|
* 导出告警列表
|
||||||
*/
|
*/
|
||||||
@@ -110,22 +124,26 @@ public class SisAlarmEventsController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警任务指派
|
* 告警任务指派
|
||||||
|
*
|
||||||
|
* @param bo 指派参数
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("sis:alarmEvents:edit")
|
@SaCheckPermission("sis:alarmEvents:edit")
|
||||||
@Log(title = "告警任务指派", businessType = BusinessType.UPDATE)
|
@Log(title = "告警任务指派", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping("/assignment")
|
@PostMapping("/assignment")
|
||||||
public R<Void> taskAssignment(@Validated @RequestBody AlarmAssignmentBo bo) {
|
public R<Void> taskAssignment(@Validated @RequestBody AlarmAssignmentBo bo) {
|
||||||
return toAjax(sisAlarmEventsService.taskAssignment(bo));
|
return toAjax(sisAlarmEventsService.taskAssignment(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警任务指派
|
* 告警处理完成
|
||||||
|
*
|
||||||
|
* @param bo 完成参数
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("sis:alarmEvents:edit")
|
@SaCheckPermission("sis:alarmEvents:edit")
|
||||||
@Log(title = "告警任务指派", businessType = BusinessType.UPDATE)
|
@Log(title = "告警处理完成", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping("/complete")
|
@PostMapping("/complete")
|
||||||
public R<Void> complete(@Validated @RequestBody AlarmCompleteBo bo) {
|
public R<Void> complete(@Validated @RequestBody AlarmCompleteBo bo) {
|
||||||
return toAjax(sisAlarmEventsService.complete(bo));
|
return toAjax(sisAlarmEventsService.complete(bo));
|
||||||
}
|
}
|
||||||
|
@@ -99,6 +99,16 @@ public class SisAlarmEvents extends TenantEntity {
|
|||||||
*/
|
*/
|
||||||
private String solveName;
|
private String solveName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人电话
|
||||||
|
*/
|
||||||
|
private String solvePhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人邮箱
|
||||||
|
*/
|
||||||
|
private String solveEmail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务接受时间
|
* 任务接受时间
|
||||||
*/
|
*/
|
||||||
|
@@ -10,6 +10,7 @@ import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|||||||
import org.dromara.sis.domain.SisAlarmEvents;
|
import org.dromara.sis.domain.SisAlarmEvents;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警业务对象 sis_alarm_events
|
* 告警业务对象 sis_alarm_events
|
||||||
@@ -86,6 +87,10 @@ public class SisAlarmEventsBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Integer state;
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态列表
|
||||||
|
*/
|
||||||
|
private List<Integer> states;
|
||||||
/**
|
/**
|
||||||
* 工单id
|
* 工单id
|
||||||
*/
|
*/
|
||||||
|
@@ -17,7 +17,6 @@ public class AlarmAssignmentBo {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private Long alarmId;
|
private Long alarmId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理人id
|
* 处理人id
|
||||||
*/
|
*/
|
||||||
@@ -29,6 +28,16 @@ public class AlarmAssignmentBo {
|
|||||||
*/
|
*/
|
||||||
private String solveName;
|
private String solveName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人电话
|
||||||
|
*/
|
||||||
|
private String solvePhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人邮箱
|
||||||
|
*/
|
||||||
|
private String solveEmail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指派备注
|
* 指派备注
|
||||||
*/
|
*/
|
||||||
|
@@ -1,23 +1,18 @@
|
|||||||
package org.dromara.sis.domain.vo;
|
package org.dromara.sis.domain.vo;
|
||||||
|
|
||||||
import java.util.Date;
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
import org.dromara.common.translation.annotation.Translation;
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
import org.dromara.common.translation.constant.TransConstant;
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
import org.dromara.sis.domain.SisAlarmEvents;
|
import org.dromara.sis.domain.SisAlarmEvents;
|
||||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import cn.idev.excel.annotation.ExcelProperty;
|
|
||||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
|
||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警视图对象 sis_alarm_events
|
* 告警视图对象 sis_alarm_events
|
||||||
*
|
*
|
||||||
@@ -122,6 +117,16 @@ public class SisAlarmEventsVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String solveName;
|
private String solveName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人电话
|
||||||
|
*/
|
||||||
|
private String solvePhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人邮箱
|
||||||
|
*/
|
||||||
|
private String solveEmail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务接受时间
|
* 任务接受时间
|
||||||
*/
|
*/
|
||||||
@@ -132,6 +137,8 @@ public class SisAlarmEventsVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Date solveTime;
|
private Date solveTime;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务完成时间
|
* 任务完成时间
|
||||||
*/
|
*/
|
||||||
|
@@ -35,6 +35,13 @@ public interface ISisAlarmEventsService {
|
|||||||
*/
|
*/
|
||||||
TableDataInfo<SisAlarmEventsVo> queryPageList(SisAlarmEventsBo bo, PageQuery pageQuery);
|
TableDataInfo<SisAlarmEventsVo> queryPageList(SisAlarmEventsBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 告警分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<SisAlarmEventsVo> queryPageListCurr(SisAlarmEventsBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询符合条件的告警列表
|
* 查询符合条件的告警列表
|
||||||
*
|
*
|
||||||
@@ -94,4 +101,6 @@ public interface ISisAlarmEventsService {
|
|||||||
* @return 返回是否成功
|
* @return 返回是否成功
|
||||||
*/
|
*/
|
||||||
Boolean complete(AlarmCompleteBo bo);
|
Boolean complete(AlarmCompleteBo bo);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ package org.dromara.sis.service.impl;
|
|||||||
|
|
||||||
import cn.dev33.satoken.context.mock.SaTokenContextMockUtil;
|
import cn.dev33.satoken.context.mock.SaTokenContextMockUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateField;
|
import cn.hutool.core.date.DateField;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -40,7 +41,10 @@ import org.springframework.scheduling.annotation.Async;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警Service业务层处理
|
* 告警Service业务层处理
|
||||||
@@ -84,6 +88,15 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
|||||||
@Override
|
@Override
|
||||||
public TableDataInfo<SisAlarmEventsVo> queryPageList(SisAlarmEventsBo bo, PageQuery pageQuery) {
|
public TableDataInfo<SisAlarmEventsVo> queryPageList(SisAlarmEventsBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<SisAlarmEvents> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<SisAlarmEvents> lqw = buildQueryWrapper(bo);
|
||||||
|
lqw.orderByDesc(SisAlarmEvents::getId);
|
||||||
|
Page<SisAlarmEventsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<SisAlarmEventsVo> queryPageListCurr(SisAlarmEventsBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<SisAlarmEvents> lqw = buildQueryWrapper(bo);
|
||||||
|
lqw.orderByDesc(SisAlarmEvents::getSolveTime);
|
||||||
Page<SisAlarmEventsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<SisAlarmEventsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
@@ -101,11 +114,11 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private LambdaQueryWrapper<SisAlarmEvents> buildQueryWrapper(SisAlarmEventsBo bo) {
|
private LambdaQueryWrapper<SisAlarmEvents> buildQueryWrapper(SisAlarmEventsBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<SisAlarmEvents> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<SisAlarmEvents> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByAsc(SisAlarmEvents::getId);
|
|
||||||
lqw.eq(bo.getLevel() != null, SisAlarmEvents::getLevel, bo.getLevel());
|
lqw.eq(bo.getLevel() != null, SisAlarmEvents::getLevel, bo.getLevel());
|
||||||
lqw.eq(bo.getSolveId() != null, SisAlarmEvents::getSolveId, bo.getSolveId());
|
lqw.eq(bo.getSolveId() != null, SisAlarmEvents::getSolveId, bo.getSolveId());
|
||||||
|
lqw.eq(bo.getState() != null, SisAlarmEvents::getState, bo.getState());
|
||||||
|
lqw.in(CollectionUtil.isNotEmpty(bo.getStates()), SisAlarmEvents::getState, bo.getStates());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDeviceIp()), SisAlarmEvents::getDeviceIp, bo.getDeviceIp());
|
lqw.eq(StringUtils.isNotBlank(bo.getDeviceIp()), SisAlarmEvents::getDeviceIp, bo.getDeviceIp());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), SisAlarmEvents::getDeviceName, bo.getDeviceName());
|
lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), SisAlarmEvents::getDeviceName, bo.getDeviceName());
|
||||||
lqw.eq(bo.getDeviceGroupId() != null, SisAlarmEvents::getDeviceGroupId, bo.getDeviceGroupId());
|
lqw.eq(bo.getDeviceGroupId() != null, SisAlarmEvents::getDeviceGroupId, bo.getDeviceGroupId());
|
||||||
@@ -230,7 +243,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
|||||||
if (sisAlarmEventsVo == null) {
|
if (sisAlarmEventsVo == null) {
|
||||||
throw new RuntimeException("工单信息不存在!");
|
throw new RuntimeException("工单信息不存在!");
|
||||||
}
|
}
|
||||||
if (sisAlarmEventsVo.getState().equals(AlarmStatus.REPORTED.getCode())) {
|
if (!sisAlarmEventsVo.getState().equals(AlarmStatus.REPORTED.getCode())) {
|
||||||
throw new RuntimeException("当前工单已指派,请刷新后重新指派!");
|
throw new RuntimeException("当前工单已指派,请刷新后重新指派!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,10 +266,13 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
|||||||
|
|
||||||
SisAlarmEvents events = new SisAlarmEvents();
|
SisAlarmEvents events = new SisAlarmEvents();
|
||||||
events.setId(sisAlarmEventsVo.getId());
|
events.setId(sisAlarmEventsVo.getId());
|
||||||
sisAlarmEventsVo.setSolveId(bo.getAlarmId());
|
events.setSolveId(bo.getSolveId());
|
||||||
sisAlarmEventsVo.setSolveName(bo.getSolveName());
|
events.setSolveName(bo.getSolveName());
|
||||||
sisAlarmEventsVo.setSolveTime(now);
|
events.setSolvePhone(bo.getSolvePhone());
|
||||||
sisAlarmEventsVo.setState(AlarmStatus.CONFIRMED.getCode());
|
events.setSolveEmail(bo.getSolveEmail());
|
||||||
|
events.setSolveName(bo.getSolveName());
|
||||||
|
events.setSolveTime(now);
|
||||||
|
events.setState(AlarmStatus.CONFIRMED.getCode());
|
||||||
this.baseMapper.updateById(events);
|
this.baseMapper.updateById(events);
|
||||||
// 写入处理流程
|
// 写入处理流程
|
||||||
SisAlarmEventProcess process = new SisAlarmEventProcess();
|
SisAlarmEventProcess process = new SisAlarmEventProcess();
|
||||||
@@ -297,11 +313,11 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
SisAlarmEvents events = new SisAlarmEvents();
|
SisAlarmEvents events = new SisAlarmEvents();
|
||||||
events.setId(sisAlarmEventsVo.getId());
|
events.setId(sisAlarmEventsVo.getId());
|
||||||
sisAlarmEventsVo.setSolveId(bo.getAlarmId());
|
events.setSolveId(bo.getAlarmId());
|
||||||
sisAlarmEventsVo.setFinishTime(now);
|
events.setFinishTime(now);
|
||||||
sisAlarmEventsVo.setSolveId(loginUser.getUserId());
|
events.setSolveId(loginUser.getUserId());
|
||||||
sisAlarmEventsVo.setSolveName(loginUser.getUsername());
|
events.setSolveName(loginUser.getUsername());
|
||||||
sisAlarmEventsVo.setState(AlarmStatus.RESOLVED.getCode());
|
events.setState(AlarmStatus.RESOLVED.getCode());
|
||||||
this.baseMapper.updateById(events);
|
this.baseMapper.updateById(events);
|
||||||
|
|
||||||
// 写入处理流程
|
// 写入处理流程
|
||||||
|
@@ -3,6 +3,7 @@ package org.dromara.system.dubbo;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.dubbo.config.annotation.DubboService;
|
import org.apache.dubbo.config.annotation.DubboService;
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.system.api.RemoteDeptService;
|
import org.dromara.system.api.RemoteDeptService;
|
||||||
import org.dromara.system.api.domain.vo.RemoteDeptVo;
|
import org.dromara.system.api.domain.vo.RemoteDeptVo;
|
||||||
import org.dromara.system.domain.vo.SysDeptVo;
|
import org.dromara.system.domain.vo.SysDeptVo;
|
||||||
@@ -57,4 +58,9 @@ public class RemoteDeptServiceImpl implements RemoteDeptService {
|
|||||||
return BeanUtil.copyToList(list, RemoteDeptVo.class);
|
return BeanUtil.copyToList(list, RemoteDeptVo.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteDeptVo selectDeptVoById(Long deptId) {
|
||||||
|
SysDeptVo sysDeptVo = sysDeptService.selectDeptById(deptId);
|
||||||
|
return BeanUtil.copyProperties(sysDeptVo, RemoteDeptVo.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user