引入会议
This commit is contained in:
1 parent
48c80d4b44
commit
545396db4a
20 files changed
+946
-32
No files matched your search
@@ -111,7 +111,7 @@ public class PjcloudTokenEndpoint {
|
||||
RegisteredClient registeredClient = RegisteredClient.withId(SecurityConstants.FROM).clientId(SecurityConstants.FROM)
|
||||
.authorizationGrantType(AuthorizationGrantType.PASSWORD)
|
||||
.tokenSettings(TokenSettings.builder()
|
||||
.accessTokenTimeToLive(Duration.ofHours(24)) // token 有效期 24 小时
|
||||
.accessTokenTimeToLive(Duration.ofDays(7)) // token 有效期 7 天
|
||||
.refreshTokenTimeToLive(Duration.ofDays(7)) // refresh token 有效期 7 天
|
||||
.accessTokenFormat(OAuth2TokenFormat.REFERENCE)
|
||||
.build())
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
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.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingEquipmentService;
|
||||
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-03-24 16:13:15
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/meetingEquipment" )
|
||||
@Tag(description = "meetingEquipment" , name = "设备表管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class MeetingEquipmentController {
|
||||
|
||||
private final MeetingEquipmentService meetingEquipmentService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param meetingEquipment 设备表
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingEquipment_view')" )
|
||||
public R getMeetingEquipmentPage(@ParameterObject Page page, @ParameterObject MeetingEquipmentEntity meetingEquipment) {
|
||||
LambdaQueryWrapper<MeetingEquipmentEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(meetingEquipment.getName()),MeetingEquipmentEntity::getName,meetingEquipment.getName());
|
||||
wrapper.eq(StrUtil.isNotBlank(meetingEquipment.getStatus()),MeetingEquipmentEntity::getStatus,meetingEquipment.getStatus());
|
||||
return R.ok(meetingEquipmentService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询设备表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingEquipment_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(meetingEquipmentService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备表
|
||||
* @param meetingEquipment 设备表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增设备表" , description = "新增设备表" )
|
||||
@SysLog("新增设备表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingEquipment_add')" )
|
||||
public R save(@RequestBody MeetingEquipmentEntity meetingEquipment) {
|
||||
meetingEquipment.setDeptId(SecurityUtils.getUser().getDeptId());
|
||||
return R.ok(meetingEquipmentService.save(meetingEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备表
|
||||
* @param meetingEquipment 设备表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改设备表" , description = "修改设备表" )
|
||||
@SysLog("修改设备表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingEquipment_edit')" )
|
||||
public R updateById(@RequestBody MeetingEquipmentEntity meetingEquipment) {
|
||||
return R.ok(meetingEquipmentService.updateById(meetingEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除设备表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除设备表" , description = "通过id删除设备表" )
|
||||
@SysLog("通过id删除设备表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingEquipment_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(meetingEquipmentService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param meetingEquipment 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingEquipment_export')" )
|
||||
public List<MeetingEquipmentEntity> export(MeetingEquipmentEntity meetingEquipment,Long[] ids) {
|
||||
return meetingEquipmentService.list(Wrappers.lambdaQuery(meetingEquipment).in(ArrayUtil.isNotEmpty(ids), MeetingEquipmentEntity::getId, ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
package com.bsd.pjcloud.integrated.controller;
|
||||
|
||||
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.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEntity;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingRoomService;
|
||||
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-03-24 16:00:41
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/meetingRoom" )
|
||||
@Tag(description = "meetingRoom" , name = "会议室信息表管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class MeetingRoomController {
|
||||
|
||||
private final MeetingRoomService meetingRoomService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param meetingRoom 会议室信息表
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_view')" )
|
||||
public R getMeetingRoomPage(@ParameterObject Page page, @ParameterObject MeetingRoomEntity meetingRoom) {
|
||||
LambdaQueryWrapper<MeetingRoomEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(meetingRoomService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询会议室信息表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(meetingRoomService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会议室信息表
|
||||
* @param meetingRoom 会议室信息表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增会议室信息表" , description = "新增会议室信息表" )
|
||||
@SysLog("新增会议室信息表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_add')" )
|
||||
public R save(@RequestBody MeetingRoomEntity meetingRoom) {
|
||||
meetingRoom.setDeptId(SecurityUtils.getUser().getDeptId());
|
||||
return R.ok(meetingRoomService.save(meetingRoom));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会议室信息表
|
||||
* @param meetingRoom 会议室信息表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改会议室信息表" , description = "修改会议室信息表" )
|
||||
@SysLog("修改会议室信息表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_edit')" )
|
||||
public R updateById(@RequestBody MeetingRoomEntity meetingRoom) {
|
||||
return R.ok(meetingRoomService.updateById(meetingRoom));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除会议室信息表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除会议室信息表" , description = "通过id删除会议室信息表" )
|
||||
@SysLog("通过id删除会议室信息表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(meetingRoomService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param meetingRoom 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_export')" )
|
||||
public List<MeetingRoomEntity> export(MeetingRoomEntity meetingRoom,Long[] ids) {
|
||||
return meetingRoomService.list(Wrappers.lambdaQuery(meetingRoom).in(ArrayUtil.isNotEmpty(ids), MeetingRoomEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.bsd.pjcloud.integrated.controller;
|
||||
|
||||
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.MeetingRoomEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingRoomEquipmentService;
|
||||
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-03-24 16:17:24
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/meetingRoomEquipment" )
|
||||
@Tag(description = "meetingRoomEquipment" , name = "设备会议室关联表管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class MeetingRoomEquipmentController {
|
||||
|
||||
private final MeetingRoomEquipmentService meetingRoomEquipmentService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param meetingRoomEquipment 设备会议室关联表
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoomEquipment_view')" )
|
||||
public R getMeetingRoomEquipmentPage(@ParameterObject Page page, @ParameterObject MeetingRoomEquipmentEntity meetingRoomEquipment) {
|
||||
LambdaQueryWrapper<MeetingRoomEquipmentEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(meetingRoomEquipmentService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询设备会议室关联表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoomEquipment_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(meetingRoomEquipmentService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备会议室关联表
|
||||
* @param meetingRoomEquipment 设备会议室关联表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增设备会议室关联表" , description = "新增设备会议室关联表" )
|
||||
@SysLog("新增设备会议室关联表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoomEquipment_add')" )
|
||||
public R save(@RequestBody MeetingRoomEquipmentEntity meetingRoomEquipment) {
|
||||
return R.ok(meetingRoomEquipmentService.save(meetingRoomEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备会议室关联表
|
||||
* @param meetingRoomEquipment 设备会议室关联表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改设备会议室关联表" , description = "修改设备会议室关联表" )
|
||||
@SysLog("修改设备会议室关联表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoomEquipment_edit')" )
|
||||
public R updateById(@RequestBody MeetingRoomEquipmentEntity meetingRoomEquipment) {
|
||||
return R.ok(meetingRoomEquipmentService.updateById(meetingRoomEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除设备会议室关联表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除设备会议室关联表" , description = "通过id删除设备会议室关联表" )
|
||||
@SysLog("通过id删除设备会议室关联表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoomEquipment_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(meetingRoomEquipmentService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param meetingRoomEquipment 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoomEquipment_export')" )
|
||||
public List<MeetingRoomEquipmentEntity> export(MeetingRoomEquipmentEntity meetingRoomEquipment,Long[] ids) {
|
||||
return meetingRoomEquipmentService.list(Wrappers.lambdaQuery(meetingRoomEquipment).in(ArrayUtil.isNotEmpty(ids), MeetingRoomEquipmentEntity::getId, ids));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "通过会议室id查询设备列表" , description = "通过会议室id查询设备列表" )
|
||||
@GetMapping("/getEquipmentList/{roomId}" )
|
||||
public R getEquipmentList(@PathVariable("roomId" ) Long roomId) {
|
||||
return R.ok(meetingRoomEquipmentService.getEquipmentList(roomId));
|
||||
}
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
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-03-24 16:13:15
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("meeting_equipment")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "设备表")
|
||||
public class MeetingEquipmentEntity extends Model<MeetingEquipmentEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@Schema(description="设备名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@Schema(description="图片")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description="排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态(0=维护中 1=可用)
|
||||
*/
|
||||
@Schema(description="状态(0=维护中 1=可用)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
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-03-24 16:00:41
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("meeting_room")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "会议室信息表")
|
||||
public class MeetingRoomEntity extends Model<MeetingRoomEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会议室名称
|
||||
*/
|
||||
@Schema(description="会议室名称")
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@Schema(description="图片")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description="排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@Schema(description="描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态(0=维护中 1=可用)
|
||||
*/
|
||||
@Schema(description="状态(0=维护中 1=可用)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 默认管理员
|
||||
*/
|
||||
@Schema(description="默认管理员")
|
||||
private Long adminId;
|
||||
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
@Schema(description="位置")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 容纳人数
|
||||
*/
|
||||
@Schema(description="容纳人数")
|
||||
private Integer capacity;
|
||||
|
||||
/**
|
||||
* 可用时间段
|
||||
*/
|
||||
@Schema(description="可用时间段")
|
||||
private String availableTime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
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-03-24 16:17:24
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("meeting__room_equipment")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "设备会议室关联表")
|
||||
public class MeetingRoomEquipmentEntity extends Model<MeetingRoomEquipmentEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会议室id
|
||||
*/
|
||||
@Schema(description="会议室id")
|
||||
private Long roomId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@Schema(description="设备id")
|
||||
private Long equipId;
|
||||
|
||||
/**
|
||||
* 设备数量
|
||||
*/
|
||||
@Schema(description="设备数量")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.integrated.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MeetingEquipmentMapper extends PjcloudBaseMapper<MeetingEquipmentEntity> {
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.integrated.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEquipmentEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MeetingRoomEquipmentMapper extends PjcloudBaseMapper<MeetingRoomEquipmentEntity> {
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.integrated.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MeetingRoomMapper extends PjcloudBaseMapper<MeetingRoomEntity> {
|
||||
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.integrated.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity;
|
||||
|
||||
public interface MeetingEquipmentService extends IService<MeetingEquipmentEntity> {
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.bsd.pjcloud.integrated.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEquipmentEntity;
|
||||
|
||||
|
||||
public interface MeetingRoomEquipmentService extends IService<MeetingRoomEquipmentEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过会议室id查询设备列表
|
||||
* @param roomId
|
||||
* @return
|
||||
*/
|
||||
Object getEquipmentList(Long roomId);
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.integrated.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEntity;
|
||||
|
||||
public interface MeetingRoomService extends IService<MeetingRoomEntity> {
|
||||
|
||||
}
|
||||
+16
@@ -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.MeetingEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingEquipmentMapper;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingEquipmentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 设备表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-03-24 16:13:15
|
||||
*/
|
||||
@Service
|
||||
public class MeetingEquipmentServiceImpl extends ServiceImpl<MeetingEquipmentMapper, MeetingEquipmentEntity> implements MeetingEquipmentService {
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.bsd.pjcloud.integrated.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingEquipmentMapper;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingRoomEquipmentMapper;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingRoomMapper;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingRoomEquipmentService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 设备会议室关联表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-03-24 16:17:24
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MeetingRoomEquipmentServiceImpl extends ServiceImpl<MeetingRoomEquipmentMapper, MeetingRoomEquipmentEntity> implements MeetingRoomEquipmentService {
|
||||
private final MeetingRoomMapper meetingRoomMapper;
|
||||
|
||||
private final MeetingEquipmentMapper meetingEquipmentMapper;
|
||||
@Override
|
||||
public Object getEquipmentList(Long roomId) {
|
||||
|
||||
LambdaQueryWrapper<MeetingRoomEquipmentEntity> meetingRoomEquipmentEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
meetingRoomEquipmentEntityLambdaQueryWrapper.eq(MeetingRoomEquipmentEntity::getRoomId,roomId);
|
||||
List<MeetingRoomEquipmentEntity> meetingRoomEquipmentEntities = baseMapper.selectList(meetingRoomEquipmentEntityLambdaQueryWrapper);
|
||||
List<Long> equipmentIds = meetingRoomEquipmentEntities.stream().map(meetingRoomEquipmentEntity -> meetingRoomEquipmentEntity.getEquipId()).collect(Collectors.toList());
|
||||
|
||||
List<MeetingEquipmentEntity> meetingEquipmentEntities = meetingEquipmentMapper.selectByIds(equipmentIds);
|
||||
|
||||
return meetingEquipmentEntities;
|
||||
}
|
||||
}
|
||||
+16
@@ -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.MeetingRoomEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingRoomMapper;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingRoomService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 会议室信息表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-03-24 16:00:41
|
||||
*/
|
||||
@Service
|
||||
public class MeetingRoomServiceImpl extends ServiceImpl<MeetingRoomMapper, MeetingRoomEntity> implements MeetingRoomService {
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?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.MeetingEquipmentMapper">
|
||||
|
||||
<resultMap id="meetingEquipmentMap" type="com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="picUrl" column="pic_url"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<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>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?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.MeetingRoomEquipmentMapper">
|
||||
|
||||
<resultMap id="meetingRoomEquipmentMap" type="com.bsd.pjcloud.integrated.entity.MeetingRoomEquipmentEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="roomId" column="room_id"/>
|
||||
<result property="equipId" column="equip_id"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<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>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?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.MeetingRoomMapper">
|
||||
|
||||
<resultMap id="meetingRoomMap" type="com.bsd.pjcloud.integrated.entity.MeetingRoomEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="roomName" column="room_name"/>
|
||||
<result property="picUrl" column="pic_url"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="adminId" column="admin_id"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="capacity" column="capacity"/>
|
||||
<result property="availableTime" column="available_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>
|
||||
+34
-31
@@ -7,6 +7,7 @@ import com.bsd.pjcloud.admin.api.entity.SysUser;
|
||||
import com.bsd.pjcloud.admin.api.feign.RemoteTokenService;
|
||||
import com.bsd.pjcloud.admin.api.feign.RemoteUserService;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.thirdparty.dto.SHJNSSODTO;
|
||||
import com.bsd.pjcloud.thirdparty.dto.ZZDUserDTO;
|
||||
@@ -67,6 +68,7 @@ public class ThirdPartyOAth2Cotroller {
|
||||
*/
|
||||
@GetMapping("/zzdsso/{token}")
|
||||
@Operation(summary = "浙政钉单点登录")
|
||||
@SysLog("浙政钉单点登录")
|
||||
@Inner(value = false)
|
||||
@GlobalTransactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -89,8 +91,8 @@ public class ThirdPartyOAth2Cotroller {
|
||||
// "\"mobile\": null" +
|
||||
// "}" +
|
||||
// "}";
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
// ObjectMapper objectMapper = new ObjectMapper();
|
||||
// ZZDUserDTO zzdUserDTO;
|
||||
// try {
|
||||
@@ -118,35 +120,36 @@ public class ThirdPartyOAth2Cotroller {
|
||||
r = remoteTokenService.generateToken(userTokenDTO);
|
||||
}else {
|
||||
//2.根据浙政钉的员工钉钉号查询是否有这个人
|
||||
List<ThirdPartyUserEntity> thirdPartyUserEntityList = thirdPartyUserService.getUserByEmployeeCode(employeeCode);
|
||||
UserDTO userDTO = new UserDTO();
|
||||
//写死,新加入到部门表的全部归类到其他部门里面,不按照浙政钉的部门
|
||||
userDTO.setDeptId(1865990541445263361L);
|
||||
userDTO.setUsername(zzdUserDTO.getUsername());
|
||||
userDTO.setName(zzdUserDTO.getUsername());
|
||||
userDTO.setNickname(zzdUserDTO.getUsername());
|
||||
//浙里办用户
|
||||
userDTO.setSystemType("1");
|
||||
//取上面的手机号
|
||||
userDTO.setPhone(mobile);
|
||||
userDTO.setDingtalkEmployeeCode(employeeCode);
|
||||
//随便写死给个密码
|
||||
userDTO.setPassword("pj"+mobile);
|
||||
if(!CollectionUtils.isEmpty(thirdPartyUserEntityList)){
|
||||
//todo 这一步现在是没用的,这个最终要考虑是否通过浙政钉里面的人员来限制移动端的使用用户来决定
|
||||
//第三方数据库里面有
|
||||
//这里只在第三方库里查到,所以要对系统用户表进行新增当前用户,插入一条信息进去
|
||||
R<Boolean> booleanR = remoteUserService.registerUser(userDTO);
|
||||
//通过唯一手机号查询到刚注册的用户信息,生成token
|
||||
R<List<SysUser>> userByMobile=remoteUserService.getUserByMobile(mobile);
|
||||
SysUser sysUser = userByMobile.getData().get(0);
|
||||
UserTokenDTO userTokenDTO = new UserTokenDTO();
|
||||
userTokenDTO.setSysUser(sysUser);
|
||||
//登录成功,根据新注册的用户信息返回token
|
||||
r=remoteTokenService.generateToken(userTokenDTO);
|
||||
}else {
|
||||
return R.failed("没有找到当前用户信息,无法访问!");
|
||||
}
|
||||
// List<ThirdPartyUserEntity> thirdPartyUserEntityList = thirdPartyUserService.getUserByEmployeeCode(employeeCode);
|
||||
// UserDTO userDTO = new UserDTO();
|
||||
// //写死,新加入到部门表的全部归类到其他部门里面,不按照浙政钉的部门
|
||||
// userDTO.setDeptId(1865990541445263361L);
|
||||
// userDTO.setUsername(zzdUserDTO.getUsername());
|
||||
// userDTO.setName(zzdUserDTO.getUsername());
|
||||
// userDTO.setNickname(zzdUserDTO.getUsername());
|
||||
// //浙里办用户
|
||||
// userDTO.setSystemType("1");
|
||||
// //取上面的手机号
|
||||
// userDTO.setPhone(mobile);
|
||||
// userDTO.setDingtalkEmployeeCode(employeeCode);
|
||||
// //随便写死给个密码
|
||||
// userDTO.setPassword("pj"+mobile);
|
||||
// if(!CollectionUtils.isEmpty(thirdPartyUserEntityList)){
|
||||
// //todo 这一步现在是没用的,这个最终要考虑是否通过浙政钉里面的人员来限制移动端的使用用户来决定
|
||||
// //第三方数据库里面有
|
||||
// //这里只在第三方库里查到,所以要对系统用户表进行新增当前用户,插入一条信息进去
|
||||
// R<Boolean> booleanR = remoteUserService.registerUser(userDTO);
|
||||
// //通过唯一手机号查询到刚注册的用户信息,生成token
|
||||
// R<List<SysUser>> userByMobile=remoteUserService.getUserByMobile(mobile);
|
||||
// SysUser sysUser = userByMobile.getData().get(0);
|
||||
// UserTokenDTO userTokenDTO = new UserTokenDTO();
|
||||
// userTokenDTO.setSysUser(sysUser);
|
||||
// //登录成功,根据新注册的用户信息返回token
|
||||
// r=remoteTokenService.generateToken(userTokenDTO);
|
||||
// }else {
|
||||
// return R.failed("没有找到当前用户信息,无法访问!");
|
||||
// }
|
||||
return R.failed("系统中没有当前用户信息,请联系管理员进行申请!");
|
||||
}
|
||||
|
||||
//两个表都没查到人员不能够使用移动端的系统
|
||||
|
||||
Reference in new issue
Block a user