Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m44s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m44s
This commit is contained in:
commit
e3e4e38f91
@ -26,9 +26,10 @@ public class EnumFetcherController {
|
||||
* @param name
|
||||
* @return 获取枚举全部值 参数以字段大驼峰格式 如:OmsOrderStatus
|
||||
*/
|
||||
|
||||
@GetMapping("/enum-values/{name}")
|
||||
public R<Map<String, String>> getEnumValues(@PathVariable("name") String name) {
|
||||
Map<String, String> map = enumFetcherService.getEnumValues(name);
|
||||
public R<Map<Object, Object>> getEnumValues(@PathVariable("name") String name) {
|
||||
Map<Object, Object> map = enumFetcherService.getEnumValues(name);
|
||||
return R.ok(map);
|
||||
}
|
||||
}
|
||||
|
@ -38,31 +38,26 @@ public class MeetAttachController extends BaseController {
|
||||
private final IMeetAttachService meetAttachService;
|
||||
|
||||
/**
|
||||
* 查询会议室增值服务列表
|
||||
* 查询分页会议室增值服务列表
|
||||
*/
|
||||
@SaCheckPermission("property:attach:list")
|
||||
// @SaCheckPermission("property:attach:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MeetAttachVo> list(MeetAttachBo bo, PageQuery pageQuery) {
|
||||
public TableDataInfo<MeetAttachVo> pageList(MeetAttachBo bo, PageQuery pageQuery) {
|
||||
return meetAttachService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
///**
|
||||
// * 导出会议室增值服务列表
|
||||
// */
|
||||
//@SaCheckPermission("property:attach:export")
|
||||
//@Log(title = "会议室增值服务", businessType = BusinessType.EXPORT)
|
||||
//@PostMapping("/export")
|
||||
//public void export(MeetAttachBo bo, HttpServletResponse response) {
|
||||
// List<MeetAttachVo> list = meetAttachService.queryList(bo);
|
||||
// ExcelUtil.exportExcel(list, "会议室增值服务", MeetAttachVo.class, response);
|
||||
//}
|
||||
|
||||
/**
|
||||
* 查询会议室增值服务列表
|
||||
*/
|
||||
@GetMapping("/attachList")
|
||||
public R<List<MeetAttachVo>> list() {
|
||||
return R.ok(meetAttachService.queryList(new MeetAttachBo()));
|
||||
}
|
||||
/**
|
||||
* 获取会议室增值服务详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:attach:query")
|
||||
//@SaCheckPermission("property:attach:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MeetAttachVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@ -83,7 +78,7 @@ public class MeetAttachController extends BaseController {
|
||||
/**
|
||||
* 修改会议室增值服务
|
||||
*/
|
||||
@SaCheckPermission("property:attach:edit")
|
||||
// @SaCheckPermission("property:attach:edit")
|
||||
@Log(title = "会议室增值服务", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@ -96,7 +91,7 @@ public class MeetAttachController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:attach:remove")
|
||||
// @SaCheckPermission("property:attach:remove")
|
||||
@Log(title = "会议室增值服务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
@ -1,11 +1,15 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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;
|
||||
@ -40,17 +44,31 @@ public class MeetBookingController extends BaseController {
|
||||
/**
|
||||
* 查询会议预约记录列表
|
||||
*/
|
||||
@SaCheckPermission("property:meetbooking:list")
|
||||
//@SaCheckPermission("property:meetbooking:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MeetBookingVo> list(MeetBookingBo bo, PageQuery pageQuery) {
|
||||
return meetBookingService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
/**
|
||||
* 按照日期查询已预约会议预约记录列表
|
||||
*/
|
||||
@GetMapping("/appointment-list")
|
||||
public R<List<MeetBookingAppointmentVo>> appointmentList(String appointmentDate) {
|
||||
return R.ok(meetBookingService.appointmentList(appointmentDate));
|
||||
}
|
||||
/**
|
||||
* 按照会议室Id查询已预约会议预约记录列表
|
||||
*/
|
||||
@GetMapping("/meet-appointment-list")
|
||||
public R<List<MeetBookingWeekVo>> appointmentIdList(String meetId) {
|
||||
return R.ok(meetBookingService.appointmentIdList(meetId));
|
||||
}
|
||||
/**
|
||||
* 获取会议预约详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:meetbooking:query")
|
||||
//@SaCheckPermission("property:meetbooking:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MeetBookingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@ -60,7 +78,7 @@ public class MeetBookingController extends BaseController {
|
||||
/**
|
||||
* 新增会议预约
|
||||
*/
|
||||
@SaCheckPermission("property:meetbooking:add")
|
||||
//@SaCheckPermission("property:meetbooking:add")
|
||||
@Log(title = "会议预约", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@ -71,24 +89,11 @@ public class MeetBookingController extends BaseController {
|
||||
/**
|
||||
* 修改会议预约
|
||||
*/
|
||||
@SaCheckPermission("property:meetbooking:edit")
|
||||
// @SaCheckPermission("property:meetbooking:edit")
|
||||
@Log(title = "会议预约", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MeetBookingBo bo) {
|
||||
return toAjax(meetBookingService.updateByBo(bo));
|
||||
}
|
||||
|
||||
///**
|
||||
// * 删除会议预约
|
||||
// *
|
||||
// * @param ids 主键串
|
||||
// */
|
||||
//@SaCheckPermission("property:meetbooking:remove")
|
||||
//@Log(title = "会议预约", businessType = BusinessType.DELETE)
|
||||
//@DeleteMapping("/{ids}")
|
||||
//public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
// @PathVariable("ids") Long[] ids) {
|
||||
// return toAjax(meetBookingService.deleteWithValidByIds(List.of(ids), true));
|
||||
//}
|
||||
}
|
||||
|
@ -60,16 +60,6 @@ public class MeetController extends BaseController {
|
||||
public R<List<MeetVo>> notlist(MeetBo bo) {
|
||||
return R.ok(meetService.queryList(bo));
|
||||
}
|
||||
///**
|
||||
// * 导出会议室管理列表
|
||||
// */
|
||||
//@SaCheckPermission("property:meet:export")
|
||||
//@Log(title = "会议室管理", businessType = BusinessType.EXPORT)
|
||||
//@PostMapping("/export")
|
||||
//public void export(MeetBo bo, HttpServletResponse response) {
|
||||
// List<MeetVo> list = meetService.queryList(bo);
|
||||
// ExcelUtil.exportExcel(list, "会议室管理", MeetVo.class, response);
|
||||
//}
|
||||
|
||||
/**
|
||||
* 获取会议室管理详细信息
|
||||
|
@ -0,0 +1,107 @@
|
||||
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.ServiceWorkOrdersBo;
|
||||
import org.dromara.property.domain.vo.ServiceWorkOrdersVo;
|
||||
import org.dromara.property.service.IServiceWorkOrdersService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【业务管理-工单处理】
|
||||
* 前端访问路由地址为:/system/workOrders
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/workOrders")
|
||||
public class ServiceWorkOrdersController extends BaseController {
|
||||
|
||||
private final IServiceWorkOrdersService serviceWorkOrdersService;
|
||||
|
||||
/**
|
||||
* 查询【工单处理】列表
|
||||
*/
|
||||
@SaCheckPermission("system:workOrders:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ServiceWorkOrdersVo> list(ServiceWorkOrdersBo bo, PageQuery pageQuery) {
|
||||
return serviceWorkOrdersService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("system:workOrders:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ServiceWorkOrdersBo bo, HttpServletResponse response) {
|
||||
List<ServiceWorkOrdersVo> list = serviceWorkOrdersService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", ServiceWorkOrdersVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:workOrders:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<ServiceWorkOrdersVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(serviceWorkOrdersService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("system:workOrders:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ServiceWorkOrdersBo bo) {
|
||||
return toAjax(serviceWorkOrdersService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("system:workOrders:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ServiceWorkOrdersBo bo) {
|
||||
return toAjax(serviceWorkOrdersService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:workOrders:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(serviceWorkOrdersService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 会议室管理对象 meet
|
||||
@ -45,12 +46,12 @@ public class Meet extends TenantEntity {
|
||||
/**
|
||||
* 基础服务
|
||||
*/
|
||||
private Long baseServiceId;
|
||||
private String baseService;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
*/
|
||||
private Long basePrice;
|
||||
private BigDecimal basePrice;
|
||||
|
||||
/**
|
||||
* 增值服务是否启用
|
||||
@ -65,7 +66,7 @@ public class Meet extends TenantEntity {
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String desc;
|
||||
private String descs;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
|
@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 会议室增值服务对象 meet_attach
|
||||
@ -40,7 +41,7 @@ public class MeetAttach extends TenantEntity {
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
@ -55,7 +56,7 @@ public class MeetAttach extends TenantEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
private int state;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
|
@ -4,6 +4,8 @@ import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@ -33,6 +35,10 @@ public class MeetBooking extends TenantEntity {
|
||||
* 会议室名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
private String meetTheme;
|
||||
|
||||
/**
|
||||
* 会议室id
|
||||
@ -77,22 +83,27 @@ public class MeetBooking extends TenantEntity {
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 是否包含增值服务
|
||||
*/
|
||||
private Long attach;
|
||||
private int attach;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
private Long payState;
|
||||
private int payState;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
private int state;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String descs;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
|
@ -0,0 +1,113 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 service_work_orders
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("service_work_orders")
|
||||
public class ServiceWorkOrders extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 工单名称
|
||||
*/
|
||||
private String orderName;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
private Long type;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
private Date dispatchTime;
|
||||
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
private String initiatorName;
|
||||
|
||||
/**
|
||||
* 发起人手机号
|
||||
*/
|
||||
private String initiatorPhone;
|
||||
|
||||
/**
|
||||
* 处理人姓名
|
||||
*/
|
||||
private String handler;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
private Date planCompleTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date compleTime;
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
private String serviceEvalua;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
private Long isTimeOut;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -9,6 +9,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 会议室增值服务业务对象 meet_attach
|
||||
*
|
||||
@ -40,7 +42,7 @@ public class MeetAttachBo extends BaseEntity {
|
||||
* 单价
|
||||
*/
|
||||
@NotNull(message = "单价不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
@ -58,7 +60,7 @@ public class MeetAttachBo extends BaseEntity {
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long state;
|
||||
private int state;
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -50,12 +51,12 @@ public class MeetBo extends BaseEntity {
|
||||
/**
|
||||
* 基础服务
|
||||
*/
|
||||
private Long baseServiceId;
|
||||
private String baseService;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
*/
|
||||
private Long basePrice;
|
||||
private BigDecimal basePrice;
|
||||
|
||||
/**
|
||||
* 增值服务是否启用
|
||||
@ -70,7 +71,7 @@ public class MeetBo extends BaseEntity {
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String desc;
|
||||
private String descs;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
@ -106,4 +107,5 @@ public class MeetBo extends BaseEntity {
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@ -80,31 +82,35 @@ public class MeetBookingBo extends BaseEntity {
|
||||
* 参会人数
|
||||
*/
|
||||
@NotNull(message = "参会人数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long personSum;
|
||||
private int personSum;
|
||||
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
@NotNull(message = "费用不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 是否包含增值服务
|
||||
*/
|
||||
@NotNull(message = "是否包含增值服务不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long attach;
|
||||
private int attach;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
@NotNull(message = "支付状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long payState;
|
||||
private int payState;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long state;
|
||||
private int state;
|
||||
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String descs;
|
||||
}
|
||||
|
@ -0,0 +1,112 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.property.domain.ServiceWorkOrders;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】业务对象 service_work_orders
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = ServiceWorkOrders.class, reverseConvertGenerate = false)
|
||||
public class ServiceWorkOrdersBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 工单名称
|
||||
*/
|
||||
private String orderName;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
private Long type;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
private Date dispatchTime;
|
||||
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
private String initiatorName;
|
||||
|
||||
/**
|
||||
* 发起人手机号
|
||||
*/
|
||||
private String initiatorPhone;
|
||||
|
||||
/**
|
||||
* 处理人姓名
|
||||
*/
|
||||
private String handler;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
private Date planCompleTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date compleTime;
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
private String serviceEvalua;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
private Long isTimeOut;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
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/7 17:07
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MeetBooking.class)
|
||||
public class MeetBookingAppointmentVo 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;
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位")
|
||||
private String unit;
|
||||
/**
|
||||
* 预定人
|
||||
*/
|
||||
@ExcelProperty(value = "预定人")
|
||||
private String person;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
private String meetTheme;
|
||||
|
||||
/**
|
||||
* 预定开始时间
|
||||
*/
|
||||
private Date scheduledStarttime;
|
||||
|
||||
/**
|
||||
* 预定结束时间
|
||||
*/
|
||||
private Date scheduledEndtime;
|
||||
/**
|
||||
* 会议时段
|
||||
*/
|
||||
private String slots;
|
||||
}
|
@ -47,6 +47,10 @@ public class MeetBookingVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "会议室id")
|
||||
private Long meetId;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
private String meetTheme;
|
||||
|
||||
/**
|
||||
* 会议室地址
|
||||
@ -114,6 +118,13 @@ public class MeetBookingVo implements Serializable {
|
||||
@ExcelProperty(value = "状态")
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
|
||||
@ExcelProperty(value = "描述")
|
||||
private String descs;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
@ -0,0 +1,78 @@
|
||||
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/7 17:07
|
||||
* @Description:查询本周实体类
|
||||
**/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MeetBooking.class)
|
||||
public class MeetBookingWeekVo 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;
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
@ExcelProperty(value = "所属单位")
|
||||
private String unit;
|
||||
/**
|
||||
* 预定人
|
||||
*/
|
||||
@ExcelProperty(value = "预定人")
|
||||
private String person;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
private String meetTheme;
|
||||
|
||||
/**
|
||||
* 预定开始时间
|
||||
*/
|
||||
private Date scheduledStarttime;
|
||||
|
||||
/**
|
||||
* 预定结束时间
|
||||
*/
|
||||
private Date scheduledEndtime;
|
||||
/**
|
||||
* 会议时段
|
||||
*/
|
||||
private String slots;
|
||||
/**
|
||||
* 星期几
|
||||
*/
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
private String dates;
|
||||
}
|
@ -1,16 +1,14 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.Meet;
|
||||
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 org.dromara.property.domain.Meet;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
|
||||
@ -45,6 +43,15 @@ public class MeetVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "位置")
|
||||
private String location;
|
||||
/**
|
||||
* 会议室位置名称
|
||||
*/
|
||||
@ExcelProperty(value = "位置名称")
|
||||
private String locationName;
|
||||
/**
|
||||
* 开放时段
|
||||
*/
|
||||
private String openHours;
|
||||
|
||||
/**
|
||||
* 容纳人数
|
||||
@ -59,13 +66,13 @@ public class MeetVo implements Serializable {
|
||||
* 基础服务
|
||||
*/
|
||||
@ExcelProperty(value = "基础服务")
|
||||
private Long baseServiceId;
|
||||
private String baseService;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
*/
|
||||
@ExcelProperty(value = "费用")
|
||||
private Long basePrice;
|
||||
private BigDecimal basePrice;
|
||||
/**
|
||||
* 增值服务是否启用
|
||||
*/
|
||||
@ -77,10 +84,34 @@ public class MeetVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "负责人")
|
||||
private String principals;
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@ExcelProperty(value = "负责人名称")
|
||||
private String principalsName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ExcelProperty(value = "联系电话")
|
||||
private String phoneNo;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String descs;
|
||||
/**
|
||||
* (0不审核,1审核)
|
||||
*/
|
||||
private Integer isCheck;
|
||||
|
||||
/**
|
||||
* 预约时间
|
||||
*/
|
||||
private String appointmentTime;
|
||||
|
||||
/**
|
||||
* (1免费2.付费,3面议)
|
||||
*/
|
||||
private Integer expenseType;
|
||||
}
|
||||
|
@ -0,0 +1,132 @@
|
||||
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.ServiceWorkOrders;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】视图对象 service_work_orders
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ServiceWorkOrders.class)
|
||||
public class ServiceWorkOrdersVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
@ExcelProperty(value = "工单编号")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 工单名称
|
||||
*/
|
||||
@ExcelProperty(value = "工单名称")
|
||||
private String orderName;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
@ExcelProperty(value = "工单类型")
|
||||
private Long type;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
@ExcelProperty(value = "派单时间")
|
||||
private Date dispatchTime;
|
||||
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "发起人姓名")
|
||||
private String initiatorName;
|
||||
|
||||
/**
|
||||
* 发起人手机号
|
||||
*/
|
||||
@ExcelProperty(value = "发起人手机号")
|
||||
private String initiatorPhone;
|
||||
|
||||
/**
|
||||
* 处理人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "处理人姓名")
|
||||
private String handler;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ExcelProperty(value = "地址")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
@ExcelProperty(value = "计划完成时间")
|
||||
private Date planCompleTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@ExcelProperty(value = "完成时间")
|
||||
private Date compleTime;
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
@ExcelProperty(value = "评价")
|
||||
private String serviceEvalua;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
@ExcelProperty(value = "是否超时")
|
||||
private Long isTimeOut;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -61,4 +61,7 @@ public interface PlantsRentalOrderMapper extends BaseMapperPlus<PlantsRentalOrde
|
||||
"FROM plants_rental_order")
|
||||
Map<String, Object> countOrderAndAmount();
|
||||
|
||||
@Select("SELECT COUNT(DISTINCT customer_name) FROM plants_rental_order")
|
||||
Integer countDistinctCustomerName();
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.ServiceWorkOrders;
|
||||
import org.dromara.property.domain.vo.ServiceWorkOrdersVo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
public interface ServiceWorkOrdersMapper extends BaseMapperPlus<ServiceWorkOrders, ServiceWorkOrdersVo> {
|
||||
|
||||
}
|
@ -4,6 +4,9 @@ import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 房间信息Mapper接口
|
||||
*
|
||||
@ -14,4 +17,5 @@ public interface TbRoomMapper extends BaseMapperPlus<TbRoom, TbRoomVo> {
|
||||
|
||||
//查询房间名称
|
||||
String queryRoomName(Long roomId);
|
||||
Map<Long,String> queryRoomNameList(List<Long> ids);
|
||||
}
|
||||
|
@ -13,5 +13,5 @@ public interface EnumFetcherService {
|
||||
* @param type 大驼峰格式
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> getEnumValues(String type);
|
||||
Map<Object, Object>getEnumValues(String type);
|
||||
}
|
||||
|
@ -72,5 +72,5 @@ public interface IMeetAttachService {
|
||||
* 获取下拉接口数据
|
||||
* @param type
|
||||
*/
|
||||
Map<String,String> getMeetAttachSelectDate(String type);
|
||||
Map<Object, Object> getMeetAttachSelectDate(String type);
|
||||
}
|
||||
|
@ -1,12 +1,15 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.MeetBooking;
|
||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -35,6 +38,10 @@ public interface IMeetBookingService {
|
||||
*/
|
||||
TableDataInfo<MeetBookingVo> queryPageList(MeetBookingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询已预约会议预约记录列表
|
||||
*/
|
||||
List<MeetBookingAppointmentVo> appointmentList(String appointmentDate);
|
||||
/**
|
||||
* 查询符合条件的会议预约列表
|
||||
*
|
||||
@ -42,7 +49,10 @@ public interface IMeetBookingService {
|
||||
* @return 会议预约列表
|
||||
*/
|
||||
List<MeetBookingVo> queryList(MeetBookingBo bo);
|
||||
|
||||
/**
|
||||
* 按照会议室Id查询已预约会议预约记录列表
|
||||
*/
|
||||
List<MeetBookingWeekVo> appointmentIdList(String meetId);
|
||||
/**
|
||||
* 新增会议预约
|
||||
*
|
||||
@ -73,5 +83,6 @@ public interface IMeetBookingService {
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> getMeetBooking(String type);
|
||||
Map<Object, Object> getMeetBooking(String type);
|
||||
|
||||
}
|
||||
|
@ -72,5 +72,5 @@ public interface IMeetService {
|
||||
* 获取下拉接口数据
|
||||
* @param type
|
||||
*/
|
||||
Map<String,String> getMeetSelectDate(String type);
|
||||
Map<Object,Object> getMeetSelectDate(String type);
|
||||
}
|
||||
|
@ -0,0 +1,68 @@
|
||||
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.ServiceWorkOrdersBo;
|
||||
import org.dromara.property.domain.vo.ServiceWorkOrdersVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
public interface IServiceWorkOrdersService {
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
ServiceWorkOrdersVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询【请填写功能名称】列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 【请填写功能名称】分页列表
|
||||
*/
|
||||
TableDataInfo<ServiceWorkOrdersVo> queryPageList(ServiceWorkOrdersBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的【请填写功能名称】列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 【请填写功能名称】列表
|
||||
*/
|
||||
List<ServiceWorkOrdersVo> queryList(ServiceWorkOrdersBo bo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param bo 【请填写功能名称】
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ServiceWorkOrdersBo bo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param bo 【请填写功能名称】
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ServiceWorkOrdersBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除【请填写功能名称】信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -31,7 +31,7 @@ public class EnumFetcherServiceImpl implements EnumFetcherService {
|
||||
private IMeetBookingService meetBookingService;
|
||||
|
||||
@Override
|
||||
public Map<String, String> getEnumValues(String type) {
|
||||
public Map<Object, Object> getEnumValues(String type) {
|
||||
switch (type) {
|
||||
case "getMeetName":
|
||||
return meetService.getMeetSelectDate(type);
|
||||
@ -56,22 +56,22 @@ public class EnumFetcherServiceImpl implements EnumFetcherService {
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> getMeetStatus() {
|
||||
Map<Object, Object> getMeetStatus() {
|
||||
return java.util.Arrays.stream(MeetStatusEnum.values())
|
||||
.collect(Collectors.toMap(MeetStatusEnum::getValue, MeetStatusEnum::getName));
|
||||
}
|
||||
|
||||
|
||||
Map<String, String> getMeetAttachStatus() {
|
||||
Map<Object, Object> getMeetAttachStatus() {
|
||||
return java.util.Arrays.stream(MeetAttachStatusEnum.values())
|
||||
.collect(Collectors.toMap(MeetAttachStatusEnum::getValue, MeetAttachStatusEnum::getName));
|
||||
}
|
||||
|
||||
Map<String, String> getMeetBookingPayStatus() {
|
||||
Map<Object, Object> getMeetBookingPayStatus() {
|
||||
return java.util.Arrays.stream(BookingPayStatusEnum.values())
|
||||
.collect(Collectors.toMap(BookingPayStatusEnum::getValue, BookingPayStatusEnum::getName));
|
||||
}
|
||||
Map<String, String>getMeetBookingStatus() {
|
||||
Map<Object, Object> getMeetBookingStatus() {
|
||||
return java.util.Arrays.stream(BookingStatusEnum.values())
|
||||
.collect(Collectors.toMap(BookingStatusEnum::getValue, BookingStatusEnum::getName));
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
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;
|
||||
@ -68,12 +69,12 @@ public class MeetAttachServiceImpl implements IMeetAttachService {
|
||||
*/
|
||||
@Override
|
||||
public List<MeetAttachVo> queryList(MeetAttachBo bo) {
|
||||
bo.setState(0);
|
||||
LambdaQueryWrapper<MeetAttach> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MeetAttach> buildQueryWrapper(MeetAttachBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MeetAttach> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MeetAttach::getId);
|
||||
lqw.eq(bo.getMeetId() != null, MeetAttach::getMeetId, bo.getMeetId());
|
||||
@ -81,7 +82,7 @@ public class MeetAttachServiceImpl implements IMeetAttachService {
|
||||
lqw.eq(bo.getPrice() != null, MeetAttach::getPrice, bo.getPrice());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), MeetAttach::getUnit, bo.getUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getType()), MeetAttach::getType, bo.getType());
|
||||
lqw.eq(bo.getState() != null, MeetAttach::getState, bo.getState());
|
||||
lqw.eq(MeetAttach::getState, bo.getState());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -140,7 +141,7 @@ public class MeetAttachServiceImpl implements IMeetAttachService {
|
||||
* 下拉接口数据
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getMeetAttachSelectDate(String type){
|
||||
public Map<Object, Object> getMeetAttachSelectDate(String type){
|
||||
|
||||
switch (type) {
|
||||
case "getMeetAttachName":
|
||||
|
@ -1,5 +1,7 @@
|
||||
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;
|
||||
@ -11,16 +13,18 @@ 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.property.domain.MeetBooking;
|
||||
import org.dromara.property.mapper.MeetBookingMapper;
|
||||
import org.dromara.property.service.IMeetBookingService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -61,6 +65,47 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
*查询该日期的会议记录
|
||||
* @param appointmentDate
|
||||
* @return 当天的会议预约记录
|
||||
*/
|
||||
@Override
|
||||
public List<MeetBookingAppointmentVo> appointmentList(String appointmentDate) {
|
||||
LambdaQueryWrapper<MeetBooking> meetBookingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
if (appointmentDate != null) {
|
||||
meetBookingLambdaQueryWrapper.le(MeetBooking::getScheduledStarttime, appointmentDate)
|
||||
.ge(MeetBooking::getScheduledEndtime, appointmentDate);
|
||||
}
|
||||
List<MeetBooking> meetBookings = baseMapper.selectList(meetBookingLambdaQueryWrapper);
|
||||
List<MeetBookingAppointmentVo> meetBookingAppointmentVoList = BeanUtil.copyToList(meetBookings, MeetBookingAppointmentVo.class);
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
|
||||
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("晚上");
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
return meetBookingAppointmentVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的会议预约列表
|
||||
*
|
||||
@ -73,8 +118,38 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MeetBookingWeekVo> appointmentIdList(String meetId) {
|
||||
// 计算当前周的起止时间
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
// 设置为周一
|
||||
calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
|
||||
Date startOfWeek = calendar.getTime();
|
||||
// 加6天变为周日
|
||||
calendar.add(Calendar.DAY_OF_MONTH, 6);
|
||||
Date endOfWeek = calendar.getTime();
|
||||
// 构建查询条件
|
||||
LambdaQueryWrapper<MeetBooking> bookingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
bookingLambdaQueryWrapper.eq(MeetBooking::getMeetId, meetId)
|
||||
.ge(MeetBooking::getScheduledStarttime, startOfWeek)
|
||||
.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->{
|
||||
//设置指定的Date对象不设置默认返回当天的星期
|
||||
calendar.setTime(s.getScheduledStarttime());
|
||||
//获取当前时间的星期
|
||||
int firstDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
|
||||
s.setWeek(weekStr[firstDayOfWeek - 1]);
|
||||
meetBookingWeekList.add(s);
|
||||
});
|
||||
return meetBookingWeekList;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MeetBooking> buildQueryWrapper(MeetBookingBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MeetBooking> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MeetBooking::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), MeetBooking::getName, bo.getName());
|
||||
@ -85,11 +160,11 @@ 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(bo.getPersonSum() != null, MeetBooking::getPersonSum, bo.getPersonSum());
|
||||
lqw.eq(bo.getPrice() != null, MeetBooking::getPrice, bo.getPrice());
|
||||
lqw.eq(bo.getAttach() != null, MeetBooking::getAttach, bo.getAttach());
|
||||
lqw.eq(bo.getPayState() != null, MeetBooking::getPayState, bo.getPayState());
|
||||
lqw.eq(bo.getState() != null, MeetBooking::getState, bo.getState());
|
||||
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());
|
||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getState()), MeetBooking::getState, bo.getState());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -100,6 +175,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(MeetBookingBo bo) {
|
||||
MeetBooking add = MapstructUtils.convert(bo, MeetBooking.class);
|
||||
validEntityBeforeSave(add);
|
||||
@ -117,6 +193,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(MeetBookingBo bo) {
|
||||
MeetBooking update = MapstructUtils.convert(bo, MeetBooking.class);
|
||||
validEntityBeforeSave(update);
|
||||
@ -146,7 +223,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getMeetBooking(String type) {
|
||||
public Map<Object, Object> getMeetBooking(String type) {
|
||||
switch (type) {
|
||||
case "getMeetBookingPerson()":
|
||||
return getList().stream()
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
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;
|
||||
@ -9,16 +10,25 @@ 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.MeetBooking;
|
||||
import org.dromara.property.domain.vo.ResidentPersonVo;
|
||||
import org.dromara.property.mapper.MeetBookingMapper;
|
||||
import org.dromara.property.mapper.ResidentPersonMapper;
|
||||
import org.dromara.property.mapper.TbRoomMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.dromara.property.domain.bo.MeetBo;
|
||||
import org.dromara.property.domain.vo.MeetVo;
|
||||
import org.dromara.property.domain.Meet;
|
||||
import org.dromara.property.mapper.MeetMapper;
|
||||
import org.dromara.property.service.IMeetService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -33,6 +43,9 @@ import java.util.stream.Collectors;
|
||||
public class MeetServiceImpl implements IMeetService {
|
||||
|
||||
private final MeetMapper baseMapper;
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
private final TbRoomMapper roomMapper;
|
||||
private final MeetBookingMapper meetbookMapper;
|
||||
|
||||
/**
|
||||
* 查询会议室管理
|
||||
@ -42,7 +55,13 @@ public class MeetServiceImpl implements IMeetService {
|
||||
*/
|
||||
@Override
|
||||
public MeetVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
MeetVo meetVo= baseMapper.selectVoById(id);
|
||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetVo.getPrincipals());
|
||||
meetVo.setPrincipalsName(residentPersonVo.getUserName());
|
||||
meetVo.setPhoneNo(residentPersonVo.getPhone());
|
||||
String locationName = roomMapper.queryRoomName(Long.valueOf(meetVo.getLocation()));
|
||||
meetVo.setLocationName(locationName);
|
||||
return meetVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -56,7 +75,17 @@ 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);
|
||||
return TableDataInfo.build(result);
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,10 +96,54 @@ public class MeetServiceImpl implements IMeetService {
|
||||
*/
|
||||
@Override
|
||||
public List<MeetVo> queryList(MeetBo bo) {
|
||||
LambdaQueryWrapper<Meet> lqw = buildQueryWrapper(bo);
|
||||
//查询当前日期和当前时间段会议记录表的会议id
|
||||
LambdaQueryWrapper<MeetBooking> bookLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
String[] times = bo.getOpenHours().split("-");
|
||||
String openStartTimeStr = times[0];
|
||||
String openEndTimeStr = times[1];
|
||||
LocalDate appointmentTime = LocalDate.parse(bo.getAppointmentTime());
|
||||
LocalTime startTime = LocalTime.parse(openStartTimeStr, DateTimeFormatter.ofPattern("HH:mm"));
|
||||
LocalTime EndTime = LocalTime.parse(openEndTimeStr, DateTimeFormatter.ofPattern("HH:mm"));
|
||||
LocalDateTime startDateTime = LocalDateTime.of(appointmentTime, startTime );
|
||||
LocalDateTime endDateTime = LocalDateTime.of(appointmentTime, EndTime);
|
||||
bookLambdaQueryWrapper.ge(MeetBooking::getScheduledStarttime, startDateTime)
|
||||
.le(MeetBooking::getScheduledEndtime, endDateTime);
|
||||
List<MeetBooking> meetBookings = meetbookMapper.selectList(bookLambdaQueryWrapper);
|
||||
List<Long> meetIdList = meetBookings.stream().map(MeetBooking::getMeetId).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<Meet> lqw = buildQueryListWrapper(bo,meetIdList);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
private LambdaQueryWrapper<Meet> buildQueryListWrapper(MeetBo bo,List<Long> meetIdList) {
|
||||
LambdaQueryWrapper<Meet> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(Meet::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), Meet::getName, bo.getName());
|
||||
lqw.notIn(ObjectUtil.isNotEmpty(meetIdList),Meet::getId,meetIdList);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), Meet::getLocation, bo.getLocation());
|
||||
lqw.le(bo.getPersonNumber() != null, Meet::getPersonNumber, bo.getPersonNumber());
|
||||
lqw.eq(bo.getBaseService() != null, Meet::getBaseService, bo.getBaseService());
|
||||
if (StringUtils.isNotBlank(bo.getOpenHours())) {
|
||||
String[] times = bo.getOpenHours().split("-");
|
||||
if (times.length == 2) {
|
||||
String openStartTimeStr = times[0];
|
||||
String openEndTimeStr = times[1];
|
||||
|
||||
String nowTime = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm"));
|
||||
if (nowTime.compareTo(openStartTimeStr) >= 0 && nowTime.compareTo(openEndTimeStr) <= 0) {
|
||||
lqw.ge(Meet::getOpenHours, openStartTimeStr)
|
||||
.le(Meet::getOpenHours, openEndTimeStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
lqw.eq(bo.getBasePrice() != null, Meet::getBasePrice, bo.getBasePrice());
|
||||
lqw.eq(bo.getAttach() != null, Meet::getAttach, bo.getAttach());
|
||||
return lqw;
|
||||
}
|
||||
private LambdaQueryWrapper<Meet> buildQueryWrapper(MeetBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<Meet> lqw = Wrappers.lambdaQuery();
|
||||
@ -78,12 +151,14 @@ public class MeetServiceImpl implements IMeetService {
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), Meet::getName, bo.getName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), Meet::getLocation, bo.getLocation());
|
||||
lqw.eq(bo.getPersonNumber() != null, Meet::getPersonNumber, bo.getPersonNumber());
|
||||
lqw.eq(bo.getBaseServiceId() != null, Meet::getBaseServiceId, bo.getBaseServiceId());
|
||||
lqw.eq(bo.getBaseService() != null, Meet::getBaseService, bo.getBaseService());
|
||||
lqw.eq(bo.getBasePrice() != null, Meet::getBasePrice, bo.getBasePrice());
|
||||
lqw.eq(bo.getAttach() != null, Meet::getAttach, bo.getAttach());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增会议室管理
|
||||
*
|
||||
@ -91,6 +166,7 @@ public class MeetServiceImpl implements IMeetService {
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(MeetBo bo) {
|
||||
Meet add = MapstructUtils.convert(bo, Meet.class);
|
||||
validEntityBeforeSave(add);
|
||||
@ -108,6 +184,7 @@ public class MeetServiceImpl implements IMeetService {
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(MeetBo bo) {
|
||||
Meet update = MapstructUtils.convert(bo, Meet.class);
|
||||
validEntityBeforeSave(update);
|
||||
@ -118,7 +195,8 @@ public class MeetServiceImpl implements IMeetService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(Meet entity){
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void validEntityBeforeSave(Meet entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@ -130,6 +208,7 @@ public class MeetServiceImpl implements IMeetService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
@ -140,16 +219,16 @@ public class MeetServiceImpl implements IMeetService {
|
||||
* 下拉接口数据
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getMeetSelectDate(String type){
|
||||
|
||||
public Map<Object, Object> getMeetSelectDate(String type){
|
||||
switch (type) {
|
||||
case "getMeetName":
|
||||
return getList().stream()
|
||||
.collect(Collectors.toMap(
|
||||
Meet::getName,
|
||||
Meet::getName,
|
||||
(oldValue, newValue) -> oldValue
|
||||
));
|
||||
Map<Object, Object> meetMap = new HashMap<>();
|
||||
for (Meet meet : getList()) {
|
||||
// 如果键不存在,则直接放入;如果存在,则保留第一个遇到的值
|
||||
meetMap.putIfAbsent("value", meet.getId());
|
||||
meetMap.putIfAbsent("name", meet.getName());
|
||||
}
|
||||
return meetMap;
|
||||
case "getMeetPrincipals":
|
||||
return getList().stream()
|
||||
.collect(Collectors.toMap(
|
||||
|
@ -406,10 +406,9 @@ public class PlantsRentalOrderServiceImpl implements IPlantsRentalOrderService {
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Integer> countCustomers() {
|
||||
LambdaQueryWrapper<PlantsRentalOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.groupBy(PlantsRentalOrder::getCustomerName);
|
||||
Integer count= baseMapper.countDistinctCustomerName();
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
map.put("count",baseMapper.selectVoList(lqw).size());
|
||||
map.put("count",count);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,147 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
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.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.ServiceWorkOrders;
|
||||
import org.dromara.property.domain.bo.ServiceWorkOrdersBo;
|
||||
import org.dromara.property.domain.vo.ServiceWorkOrdersVo;
|
||||
import org.dromara.property.mapper.ServiceWorkOrdersMapper;
|
||||
import org.dromara.property.service.IServiceWorkOrdersService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
|
||||
private final ServiceWorkOrdersMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public ServiceWorkOrdersVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询【请填写功能名称】列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 【请填写功能名称】分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ServiceWorkOrdersVo> queryPageList(ServiceWorkOrdersBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<ServiceWorkOrders> lqw = buildQueryWrapper(bo);
|
||||
Page<ServiceWorkOrdersVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的【请填写功能名称】列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 【请填写功能名称】列表
|
||||
*/
|
||||
@Override
|
||||
public List<ServiceWorkOrdersVo> queryList(ServiceWorkOrdersBo bo) {
|
||||
LambdaQueryWrapper<ServiceWorkOrders> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ServiceWorkOrders> buildQueryWrapper(ServiceWorkOrdersBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<ServiceWorkOrders> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(ServiceWorkOrders::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), ServiceWorkOrders::getOrderNo, bo.getOrderNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getOrderName()), ServiceWorkOrders::getOrderName, bo.getOrderName());
|
||||
lqw.eq(bo.getType() != null, ServiceWorkOrders::getType, bo.getType());
|
||||
lqw.eq(bo.getStatus() != null, ServiceWorkOrders::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getDispatchTime() != null, ServiceWorkOrders::getDispatchTime, bo.getDispatchTime());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getInitiatorName()), ServiceWorkOrders::getInitiatorName, bo.getInitiatorName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInitiatorPhone()), ServiceWorkOrders::getInitiatorPhone, bo.getInitiatorPhone());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getHandler()), ServiceWorkOrders::getHandler, bo.getHandler());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), ServiceWorkOrders::getLocation, bo.getLocation());
|
||||
lqw.eq(bo.getPlanCompleTime() != null, ServiceWorkOrders::getPlanCompleTime, bo.getPlanCompleTime());
|
||||
lqw.eq(bo.getCompleTime() != null, ServiceWorkOrders::getCompleTime, bo.getCompleTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getServiceEvalua()), ServiceWorkOrders::getServiceEvalua, bo.getServiceEvalua());
|
||||
lqw.eq(bo.getIsTimeOut() != null, ServiceWorkOrders::getIsTimeOut, bo.getIsTimeOut());
|
||||
lqw.eq(bo.getCreateById() != null, ServiceWorkOrders::getCreateById, bo.getCreateById());
|
||||
lqw.eq(bo.getUpdateById() != null, ServiceWorkOrders::getUpdateById, bo.getUpdateById());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), ServiceWorkOrders::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param bo 【请填写功能名称】
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ServiceWorkOrdersBo bo) {
|
||||
ServiceWorkOrders add = MapstructUtils.convert(bo, ServiceWorkOrders.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param bo 【请填写功能名称】
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ServiceWorkOrdersBo bo) {
|
||||
ServiceWorkOrders update = MapstructUtils.convert(bo, ServiceWorkOrders.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ServiceWorkOrders entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除【请填写功能名称】信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -14,4 +14,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
inner join tb_community c on r.community_id=c.id
|
||||
where r.id=#{roomId}
|
||||
</select>
|
||||
|
||||
<select id="queryRoomNameList" resultType="java.util.Map">
|
||||
select
|
||||
r.id,
|
||||
concat(c.community_name,b.building_name,u.unit_name,f.floor_name,r.room_number)
|
||||
from tb_room r
|
||||
inner join tb_floor f on r.floor_id=f.id
|
||||
inner join tb_unit u on r.unit_id=u.id
|
||||
inner join tb_building b on r.building_id=b.id
|
||||
inner join tb_community c on r.community_id=c.id
|
||||
where r.id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user