This commit is contained in:
parent
1ca5352a9d
commit
7dc0a87a23
@ -27,8 +27,8 @@ public class EnumFetcherController {
|
||||
* @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);
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ 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.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
@ -45,6 +46,14 @@ public class MeetBookingController extends BaseController {
|
||||
public TableDataInfo<MeetBookingVo> list(MeetBookingBo bo, PageQuery pageQuery) {
|
||||
return meetBookingService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
/**
|
||||
* 查询已预约会议预约记录列表
|
||||
*/
|
||||
@GetMapping("/appointment-list")
|
||||
public List<MeetBookingAppointmentVo> appointmentList(String appointmentDate) {
|
||||
return meetBookingService.appointmentList(appointmentDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会议预约详细信息
|
||||
*
|
||||
@ -78,17 +87,4 @@ public class MeetBookingController extends BaseController {
|
||||
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;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
|
@ -33,6 +33,10 @@ public class MeetBooking extends TenantEntity {
|
||||
* 会议室名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
private String meetTheme;
|
||||
|
||||
/**
|
||||
* 会议室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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
@ -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,42 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
|
||||
/**
|
||||
* @Author:yuyongle
|
||||
* @Date:2025/7/7 17:07
|
||||
* @Description:
|
||||
**/
|
||||
public class MeetBookingAppointmentVo {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@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;
|
||||
}
|
@ -47,6 +47,10 @@ public class MeetBookingVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "会议室id")
|
||||
private Long meetId;
|
||||
/**
|
||||
* 会议室主题
|
||||
*/
|
||||
private String meetTheme;
|
||||
|
||||
/**
|
||||
* 会议室地址
|
||||
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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> {
|
||||
|
||||
}
|
@ -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,6 +1,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.MeetBookingVo;
|
||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -35,6 +36,10 @@ public interface IMeetBookingService {
|
||||
*/
|
||||
TableDataInfo<MeetBookingVo> queryPageList(MeetBookingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询已预约会议预约记录列表
|
||||
*/
|
||||
List<MeetBookingAppointmentVo> appointmentList(String appointmentDate);
|
||||
/**
|
||||
* 查询符合条件的会议预约列表
|
||||
*
|
||||
@ -73,5 +78,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));
|
||||
}
|
||||
|
@ -140,7 +140,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,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -11,12 +12,14 @@ 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.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;
|
||||
@ -61,6 +64,23 @@ 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);
|
||||
return meetBookingAppointmentVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的会议预约列表
|
||||
*
|
||||
@ -100,6 +120,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 +138,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 +168,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()
|
||||
|
@ -9,13 +9,19 @@ 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.vo.ResidentPersonVo;
|
||||
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.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
@ -33,6 +39,8 @@ import java.util.stream.Collectors;
|
||||
public class MeetServiceImpl implements IMeetService {
|
||||
|
||||
private final MeetMapper baseMapper;
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
private final TbRoomMapper roomMapper;
|
||||
|
||||
/**
|
||||
* 查询会议室管理
|
||||
@ -56,7 +64,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));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,7 +96,7 @@ 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 +109,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 +127,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 +138,8 @@ public class MeetServiceImpl implements IMeetService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(Meet entity){
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void validEntityBeforeSave(Meet entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@ -130,6 +151,7 @@ public class MeetServiceImpl implements IMeetService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
@ -140,13 +162,13 @@ 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::getId,
|
||||
Meet::getName,
|
||||
(oldValue, newValue) -> oldValue
|
||||
));
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user