Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
commit
74c7a809d9
@ -1,30 +1,26 @@
|
||||
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.MeetBookingDetailVo;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 会议预约
|
||||
@ -70,7 +66,7 @@ public class MeetBookingController extends BaseController {
|
||||
*/
|
||||
//@SaCheckPermission("property:meetbooking:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MeetBookingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
public R<MeetBookingDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(meetBookingService.queryById(id));
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class ServerController extends BaseController {
|
||||
/**
|
||||
* 查询服务管理列表
|
||||
*/
|
||||
@SaCheckPermission("property:server:list")
|
||||
//@SaCheckPermission("property:server:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ServerVo> list(ServerBo bo, PageQuery pageQuery) {
|
||||
return serverService.queryPageList(bo, pageQuery);
|
||||
@ -49,7 +49,7 @@ public class ServerController extends BaseController {
|
||||
/**
|
||||
* 导出服务管理列表
|
||||
*/
|
||||
@SaCheckPermission("property:server:export")
|
||||
//@SaCheckPermission("property:server:export")
|
||||
@Log(title = "服务管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ServerBo bo, HttpServletResponse response) {
|
||||
@ -62,7 +62,7 @@ public class ServerController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:server:query")
|
||||
//@SaCheckPermission("property:server:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<ServerVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@ -72,7 +72,7 @@ public class ServerController extends BaseController {
|
||||
/**
|
||||
* 新增服务管理
|
||||
*/
|
||||
@SaCheckPermission("property:server:add")
|
||||
// @SaCheckPermission("property:server:add")
|
||||
@Log(title = "服务管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@ -83,7 +83,7 @@ public class ServerController extends BaseController {
|
||||
/**
|
||||
* 修改服务管理
|
||||
*/
|
||||
@SaCheckPermission("property:server:edit")
|
||||
// @SaCheckPermission("property:server:edit")
|
||||
@Log(title = "服务管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@ -96,7 +96,7 @@ public class ServerController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:server:remove")
|
||||
// @SaCheckPermission("property:server:remove")
|
||||
@Log(title = "服务管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
@ -0,0 +1,113 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -78,7 +78,7 @@ public class MeetBooking extends TenantEntity {
|
||||
/**
|
||||
* 参会人数
|
||||
*/
|
||||
private Long personSum;
|
||||
private int personSum;
|
||||
|
||||
/**
|
||||
* 费用
|
||||
|
@ -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;
|
||||
}
|
@ -44,11 +44,21 @@ public class MeetBookingAppointmentVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位")
|
||||
private String unit;
|
||||
/**
|
||||
* 所属单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位名称")
|
||||
private String unitName;
|
||||
/**
|
||||
* 预定人
|
||||
*/
|
||||
@ExcelProperty(value = "预定人")
|
||||
private String person;
|
||||
/**
|
||||
* 预定人名称
|
||||
*/
|
||||
@ExcelProperty(value = "预定人名称")
|
||||
private String personName;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
|
@ -0,0 +1,143 @@
|
||||
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.MeetBooking;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:yuyongle
|
||||
* @Date:2025/7/9 10:18
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MeetBooking.class)
|
||||
public class MeetBookingDetailVo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会议室名称
|
||||
*/
|
||||
@ExcelProperty(value = "会议室名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 会议室id
|
||||
*/
|
||||
@ExcelProperty(value = "会议室id")
|
||||
private Long meetId;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
private String meetTheme;
|
||||
|
||||
/**
|
||||
* 会议室地址
|
||||
*/
|
||||
@ExcelProperty(value = "会议室地址")
|
||||
private String meetLocation;
|
||||
|
||||
/**
|
||||
* 会议室地址名称
|
||||
*/
|
||||
@ExcelProperty(value = "会议室地址名称")
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位")
|
||||
private String unit;
|
||||
/**
|
||||
* 所属单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位名称")
|
||||
private String unitName;
|
||||
/**
|
||||
* 预定人
|
||||
*/
|
||||
@ExcelProperty(value = "预定人")
|
||||
private String person;
|
||||
|
||||
/**
|
||||
* 预定人
|
||||
*/
|
||||
@ExcelProperty(value = "预定人姓名")
|
||||
private String personName;
|
||||
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@ExcelProperty(value = "联系方式")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 预定开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "预定开始时间")
|
||||
private Date scheduledStarttime;
|
||||
|
||||
/**
|
||||
* 预定结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "预定结束时间")
|
||||
private Date scheduledEndtime;
|
||||
|
||||
/**
|
||||
* 参会人数
|
||||
*/
|
||||
@ExcelProperty(value = "参会人数")
|
||||
private Long personSum;
|
||||
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
@ExcelProperty(value = "费用")
|
||||
private Long price;
|
||||
|
||||
/**
|
||||
* 是否包含增值服务
|
||||
*/
|
||||
@ExcelProperty(value = "是否包含增值服务")
|
||||
private Long attach;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
@ExcelProperty(value = "支付状态")
|
||||
private Long payState;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
|
||||
@ExcelProperty(value = "描述")
|
||||
private String descs;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -43,11 +43,21 @@ public class MeetBookingWeekVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位")
|
||||
private String unit;
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位")
|
||||
private String unitName;
|
||||
/**
|
||||
* 预定人
|
||||
*/
|
||||
@ExcelProperty(value = "预定人")
|
||||
private String person;
|
||||
/**
|
||||
* 预定人名称
|
||||
*/
|
||||
@ExcelProperty(value = "预定人名称")
|
||||
private String personName;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
|
@ -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> {
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.MeetBooking;
|
||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingDetailVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -27,7 +28,7 @@ public interface IMeetBookingService {
|
||||
* @param id 主键
|
||||
* @return 会议预约
|
||||
*/
|
||||
MeetBookingVo queryById(Long id);
|
||||
MeetBookingDetailVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询会议预约列表
|
||||
|
@ -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,28 +2,28 @@ 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.mapper.MeetBookingMapper;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.property.domain.vo.*;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.dromara.property.service.IMeetBookingService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -39,6 +39,10 @@ import java.util.stream.Collectors;
|
||||
public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
|
||||
private final MeetBookingMapper baseMapper;
|
||||
private final MeetAttachOrderMapper meetAttachOrderMapper;
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
private final TbRoomMapper roomMapper;
|
||||
private final ResidentUnitMapper residentUnitMapper;
|
||||
|
||||
/**
|
||||
* 查询会议预约
|
||||
@ -47,8 +51,17 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
* @return 会议预约
|
||||
*/
|
||||
@Override
|
||||
public MeetBookingVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
public MeetBookingDetailVo queryById(Long id) {
|
||||
MeetBookingVo meetBookingVo = baseMapper.selectVoById(id);
|
||||
MeetBookingDetailVo meetBookingDetailVo = BeanUtil.copyProperties(meetBookingVo, MeetBookingDetailVo.class);
|
||||
String locationName = roomMapper.queryRoomName(Long.valueOf(meetBookingDetailVo.getMeetLocation()));
|
||||
meetBookingDetailVo.setLocationName(locationName);
|
||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetBookingDetailVo.getPerson());
|
||||
meetBookingDetailVo.setPersonName(residentPersonVo.getUserName());
|
||||
meetBookingDetailVo.setPerson(residentPersonVo.getPhone());
|
||||
ResidentUnitVo residentUnitVo = residentUnitMapper.selectVoById(meetBookingDetailVo.getUnit());
|
||||
meetBookingDetailVo.setUnitName(residentUnitVo.getName());
|
||||
return meetBookingDetailVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,41 +80,58 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
|
||||
/**
|
||||
*查询该日期的会议记录
|
||||
* @param appointmentDate
|
||||
* @param appointmentDateStr
|
||||
* @return 当天的会议预约记录
|
||||
*/
|
||||
@Override
|
||||
public List<MeetBookingAppointmentVo> appointmentList(String appointmentDate) {
|
||||
public List<MeetBookingAppointmentVo> appointmentList(String appointmentDateStr) {
|
||||
LambdaQueryWrapper<MeetBooking> meetBookingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
if (appointmentDate != null) {
|
||||
meetBookingLambdaQueryWrapper.le(MeetBooking::getScheduledStarttime, appointmentDate)
|
||||
.ge(MeetBooking::getScheduledEndtime, appointmentDate);
|
||||
}
|
||||
LocalDate date = LocalDate.parse(appointmentDateStr);
|
||||
LocalDateTime startOfDay = date.atStartOfDay();
|
||||
LocalDateTime endOfDay = date.atTime(LocalTime.MAX);
|
||||
meetBookingLambdaQueryWrapper
|
||||
.le(MeetBooking::getScheduledStarttime, endOfDay)
|
||||
.ge(MeetBooking::getScheduledEndtime, startOfDay);
|
||||
List<MeetBooking> meetBookings = baseMapper.selectList(meetBookingLambdaQueryWrapper);
|
||||
List<MeetBookingAppointmentVo> meetBookingAppointmentVoList = BeanUtil.copyToList(meetBookings, MeetBookingAppointmentVo.class);
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
|
||||
List<String> units = meetBookingAppointmentVoList.stream()
|
||||
.map(vo -> vo.getUnit())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<String> persons = meetBookingAppointmentVoList.stream()
|
||||
.map(vo -> vo.getPerson())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoByIds(units);
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoByIds(persons);
|
||||
meetBookingAppointmentVoList.stream().forEach(
|
||||
s->{
|
||||
String str = df.format(s.getScheduledStarttime());
|
||||
int a = Integer.parseInt(str);
|
||||
if (a >= 0 && a <= 6) {
|
||||
s.setSlots("凌晨");
|
||||
}
|
||||
if (a > 6 && a <= 12) {
|
||||
s.setSlots("上午");
|
||||
}
|
||||
if (a > 12 && a <= 13) {
|
||||
s.setSlots("中午");
|
||||
}
|
||||
if (a > 13 && a <= 18) {
|
||||
s.setSlots("下午");
|
||||
}
|
||||
if (a > 18 && a <= 24) {
|
||||
s.setSlots("晚上");
|
||||
}
|
||||
s -> {
|
||||
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(residentUnitVo.getName());
|
||||
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(residentPersonVo.getUserName());
|
||||
String str = df.format(s.getScheduledStarttime());
|
||||
int a = Integer.parseInt(str);
|
||||
if (a >= 0 && a <= 6) {
|
||||
s.setSlots("凌晨");
|
||||
}
|
||||
if (a > 6 && a <= 12) {
|
||||
s.setSlots("上午");
|
||||
}
|
||||
if (a > 12 && a <= 13) {
|
||||
s.setSlots("中午");
|
||||
}
|
||||
if (a > 13 && a <= 18) {
|
||||
s.setSlots("下午");
|
||||
}
|
||||
if (a > 18 && a <= 24) {
|
||||
s.setSlots("晚上");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
return meetBookingAppointmentVoList;
|
||||
}
|
||||
@ -136,14 +166,48 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
.le(MeetBooking::getScheduledEndtime, endOfWeek);
|
||||
List<MeetBookingVo> meetBookingVoList = baseMapper.selectVoList(bookingLambdaQueryWrapper);
|
||||
List<MeetBookingWeekVo> meetBookingWeekVoList = BeanUtil.copyToList(meetBookingVoList, MeetBookingWeekVo.class);
|
||||
String[] weekStr={"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
|
||||
List<MeetBookingWeekVo> meetBookingWeekList= new ArrayList<>();
|
||||
meetBookingWeekVoList.stream().forEach(s->{
|
||||
String[] weekStr = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
|
||||
List<MeetBookingWeekVo> meetBookingWeekList = new ArrayList<>();
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<String> units = meetBookingVoList.stream()
|
||||
.map(vo -> vo.getUnit())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<String> persons = meetBookingVoList.stream()
|
||||
.map(vo -> vo.getPerson())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoByIds(units);
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoByIds(persons);
|
||||
meetBookingWeekVoList.stream().forEach(s -> {
|
||||
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(residentUnitVo.getName());
|
||||
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(residentPersonVo.getUserName());
|
||||
//设置指定的Date对象不设置默认返回当天的星期
|
||||
calendar.setTime(s.getScheduledStarttime());
|
||||
//获取当前时间的星期
|
||||
int firstDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
|
||||
s.setWeek(weekStr[firstDayOfWeek - 1]);
|
||||
String str = df.format(s.getScheduledStarttime());
|
||||
int a = Integer.parseInt(str);
|
||||
if (a >= 0 && a <= 6) {
|
||||
s.setSlots("凌晨");
|
||||
}
|
||||
if (a > 6 && a <= 12) {
|
||||
s.setSlots("上午");
|
||||
}
|
||||
if (a > 12 && a <= 13) {
|
||||
s.setSlots("中午");
|
||||
}
|
||||
if (a > 13 && a <= 18) {
|
||||
s.setSlots("下午");
|
||||
}
|
||||
if (a > 18 && a <= 24) {
|
||||
s.setSlots("晚上");
|
||||
}
|
||||
meetBookingWeekList.add(s);
|
||||
});
|
||||
return meetBookingWeekList;
|
||||
@ -160,7 +224,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), MeetBooking::getPhone, bo.getPhone());
|
||||
lqw.eq(bo.getScheduledStarttime() != null, MeetBooking::getScheduledStarttime, bo.getScheduledStarttime());
|
||||
lqw.eq(bo.getScheduledEndtime() != null, MeetBooking::getScheduledEndtime, bo.getScheduledEndtime());
|
||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getPersonSum()), MeetBooking::getPersonSum, bo.getPersonSum());
|
||||
// lqw.eq(ObjectUtil.isNotEmpty(bo.getPersonSum()), MeetBooking::getPersonSum, bo.getPersonSum());
|
||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getPrice()), MeetBooking::getPrice, bo.getPrice());
|
||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getAttach()), MeetBooking::getAttach, bo.getAttach());
|
||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getPayState()), MeetBooking::getPayState, bo.getPayState());
|
||||
@ -183,6 +247,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;
|
||||
}
|
||||
|
||||
@ -203,7 +279,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MeetBooking entity){
|
||||
private void validEntityBeforeSave(MeetBooking entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@ -216,7 +292,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
@ -236,7 +312,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
throw new IllegalArgumentException("Unknown type: " + type);
|
||||
}
|
||||
}
|
||||
public List<MeetBooking> getList(){
|
||||
|
||||
public List<MeetBooking> getList() {
|
||||
LambdaQueryWrapper<MeetBooking> meetQueryWrapper = new LambdaQueryWrapper<>();
|
||||
return baseMapper.selectList(meetQueryWrapper);
|
||||
|
||||
|
@ -75,17 +75,7 @@ public class MeetServiceImpl implements IMeetService {
|
||||
public TableDataInfo<MeetVo> queryPageList(MeetBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<Meet> lqw = buildQueryWrapper(bo);
|
||||
Page<MeetVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
List<MeetVo> rows = result.getRecords();
|
||||
List<MeetVo> row = new ArrayList<>();
|
||||
rows.forEach(s -> {
|
||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(s.getPrincipals());
|
||||
s.setPrincipalsName(residentPersonVo.getUserName());
|
||||
s.setPhoneNo(residentPersonVo.getPhone());
|
||||
String locationName = roomMapper.queryRoomName(Long.valueOf(s.getLocation()));
|
||||
s.setLocationName(locationName);
|
||||
row.add(s);
|
||||
});
|
||||
return TableDataInfo.build(new Page().setRecords(row));
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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