修改了会议预约记录bug
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 12m42s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 12m42s
This commit is contained in:
parent
e3e4e38f91
commit
21c149bf0c
@ -1,30 +1,25 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
||||
import org.redisson.api.RList;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.property.service.IMeetBookingService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
||||
import org.dromara.property.service.IMeetBookingService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会议预约
|
||||
|
@ -0,0 +1,114 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.property.domain.bo.ServiceWarningBo;
|
||||
import org.dromara.property.domain.vo.ServiceWarningVo;
|
||||
import org.dromara.property.service.IServiceWarningService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务管理-预警事件
|
||||
|
||||
* 前端访问路由地址为:/system/warning
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/warning")
|
||||
public class ServiceWarningController extends BaseController {
|
||||
|
||||
private final IServiceWarningService serviceWarningService;
|
||||
|
||||
/**
|
||||
* 查询业务管理-预警事件
|
||||
列表
|
||||
*/
|
||||
@SaCheckPermission("system:warning:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ServiceWarningVo> list(ServiceWarningBo bo, PageQuery pageQuery) {
|
||||
return serviceWarningService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出业务管理-预警事件
|
||||
列表
|
||||
*/
|
||||
@SaCheckPermission("system:warning:export")
|
||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ServiceWarningBo bo, HttpServletResponse response) {
|
||||
List<ServiceWarningVo> list = serviceWarningService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "业务管理-预警事件", ServiceWarningVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务管理-预警事件
|
||||
详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:warning:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<ServiceWarningVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(serviceWarningService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务管理-预警事件
|
||||
|
||||
*/
|
||||
@SaCheckPermission("system:warning:add")
|
||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ServiceWarningBo bo) {
|
||||
return toAjax(serviceWarningService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务管理-预警事件
|
||||
|
||||
*/
|
||||
@SaCheckPermission("system:warning:edit")
|
||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ServiceWarningBo bo) {
|
||||
return toAjax(serviceWarningService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务管理-预警事件
|
||||
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:warning:remove")
|
||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(serviceWarningService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 meet_attach_order
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("meet_attach_order")
|
||||
public class MeetAttachOrder extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long meetAttachId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long meetBookingId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 业务管理-预警事件
|
||||
对象 service_warning
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("service_warning")
|
||||
public class ServiceWarning extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 事件编号
|
||||
*/
|
||||
private String eventNo;
|
||||
|
||||
/**
|
||||
* 事件类型(0设备告警1能耗异常2安防事件)
|
||||
*/
|
||||
private Long eventType;
|
||||
|
||||
/**
|
||||
* 告警等级(0低危,1中危2高危,3危急)
|
||||
*/
|
||||
private Long alarmLevel;
|
||||
|
||||
/**
|
||||
* 发生位置
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 发生时间
|
||||
*/
|
||||
private Date placeTime;
|
||||
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
private String processors;
|
||||
|
||||
/**
|
||||
* 状态(0未处理,1处理中,2处理完成`)
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date completionTime;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.property.domain.MeetAttachOrder;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】业务对象 meet_attach_order
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MeetAttachOrder.class, reverseConvertGenerate = false)
|
||||
public class MeetAttachOrderBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long meetAttachId;
|
||||
|
||||
private Long meetBookingId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MeetBooking;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.property.domain.MeetBooking;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会议预约业务对象 meet_booking
|
||||
@ -27,49 +27,43 @@ public class MeetBookingBo extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会议室名称
|
||||
*/
|
||||
@NotBlank(message = "会议室名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 会议室id
|
||||
*/
|
||||
@NotNull(message = "会议室id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long meetId;
|
||||
|
||||
/**
|
||||
* 会议室地址
|
||||
*/
|
||||
@NotBlank(message = "会议室地址不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String meetLocation;
|
||||
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
@NotBlank(message = "所属单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 预定人
|
||||
*/
|
||||
@NotBlank(message = "预定人不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String person;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@NotBlank(message = "联系方式不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 预定开始时间
|
||||
*/
|
||||
@NotNull(message = "预定开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
|
||||
private Date scheduledStarttime;
|
||||
|
||||
/**
|
||||
@ -93,19 +87,16 @@ public class MeetBookingBo extends BaseEntity {
|
||||
/**
|
||||
* 是否包含增值服务
|
||||
*/
|
||||
@NotNull(message = "是否包含增值服务不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private int attach;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
@NotNull(message = "支付状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private int payState;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private int state;
|
||||
|
||||
|
||||
@ -113,4 +104,8 @@ public class MeetBookingBo extends BaseEntity {
|
||||
* 描述
|
||||
*/
|
||||
private String descs;
|
||||
/**
|
||||
* 增值服务列表
|
||||
*/
|
||||
List<MeetAttachOrderBo> meetAttachOrderBoList;
|
||||
}
|
||||
|
@ -0,0 +1,93 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.property.domain.ServiceWarning;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务管理-预警事件
|
||||
业务对象 service_warning
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = ServiceWarning.class, reverseConvertGenerate = false)
|
||||
public class ServiceWarningBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 事件编号
|
||||
*/
|
||||
@NotBlank(message = "事件编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String eventNo;
|
||||
|
||||
/**
|
||||
* 事件类型(0设备告警1能耗异常2安防事件)
|
||||
*/
|
||||
@NotNull(message = "事件类型(0设备告警1能耗异常2安防事件)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long eventType;
|
||||
|
||||
/**
|
||||
* 告警等级(0低危,1中危2高危,3危急)
|
||||
*/
|
||||
@NotNull(message = "告警等级(0低危,1中危2高危,3危急)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long alarmLevel;
|
||||
|
||||
/**
|
||||
* 发生位置
|
||||
*/
|
||||
@NotBlank(message = "发生位置不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 发生时间
|
||||
*/
|
||||
private Date placeTime;
|
||||
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
private String processors;
|
||||
|
||||
/**
|
||||
* 状态(0未处理,1处理中,2处理完成`)
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date completionTime;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.property.domain.MeetAttachOrder;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】视图对象 meet_attach_order
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MeetAttachOrder.class)
|
||||
public class MeetAttachOrderVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long meetAttachId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long meetBookingId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@ExcelProperty(value = "数量")
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.property.domain.ServiceWarning;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 业务管理-预警事件
|
||||
视图对象 service_warning
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ServiceWarning.class)
|
||||
public class ServiceWarningVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 事件编号
|
||||
*/
|
||||
@ExcelProperty(value = "事件编号")
|
||||
private String eventNo;
|
||||
|
||||
/**
|
||||
* 事件类型(0设备告警1能耗异常2安防事件)
|
||||
*/
|
||||
@ExcelProperty(value = "事件类型(0设备告警1能耗异常2安防事件)")
|
||||
private Long eventType;
|
||||
|
||||
/**
|
||||
* 告警等级(0低危,1中危2高危,3危急)
|
||||
*/
|
||||
@ExcelProperty(value = "告警等级(0低危,1中危2高危,3危急)")
|
||||
private Long alarmLevel;
|
||||
|
||||
/**
|
||||
* 发生位置
|
||||
*/
|
||||
@ExcelProperty(value = "发生位置")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 发生时间
|
||||
*/
|
||||
@ExcelProperty(value = "发生时间")
|
||||
private Date placeTime;
|
||||
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
@ExcelProperty(value = "处理人")
|
||||
private String processors;
|
||||
|
||||
/**
|
||||
* 状态(0未处理,1处理中,2处理完成`)
|
||||
*/
|
||||
@ExcelProperty(value = "状态(0未处理,1处理中,2处理完成`)")
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@ExcelProperty(value = "完成时间")
|
||||
private Date completionTime;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package org.dromara.property.mapper;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.MeetAttachOrder;
|
||||
import org.dromara.property.domain.vo.MeetAttachOrderVo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
public interface MeetAttachOrderMapper extends BaseMapperPlus<MeetAttachOrder, MeetAttachOrderVo> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.ServiceWarning;
|
||||
import org.dromara.property.domain.vo.ServiceWarningVo;
|
||||
|
||||
/**
|
||||
* 业务管理-预警事件
|
||||
Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
public interface ServiceWarningMapper extends BaseMapperPlus<ServiceWarning, ServiceWarningVo> {
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.property.domain.bo.ServiceWarningBo;
|
||||
import org.dromara.property.domain.vo.ServiceWarningVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务管理-预警事件
|
||||
Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
public interface IServiceWarningService {
|
||||
|
||||
/**
|
||||
* 查询业务管理-预警事件
|
||||
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 业务管理-预警事件
|
||||
|
||||
*/
|
||||
ServiceWarningVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询业务管理-预警事件
|
||||
列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 业务管理-预警事件
|
||||
分页列表
|
||||
*/
|
||||
TableDataInfo<ServiceWarningVo> queryPageList(ServiceWarningBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的业务管理-预警事件
|
||||
列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 业务管理-预警事件
|
||||
列表
|
||||
*/
|
||||
List<ServiceWarningVo> queryList(ServiceWarningBo bo);
|
||||
|
||||
/**
|
||||
* 新增业务管理-预警事件
|
||||
|
||||
*
|
||||
* @param bo 业务管理-预警事件
|
||||
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ServiceWarningBo bo);
|
||||
|
||||
/**
|
||||
* 修改业务管理-预警事件
|
||||
|
||||
*
|
||||
* @param bo 业务管理-预警事件
|
||||
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ServiceWarningBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除业务管理-预警事件
|
||||
信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -2,25 +2,25 @@ package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.Meet;
|
||||
import org.dromara.property.domain.MeetAttach;
|
||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.MeetAttachOrder;
|
||||
import org.dromara.property.domain.MeetBooking;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
||||
import org.dromara.property.mapper.MeetAttachOrderMapper;
|
||||
import org.dromara.property.mapper.MeetBookingMapper;
|
||||
import org.dromara.property.service.IMeetBookingService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -39,6 +39,7 @@ import java.util.stream.Collectors;
|
||||
public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
|
||||
private final MeetBookingMapper baseMapper;
|
||||
private final MeetAttachOrderMapper meetAttachOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询会议预约
|
||||
@ -183,6 +184,18 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
List<MeetAttachOrder> meetAttachList = new ArrayList<>();
|
||||
if(ObjectUtil.isNotEmpty(bo.getMeetAttachOrderBoList()) ){
|
||||
bo.getMeetAttachOrderBoList().forEach(
|
||||
s->{
|
||||
s.setMeetBookingId(add.getId());
|
||||
MeetAttachOrder meetAttachOrder = BeanUtil.copyProperties(s, MeetAttachOrder.class);
|
||||
meetAttachList.add(meetAttachOrder);
|
||||
}
|
||||
);
|
||||
meetAttachOrderMapper.insertBatch(meetAttachList);
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,154 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.ServiceWarning;
|
||||
import org.dromara.property.domain.bo.ServiceWarningBo;
|
||||
import org.dromara.property.domain.vo.ServiceWarningVo;
|
||||
import org.dromara.property.mapper.ServiceWarningMapper;
|
||||
import org.dromara.property.service.IServiceWarningService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 业务管理-预警事件
|
||||
Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-08
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ServiceWarningServiceImpl implements IServiceWarningService {
|
||||
|
||||
private final ServiceWarningMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询业务管理-预警事件
|
||||
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 业务管理-预警事件
|
||||
|
||||
*/
|
||||
@Override
|
||||
public ServiceWarningVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询业务管理-预警事件
|
||||
列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 业务管理-预警事件
|
||||
分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ServiceWarningVo> queryPageList(ServiceWarningBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<ServiceWarning> lqw = buildQueryWrapper(bo);
|
||||
Page<ServiceWarningVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的业务管理-预警事件
|
||||
列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 业务管理-预警事件
|
||||
列表
|
||||
*/
|
||||
@Override
|
||||
public List<ServiceWarningVo> queryList(ServiceWarningBo bo) {
|
||||
LambdaQueryWrapper<ServiceWarning> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ServiceWarning> buildQueryWrapper(ServiceWarningBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<ServiceWarning> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(ServiceWarning::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEventNo()), ServiceWarning::getEventNo, bo.getEventNo());
|
||||
lqw.eq(bo.getEventType() != null, ServiceWarning::getEventType, bo.getEventType());
|
||||
lqw.eq(bo.getAlarmLevel() != null, ServiceWarning::getAlarmLevel, bo.getAlarmLevel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), ServiceWarning::getLocation, bo.getLocation());
|
||||
lqw.eq(bo.getPlaceTime() != null, ServiceWarning::getPlaceTime, bo.getPlaceTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProcessors()), ServiceWarning::getProcessors, bo.getProcessors());
|
||||
lqw.eq(bo.getStatus() != null, ServiceWarning::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getCompletionTime() != null, ServiceWarning::getCompletionTime, bo.getCompletionTime());
|
||||
lqw.eq(bo.getCreateById() != null, ServiceWarning::getCreateById, bo.getCreateById());
|
||||
lqw.eq(bo.getUpdateById() != null, ServiceWarning::getUpdateById, bo.getUpdateById());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), ServiceWarning::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务管理-预警事件
|
||||
|
||||
*
|
||||
* @param bo 业务管理-预警事件
|
||||
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ServiceWarningBo bo) {
|
||||
ServiceWarning add = MapstructUtils.convert(bo, ServiceWarning.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务管理-预警事件
|
||||
|
||||
*
|
||||
* @param bo 业务管理-预警事件
|
||||
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ServiceWarningBo bo) {
|
||||
ServiceWarning update = MapstructUtils.convert(bo, ServiceWarning.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ServiceWarning entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除业务管理-预警事件
|
||||
信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user