This commit is contained in:
dzc committed 2025-05-20 17:37:20 +08:00
commit 86b6ccd66c
11 files changed
+402 -4

No files matched your search

@@ -145,4 +145,8 @@ public interface CacheConstants {
String THIRDPARTY_ZY_SELF_TOKEN = "thirdparty:zy:self_token:";
/* ************************************* end 第三方对接相关 end ************************************* */
/** mfa */
String SMS_CODE_KEY="sms_code:";
}
@@ -0,0 +1,58 @@
package com.bsd.pjcloud.integrated.vo.lostandfound.app;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
@Data
public class LostAndFoundPageVo {
/**
* id
*/
@Schema(description="id")
private Long id;
/**
* 标题
*/
@Schema(description="标题")
private String title;
/**
* 图片
*/
@Schema(description="图片")
private String picUrl;
/**
* 描述
*/
@Schema(description="描述")
private String description;
/**
* 发现日期
*/
@Schema(description="发现日期")
private LocalDate dateFound;
/**
* 发现地点
*/
@Schema(description="发现地点")
private String location;
/**
* 状态
*/
@Schema(description="状态")
private String status;
}
@@ -6,11 +6,13 @@ import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.core.util.BeanUtils;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.log.annotation.SysLog;
import com.bsd.pjcloud.common.security.util.SecurityUtils;
import com.bsd.pjcloud.integrated.entity.LostAndFoundEntity;
import com.bsd.pjcloud.integrated.service.LostAndFoundService;
import com.bsd.pjcloud.integrated.vo.lostandfound.app.LostAndFoundPageVo;
import org.springframework.security.access.prepost.PreAuthorize;
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
@@ -49,7 +51,6 @@ public class LostAndFoundController {
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('integrated_lostAndFound_view')" )
public R getLostAndFoundPage(@ParameterObject Page page, @ParameterObject LostAndFoundEntity lostAndFound) {
lostAndFound.setDeptId(SecurityUtils.getUser().getDeptId());
LambdaQueryWrapper<LostAndFoundEntity> wrapper = Wrappers.lambdaQuery();
wrapper.like(StrUtil.isNotBlank(lostAndFound.getTitle()),LostAndFoundEntity::getTitle,lostAndFound.getTitle());
wrapper.eq(StrUtil.isNotBlank(lostAndFound.getStatus()),LostAndFoundEntity::getStatus,lostAndFound.getStatus());
@@ -79,6 +80,7 @@ public class LostAndFoundController {
@PostMapping
@PreAuthorize("@pms.hasPermission('integrated_lostAndFound_add')" )
public R save(@RequestBody LostAndFoundEntity lostAndFound) {
lostAndFound.setDeptId(SecurityUtils.getUser().getDeptId());
return R.ok(lostAndFoundService.save(lostAndFound));
}
@@ -121,4 +123,30 @@ public class LostAndFoundController {
public List<LostAndFoundEntity> export(LostAndFoundEntity lostAndFound,Long[] ids) {
return lostAndFoundService.list(Wrappers.lambdaQuery(lostAndFound).in(ArrayUtil.isNotEmpty(ids), LostAndFoundEntity::getId, ids));
}
/**-------------------------------APP--------------------------*/
/**
* app分页查询
* @param page 分页对象
* @param lostAndFound 失物招领
* @return
*/
@Operation(summary = "失物招领app分页查询" , description = "物招领app分页查询" )
@GetMapping("/app/page" )
public R getLostAndFoundAppPage(@ParameterObject Page page, @ParameterObject LostAndFoundEntity lostAndFound) {
LambdaQueryWrapper<LostAndFoundEntity> wrapper = Wrappers.lambdaQuery();
wrapper.like(StrUtil.isNotBlank(lostAndFound.getTitle()),LostAndFoundEntity::getTitle,lostAndFound.getTitle());
Page<LostAndFoundEntity> pageData = lostAndFoundService.page(page, wrapper);
List<LostAndFoundEntity> records = pageData.getRecords();
Page<LostAndFoundPageVo> lostAndFoundPageVoPage = new Page<>();
List<LostAndFoundPageVo> lostAndFoundPageVos = BeanUtils.toBean(records, LostAndFoundPageVo.class);
lostAndFoundPageVoPage.setRecords(lostAndFoundPageVos);
lostAndFoundPageVoPage.setTotal(pageData.getTotal());
lostAndFoundPageVoPage.setCurrent(pageData.getCurrent());
lostAndFoundPageVoPage.setSize(pageData.getSize());
return R.ok(lostAndFoundPageVoPage);
}
}
@@ -0,0 +1,121 @@
package com.bsd.pjcloud.integrated.controller;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.log.annotation.SysLog;
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
import com.bsd.pjcloud.integrated.service.MeetingBookingService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.http.HttpHeaders;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
/**
* 会议室预约
*
* @author zjf
* @date 2025-05-20 10:51:29
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/meetingBooking" )
@Tag(description = "meetingBooking" , name = "会议室预约管理" )
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class MeetingBookingController {
private final MeetingBookingService meetingBookingService;
/**
* 分页查询
* @param page 分页对象
* @param meetingBooking 会议室预约
* @return
*/
@Operation(summary = "分页查询" , description = "分页查询" )
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('integrated_meetingBooking_view')" )
public R getMeetingBookingPage(@ParameterObject Page page, @ParameterObject MeetingBookingEntity meetingBooking) {
LambdaQueryWrapper<MeetingBookingEntity> wrapper = Wrappers.lambdaQuery();
wrapper.eq(StrUtil.isNotBlank(meetingBooking.getTitle()),MeetingBookingEntity::getTitle,meetingBooking.getTitle());
return R.ok(meetingBookingService.page(page, wrapper));
}
/**
* 通过id查询会议室预约
* @param id id
* @return R
*/
@Operation(summary = "通过id查询" , description = "通过id查询" )
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('integrated_meetingBooking_view')" )
public R getById(@PathVariable("id" ) Long id) {
return R.ok(meetingBookingService.getById(id));
}
/**
* 新增会议室预约
* @param meetingBooking 会议室预约
* @return R
*/
@Operation(summary = "新增会议室预约" , description = "新增会议室预约" )
@SysLog("新增会议室预约" )
@PostMapping
@PreAuthorize("@pms.hasPermission('integrated_meetingBooking_add')" )
public R save(@RequestBody MeetingBookingEntity meetingBooking) {
return R.ok(meetingBookingService.save(meetingBooking));
}
/**
* 修改会议室预约
* @param meetingBooking 会议室预约
* @return R
*/
@Operation(summary = "修改会议室预约" , description = "修改会议室预约" )
@SysLog("修改会议室预约" )
@PutMapping
@PreAuthorize("@pms.hasPermission('integrated_meetingBooking_edit')" )
public R updateById(@RequestBody MeetingBookingEntity meetingBooking) {
return R.ok(meetingBookingService.updateById(meetingBooking));
}
/**
* 通过id删除会议室预约
* @param ids id列表
* @return R
*/
@Operation(summary = "通过id删除会议室预约" , description = "通过id删除会议室预约" )
@SysLog("通过id删除会议室预约" )
@DeleteMapping
@PreAuthorize("@pms.hasPermission('integrated_meetingBooking_del')" )
public R removeById(@RequestBody Long[] ids) {
return R.ok(meetingBookingService.removeBatchByIds(CollUtil.toList(ids)));
}
/**
* 导出excel 表格
* @param meetingBooking 查询条件
* @param ids 导出指定ID
* @return excel 文件流
*/
@ResponseExcel
@GetMapping("/export")
@PreAuthorize("@pms.hasPermission('integrated_meetingBooking_export')" )
public List<MeetingBookingEntity> export(MeetingBookingEntity meetingBooking,Long[] ids) {
return meetingBookingService.list(Wrappers.lambdaQuery(meetingBooking).in(ArrayUtil.isNotEmpty(ids), MeetingBookingEntity::getId, ids));
}
}
@@ -82,14 +82,15 @@ public class MeetingRoomController {
@Transactional
public R save(@RequestBody MeetingRoomEntity meetingRoom) {
meetingRoom.setDeptId(SecurityUtils.getUser().getDeptId());
List<MeetingRoomEquipmentEntity> meetingRoomEquipmentEntityList = meetingRoom.getMeetingRoomEquipmentEntityList();
List<MeetingRoomEquipmentEntity> meetingRoomEquipmentEntityList = meetingRoom.getEquipmentList();
boolean save = meetingRoomService.save(meetingRoom);
if (CollUtil.isNotEmpty(meetingRoomEquipmentEntityList)) {
meetingRoomEquipmentEntityList.forEach(meetingRoomEquipmentEntity -> {
meetingRoomEquipmentEntity.setRoomId(meetingRoom.getId());
});
meetingRoomEquipmentService.saveBatch(meetingRoomEquipmentEntityList);
}
return R.ok(meetingRoomService.save(meetingRoom));
return R.ok(save);
}
/**
@@ -0,0 +1,127 @@
package com.bsd.pjcloud.integrated.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.bsd.pjcloud.common.core.util.TenantTable;
import java.time.LocalDateTime;
/**
* 会议室预约
*
* @author zjf
* @date 2025-05-20 10:51:29
*/
@Data
@TenantTable
@TableName("meeting_booking")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "会议室预约")
public class MeetingBookingEntity extends Model<MeetingBookingEntity> {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description="id")
private Long id;
/**
* 会议主题
*/
@Schema(description="会议主题")
private String title;
/**
* 会议室id
*/
@Schema(description="会议室id")
private Long roomId;
/**
* 会议说明
*/
@Schema(description="会议说明")
private String description;
/**
* 审批状态
*/
@Schema(description="审批状态")
private String meetingStatus;
/**
* 部门id
*/
@Schema(description="部门id")
private Long deptId;
/**
* 申请人id
*/
@Schema(description="申请人id")
private Long applicantId;
/**
* 会议负责人id
*/
@Schema(description="会议负责人id")
private Long assigneeId;
/**
* 开始时间
*/
@Schema(description="开始时间")
private LocalDateTime startTime;
/**
* 结束时间
*/
@Schema(description="结束时间")
private LocalDateTime endTime;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建者")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建时间")
private LocalDateTime createTime;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="更新者")
private String updateBy;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="更新时间")
private LocalDateTime updateTime;
/**
* 是否删除
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description="是否删除")
private String delFlag;
/**
* 租户编号
*/
@Schema(description="租户编号")
private Long tenantId;
}
@@ -135,5 +135,5 @@ public class MeetingRoomEntity extends Model<MeetingRoomEntity> {
@TableField(exist = false)
@Schema(description="设备会议室关联")
private List<MeetingRoomEquipmentEntity> meetingRoomEquipmentEntityList;
private List<MeetingRoomEquipmentEntity> equipmentList;
}
@@ -0,0 +1,11 @@
package com.bsd.pjcloud.integrated.mapper;
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MeetingBookingMapper extends PjcloudBaseMapper<MeetingBookingEntity> {
}
@@ -0,0 +1,8 @@
package com.bsd.pjcloud.integrated.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
public interface MeetingBookingService extends IService<MeetingBookingEntity> {
}
@@ -0,0 +1,16 @@
package com.bsd.pjcloud.integrated.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
import com.bsd.pjcloud.integrated.mapper.MeetingBookingMapper;
import com.bsd.pjcloud.integrated.service.MeetingBookingService;
import org.springframework.stereotype.Service;
/**
* 会议室预约
*
* @author zjf
* @date 2025-05-20 10:51:29
*/
@Service
public class MeetingBookingServiceImpl extends ServiceImpl<MeetingBookingMapper, MeetingBookingEntity> implements MeetingBookingService {
}
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsd.pjcloud.integrated.mapper.MeetingBookingMapper">
<resultMap id="meetingBookingMap" type="com.bsd.pjcloud.integrated.entity.MeetingBookingEntity">
<id property="id" column="id"/>
<result property="title" column="title"/>
<result property="roomId" column="room_id"/>
<result property="description" column="description"/>
<result property="meetingStatus" column="meeting_status"/>
<result property="deptId" column="dept_id"/>
<result property="applicantId" column="applicant_id"/>
<result property="assigneeId" column="assignee_id"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="delFlag" column="del_flag"/>
<result property="tenantId" column="tenant_id"/>
</resultMap>
</mapper>