diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostReturnPayFeeController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostReturnPayFeeController.java index 79c7e7bb..956f94b6 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostReturnPayFeeController.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostReturnPayFeeController.java @@ -40,7 +40,7 @@ public class CostReturnPayFeeController extends BaseController { /** * 查询费用-抄类型列表 */ - @SaCheckPermission("system:returnPayFee:list") + //@SaCheckPermission("system:returnPayFee:list") @GetMapping("/list") public TableDataInfo list(CostReturnPayFeeBo bo, PageQuery pageQuery) { return costReturnPayFeeService.queryPageList(bo, pageQuery); diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerContingenPlanController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerContingenPlanController.java new file mode 100644 index 00000000..5971ef68 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerContingenPlanController.java @@ -0,0 +1,106 @@ +package org.dromara.property.controller; + +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.bo.CustomerContingenPlanBo; +import org.dromara.property.domain.vo.CustomerContingenPlanVo; +import org.dromara.property.service.ICustomerContingenPlanService; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 客户服务-应急预案 + * 前端访问路由地址为:/system/contingenPlan + * + * @author mocheng + * @date 2025-07-22 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/contingenPlan") +public class CustomerContingenPlanController extends BaseController { + + private final ICustomerContingenPlanService customerContingenPlanService; + + /** + * 查询客户服务-应急预案列表 + */ + @SaCheckPermission("system:contingenPlan:list") + @GetMapping("/list") + public TableDataInfo list(CustomerContingenPlanBo bo, PageQuery pageQuery) { + return customerContingenPlanService.queryPageList(bo, pageQuery); + } + + /** + * 导出客户服务-应急预案列表 + */ + @SaCheckPermission("system:contingenPlan:export") + @Log(title = "客户服务-应急预案", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(CustomerContingenPlanBo bo, HttpServletResponse response) { + List list = customerContingenPlanService.queryList(bo); + ExcelUtil.exportExcel(list, "客户服务-应急预案", CustomerContingenPlanVo.class, response); + } + + /** + * 获取客户服务-应急预案详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("system:contingenPlan:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable("id") Long id) { + return R.ok(customerContingenPlanService.queryById(id)); + } + + /** + * 新增客户服务-应急预案 + */ + @SaCheckPermission("system:contingenPlan:add") + @Log(title = "客户服务-应急预案", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody CustomerContingenPlanBo bo) { + return toAjax(customerContingenPlanService.insertByBo(bo)); + } + + /** + * 修改客户服务-应急预案 + */ + @SaCheckPermission("system:contingenPlan:edit") + @Log(title = "客户服务-应急预案", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody CustomerContingenPlanBo bo) { + return toAjax(customerContingenPlanService.updateByBo(bo)); + } + + /** + * 删除客户服务-应急预案 + * + * @param ids 主键串 + */ + @SaCheckPermission("system:contingenPlan:remove") + @Log(title = "客户服务-应急预案", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable("ids") Long[] ids) { + return toAjax(customerContingenPlanService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerFeedbacksController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerFeedbacksController.java new file mode 100644 index 00000000..a65efddb --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerFeedbacksController.java @@ -0,0 +1,108 @@ +package org.dromara.property.controller; + +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.bo.CustomerFeedbacksBo; +import org.dromara.property.domain.vo.CustomerFeedbacksVo; +import org.dromara.property.service.ICustomerFeedbacksService; +import org.jfree.data.category.DefaultCategoryDataset; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 客户服务-意见反馈 + * 前端访问路由地址为:/system/feedbacks + * + * @author mocheng + * @date 2025-07-22 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/feedbacks") +public class CustomerFeedbacksController extends BaseController { + + private final ICustomerFeedbacksService customerFeedbacksService; + + /** + * 查询客户服务-意见反馈列表 + */ + @SaCheckPermission("system:feedbacks:list") + @GetMapping("/list") + public TableDataInfo list(CustomerFeedbacksBo bo, PageQuery pageQuery) { + DefaultCategoryDataset dataset = new DefaultCategoryDataset(); + return customerFeedbacksService.queryPageList(bo, pageQuery); + } + + /** + * 导出客户服务-意见反馈列表 + */ + @SaCheckPermission("system:feedbacks:export") + @Log(title = "客户服务-意见反馈", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(CustomerFeedbacksBo bo, HttpServletResponse response) { + List list = customerFeedbacksService.queryList(bo); + ExcelUtil.exportExcel(list, "客户服务-意见反馈", CustomerFeedbacksVo.class, response); + } + + /** + * 获取客户服务-意见反馈详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("system:feedbacks:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable("id") Long id) { + return R.ok(customerFeedbacksService.queryById(id)); + } + + /** + * 新增客户服务-意见反馈 + */ + @SaCheckPermission("system:feedbacks:add") + @Log(title = "客户服务-意见反馈", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody CustomerFeedbacksBo bo) { + return toAjax(customerFeedbacksService.insertByBo(bo)); + } + + /** + * 修改客户服务-意见反馈 + */ + @SaCheckPermission("system:feedbacks:edit") + @Log(title = "客户服务-意见反馈", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody CustomerFeedbacksBo bo) { + return toAjax(customerFeedbacksService.updateByBo(bo)); + } + + /** + * 删除客户服务-意见反馈 + * + * @param ids 主键串 + */ + @SaCheckPermission("system:feedbacks:remove") + @Log(title = "客户服务-意见反馈", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable("ids") Long[] ids) { + return toAjax(customerFeedbacksService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerNoticesController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerNoticesController.java new file mode 100644 index 00000000..20692213 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerNoticesController.java @@ -0,0 +1,106 @@ +package org.dromara.property.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.property.domain.vo.CustomerNoticesVo; +import org.dromara.property.domain.bo.CustomerNoticesBo; +import org.dromara.property.service.ICustomerNoticesService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 客户服务-通知公告 + * 前端访问路由地址为:/domain/notices + * + * @author 余永乐 + * @date 2025-07-22 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/notices") +public class CustomerNoticesController extends BaseController { + + private final ICustomerNoticesService customerNoticesService; + + /** + * 查询客户服务-通知公告列表 + */ + @SaCheckPermission("domain:notices:list") + @GetMapping("/list") + public TableDataInfo list(CustomerNoticesBo bo, PageQuery pageQuery) { + return customerNoticesService.queryPageList(bo, pageQuery); + } + + /** + * 导出客户服务-通知公告列表 + */ + @SaCheckPermission("domain:notices:export") + @Log(title = "客户服务-通知公告", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(CustomerNoticesBo bo, HttpServletResponse response) { + List list = customerNoticesService.queryList(bo); + ExcelUtil.exportExcel(list, "客户服务-通知公告", CustomerNoticesVo.class, response); + } + + /** + * 获取客户服务-通知公告详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("domain:notices:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable("id") Long id) { + return R.ok(customerNoticesService.queryById(id)); + } + + /** + * 新增客户服务-通知公告 + */ + @SaCheckPermission("domain:notices:add") + @Log(title = "客户服务-通知公告", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody CustomerNoticesBo bo) { + return toAjax(customerNoticesService.insertByBo(bo)); + } + + /** + * 修改客户服务-通知公告 + */ + @SaCheckPermission("domain:notices:edit") + @Log(title = "客户服务-通知公告", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody CustomerNoticesBo bo) { + return toAjax(customerNoticesService.updateByBo(bo)); + } + + /** + * 删除客户服务-通知公告 + * + * @param ids 主键串 + */ + @SaCheckPermission("domain:notices:remove") + @Log(title = "客户服务-通知公告", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable("ids") Long[] ids) { + return toAjax(customerNoticesService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/ServeceCustomerController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerServeceController.java similarity index 71% rename from ruoyi-modules/Property/src/main/java/org/dromara/property/controller/ServeceCustomerController.java rename to ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerServeceController.java index 65e0362a..d2cb900d 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/ServeceCustomerController.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CustomerServeceController.java @@ -1,14 +1,11 @@ package org.dromara.property.controller; -import cn.dev33.satoken.annotation.SaCheckPermission; import lombok.RequiredArgsConstructor; import org.dromara.common.core.domain.R; -import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.property.domain.bo.ServerBookingBo; +import org.dromara.common.web.core.BaseController; import org.dromara.property.domain.vo.ServeceCustomerCountVo; -import org.dromara.property.domain.vo.ServerBookingVo; import org.dromara.property.service.IServiceWorkOrdersService; +import org.jfree.data.category.DefaultCategoryDataset; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -22,8 +19,8 @@ import org.springframework.web.bind.annotation.RestController; @Validated @RequiredArgsConstructor @RestController -@RequestMapping("/serveceCustomer") -public class ServeceCustomerController { +@RequestMapping("/customerServece") +public class CustomerServeceController extends BaseController { private final IServiceWorkOrdersService serviceWorkOrdersService; /** * 查询客户服务工单看板统计 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java index a45d5dd3..954b6173 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java @@ -34,9 +34,13 @@ public class CostMeterWater extends TenantEntity { */ private Long userId; /** - * 费用类型id + * 费用项目id */ private Long itemId; + /** + * 费用类型 + */ + private String costType; /** * 房间id */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerContingenPlan.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerContingenPlan.java new file mode 100644 index 00000000..bfc1f396 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerContingenPlan.java @@ -0,0 +1,72 @@ +package org.dromara.property.domain; + +import org.dromara.common.tenant.core.TenantEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; + +import java.io.Serial; + +/** + * 客户服务-应急预案对象 customer_contingen_plan + * + * @author mocheng + * @date 2025-07-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("customer_contingen_plan") +public class CustomerContingenPlan extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 预案类型 + */ + private String contingenPlanType; + + /** + * 预案名称 + */ + private String contingenPlanName; + + /** + * 预案内容 + */ + private String contingenPlanContent; + + /** + * 发起人 + */ + private String initiat; + + /** + * 责任人 + */ + private Long dutyPersion; + + /** + * 风险等级 + */ + private Integer grade; + + /** + * 完成时间 + */ + private Date compleTimes; + + /** + * 状态(0.待审核1.待进行2.已完成) + */ + private String status; + + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerFeedbacks.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerFeedbacks.java new file mode 100644 index 00000000..7ac186e2 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerFeedbacks.java @@ -0,0 +1,74 @@ +package org.dromara.property.domain; + +import org.dromara.common.tenant.core.TenantEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * 客户服务-意见反馈对象 customer_feedbacks + * + * @author mocheng + * @date 2025-07-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("customer_feedbacks") +public class CustomerFeedbacks extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 反馈类型(0保修1保洁2会议) + */ + private String feedbackType; + + /** + * 反馈人 + */ + private Long feedbackPersion; + + /** + * 反馈人电话 + */ + private String feedbackPersionPhone; + + /** + * 反馈内容 + */ + private String feedbackContent; + + /** + * 反馈位置 + */ + private String feedbackLocation; + + /** + * 反馈图片 + */ + private String feedbackImg; + + /** + * 是否转至工单 + */ + private String isWorkOrder; + + /** + * 状态(0待处理1处理中2处理完成) + */ + private String status; + + /** + * 客服电话 + */ + private String serviceName; +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerNotices.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerNotices.java new file mode 100644 index 00000000..dd1fab20 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CustomerNotices.java @@ -0,0 +1,77 @@ +package org.dromara.property.domain; + +import cn.idev.excel.annotation.ExcelProperty; +import org.dromara.common.tenant.core.TenantEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 客户服务-通知公告对象 customer_notices + * + * @author 余永乐 + * @date 2025-07-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("customer_notices") +public class CustomerNotices extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 标题 + */ + private String title; + /** + * 通知人 + */ + private String noticePersion; + + /** + * 类型 + */ + private String type; + + /** + * 备注 + */ + private String remark; + + /** + * 是否全小区公告 + */ + private String isAll; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + /** + * 公告内容 + */ + private String afficheContent; + + /** + * 发布人 + */ + private Long issuers; + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java index 274ab26c..330887e9 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java @@ -36,10 +36,15 @@ public class CostMeterWaterBo extends BaseEntity { private Long userId; /** - * 费用类型id + * 费用项目id */ - @NotNull(message = "费用类型id不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotNull(message = "费用项目id不能为空", groups = { AddGroup.class, EditGroup.class }) private Long itemId; + + /** + * 费用类型 + */ + private String costType; /** * 房间id */ @@ -53,7 +58,6 @@ public class CostMeterWaterBo extends BaseEntity { /** * 对象名称 */ - @NotBlank(message = "对象名称不能为空", groups = { AddGroup.class, EditGroup.class }) private String objName; /** @@ -65,20 +69,18 @@ public class CostMeterWaterBo extends BaseEntity { /** * 上期度数 */ - @NotBlank(message = "上期度数不能为空", groups = { AddGroup.class, EditGroup.class }) private String preDegrees; /** * 上期读表时间 */ - @NotNull(message = "上期读表时间不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date preReadingTime; /** * 本期读表时间 */ - @NotNull(message = "本期读表时间不能为空", groups = { AddGroup.class, EditGroup.class }) private Date curReadingTime; /** diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostReturnPayFeeBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostReturnPayFeeBo.java index 3e5b944d..bb3d6cfe 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostReturnPayFeeBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostReturnPayFeeBo.java @@ -41,6 +41,7 @@ public class CostReturnPayFeeBo extends BaseEntity { /** * 收费类型 */ + private String chargeType; /** * 支付单号 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerContingenPlanBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerContingenPlanBo.java new file mode 100644 index 00000000..14c3d323 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerContingenPlanBo.java @@ -0,0 +1,82 @@ +package org.dromara.property.domain.bo; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.util.Date; +import org.dromara.property.domain.CustomerContingenPlan; + +/** + * 客户服务-应急预案业务对象 customer_contingen_plan + * + * @author mocheng + * @date 2025-07-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = CustomerContingenPlan.class, reverseConvertGenerate = false) +public class CustomerContingenPlanBo extends BaseEntity { + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 预案类型 + */ + @NotBlank(message = "预案类型不能为空", groups = { AddGroup.class, EditGroup.class }) + private String contingenPlanType; + + /** + * 预案名称 + */ + @NotBlank(message = "预案名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String contingenPlanName; + + /** + * 预案内容 + */ + //@NotBlank(message = "预案内容不能为空", groups = { AddGroup.class, EditGroup.class }) + private String contingenPlanContent; + + /** + * 发起人 + */ + @NotNull(message = "发起人不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long initiat; + + /** + * 责任人 + */ + @NotNull(message = "责任人不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long dutyPersion; + + /** + * 风险等级 + */ + @NotNull(message = "风险等级不能为空", groups = { AddGroup.class, EditGroup.class }) + private Integer grade; + + /** + * 完成时间 + */ + private Date compleTimes; + + /** + * 状态(0.待审核1待进行2已完成) + */ + private String status; + + /** + * 搜索值 + */ + private String searchValue; + + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerFeedbacksBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerFeedbacksBo.java new file mode 100644 index 00000000..6bb5d29f --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerFeedbacksBo.java @@ -0,0 +1,86 @@ +package org.dromara.property.domain.bo; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import org.dromara.property.domain.CustomerFeedbacks; + +/** + * 客户服务-意见反馈业务对象 customer_feedbacks + * + * @author mocheng + * @date 2025-07-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = CustomerFeedbacks.class, reverseConvertGenerate = false) +public class CustomerFeedbacksBo extends BaseEntity { + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 反馈类型(0保修1保洁2会议) + */ + @NotBlank(message = "反馈类型(0保修1保洁2会议)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String feedbackType; + + /** + * 反馈人 + */ + @NotNull(message = "反馈人不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long feedbackPersion; + + /** + * 反馈人电话 + */ + @NotBlank(message = "反馈人电话不能为空", groups = { AddGroup.class, EditGroup.class }) + private String feedbackPersionPhone; + + /** + * 反馈内容 + */ + @NotBlank(message = "反馈内容不能为空", groups = { AddGroup.class, EditGroup.class }) + private String feedbackContent; + + /** + * 反馈位置 + */ + @NotBlank(message = "反馈位置不能为空", groups = { AddGroup.class, EditGroup.class }) + private String feedbackLocation; + + /** + * 反馈图片 + */ + @NotBlank(message = "反馈图片不能为空", groups = { AddGroup.class, EditGroup.class }) + private String feedbackImg; + + /** + * 是否转至工单 + */ + private String isWorkOrder; + + /** + * 状态(1待处理2处理中3处理完成) + */ + private String status; + + /** + * 客服电话 + */ + private String serviceName; + + /** + * 搜索值 + */ + private String searchValue; + + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerNoticesBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerNoticesBo.java new file mode 100644 index 00000000..044120e4 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CustomerNoticesBo.java @@ -0,0 +1,86 @@ +package org.dromara.property.domain.bo; + +import cn.idev.excel.annotation.ExcelProperty; +import org.dromara.property.domain.CustomerNotices; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 客户服务-通知公告业务对象 customer_notices + * + * @author 余永乐 + * @date 2025-07-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = CustomerNotices.class, reverseConvertGenerate = false) +public class CustomerNoticesBo extends BaseEntity { + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 标题 + */ + @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class }) + private String title; + + /** + * 类型 + */ + @NotBlank(message = "类型不能为空", groups = { AddGroup.class, EditGroup.class }) + private String type; + /** + * 通知人 + */ + @ExcelProperty(value = "通知人") + private String noticePersion; + + /** + * 备注 + */ + private String remark; + + /** + * 是否全小区公告 + */ + @NotBlank(message = "是否全小区公告不能为空", groups = { AddGroup.class, EditGroup.class }) + private String isAll; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + /** + * 公告内容 + */ + private String afficheContent; + + /** + * 发布人 + */ + private Long issuers; + + /** + * 搜索值 + */ + private String searchValue; + + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java index 32349fec..6e3a2185 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java @@ -38,10 +38,13 @@ public class CostMeterWaterVo implements Serializable { private Long userId; /** - * 费用类型id + * 费用项目id */ - @ExcelProperty(value = "费用类型id") private Long itemId; + /** + * 费用类型 + */ + private String costType; /** * 房间id */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostReturnPayFeeVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostReturnPayFeeVo.java index 0b6dcb1c..1d85bdc0 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostReturnPayFeeVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostReturnPayFeeVo.java @@ -38,6 +38,15 @@ public class CostReturnPayFeeVo implements Serializable { */ @ExcelProperty(value = "退款单号") private String returnNo; + /** + * 收费id + */ + private Long chargeId; + /** + * 收费类型 + */ + + private String chargeType; /** * 支付单号 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerContingenPlanVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerContingenPlanVo.java new file mode 100644 index 00000000..756de321 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerContingenPlanVo.java @@ -0,0 +1,103 @@ +package org.dromara.property.domain.vo; + +import cn.idev.excel.annotation.ExcelIgnoreUnannotated; +import cn.idev.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.property.domain.CustomerContingenPlan; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 客户服务-应急预案视图对象 customer_contingen_plan + * + * @author mocheng + * @date 2025-07-22 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = CustomerContingenPlan.class) +public class CustomerContingenPlanVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 预案类型 + */ + @ExcelProperty(value = "预案类型") + private String contingenPlanType; + + /** + * 预案名称 + */ + @ExcelProperty(value = "预案名称") + private String contingenPlanName; + + /** + * 预案内容 + */ + @ExcelProperty(value = "预案内容") + private String contingenPlanContent; + + /** + * 发起人 + */ + @ExcelProperty(value = "发起人") + private long initiat; + + @ExcelProperty(value = "发起人姓名") + private String initiatName; + /** + * 责任人 + */ + private Long dutyPersion; + /** + * 责任人 + */ + private String dutyPersionName; + + /** + * 风险等级 + */ + private Integer grade; + + /** + * 完成时间 + */ + private Date compleTimes; + + /** + * 状态(1.待审核2待进行3已完成) + */ + @ExcelProperty(value = "状态(1.待审核2待进行3已完成)") + private String status; + + /** + * 搜索值 + */ + @ExcelProperty(value = "搜索值") + private String searchValue; + /** + * 创建时间 + */ + @ExcelProperty(value = "创建时间") + private Date createTime; + /** + * 最后更新时间 + */ + @ExcelProperty(value = "最后更新时间") + private Date updateTime; + + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerFeedbacksVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerFeedbacksVo.java new file mode 100644 index 00000000..ca99a5e4 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerFeedbacksVo.java @@ -0,0 +1,96 @@ +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.CustomerFeedbacks; + +import java.io.Serial; +import java.io.Serializable; + + + +/** + * 客户服务-意见反馈视图对象 customer_feedbacks + * + * @author mocheng + * @date 2025-07-22 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = CustomerFeedbacks.class) +public class CustomerFeedbacksVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 反馈类型(0保修1保洁2会议) + */ + @ExcelProperty(value = "反馈类型(0保修1保洁2会议)") + private String feedbackType; + + /** + * 反馈人 + */ + @ExcelProperty(value = "反馈人") + private Long feedbackPersion; + + /** + * 反馈人电话 + */ + @ExcelProperty(value = "反馈人电话") + private String feedbackPersionPhone; + + /** + * 反馈内容 + */ + @ExcelProperty(value = "反馈内容") + private String feedbackContent; + + /** + * 反馈位置 + */ + @ExcelProperty(value = "反馈位置") + private String feedbackLocation; + + /** + * 反馈图片 + */ + @ExcelProperty(value = "反馈图片") + private String feedbackImg; + + /** + * 是否转至工单 + */ + @ExcelProperty(value = "是否转至工单") + private String isWorkOrder; + + /** + * 状态(1待处理2处理中3处理完成) + */ + @ExcelProperty(value = "状态(1待处理2处理中3处理完成)") + private String status; + + /** + * 客服电话 + */ + @ExcelProperty(value = "客服电话") + private String serviceName; + + /** + * 搜索值 + */ + @ExcelProperty(value = "搜索值") + private String searchValue; + + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerNoticesVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerNoticesVo.java new file mode 100644 index 00000000..cce342c9 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CustomerNoticesVo.java @@ -0,0 +1,99 @@ +package org.dromara.property.domain.vo; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.property.domain.CustomerNotices; +import cn.idev.excel.annotation.ExcelIgnoreUnannotated; +import cn.idev.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 客户服务-通知公告视图对象 customer_notices + * + * @author 余永乐 + * @date 2025-07-22 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = CustomerNotices.class) +public class CustomerNoticesVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 标题 + */ + @ExcelProperty(value = "标题") + private String title; + + /** + * 类型 + */ + @ExcelProperty(value = "类型") + private String type; + /** + * 通知人 + */ + @ExcelProperty(value = "通知人") + private String noticePersion; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 是否全小区公告 + */ + @ExcelProperty(value = "是否全小区公告") + private String isAll; + + /** + * 开始时间 + */ + @ExcelProperty(value = "开始时间") + private Date startTime; + + /** + * 结束时间 + */ + @ExcelProperty(value = "结束时间") + private Date endTime; + + /** + * 公告内容 + */ + @ExcelProperty(value = "公告内容") + private String afficheContent; + + /** + * 发布人 + */ + @ExcelProperty(value = "发布人") + private Long issuers; + + /** + * 搜索值 + */ + @ExcelProperty(value = "搜索值") + private String searchValue; + + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServeceCustomerCountVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServeceCustomerCountVo.java index 60034545..62a9e9ad 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServeceCustomerCountVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServeceCustomerCountVo.java @@ -32,7 +32,7 @@ public class ServeceCustomerCountVo implements Serializable { /** * 当月工单超时率 */ - private Integer novertimeOrdersRate; + private Double novertimeOrdersRate; /** * 当月工单数 */ @@ -44,7 +44,7 @@ public class ServeceCustomerCountVo implements Serializable { /** * 当月满意度 */ - private Integer monthoSatisfaction; + private Double monthoSatisfaction; /** * 满意数 */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerContingenPlanMapper.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerContingenPlanMapper.java new file mode 100644 index 00000000..40994a21 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerContingenPlanMapper.java @@ -0,0 +1,18 @@ +package org.dromara.property.mapper; + + +import org.apache.ibatis.annotations.Mapper; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.property.domain.CustomerContingenPlan; +import org.dromara.property.domain.vo.CustomerContingenPlanVo; + +/** + * 客户服务-应急预案Mapper接口 + * + * @author mocheng + * @date 2025-07-22 + */ +@Mapper +public interface CustomerContingenPlanMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerFeedbacksMapper.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerFeedbacksMapper.java new file mode 100644 index 00000000..9a45f0ad --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerFeedbacksMapper.java @@ -0,0 +1,17 @@ +package org.dromara.property.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.property.domain.CustomerFeedbacks; +import org.dromara.property.domain.vo.CustomerFeedbacksVo; + +/** + * 客户服务-意见反馈Mapper接口 + * + * @author mocheng + * @date 2025-07-22 + */ +@Mapper +public interface CustomerFeedbacksMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerNoticesMapper.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerNoticesMapper.java new file mode 100644 index 00000000..04a25bb9 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CustomerNoticesMapper.java @@ -0,0 +1,17 @@ +package org.dromara.property.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.dromara.property.domain.CustomerNotices; +import org.dromara.property.domain.vo.CustomerNoticesVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 客户服务-通知公告Mapper接口 + * + * @author 余永乐 + * @date 2025-07-22 + */ +@Mapper +public interface CustomerNoticesMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerContingenPlanService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerContingenPlanService.java new file mode 100644 index 00000000..b781d8bd --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerContingenPlanService.java @@ -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.CustomerContingenPlanBo; +import org.dromara.property.domain.vo.CustomerContingenPlanVo; + +import java.util.Collection; +import java.util.List; + +/** + * 客户服务-应急预案Service接口 + * + * @author mocheng + * @date 2025-07-22 + */ +public interface ICustomerContingenPlanService { + + /** + * 查询客户服务-应急预案 + * + * @param id 主键 + * @return 客户服务-应急预案 + */ + CustomerContingenPlanVo queryById(Long id); + + /** + * 分页查询客户服务-应急预案列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 客户服务-应急预案分页列表 + */ + TableDataInfo queryPageList(CustomerContingenPlanBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的客户服务-应急预案列表 + * + * @param bo 查询条件 + * @return 客户服务-应急预案列表 + */ + List queryList(CustomerContingenPlanBo bo); + + /** + * 新增客户服务-应急预案 + * + * @param bo 客户服务-应急预案 + * @return 是否新增成功 + */ + Boolean insertByBo(CustomerContingenPlanBo bo); + + /** + * 修改客户服务-应急预案 + * + * @param bo 客户服务-应急预案 + * @return 是否修改成功 + */ + Boolean updateByBo(CustomerContingenPlanBo bo); + + /** + * 校验并批量删除客户服务-应急预案信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerFeedbacksService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerFeedbacksService.java new file mode 100644 index 00000000..be166f51 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerFeedbacksService.java @@ -0,0 +1,67 @@ +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.CustomerFeedbacksBo; +import org.dromara.property.domain.vo.CustomerFeedbacksVo; + +import java.util.Collection; +import java.util.List; + +/** + * 客户服务-意见反馈Service接口 + * + * @author mocheng + * @date 2025-07-22 + */ +public interface ICustomerFeedbacksService { + + /** + * 查询客户服务-意见反馈 + * + * @param id 主键 + * @return 客户服务-意见反馈 + */ + CustomerFeedbacksVo queryById(Long id); + + /** + * 分页查询客户服务-意见反馈列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 客户服务-意见反馈分页列表 + */ + TableDataInfo queryPageList(CustomerFeedbacksBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的客户服务-意见反馈列表 + * + * @param bo 查询条件 + * @return 客户服务-意见反馈列表 + */ + List queryList(CustomerFeedbacksBo bo); + + /** + * 新增客户服务-意见反馈 + * + * @param bo 客户服务-意见反馈 + * @return 是否新增成功 + */ + Boolean insertByBo(CustomerFeedbacksBo bo); + + /** + * 修改客户服务-意见反馈 + * + * @param bo 客户服务-意见反馈 + * @return 是否修改成功 + */ + Boolean updateByBo(CustomerFeedbacksBo bo); + + /** + * 校验并批量删除客户服务-意见反馈信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerNoticesService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerNoticesService.java new file mode 100644 index 00000000..0376d125 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICustomerNoticesService.java @@ -0,0 +1,68 @@ +package org.dromara.property.service; + +import org.dromara.property.domain.vo.CustomerNoticesVo; +import org.dromara.property.domain.bo.CustomerNoticesBo; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import java.util.Collection; +import java.util.List; + +/** + * 客户服务-通知公告Service接口 + * + * @author 余永乐 + * @date 2025-07-22 + */ +public interface ICustomerNoticesService { + + /** + * 查询客户服务-通知公告 + * + * @param id 主键 + * @return 客户服务-通知公告 + */ + CustomerNoticesVo queryById(Long id); + + /** + * 分页查询客户服务-通知公告列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 客户服务-通知公告分页列表 + */ + TableDataInfo queryPageList(CustomerNoticesBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的客户服务-通知公告列表 + * + * @param bo 查询条件 + * @return 客户服务-通知公告列表 + */ + List queryList(CustomerNoticesBo bo); + + /** + * 新增客户服务-通知公告 + * + * @param bo 客户服务-通知公告 + * @return 是否新增成功 + */ + Boolean insertByBo(CustomerNoticesBo bo); + + /** + * 修改客户服务-通知公告 + * + * @param bo 客户服务-通知公告 + * @return 是否修改成功 + */ + Boolean updateByBo(CustomerNoticesBo bo); + + /** + * 校验并批量删除客户服务-通知公告信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java index 9906d476..5d58be33 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java @@ -6,6 +6,7 @@ import org.dromara.property.domain.bo.ServiceWorkOrdersBo; import org.dromara.property.domain.vo.ServeceCustomerCountVo; import org.dromara.property.domain.vo.ServiceWorkOrdersInfoVo; import org.dromara.property.domain.vo.ServiceWorkOrdersVo; +import org.jfree.data.category.DefaultCategoryDataset; import java.util.Collection; import java.util.List; @@ -73,4 +74,5 @@ public interface IServiceWorkOrdersService { * @return */ ServeceCustomerCountVo counts(); + } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostMeterWaterServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostMeterWaterServiceImpl.java index 777b0a06..bf4a053f 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostMeterWaterServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostMeterWaterServiceImpl.java @@ -17,6 +17,7 @@ import org.dromara.property.domain.CostMeterWater; import org.dromara.property.mapper.CostMeterWaterMapper; import org.dromara.property.service.ICostMeterWaterService; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.Collection; @@ -95,6 +96,7 @@ public class CostMeterWaterServiceImpl implements ICostMeterWaterService { @Override public Boolean insertByBo(CostMeterWaterBo bo) { CostMeterWater add = MapstructUtils.convert(bo, CostMeterWater.class); + add.setCurReadingTime(new Date()); validEntityBeforeSave(add); boolean flag = baseMapper.insert(add) > 0; if (flag) { diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java index 5f0c836d..32875ac2 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java @@ -52,11 +52,11 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService { * @return 费用-缴费审核 */ @Override - public CostPayFeeAuditVo queryById(Long id){ + public CostPayFeeAuditVo queryById(Long id) { CostPayFeeAuditVo costPayFeeAuditVo = baseMapper.selectVoById(id); CostItemsVo costItemsVo = costItemsMapper.selectVoById(costPayFeeAuditVo.getItemId()); - costPayFeeAuditVo.setChargeItem(ObjectUtil.isNotEmpty(costItemsVo)? costItemsVo.getChargeItem() :null ); - costPayFeeAuditVo.setChargeCycle(ObjectUtil.isNotEmpty(costItemsVo)? costItemsVo.getChargeCycle() :null ); + costPayFeeAuditVo.setChargeItem(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeItem() : null); + costPayFeeAuditVo.setChargeCycle(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeCycle() : null); //TbRoomVo roomVo = roomMapper.selectVoById(costPayFeeAuditVo.getChargeId()); //costPayFeeAuditVo.setRoomNumber(ObjectUtil.isNotEmpty(roomVo)? roomVo.getRoomNumber() :null ); return costPayFeeAuditVo; @@ -73,8 +73,8 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService { public TableDataInfo queryPageList(CostPayFeeAuditBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - if(CollUtil.isEmpty(result.getRecords())){ - return TableDataInfo.build(result); + if (CollUtil.isEmpty(result.getRecords())) { + return TableDataInfo.build(result); } List itemIdList = result.getRecords().stream() .map(vo -> vo.getItemId()) @@ -85,21 +85,24 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService { .distinct() .collect(Collectors.toList()); List costItemsVoList = costItemsMapper.selectVoByIds(itemIdList); - List roomVoList = roomMapper.selectVoByIds(roomIdList); + List roomVoList = roomMapper.selectVoByIds(roomIdList); List costPayFeeAuditVoList = new ArrayList<>(); result.getRecords().stream().forEach(s -> { CostItemsVo costItemsVo = costItemsVoList.stream() .filter(vo -> vo.getId() != null && vo.getId().equals(s.getItemId())).findFirst().orElse(null); - s.setChargeItem(ObjectUtil.isNotEmpty(costItemsVo)?costItemsVo.getChargeItem():null); - s.setCostType(ObjectUtil.isNotEmpty(costItemsVo)?costItemsVo.getCostType():null); - s.setChargeCycle(ObjectUtil.isNotEmpty(costItemsVo)?costItemsVo.getChargeCycle():null); + s.setChargeItem(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeItem() : null); + s.setCostType(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getCostType() : null); + s.setChargeCycle(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeCycle() : null); TbRoomVo tbRoomVo = roomVoList.stream() .filter(vo -> vo.getId() != null && vo.getId().equals(s.getChargeId())).findFirst().orElse(null); - s.setRoomNumber(ObjectUtil.isNotEmpty(tbRoomVo)?tbRoomVo.getRoomNumber():null); + s.setRoomNumber(ObjectUtil.isNotEmpty(tbRoomVo) ? tbRoomVo.getRoomNumber() : null); costPayFeeAuditVoList.add(s); }); - return TableDataInfo.build(new Page().setRecords(costPayFeeAuditVoList)); + Page costPayFeeAuditVoPage = new Page() + .setRecords(costPayFeeAuditVoList) + .setTotal(result.getTotal()); + return TableDataInfo.build(costPayFeeAuditVoPage); } /** @@ -162,33 +165,34 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService { /** * 保存前的数据校验 */ - private void validEntityBeforeSave(CostPayFeeAudit entity){ + private void validEntityBeforeSave(CostPayFeeAudit entity) { //TODO 做一些数据校验,如唯一约束 } + /** * 修改前的数据校验 */ - private void validEntityBeforeUpdate(CostPayFeeAudit entity){ + private void validEntityBeforeUpdate(CostPayFeeAudit entity) { //TODO 做一些数据校验,如唯一约束 - if(entity.getState().equals("1")){ - if(entity.getChargeType().equals("1")){ - CostHouseCharge costHouseCharge = coinHouseChargeMapper.selectById(entity.getChargeId()); - costHouseCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_WAS_APPROVED.getValue()); - coinHouseChargeMapper.updateById(costHouseCharge); - } - if(entity.getChargeType().equals("2")){ + if (entity.getState().equals("1")) { + if (entity.getChargeType().equals("1")) { + CostHouseCharge costHouseCharge = coinHouseChargeMapper.selectById(entity.getChargeId()); + costHouseCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_WAS_APPROVED.getValue()); + coinHouseChargeMapper.updateById(costHouseCharge); + } + if (entity.getChargeType().equals("2")) { CostCarCharge costCarCharge = costCarChargeMapper.selectById(entity.getChargeId()); costCarCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_WAS_APPROVED.getValue()); costCarChargeMapper.updateById(costCarCharge); } } - if(entity.getState().equals("2")){ - if(entity.getChargeType().equals("1")){ + if (entity.getState().equals("2")) { + if (entity.getChargeType().equals("1")) { CostHouseCharge costHouseCharge = coinHouseChargeMapper.selectById(entity.getChargeId()); costHouseCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_REVIEW_FAILED.getValue()); coinHouseChargeMapper.updateById(costHouseCharge); } - if(entity.getChargeType().equals("2")){ + if (entity.getChargeType().equals("2")) { CostCarCharge costCarCharge = costCarChargeMapper.selectById(entity.getChargeId()); costCarCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_REVIEW_FAILED.getValue()); costCarChargeMapper.updateById(costCarCharge); @@ -205,7 +209,7 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService { */ @Override public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { - if(isValid){ + if (isValid) { //TODO 做一些业务上的校验,判断是否需要校验 } return baseMapper.deleteByIds(ids) > 0; diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerContingenPlanServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerContingenPlanServiceImpl.java new file mode 100644 index 00000000..da55aaf3 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerContingenPlanServiceImpl.java @@ -0,0 +1,155 @@ +package org.dromara.property.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.dromara.property.domain.CustomerContingenPlan; +import org.dromara.property.domain.ResidentPerson; +import org.dromara.property.domain.bo.CustomerContingenPlanBo; +import org.dromara.property.domain.vo.CustomerContingenPlanVo; +import org.dromara.property.domain.vo.ResidentUnitVo; +import org.dromara.property.mapper.CustomerContingenPlanMapper; +import org.dromara.property.mapper.ResidentPersonMapper; +import org.dromara.property.service.ICustomerContingenPlanService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 客户服务-应急预案Service业务层处理 + * + * @author mocheng + * @date 2025-07-22 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class CustomerContingenPlanServiceImpl implements ICustomerContingenPlanService { + + private final CustomerContingenPlanMapper baseMapper; + private final ResidentPersonMapper residentPersonMapper; + + /** + * 查询客户服务-应急预案 + * + * @param id 主键 + * @return 客户服务-应急预案 + */ + @Override + public CustomerContingenPlanVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询客户服务-应急预案列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 客户服务-应急预案分页列表 + */ + @Override + public TableDataInfo queryPageList(CustomerContingenPlanBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + List residentPeoplelist = residentPersonMapper.selectList(); + if (CollUtil.isNotEmpty(residentPeoplelist)) { + result.getRecords().stream().forEach(s -> { + ResidentPerson residentInitiatVo = residentPeoplelist.stream() + .filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getInitiat())).findFirst().orElse(null); + s.setInitiatName(ObjectUtil.isNotEmpty(residentInitiatVo)?residentInitiatVo.getUserName():null); + ResidentPerson residentDutyVo = residentPeoplelist.stream() + .filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getDutyPersion())).findFirst().orElse(null); + s.setDutyPersionName(ObjectUtil.isNotEmpty(residentDutyVo)?residentDutyVo.getUserName():null); + }); + } + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的客户服务-应急预案列表 + * + * @param bo 查询条件 + * @return 客户服务-应急预案列表 + */ + @Override + public List queryList(CustomerContingenPlanBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(CustomerContingenPlanBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByAsc(CustomerContingenPlan::getId); + lqw.eq(StringUtils.isNotBlank(bo.getContingenPlanType()), CustomerContingenPlan::getContingenPlanType, bo.getContingenPlanType()); + lqw.like(StringUtils.isNotBlank(bo.getContingenPlanName()), CustomerContingenPlan::getContingenPlanName, bo.getContingenPlanName()); + lqw.eq(StringUtils.isNotBlank(bo.getContingenPlanContent()), CustomerContingenPlan::getContingenPlanContent, bo.getContingenPlanContent()); + lqw.eq(ObjectUtil.isNotEmpty(bo.getInitiat()), CustomerContingenPlan::getInitiat, bo.getInitiat()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CustomerContingenPlan::getStatus, bo.getStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), CustomerContingenPlan::getSearchValue, bo.getSearchValue()); + return lqw; + } + + /** + * 新增客户服务-应急预案 + * + * @param bo 客户服务-应急预案 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(CustomerContingenPlanBo bo) { + CustomerContingenPlan add = MapstructUtils.convert(bo, CustomerContingenPlan.class); + add.setStatus("0"); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改客户服务-应急预案 + * + * @param bo 客户服务-应急预案 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(CustomerContingenPlanBo bo) { + CustomerContingenPlan update = MapstructUtils.convert(bo, CustomerContingenPlan.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(CustomerContingenPlan entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除客户服务-应急预案信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java new file mode 100644 index 00000000..ed412d4f --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java @@ -0,0 +1,141 @@ +package org.dromara.property.service.impl; + +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.dromara.property.domain.CustomerFeedbacks; +import org.dromara.property.domain.bo.CustomerFeedbacksBo; +import org.dromara.property.domain.vo.CustomerFeedbacksVo; +import org.dromara.property.mapper.CustomerFeedbacksMapper; +import org.dromara.property.service.ICustomerFeedbacksService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 客户服务-意见反馈Service业务层处理 + * + * @author mocheng + * @date 2025-07-22 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class CustomerFeedbacksServiceImpl implements ICustomerFeedbacksService { + + private final CustomerFeedbacksMapper baseMapper; + + /** + * 查询客户服务-意见反馈 + * + * @param id 主键 + * @return 客户服务-意见反馈 + */ + @Override + public CustomerFeedbacksVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询客户服务-意见反馈列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 客户服务-意见反馈分页列表 + */ + @Override + public TableDataInfo queryPageList(CustomerFeedbacksBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的客户服务-意见反馈列表 + * + * @param bo 查询条件 + * @return 客户服务-意见反馈列表 + */ + @Override + public List queryList(CustomerFeedbacksBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(CustomerFeedbacksBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByAsc(CustomerFeedbacks::getId); + lqw.eq(StringUtils.isNotBlank(bo.getFeedbackType()), CustomerFeedbacks::getFeedbackType, bo.getFeedbackType()); + lqw.eq(bo.getFeedbackPersion() != null, CustomerFeedbacks::getFeedbackPersion, bo.getFeedbackPersion()); + lqw.eq(StringUtils.isNotBlank(bo.getFeedbackPersionPhone()), CustomerFeedbacks::getFeedbackPersionPhone, bo.getFeedbackPersionPhone()); + lqw.eq(StringUtils.isNotBlank(bo.getFeedbackContent()), CustomerFeedbacks::getFeedbackContent, bo.getFeedbackContent()); + lqw.eq(StringUtils.isNotBlank(bo.getFeedbackLocation()), CustomerFeedbacks::getFeedbackLocation, bo.getFeedbackLocation()); + lqw.eq(StringUtils.isNotBlank(bo.getFeedbackImg()), CustomerFeedbacks::getFeedbackImg, bo.getFeedbackImg()); + lqw.eq(StringUtils.isNotBlank(bo.getIsWorkOrder()), CustomerFeedbacks::getIsWorkOrder, bo.getIsWorkOrder()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CustomerFeedbacks::getStatus, bo.getStatus()); + lqw.like(StringUtils.isNotBlank(bo.getServiceName()), CustomerFeedbacks::getServiceName, bo.getServiceName()); + lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), CustomerFeedbacks::getSearchValue, bo.getSearchValue()); + return lqw; + } + + /** + * 新增客户服务-意见反馈 + * + * @param bo 客户服务-意见反馈 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(CustomerFeedbacksBo bo) { + CustomerFeedbacks add = MapstructUtils.convert(bo, CustomerFeedbacks.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改客户服务-意见反馈 + * + * @param bo 客户服务-意见反馈 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(CustomerFeedbacksBo bo) { + CustomerFeedbacks update = MapstructUtils.convert(bo, CustomerFeedbacks.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(CustomerFeedbacks entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除客户服务-意见反馈信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerNoticesServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerNoticesServiceImpl.java new file mode 100644 index 00000000..f2e5f01b --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerNoticesServiceImpl.java @@ -0,0 +1,138 @@ +package org.dromara.property.service.impl; + +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.dromara.property.domain.bo.CustomerNoticesBo; +import org.dromara.property.domain.vo.CustomerNoticesVo; +import org.dromara.property.domain.CustomerNotices; +import org.dromara.property.mapper.CustomerNoticesMapper; +import org.dromara.property.service.ICustomerNoticesService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 客户服务-通知公告Service业务层处理 + * + * @author 余永乐 + * @date 2025-07-22 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class CustomerNoticesServiceImpl implements ICustomerNoticesService { + + private final CustomerNoticesMapper baseMapper; + + /** + * 查询客户服务-通知公告 + * + * @param id 主键 + * @return 客户服务-通知公告 + */ + @Override + public CustomerNoticesVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询客户服务-通知公告列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 客户服务-通知公告分页列表 + */ + @Override + public TableDataInfo queryPageList(CustomerNoticesBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的客户服务-通知公告列表 + * + * @param bo 查询条件 + * @return 客户服务-通知公告列表 + */ + @Override + public List queryList(CustomerNoticesBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(CustomerNoticesBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByAsc(CustomerNotices::getId); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), CustomerNotices::getTitle, bo.getTitle()); + lqw.eq(StringUtils.isNotBlank(bo.getType()), CustomerNotices::getType, bo.getType()); + lqw.eq(StringUtils.isNotBlank(bo.getIsAll()), CustomerNotices::getIsAll, bo.getIsAll()); + lqw.eq(bo.getStartTime() != null, CustomerNotices::getStartTime, bo.getStartTime()); + lqw.eq(bo.getEndTime() != null, CustomerNotices::getEndTime, bo.getEndTime()); + lqw.eq(StringUtils.isNotBlank(bo.getAfficheContent()), CustomerNotices::getAfficheContent, bo.getAfficheContent()); + lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), CustomerNotices::getSearchValue, bo.getSearchValue()); + return lqw; + } + + /** + * 新增客户服务-通知公告 + * + * @param bo 客户服务-通知公告 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(CustomerNoticesBo bo) { + CustomerNotices add = MapstructUtils.convert(bo, CustomerNotices.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改客户服务-通知公告 + * + * @param bo 客户服务-通知公告 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(CustomerNoticesBo bo) { + CustomerNotices update = MapstructUtils.convert(bo, CustomerNotices.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(CustomerNotices entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除客户服务-通知公告信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java index de1569f5..2bde554e 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java @@ -2,6 +2,7 @@ package org.dromara.property.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.idev.excel.event.Order; @@ -28,9 +29,16 @@ import org.dromara.property.mapper.ServiceWorkOrdersRecordMapper; import org.dromara.property.mapper.ServiceWorkOrdersTypeMapper; import org.dromara.property.service.IServiceWorkOrdersService; import org.dromara.system.api.model.LoginUser; +import org.jfree.chart.ChartFactory; +import org.jfree.chart.ChartPanel; +import org.jfree.chart.JFreeChart; +import org.jfree.chart.plot.PlotOrientation; +import org.jfree.data.category.DefaultCategoryDataset; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; @@ -60,8 +68,8 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { public ServiceWorkOrdersInfoVo queryById(Long id) { ServiceWorkOrdersVo serviceWorkOrdersVo = baseMapper.selectVoById(id); ServiceWorkOrdersInfoVo serviceWorkOrdersInfoVo = BeanUtil.copyProperties(serviceWorkOrdersVo, ServiceWorkOrdersInfoVo.class); - if(Objects.isNull(serviceWorkOrdersInfoVo)){ - return serviceWorkOrdersInfoVo; + if (Objects.isNull(serviceWorkOrdersInfoVo)) { + return serviceWorkOrdersInfoVo; } ServiceWorkOrdersTypeVo serviceWorkOrdersTypeVo = typesMapper.selectVoById(serviceWorkOrdersVo.getType()); if (Objects.nonNull(serviceWorkOrdersTypeVo)) { @@ -84,7 +92,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { if (Objects.nonNull(serviceWorkOrdersTypeVo)) { workOrdersRecordVo.setInitiatorPeople(serviceWorkOrdersVo.getInitiatorPeople()); } - if(workOrdersRecordVo.getStatus().equals("1")||workOrdersRecordVo.getStatus().equals("2")){ + if (workOrdersRecordVo.getStatus().equals("1") || workOrdersRecordVo.getStatus().equals("2")) { serviceWorkOrdersInfoVo.setDispatchTime(workOrdersRecordVo.getCreateTime()); } }); @@ -139,6 +147,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); lqw.orderByAsc(ServiceWorkOrders::getId); lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), ServiceWorkOrders::getOrderNo, bo.getOrderNo()); + lqw.eq(ObjectUtil.isNotEmpty(bo.getStatus()), ServiceWorkOrders::getStatus, bo.getStatus()); lqw.like(StringUtils.isNotBlank(bo.getOrderName()), ServiceWorkOrders::getOrderName, bo.getOrderName()); lqw.eq(bo.getDispatchTime() != null, ServiceWorkOrders::getDispatchTime, bo.getDispatchTime()); lqw.like(StringUtils.isNotBlank(bo.getInitiatorName()), ServiceWorkOrders::getInitiatorPeople, bo.getInitiatorName()); @@ -206,6 +215,12 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { * 修改前的数据校验 */ private void validEntityBeforeUpdate(ServiceWorkOrders entity) { + LambdaQueryWrapper residentPersonQueryWrapper = new LambdaQueryWrapper<>(); + residentPersonQueryWrapper.eq(ResidentPerson::getUserId, entity.getHandler()); + residentPersonQueryWrapper.last("LIMIT 1"); + ResidentPerson residentPerson = residentPersonMapper.selectOne(residentPersonQueryWrapper); + Assert.notNull(residentPerson, "该用户未入住不能抢单"); + entity.setHandler(residentPerson.getId()); LambdaQueryWrapper ordersLambdaQueryWrapper = new LambdaQueryWrapper<>(); ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getOrderId, entity.getId()); ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getStatus, entity.getStatus()); @@ -243,32 +258,65 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { @Override public ServeceCustomerCountVo counts() { List serviceWorkOrdersList = baseMapper.selectList(new QueryWrapper<>()); - // 总工单数 + + // 总工单数 int workOrdersTotal = serviceWorkOrdersList.size(); - // 待派送工单 - int notWorkOrdersTotal = (int) serviceWorkOrdersList.stream().filter(order -> "0".equals(order.getStatus())).count(); - //未半结超时工单 - int novertimeOrdersTotal = (int) serviceWorkOrdersList.stream().filter(order -> !"4".equals(order.getStatus()) && "1".equals(order.getIsTimeOut())).count(); - // 处理中工单 - int inHandOrdersTotal = (int) serviceWorkOrdersList.stream().filter(order -> "3".equals(order.getStatus())).count(); - // 当月工单超时率 - int novertimeOrdersRate = (int) serviceWorkOrdersList.stream().filter(order -> "3".equals(order.getStatus())).count(); - // 当月工单数 - int monthOrdersTotal = (int) serviceWorkOrdersList.stream().filter(order -> "3".equals(order.getStatus())).count(); - // 超时工单数 - int outTimeOrdersTotal = (int) serviceWorkOrdersList.stream().filter(order -> "3".equals(order.getStatus())).count(); - // 当月满意度 - int monthoSatisfaction = (int) serviceWorkOrdersList.stream().filter(order -> "3".equals(order.getStatus())).count(); - // 满意数 - int satisfaction = (int) serviceWorkOrdersList.stream().filter(order -> "3".equals(order.getStatus())).count(); + // 待派送工单(status = "0") + int notWorkOrdersTotal = (int) serviceWorkOrdersList.stream() + .filter(order -> "0".equals(order.getStatus())) + .count(); + // 未闭环且超时的工单(status ≠ "4" 且 isTimeOut = "1") + int novertimeOrdersTotal = (int) serviceWorkOrdersList.stream() + .filter(order -> !"4".equals(order.getStatus()) && "1".equals(order.getIsTimeOut())) + .count(); - new ServeceCustomerCountVo() + // 处理中工单(status = "3") + int inHandOrdersTotal = (int) serviceWorkOrdersList.stream() + .filter(order -> "3".equals(order.getStatus())) + .count(); + + // 当前月份(格式:2025-07) + String currentMonth = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM")); + + // 当月工单数(创建时间在当月) + int monthOrdersTotal = (int) serviceWorkOrdersList.stream() + .filter(order -> currentMonth.equals(order.getCreateTime())) + .count(); + + // 当月超时工单数(isTimeOut = "1" 且创建时间在当月) + int outTimeOrdersTotal = (int) serviceWorkOrdersList.stream() + .filter(order -> "1".equals(order.getIsTimeOut()) && currentMonth.equals(order.getCreateTime())) + .count(); + + // 计算当月工单超时率(保留两位小数) + double novertimeOrdersRate = monthOrdersTotal == 0 ? 0.0 : + (double) outTimeOrdersTotal / monthOrdersTotal * 100; + + // 满意数(假设 satisfactionLevel >= 4 表示满意) + int satisfaction = (int) serviceWorkOrdersList.stream() + .filter(order -> order.getServiceEvalua() != null && order.getServiceEvalua()>= 4) + .count(); + + // 当月满意度(当月工单中满意的占比) + int monthSatisfactionCount = (int) serviceWorkOrdersList.stream() + .filter(order -> currentMonth.equals(order.getCreateTime()) + && order.getServiceEvalua() != null + && order.getServiceEvalua() >= 4) + .count(); + + double monthoSatisfaction = monthOrdersTotal == 0 ? 0.0 : + (double) monthSatisfactionCount / monthOrdersTotal * 100; + + return new ServeceCustomerCountVo() .setWorkOrdersTotal(workOrdersTotal) .setNotWorkOrdersTotal(notWorkOrdersTotal) .setNovertimeOrdersTotal(novertimeOrdersTotal) - .setInHandOrdersTotal(inHandOrdersTotal); - - return null; + .setInHandOrdersTotal(inHandOrdersTotal) + .setNovertimeOrdersRate(novertimeOrdersRate) + .setMonthOrdersTotal(monthOrdersTotal) + .setOutTimeOrdersTotal(outTimeOrdersTotal) + .setMonthoSatisfaction(monthoSatisfaction) + .setSatisfaction(satisfaction); } } diff --git a/ruoyi-modules/Property/src/main/resources/mapper/Property/CustomerContingenPlanMapper.xml b/ruoyi-modules/Property/src/main/resources/mapper/Property/CustomerContingenPlanMapper.xml new file mode 100644 index 00000000..dafde607 --- /dev/null +++ b/ruoyi-modules/Property/src/main/resources/mapper/Property/CustomerContingenPlanMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/ruoyi-modules/Property/src/main/resources/mapper/Property/CustomerFeedbacksMapper.xml b/ruoyi-modules/Property/src/main/resources/mapper/Property/CustomerFeedbacksMapper.xml new file mode 100644 index 00000000..47677315 --- /dev/null +++ b/ruoyi-modules/Property/src/main/resources/mapper/Property/CustomerFeedbacksMapper.xml @@ -0,0 +1,7 @@ + + + + +