Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.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.MeetParticipantsBo;
|
||||
import org.dromara.property.domain.vo.MeetParticipantsVo;
|
||||
import org.dromara.property.service.IMeetParticipantsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 会议室参会记录
|
||||
* 前端访问路由地址为:/property/participants
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-09-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/participants")
|
||||
public class MeetParticipantsController extends BaseController {
|
||||
|
||||
private final IMeetParticipantsService meetParticipantsService;
|
||||
|
||||
/**
|
||||
* 查询会议室参会记录列表
|
||||
*/
|
||||
//@SaCheckPermission("property:participants:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MeetParticipantsVo> list(MeetParticipantsBo bo, PageQuery pageQuery) {
|
||||
return meetParticipantsService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取会议室参会记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:participants:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MeetParticipantsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(meetParticipantsService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议室参会记录
|
||||
*/
|
||||
@SaCheckPermission("property:participants:add")
|
||||
@Log(title = "会议室参会记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MeetParticipantsBo bo) {
|
||||
return toAjax(meetParticipantsService.insertByBo(bo));
|
||||
}
|
||||
}
|
@@ -2,22 +2,21 @@ package org.dromara.property.controller.mobile;
|
||||
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
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.InspectionTaskDetailBo;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionPointVo;
|
||||
import org.dromara.property.service.IInspectionPointService;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionTaskDetailVo;
|
||||
import org.dromara.property.service.IInspectionTaskDetailService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author yuyongle
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @description: 移动端巡检点任务
|
||||
* @date 2025/9/1 17:13
|
||||
*/
|
||||
@Validated
|
||||
@@ -30,7 +29,23 @@ public class MInspectionTaskDetailController extends BaseController {
|
||||
* 查询巡检点列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MInspectionPointVo> list(InspectionTaskDetailBo bo, PageQuery pageQuery) {
|
||||
public TableDataInfo<MInspectionTaskDetailVo> list(InspectionTaskDetailBo bo, PageQuery pageQuery) {
|
||||
return inspectionTaskDetailService.mQueryPageList(bo,pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改巡检明细
|
||||
*/
|
||||
@PostMapping("/signIn")
|
||||
public R<Void> signIn(@Validated(EditGroup.class) @RequestBody InspectionTaskDetailBo bo) {
|
||||
return toAjax(inspectionTaskDetailService.signIn(bo));
|
||||
}
|
||||
/**
|
||||
* 提交巡检明细
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
public R<Void> submit(@Validated(EditGroup.class) @RequestBody InspectionTaskDetailBo bo) {
|
||||
return toAjax(inspectionTaskDetailService.submit(bo));
|
||||
}
|
||||
}
|
||||
|
@@ -36,7 +36,10 @@ public class InspectionPoint extends TenantEntity {
|
||||
* 巡检点名称
|
||||
*/
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 巡检位置
|
||||
*/
|
||||
private String inspectionLocation;
|
||||
/**
|
||||
* 巡检点类型
|
||||
*/
|
||||
|
@@ -29,6 +29,10 @@ public class InspectionTask extends TenantEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
|
@@ -55,6 +55,10 @@ public class InspectionTaskDetail extends TenantEntity {
|
||||
* 签到类型(1.现场拍照、2.摄像头签到、3.现场扫码)
|
||||
*/
|
||||
private String signType;
|
||||
/**
|
||||
* 实际签到状态(0未签到1.已签到)
|
||||
*/
|
||||
private String actualSignState;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
|
@@ -0,0 +1,55 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import net.sf.jsqlparser.util.validation.metadata.DatabaseException;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会议室参会记录对象 meet_participants
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-09-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("meet_participants")
|
||||
public class MeetParticipants extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会议室id
|
||||
*/
|
||||
private Long meetBookId;
|
||||
|
||||
/**
|
||||
* 入驻人员id
|
||||
*/
|
||||
private Long residentPersonId;
|
||||
/**
|
||||
* 签到状态
|
||||
*/
|
||||
private String signState;
|
||||
/**
|
||||
* 签到时间
|
||||
*/
|
||||
private Date signTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
}
|
@@ -58,6 +58,18 @@ public class TbBuilding extends TenantEntity {
|
||||
* 电梯数量
|
||||
*/
|
||||
private Integer elevatorCount;
|
||||
/**
|
||||
* 建筑面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 公摊面积(平方米)
|
||||
*/
|
||||
private Float sharedArea;
|
||||
|
||||
/**
|
||||
* 竣工日期
|
||||
|
@@ -56,7 +56,18 @@ public class TbFloor extends TenantEntity {
|
||||
* 楼层类型
|
||||
*/
|
||||
private Integer floorType;
|
||||
|
||||
/**
|
||||
* 建筑面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 公摊面积(平方米)
|
||||
*/
|
||||
private Float sharedArea;
|
||||
/**
|
||||
* 房间数量
|
||||
*/
|
||||
|
@@ -43,7 +43,11 @@ public class InspectionPointBo extends BaseEntity {
|
||||
*/
|
||||
@NotBlank(message = "巡检点类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String pointType;
|
||||
|
||||
/**
|
||||
* 巡检位置
|
||||
*/
|
||||
@NotBlank(message = "巡检位置不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String inspectionLocation;
|
||||
/**
|
||||
* nfc编码
|
||||
*/
|
||||
|
@@ -0,0 +1,57 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MeetParticipants;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 会议室参会记录业务对象 meet_participants
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-09-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MeetParticipants.class, reverseConvertGenerate = false)
|
||||
public class MeetParticipantsBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会议室预约id
|
||||
*/
|
||||
@NotNull(message = "会议室预约不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long meetBookId;
|
||||
|
||||
/**
|
||||
* 入驻人员id
|
||||
*/
|
||||
@NotNull(message = "入驻人员id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long residentPersonId;
|
||||
/**
|
||||
* 签到状态
|
||||
*/
|
||||
private String signState;
|
||||
/**
|
||||
* 签到时间
|
||||
*/
|
||||
private Date signTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -45,7 +45,18 @@ public class TbBuildingBo extends BaseEntity {
|
||||
* 总层数
|
||||
*/
|
||||
private Integer floorCount;
|
||||
|
||||
/**
|
||||
* 建筑面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 公摊面积(平方米)
|
||||
*/
|
||||
private Float sharedArea;
|
||||
/**
|
||||
* 单元数
|
||||
*/
|
||||
|
@@ -42,7 +42,18 @@ public class TbFloorBo extends BaseEntity {
|
||||
*/
|
||||
@NotNull(message = "楼层号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer floorNumber;
|
||||
|
||||
/**
|
||||
* 建筑面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 公摊面积(平方米)
|
||||
*/
|
||||
private Float sharedArea;
|
||||
/**
|
||||
* 楼层类型
|
||||
*/
|
||||
|
@@ -48,7 +48,10 @@ public class InspectionPointVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点名称")
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 巡检位置
|
||||
*/
|
||||
private String inspectionLocation;
|
||||
/**
|
||||
* 巡检点类型
|
||||
*/
|
||||
|
@@ -43,24 +43,43 @@ public class InspectionTaskDetailVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "任务id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 任务text
|
||||
*/
|
||||
@ExcelProperty(value = "任务text")
|
||||
private String taskText;
|
||||
/**
|
||||
* 路线id
|
||||
*/
|
||||
@ExcelProperty(value = "路线id")
|
||||
private Long routeId;
|
||||
/**
|
||||
* 路线text
|
||||
*/
|
||||
@ExcelProperty(value = "路线text")
|
||||
private String routeText;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检计划id")
|
||||
private Long planId;
|
||||
/**
|
||||
* 巡检计划text
|
||||
*/
|
||||
@ExcelProperty(value = " 巡检计划text")
|
||||
private Long planText;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点id")
|
||||
private Long pointId;
|
||||
/**
|
||||
* 巡检点text
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点text")
|
||||
private Long pointText;
|
||||
|
||||
/**
|
||||
* 签到类型(1.现场拍照、2.摄像头签到、3.现场扫码)
|
||||
@@ -102,12 +121,22 @@ public class InspectionTaskDetailVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "计划巡检人")
|
||||
private String planInspectionPerson;
|
||||
/**
|
||||
* 计划巡检人text
|
||||
*/
|
||||
@ExcelProperty(value = "计划巡检人Text")
|
||||
private String planInspectionPersonText;
|
||||
|
||||
/**
|
||||
* 实际巡检人
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检人")
|
||||
private String actualInspectionPerson;
|
||||
/**
|
||||
* 实际巡检人Text
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检人Text")
|
||||
private String actualInspectionPersonText;
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
|
@@ -0,0 +1,60 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.MeetParticipants;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 会议室参会记录视图对象 meet_participants
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-09-03
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MeetParticipants.class)
|
||||
public class MeetParticipantsVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会议室预约id
|
||||
*/
|
||||
private Long meetBookId;
|
||||
/**
|
||||
* 入驻人员id
|
||||
*/
|
||||
private Long residentPersonId;
|
||||
/**
|
||||
* 会议室预约记录
|
||||
*/
|
||||
private MeetBookingVo meetBookingVo;
|
||||
/**
|
||||
* 参会人员
|
||||
*/
|
||||
private ResidentPersonVo residentPersonVo;
|
||||
/**
|
||||
* 签到状态
|
||||
*/
|
||||
private String signState;
|
||||
/**
|
||||
* 签到时间
|
||||
*/
|
||||
private Date signTime;
|
||||
}
|
@@ -35,7 +35,10 @@ public class TbBuildingVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "园区编码")
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 园区文本
|
||||
*/
|
||||
private String communityText;
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
@@ -62,7 +65,18 @@ public class TbBuildingVo implements Serializable {
|
||||
|
||||
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "buildType", other = "sis_build_use_type")
|
||||
private String buildTypeName;
|
||||
|
||||
/**
|
||||
* 建筑面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 公摊面积(平方米)
|
||||
*/
|
||||
private Float sharedArea;
|
||||
/**
|
||||
* 电梯数量
|
||||
*/
|
||||
|
@@ -1,5 +1,8 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.property.domain.TbFloor;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
@@ -38,12 +41,20 @@ public class TbFloorVo implements Serializable {
|
||||
* 社区id
|
||||
*/
|
||||
private Long communityId;
|
||||
/**
|
||||
* 社区文本
|
||||
*/
|
||||
private String communityText;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
@ExcelProperty(value = "建筑名称")
|
||||
private Long buildingId;
|
||||
/**
|
||||
* 建筑文本
|
||||
*/
|
||||
private String buildingText;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
@@ -74,7 +85,18 @@ public class TbFloorVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "房间数量")
|
||||
private Integer roomCount;
|
||||
|
||||
/**
|
||||
* 建筑面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 公摊面积(平方米)
|
||||
*/
|
||||
private Float sharedArea;
|
||||
/**
|
||||
* 层高
|
||||
*/
|
||||
|
@@ -1,67 +0,0 @@
|
||||
package org.dromara.property.domain.vo.mobile;
|
||||
|
||||
|
||||
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.InspectionTaskDetail;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author yuyongle
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2025/9/1 16:24
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionTaskDetail.class)
|
||||
public class MInspectionPointVo {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点id")
|
||||
private Long pointId;
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点名称")
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
@ExcelProperty(value = "巡检状态(0未完成,1已完成)")
|
||||
private String inspectionState;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
@ExcelProperty(value = "巡检结果")
|
||||
private String inspectionResults;
|
||||
|
||||
/**
|
||||
* 点开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "点开始时间")
|
||||
private Date pointStartTime;
|
||||
|
||||
/**
|
||||
* 点结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "点结束时间")
|
||||
private Date pointEndTime;
|
||||
}
|
@@ -0,0 +1,161 @@
|
||||
package org.dromara.property.domain.vo.mobile;
|
||||
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.property.domain.InspectionTaskDetail;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author yuyongle
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2025/9/1 16:24
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionTaskDetail.class)
|
||||
public class MInspectionTaskDetailVo {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点id")
|
||||
private Long pointId;
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点名称")
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
@ExcelProperty(value = "巡检状态(0未完成,1已完成)")
|
||||
private String inspectionState;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
@ExcelProperty(value = "巡检结果")
|
||||
private String inspectionResults;
|
||||
|
||||
/**
|
||||
* 点开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "点开始时间")
|
||||
private Date pointStartTime;
|
||||
|
||||
/**
|
||||
* 点结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "点结束时间")
|
||||
private Date pointEndTime;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@ExcelProperty(value = "任务id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 路线id
|
||||
*/
|
||||
@ExcelProperty(value = "路线id")
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检计划id")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 签到类型(1.现场拍照、2.摄像头签到、3.现场扫码)
|
||||
*/
|
||||
@ExcelProperty(value = "签到类型(1.现场拍照、2.摄像头签到、3.现场扫码)")
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检时间")
|
||||
private Date actualInspectionTime;
|
||||
|
||||
/**
|
||||
* 实际签到状态(0未签到1.已签到)
|
||||
*/
|
||||
private String actualSignState;
|
||||
|
||||
/**
|
||||
* 巡检图片
|
||||
*/
|
||||
@ExcelProperty(value = "巡检图片")
|
||||
private String inspectionImage;
|
||||
|
||||
/**
|
||||
* 巡检图片Url
|
||||
*/
|
||||
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "inspectionImage")
|
||||
private String inspectionImageUrl;
|
||||
/**
|
||||
* 计划巡检人
|
||||
*/
|
||||
@ExcelProperty(value = "计划巡检人")
|
||||
private String planInspectionPerson;
|
||||
/**
|
||||
* 计划巡检人文本
|
||||
*/
|
||||
@ExcelProperty(value = "计划巡检人文本")
|
||||
private String planInspectionPersonText;
|
||||
|
||||
/**
|
||||
* 实际巡检人
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检人")
|
||||
private String actualInspectionPerson;
|
||||
/**
|
||||
* 实际巡检人文本
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检人文本")
|
||||
private String actualInspectionPersonText;
|
||||
|
||||
/**
|
||||
* 巡检描述
|
||||
*/
|
||||
@ExcelProperty(value = "巡检描述")
|
||||
private String inspectionDesc;
|
||||
|
||||
/**
|
||||
* 巡检位置
|
||||
*/
|
||||
@ExcelProperty(value = "巡检位置")
|
||||
private String inspectionLocation;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检时间")
|
||||
private Date inspectionTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.MeetParticipants;
|
||||
import org.dromara.property.domain.vo.MeetParticipantsVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 会议室参会记录Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-09-03
|
||||
*/
|
||||
public interface MeetParticipantsMapper extends BaseMapperPlus<MeetParticipants, MeetParticipantsVo> {
|
||||
|
||||
}
|
@@ -3,7 +3,6 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.property.domain.bo.InspectionPointBo;
|
||||
import org.dromara.property.domain.vo.InspectionPointVo;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionPointVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@@ -4,7 +4,7 @@ import org.dromara.property.domain.vo.InspectionTaskDetailVo;
|
||||
import org.dromara.property.domain.bo.InspectionTaskDetailBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionPointVo;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionTaskDetailVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -75,5 +75,16 @@ public interface IInspectionTaskDetailService {
|
||||
* @param pageQuery
|
||||
* @return
|
||||
*/
|
||||
TableDataInfo<MInspectionPointVo> mQueryPageList(InspectionTaskDetailBo bo, PageQuery pageQuery);
|
||||
TableDataInfo<MInspectionTaskDetailVo> mQueryPageList(InspectionTaskDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 巡检明细签到
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
Boolean signIn(InspectionTaskDetailBo bo);
|
||||
/**
|
||||
* 提交巡检明细
|
||||
*/
|
||||
Boolean submit(InspectionTaskDetailBo bo);
|
||||
}
|
||||
|
@@ -0,0 +1,52 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.MeetParticipants;
|
||||
import org.dromara.property.domain.vo.MeetParticipantsVo;
|
||||
import org.dromara.property.domain.bo.MeetParticipantsBo;
|
||||
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 mocheng
|
||||
* @date 2025-09-03
|
||||
*/
|
||||
public interface IMeetParticipantsService {
|
||||
|
||||
/**
|
||||
* 查询会议室参会记录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 会议室参会记录
|
||||
*/
|
||||
MeetParticipantsVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询会议室参会记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 会议室参会记录分页列表
|
||||
*/
|
||||
TableDataInfo<MeetParticipantsVo> queryPageList(MeetParticipantsBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的会议室参会记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 会议室参会记录列表
|
||||
*/
|
||||
List<MeetParticipantsVo> queryList(MeetParticipantsBo bo);
|
||||
|
||||
/**
|
||||
* 新增会议室参会记录
|
||||
*
|
||||
* @param bo 会议室参会记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MeetParticipantsBo bo);
|
||||
}
|
@@ -55,8 +55,10 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
private final InspectionPlanStaffMapper inspectionPlanStaffMapper;
|
||||
private final InspectionRouteMapper inspectionRouteMapper;
|
||||
private final InspectionPointMapper inspectionPointMapper;
|
||||
private final InspectionRoutePointMapper inspectionRoutePointMapper;
|
||||
private final InspectionTaskMapper inspectionTaskMapper;
|
||||
private final InspectionTaskDetailMapper inspectionTaskDetailMapper;
|
||||
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
@@ -227,6 +229,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
if (DateUtil.isIn(today, startDate, endDate) && inspectionDayList.contains(day)) {
|
||||
InspectionTask task = new InspectionTask();
|
||||
task.setInspectionPlanId(p.getId());
|
||||
task.setTaskName(plan.getPlanName()+"的任务");
|
||||
task.setTaskType(plan.getSignType());
|
||||
task.setPlanInsTime(startDate + "~" + p.getEndTime());
|
||||
task.setTenantId(plan.getTenantId());
|
||||
@@ -268,6 +271,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
task.setInspectionPlanId(p.getId());
|
||||
task.setInspectionPlanId(p.getId());
|
||||
task.setTaskType(plan.getSignType());
|
||||
task.setTaskName(plan.getPlanName()+"的任务");
|
||||
task.setPlanInsTime(startDate + "~" + p.getEndTime());
|
||||
task.setTenantId(plan.getTenantId());
|
||||
task.setStatus("0");
|
||||
@@ -275,7 +279,6 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
String userIds = inspectionPlanStaffVos.stream().map(vo -> vo.getUserId().toString()).collect(Collectors.joining(","));
|
||||
|
||||
String userNames = inspectionPlanStaffVos.stream().map(InspectionPlanStaffVo::getUserName).collect(Collectors.joining(","));
|
||||
|
||||
task.setPlanUserId(userIds);
|
||||
task.setPlanUserName(userNames);
|
||||
} else {
|
||||
@@ -301,13 +304,28 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
Assert.isTrue(CollUtil.isNotEmpty(inspectionRoutePointVoList), "该计划路线没有关联的巡检点");
|
||||
//收集巡检点id
|
||||
List<Long> pointIds = inspectionRoutePointVoList.stream().map(vo -> vo.getPointId()).toList();
|
||||
List<InspectionRoutePointVo> inspectionRoutePointVos = inspectionRoutePointMapper.selectVoByIds(pointIds);
|
||||
Assert.isTrue(CollUtil.isNotEmpty(inspectionRoutePointVos), "未找到巡检点");
|
||||
inspectionRoutePointVos.forEach(vo -> {
|
||||
List<InspectionPointVo> inspectionPointVos = inspectionPointMapper.selectVoByIds(pointIds);
|
||||
Assert.isTrue(CollUtil.isNotEmpty(inspectionPointVos), "未找到巡检点");
|
||||
//根据计划id查询计划巡检人
|
||||
List<InspectionPlanStaffVo> inspectionPlanStaffVos = inspectionPlanStaffMapper.selectVoList(
|
||||
new LambdaQueryWrapper<InspectionPlanStaff>()
|
||||
.eq(InspectionPlanStaff::getInspectionPlanId, plan.getId())
|
||||
);
|
||||
//收集userId为以,分隔
|
||||
String userIds = inspectionPlanStaffVos.stream().map(vo -> vo.getUserId().toString()).collect(Collectors.joining(","));
|
||||
//查询用户姓名用,分割
|
||||
// String nickname = remoteUserService.selectNicknameByIds(userIds);
|
||||
|
||||
inspectionPointVos.forEach(vo -> {
|
||||
InspectionTaskDetail taskDetail = new InspectionTaskDetail();
|
||||
taskDetail.setTaskId(task.getId());
|
||||
taskDetail.setRouteId(vo.getRouteId());
|
||||
taskDetail.setPointId(vo.getPointId());
|
||||
taskDetail.setRouteId(plan.getInspectionRouteId());
|
||||
taskDetail.setPointId(vo.getId());
|
||||
taskDetail.setPlanId(plan.getId());
|
||||
taskDetail.setInspectionState("0");
|
||||
taskDetail.setSignType(plan.getSignType());
|
||||
taskDetail.setInspectionLocation(vo.getInspectionLocation());
|
||||
taskDetail.setPlanInspectionPerson(userIds);
|
||||
// 分割
|
||||
String[] parts = StrUtil.splitToArray(task.getPlanInsTime(), '~');
|
||||
String dateTimeStr1 = parts[0]; // 完整时间
|
||||
@@ -321,6 +339,9 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
Date endDate = DateUtil.parse(dateTimeStr2, DatePattern.NORM_DATETIME_FORMAT);
|
||||
taskDetail.setPointStartTime(startDate);
|
||||
taskDetail.setPointEndTime(endDate);
|
||||
taskDetail.setActualSignState("0");
|
||||
taskDetail.setInspectionLocation(vo.getInspectionLocation());
|
||||
inspectionTaskDetailMapper.insert(taskDetail);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -11,13 +11,10 @@ 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.InspectionPlanStaff;
|
||||
import org.dromara.property.domain.InspectionPoint;
|
||||
import org.dromara.property.domain.bo.InspectionPointBo;
|
||||
import org.dromara.property.domain.vo.InspectionItemVo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.vo.InspectionPointVo;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionPointVo;
|
||||
import org.dromara.property.mapper.InspectionItemMapper;
|
||||
import org.dromara.property.mapper.InspectionPlanMapper;
|
||||
import org.dromara.property.mapper.InspectionPointMapper;
|
||||
@@ -25,7 +22,6 @@ import org.dromara.property.service.IInspectionPointService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
@@ -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.ObjectUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -12,20 +13,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.InspectionPointVo;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionPointVo;
|
||||
import org.dromara.property.mapper.InspectionPointMapper;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.property.domain.vo.*;
|
||||
import org.dromara.property.domain.vo.mobile.MInspectionTaskDetailVo;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.dromara.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.InspectionTaskDetailBo;
|
||||
import org.dromara.property.domain.vo.InspectionTaskDetailVo;
|
||||
import org.dromara.property.domain.InspectionTaskDetail;
|
||||
import org.dromara.property.mapper.InspectionTaskDetailMapper;
|
||||
import org.dromara.property.service.IInspectionTaskDetailService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -41,6 +41,9 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
|
||||
private final InspectionTaskDetailMapper baseMapper;
|
||||
private final InspectionPointMapper inspectionPointMapper;
|
||||
private final InspectionPlanMapper inspectionPlanMapper;
|
||||
private final InspectionRouteMapper inspectionRouteMapper;
|
||||
private final InspectionTaskMapper inspectionTaskMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检明细
|
||||
@@ -49,7 +52,7 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
* @return 巡检明细
|
||||
*/
|
||||
@Override
|
||||
public InspectionTaskDetailVo queryById(Long id){
|
||||
public InspectionTaskDetailVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@@ -64,9 +67,38 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
public TableDataInfo<InspectionTaskDetailVo> queryPageList(InspectionTaskDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionTaskDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionTaskDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
if (CollUtil.isNotEmpty(result.getRecords())) {
|
||||
//收集任务id为list
|
||||
List<Long> taskIds = result.getRecords().stream().map(InspectionTaskDetailVo::getTaskId).toList();
|
||||
//收集任务为map id和名称
|
||||
Map<Long, String> taskNameMap = inspectionTaskMapper.selectVoByIds(taskIds).stream()
|
||||
.collect(Collectors.toMap(InspectionTaskVo::getId, InspectionTaskVo::getPlanName));
|
||||
//收集路线id为list
|
||||
List<Long> routeIds = result.getRecords().stream().map(InspectionTaskDetailVo::getRouteId).toList();
|
||||
//收集任务为map id和名称
|
||||
Map<Long, String> routeNameMap = inspectionRouteMapper.selectVoByIds(routeIds).stream()
|
||||
.collect(Collectors.toMap(InspectionRouteVo::getId, InspectionRouteVo::getRouteName));
|
||||
//收集路线列表
|
||||
List<InspectionRouteVo> inspectionRoutes = inspectionRouteMapper.selectVoByIds(routeIds);
|
||||
//收集计划id为list
|
||||
List<Long> planIds = result.getRecords().stream().map(InspectionTaskDetailVo::getPlanId).toList();
|
||||
//收集计划列表
|
||||
Map<Long, String> planNameMap = inspectionPlanMapper.selectVoByIds(routeIds).stream()
|
||||
.collect(Collectors.toMap(InspectionPlanVo::getId, InspectionPlanVo::getPlanName));
|
||||
//巡检点id为list
|
||||
List<Long> pointIds = result.getRecords().stream().map(InspectionTaskDetailVo::getPointId).toList();
|
||||
result.getRecords().stream().forEach(vo -> {
|
||||
disposeData(vo);
|
||||
});
|
||||
}
|
||||
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private void disposeData(InspectionTaskDetailVo vo) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检明细列表
|
||||
*
|
||||
@@ -110,6 +142,7 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(InspectionTaskDetailBo bo) {
|
||||
InspectionTaskDetail add = MapstructUtils.convert(bo, InspectionTaskDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
@@ -127,6 +160,7 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(InspectionTaskDetailBo bo) {
|
||||
InspectionTaskDetail update = MapstructUtils.convert(bo, InspectionTaskDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
@@ -136,7 +170,7 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionTaskDetail entity){
|
||||
private void validEntityBeforeSave(InspectionTaskDetail entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@@ -148,13 +182,15 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
//移动端
|
||||
|
||||
/**
|
||||
* APP端查询巡检明细列表
|
||||
*
|
||||
@@ -163,25 +199,25 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MInspectionPointVo> mQueryPageList(InspectionTaskDetailBo bo, PageQuery pageQuery) {
|
||||
public TableDataInfo<MInspectionTaskDetailVo> mQueryPageList(InspectionTaskDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionTaskDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionTaskDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
// 转换 VO 类型
|
||||
List<MInspectionPointVo> mInspectionTaskDetailVo=new ArrayList<>();
|
||||
List<MInspectionTaskDetailVo> mInspectionTaskDetailVo = new ArrayList<>();
|
||||
// 转换并设置 typeName
|
||||
if(CollUtil.isNotEmpty(result.getRecords())){
|
||||
if (CollUtil.isNotEmpty(result.getRecords())) {
|
||||
//收集巡检点id
|
||||
List<Long> pointIdList = result.getRecords().stream().map(InspectionTaskDetailVo::getPointId).collect(Collectors.toList());
|
||||
//查询巡检点转成巡检点名称转成map id->名称
|
||||
//查询巡检点转成巡检点名称转成map id->名称
|
||||
Map<Long, String> pointNameMap = inspectionPointMapper.selectVoByIds(pointIdList).stream().collect(Collectors.toMap(InspectionPointVo::getId, InspectionPointVo::getPointName));
|
||||
mInspectionTaskDetailVo = result.getRecords().stream().map(vo -> {
|
||||
MInspectionPointVo mVo = BeanUtil.copyProperties(vo, MInspectionPointVo.class);
|
||||
dataProcessing(mVo,pointNameMap);
|
||||
MInspectionTaskDetailVo mVo = BeanUtil.copyProperties(vo, MInspectionTaskDetailVo.class);
|
||||
dataProcessing(mVo, pointNameMap);
|
||||
return mVo;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
// 构建分页结果
|
||||
Page<MInspectionPointVo> pageResult = new Page<>();
|
||||
Page<MInspectionTaskDetailVo> pageResult = new Page<>();
|
||||
pageResult.setRecords(mInspectionTaskDetailVo);
|
||||
pageResult.setTotal(result.getTotal());
|
||||
pageResult.setCurrent(result.getCurrent());
|
||||
@@ -190,11 +226,62 @@ public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailSer
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
*
|
||||
* @param mInspectionTaskDetailVo
|
||||
* @param pointNameMap
|
||||
*/
|
||||
private void dataProcessing(MInspectionPointVo mInspectionTaskDetailVo, Map<Long, String> pointNameMap){
|
||||
mInspectionTaskDetailVo.setPointName( ObjectUtil.defaultIfNull(pointNameMap.get(mInspectionTaskDetailVo.getPointId()), "未知点位"));
|
||||
private void dataProcessing(MInspectionTaskDetailVo mInspectionTaskDetailVo, Map<Long, String> pointNameMap) {
|
||||
mInspectionTaskDetailVo.setPointName(ObjectUtil.defaultIfNull(pointNameMap.get(mInspectionTaskDetailVo.getPointId()), "未知点位"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检明细签到
|
||||
*
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean signIn(InspectionTaskDetailBo bo) {
|
||||
//查询巡检明细
|
||||
InspectionTaskDetail inspectionTaskDetail = baseMapper.selectById(bo.getId());
|
||||
String planInspectionPerson = inspectionTaskDetail.getPlanInspectionPerson();
|
||||
|
||||
// 将逗号分隔的字符串转换为Long类型的List
|
||||
List<Long> planInspectionPersonIds = Collections.emptyList();
|
||||
if (StringUtils.isNotBlank(planInspectionPerson)) {
|
||||
planInspectionPersonIds = Arrays.stream(planInspectionPerson.split(","))
|
||||
.map(String::trim)
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.map(Long::valueOf)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
Assert.isTrue(inspectionTaskDetail.getActualSignState().equals("0"), "该巡检点已签到,请勿重复签到");
|
||||
bo.setPointStartTime(new Date());
|
||||
bo.setActualSignState("1");
|
||||
//当前登录用户id
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
Assert.isTrue(planInspectionPersonIds.contains(loginUser.getUserId()), "当前签到人不在计划巡检人列表内");
|
||||
bo.setActualInspectionPerson(loginUser.getUserId().toString());
|
||||
InspectionTaskDetail update = MapstructUtils.convert(bo, InspectionTaskDetail.class);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交巡检明细
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submit(InspectionTaskDetailBo bo) {
|
||||
//查询巡检明细
|
||||
InspectionTaskDetail inspectionTaskDetail = baseMapper.selectById(bo.getId());
|
||||
Assert.isTrue(inspectionTaskDetail.getInspectionState().equals("0"), "该巡检点已巡检,请勿重复提交");
|
||||
bo.setInspectionState("1");
|
||||
bo.setPointEndTime(new Date());
|
||||
bo.setInspectionState("1");
|
||||
InspectionTaskDetail update = MapstructUtils.convert(bo, InspectionTaskDetail.class);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,158 @@
|
||||
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.bo.MeetBookingBo;
|
||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||
import org.dromara.property.domain.vo.ResidentPersonVo;
|
||||
import org.dromara.property.domain.vo.ResidentUnitVo;
|
||||
import org.dromara.property.mapper.MeetBookingMapper;
|
||||
import org.dromara.property.mapper.ResidentPersonMapper;
|
||||
import org.dromara.property.mapper.ResidentUnitMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.MeetParticipantsBo;
|
||||
import org.dromara.property.domain.vo.MeetParticipantsVo;
|
||||
import org.dromara.property.domain.MeetParticipants;
|
||||
import org.dromara.property.mapper.MeetParticipantsMapper;
|
||||
import org.dromara.property.service.IMeetParticipantsService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 会议室参会记录Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-09-03
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MeetParticipantsServiceImpl implements IMeetParticipantsService {
|
||||
|
||||
private final MeetParticipantsMapper baseMapper;
|
||||
private final MeetBookingMapper meetBookingMapper;
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
private final ResidentUnitMapper residentUnitMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询会议室参会记录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 会议室参会记录
|
||||
*/
|
||||
@Override
|
||||
public MeetParticipantsVo queryById(Long id) {
|
||||
MeetParticipantsVo meetParticipantsVo = baseMapper.selectVoById(id);
|
||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetParticipantsVo.getResidentPersonId());
|
||||
MeetBookingVo meetBookingVo = meetBookingMapper.selectVoById(meetParticipantsVo.getMeetBookId());
|
||||
meetParticipantsVo.setResidentPersonVo(ObjectUtil.isNotEmpty(residentPersonVo)?residentPersonVo:null);
|
||||
meetParticipantsVo.setMeetBookingVo(ObjectUtil.isNotEmpty(meetBookingVo)?meetBookingVo:null);
|
||||
return meetParticipantsVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询会议室参会记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 会议室参会记录分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MeetParticipantsVo> queryPageList(MeetParticipantsBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MeetParticipants> lqw = buildQueryWrapper(bo);
|
||||
Page<MeetParticipantsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
if (CollUtil.isNotEmpty(result.getRecords())) {
|
||||
//将会议室id和入驻人员id收集
|
||||
List<Long> meetIds = result.getRecords().stream().map(MeetParticipantsVo::getMeetBookId).distinct().toList();
|
||||
List<Long> residentPersonIds = result.getRecords().stream().map(MeetParticipantsVo::getResidentPersonId).distinct().toList();
|
||||
List<ResidentPersonVo> residentPersonVos = residentPersonMapper.selectVoByIds(residentPersonIds);
|
||||
List<MeetBookingVo> meetBookingVos = meetBookingMapper.selectVoByIds(meetIds);
|
||||
handData(residentPersonVos, meetBookingVos);
|
||||
//处理数据
|
||||
result.getRecords().forEach(s -> {
|
||||
s.setMeetBookingVo(meetBookingVos.stream().filter(vo -> vo.getId().equals(s.getMeetBookId())).findFirst().orElse(null));
|
||||
s.setResidentPersonVo(residentPersonVos.stream().filter(vo -> vo.getId().equals(s.getResidentPersonId())).findFirst().orElse(null));
|
||||
});
|
||||
}
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
/**
|
||||
* 处理数据
|
||||
*/
|
||||
private void handData(List<ResidentPersonVo> residentPersonVos ,List<MeetBookingVo> meetBookingVos){
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<ResidentPersonVo> residentPersonVoList = residentPersonMapper.selectVoList();
|
||||
meetBookingVos.stream().forEach(s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(ObjectUtil.isNotEmpty(residentUnitVo) ? residentUnitVo.getName() : null);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(residentPersonVoList)) {
|
||||
ResidentPersonVo residentPersonVo = residentPersonVoList.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getUserName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getPhone() : null);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询符合条件的会议室参会记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 会议室参会记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<MeetParticipantsVo> queryList(MeetParticipantsBo bo) {
|
||||
LambdaQueryWrapper<MeetParticipants> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MeetParticipants> buildQueryWrapper(MeetParticipantsBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MeetParticipants> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MeetParticipants::getId);
|
||||
lqw.eq(bo.getMeetBookId() != null, MeetParticipants::getMeetBookId, bo.getMeetBookId());
|
||||
lqw.eq(bo.getResidentPersonId() != null, MeetParticipants::getResidentPersonId, bo.getResidentPersonId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MeetParticipants::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议室参会记录
|
||||
*
|
||||
* @param bo 会议室参会记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MeetParticipantsBo bo) {
|
||||
MeetParticipants add = MapstructUtils.convert(bo, MeetParticipants.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MeetParticipants entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
}
|
@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 建筑Service业务层处理
|
||||
@@ -60,6 +61,13 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
public TableDataInfo<TbBuildingVo> queryPageList(TbBuildingBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbBuilding> lqw = buildQueryWrapper(bo);
|
||||
Page<TbBuildingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
//收集社区id
|
||||
List<Long> communityIds = result.getRecords().stream().map(TbBuildingVo::getCommunityId).toList();
|
||||
//查询社区名称map
|
||||
Map<Long, String> communityMap = communityMapper.selectVoByIds(communityIds).stream().collect(Collectors.toMap(TbCommunityVo::getId, TbCommunityVo::getCommunityName));
|
||||
result.getRecords().forEach(s->{
|
||||
s.setCommunityText(communityMap.get(s.getCommunityId()));
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import aj.org.objectweb.asm.Handle;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@@ -10,12 +12,18 @@ 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.TbCommunity;
|
||||
import org.dromara.property.domain.TbE8Config;
|
||||
import org.dromara.property.domain.TbFloor;
|
||||
import org.dromara.property.domain.bo.TbFloorBo;
|
||||
import org.dromara.property.domain.vo.InspectionPointVo;
|
||||
import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
import org.dromara.property.domain.vo.TbCommunityVo;
|
||||
import org.dromara.property.domain.vo.TbFloorVo;
|
||||
import org.dromara.property.mapper.TbBuildingMapper;
|
||||
import org.dromara.property.mapper.TbCommunityMapper;
|
||||
import org.dromara.property.mapper.TbFloorMapper;
|
||||
import org.dromara.property.mapper.TbRoomMapper;
|
||||
import org.dromara.property.service.ITbBuildingService;
|
||||
import org.dromara.property.service.ITbFloorService;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
@@ -23,8 +31,10 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 楼层Service业务层处理
|
||||
@@ -40,6 +50,8 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
private final TbFloorMapper baseMapper;
|
||||
private final ITbUnitService tbUnitService;
|
||||
private final ITbBuildingService iTbBuildingService;
|
||||
private final TbBuildingMapper tbBuildingMapper;
|
||||
private final TbCommunityMapper tbCommunityMapper;
|
||||
|
||||
/**
|
||||
* 查询楼层
|
||||
@@ -63,9 +75,29 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
public TableDataInfo<TbFloorVo> queryPageList(TbFloorBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbFloor> lqw = buildQueryWrapper(bo);
|
||||
Page<TbFloorVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
if (CollUtil.isNotEmpty(result.getRecords())) {
|
||||
//收集园区id
|
||||
List<Long> communityIds = result.getRecords().stream().map(TbFloorVo::getCommunityId).toList();
|
||||
//查询园区为map
|
||||
Map<Long, String> pointNameMap = tbCommunityMapper.selectVoByIds(communityIds).stream().collect(Collectors.toMap(TbCommunityVo::getId, TbCommunityVo::getCommunityName));
|
||||
|
||||
|
||||
//收集建筑id
|
||||
List<Long> buildingIds = result.getRecords().stream().map(TbFloorVo::getBuildingId).toList();
|
||||
//查询建筑为map
|
||||
Map<Long, String> buildingNameMap = tbBuildingMapper.selectVoByIds(buildingIds).stream().collect(Collectors.toMap(TbBuildingVo::getId, TbBuildingVo::getBuildingName));
|
||||
result.getRecords().stream().forEach(s -> {
|
||||
handleData(s, pointNameMap, buildingNameMap);
|
||||
});
|
||||
}
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private void handleData(TbFloorVo floorVo, Map<Long, String> pointNameMap, Map<Long, String> buildingNameMap) {
|
||||
floorVo.setCommunityText(pointNameMap.get(floorVo.getCommunityId()));
|
||||
floorVo.setBuildingText(buildingNameMap.get(floorVo.getBuildingId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的楼层列表
|
||||
*
|
||||
@@ -85,7 +117,7 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
.orderByDesc(TbFloor::getUpdateTime);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFloorName()), TbFloor::getFloorName, bo.getFloorName());
|
||||
lqw.eq(bo.getFloorNumber() != null, TbFloor::getFloorNumber, bo.getFloorNumber());
|
||||
lqw.eq(bo.getBuildingId()!= null, TbFloor::getUnitId, bo.getBuildingId());
|
||||
lqw.eq(bo.getBuildingId() != null, TbFloor::getUnitId, bo.getBuildingId());
|
||||
lqw.eq(bo.getFloorType() != null, TbFloor::getFloorType, bo.getFloorType());
|
||||
lqw.eq(bo.getRoomCount() != null, TbFloor::getRoomCount, bo.getRoomCount());
|
||||
lqw.eq(bo.getFloorHeight() != null, TbFloor::getFloorHeight, bo.getFloorHeight());
|
||||
|
Reference in New Issue
Block a user