mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 13:39:37 +08:00
新增智能设备对应需求
This commit is contained in:
parent
382bde2f2c
commit
d0107d5b1a
@ -47,7 +47,8 @@ public class WisdomDeviceController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询智能设备列表
|
* 查询智能设备列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomDevice:list")
|
@Ignore
|
||||||
|
// @RequiresPermissions("wisdom:wisdomDevice:list")
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
public R list(WisdomDevice wisdomDevice) {
|
public R list(WisdomDevice wisdomDevice) {
|
||||||
startPage();
|
startPage();
|
||||||
@ -65,7 +66,8 @@ public class WisdomDeviceController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 新增保存智能设备
|
* 新增保存智能设备
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomDevice:add")
|
// @RequiresPermissions("wisdom:wisdomDevice:add")
|
||||||
|
@Ignore
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
public R addSave(@RequestBody WisdomDevice wisdomDevice) {
|
public R addSave(@RequestBody WisdomDevice wisdomDevice) {
|
||||||
return toAjax(wisdomDeviceService.insertWisdomDevice(wisdomDevice));
|
return toAjax(wisdomDeviceService.insertWisdomDevice(wisdomDevice));
|
||||||
@ -74,7 +76,8 @@ public class WisdomDeviceController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改保存智能设备
|
* 修改保存智能设备
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomDevice:edit")
|
// @RequiresPermissions("wisdom:wisdomDevice:edit")
|
||||||
|
@Ignore
|
||||||
@PostMapping("update")
|
@PostMapping("update")
|
||||||
public R editSave(@RequestBody WisdomDevice wisdomDevice) {
|
public R editSave(@RequestBody WisdomDevice wisdomDevice) {
|
||||||
return toAjax(wisdomDeviceService.updateWisdomDevice(wisdomDevice));
|
return toAjax(wisdomDeviceService.updateWisdomDevice(wisdomDevice));
|
||||||
@ -83,7 +86,8 @@ public class WisdomDeviceController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除智能设备
|
* 删除智能设备
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomDevice:remove")
|
// @RequiresPermissions("wisdom:wisdomDevice:remove")
|
||||||
|
@Ignore
|
||||||
@PostMapping("remove")
|
@PostMapping("remove")
|
||||||
public R remove(String ids) {
|
public R remove(String ids) {
|
||||||
return toAjax(wisdomDeviceService.deleteWisdomDeviceByIds(ids));
|
return toAjax(wisdomDeviceService.deleteWisdomDeviceByIds(ids));
|
||||||
|
@ -17,6 +17,7 @@ import com.ics.common.core.domain.R;
|
|||||||
import com.ics.common.core.controller.BaseController;
|
import com.ics.common.core.controller.BaseController;
|
||||||
import com.ics.admin.domain.WisdomRoom;
|
import com.ics.admin.domain.WisdomRoom;
|
||||||
import com.ics.admin.service.IWisdomRoomService;
|
import com.ics.admin.service.IWisdomRoomService;
|
||||||
|
import org.wf.jwtp.annotation.Ignore;
|
||||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -52,7 +53,8 @@ public class WisdomRoomController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询智能房间列表
|
* 查询智能房间列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomRoom:list")
|
@Ignore
|
||||||
|
// @RequiresPermissions("wisdom:wisdomRoom:list")
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
public R list(WisdomRoom wisdomRoom) {
|
public R list(WisdomRoom wisdomRoom) {
|
||||||
startPage();
|
startPage();
|
||||||
@ -60,7 +62,9 @@ public class WisdomRoomController extends BaseController {
|
|||||||
for (WisdomRoom room : wisdomRooms) {
|
for (WisdomRoom room : wisdomRooms) {
|
||||||
List<Long> collect = wisdomStaffService.selectWisdomStaffByRoomId(room.getId());
|
List<Long> collect = wisdomStaffService.selectWisdomStaffByRoomId(room.getId());
|
||||||
room.setStaffId(collect);
|
room.setStaffId(collect);
|
||||||
room.setStaffLists(customerStaffService.selectList());
|
IcsCustomerStaff icsCustomerStaff =new IcsCustomerStaff();
|
||||||
|
icsCustomerStaff.setIcsCustomerId(85L);
|
||||||
|
room.setStaffLists(customerStaffService.selectCustomerStaffList(icsCustomerStaff));
|
||||||
}
|
}
|
||||||
return result(wisdomRooms);
|
return result(wisdomRooms);
|
||||||
}
|
}
|
||||||
@ -69,7 +73,8 @@ public class WisdomRoomController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 新增保存智能房间
|
* 新增保存智能房间
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomRoom:add")
|
// @RequiresPermissions("wisdom:wisdomRoom:add")
|
||||||
|
@Ignore
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
public R addSave(@RequestBody WisdomRoom wisdomRoom) {
|
public R addSave(@RequestBody WisdomRoom wisdomRoom) {
|
||||||
int i = wisdomRoomService.insertWisdomRoom(wisdomRoom);
|
int i = wisdomRoomService.insertWisdomRoom(wisdomRoom);
|
||||||
@ -87,7 +92,8 @@ public class WisdomRoomController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改保存智能房间
|
* 修改保存智能房间
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomRoom:edit")
|
// @RequiresPermissions("wisdom:wisdomRoom:edit")
|
||||||
|
@Ignore
|
||||||
@PostMapping("update")
|
@PostMapping("update")
|
||||||
public R editSave(@RequestBody WisdomRoom wisdomRoom) {
|
public R editSave(@RequestBody WisdomRoom wisdomRoom) {
|
||||||
int i = wisdomRoomService.updateWisdomRoom(wisdomRoom);
|
int i = wisdomRoomService.updateWisdomRoom(wisdomRoom);
|
||||||
@ -97,6 +103,7 @@ public class WisdomRoomController extends BaseController {
|
|||||||
if (ids.size()>0) wisdomStaffService.deleteWisdomStaffByIds(joinStr);
|
if (ids.size()>0) wisdomStaffService.deleteWisdomStaffByIds(joinStr);
|
||||||
for (Long s : wisdomRoom.getStaffId()) {
|
for (Long s : wisdomRoom.getStaffId()) {
|
||||||
wisdomStaff.setWisdomRoomId(wisdomRoom.getId());
|
wisdomStaff.setWisdomRoomId(wisdomRoom.getId());
|
||||||
|
wisdomStaff.setDataType("0");
|
||||||
wisdomStaff.setStaffId(s);
|
wisdomStaff.setStaffId(s);
|
||||||
wisdomStaffService.insertWisdomStaff(wisdomStaff);
|
wisdomStaffService.insertWisdomStaff(wisdomStaff);
|
||||||
}
|
}
|
||||||
@ -106,7 +113,8 @@ public class WisdomRoomController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除智能房间
|
* 删除智能房间
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomRoom:remove")
|
// @RequiresPermissions("wisdom:wisdomRoom:remove")
|
||||||
|
@Ignore
|
||||||
@PostMapping("remove")
|
@PostMapping("remove")
|
||||||
public R remove(String ids) {
|
public R remove(String ids) {
|
||||||
return toAjax(wisdomRoomService.deleteWisdomRoomByIds(ids));
|
return toAjax(wisdomRoomService.deleteWisdomRoomByIds(ids));
|
||||||
@ -115,10 +123,13 @@ public class WisdomRoomController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 用户列表
|
* 用户列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("wisdom:wisdomRoom:view")
|
// @RequiresPermissions("wisdom:wisdomRoom:view")
|
||||||
|
@Ignore
|
||||||
@GetMapping("selectStaff")
|
@GetMapping("selectStaff")
|
||||||
public R selectStaff() {
|
public R selectStaff() {
|
||||||
List<IcsCustomerStaff> customerStaffs = customerStaffService.selectList();
|
IcsCustomerStaff icsCustomerStaff =new IcsCustomerStaff();
|
||||||
|
icsCustomerStaff.setIcsCustomerId(85L);
|
||||||
|
List<IcsCustomerStaff> customerStaffs = customerStaffService.selectCustomerStaffList(icsCustomerStaff);
|
||||||
return R.data(customerStaffs);
|
return R.data(customerStaffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +302,10 @@ public class IcsCustomerStaffServiceImpl extends ServiceImpl<IcsCustomerStaffMap
|
|||||||
@Override
|
@Override
|
||||||
public List<IcsCustomerStaff> selectList() {
|
public List<IcsCustomerStaff> selectList() {
|
||||||
|
|
||||||
return baseMapper.selectList(null);
|
QueryWrapper<IcsCustomerStaff> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.groupBy("id");
|
||||||
|
|
||||||
|
return baseMapper.selectList(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -121,6 +121,7 @@ public class WisdomStaffServiceImpl extends ServiceImpl<WisdomStaffMapper, Wisdo
|
|||||||
public List<Long> selectWisdomStaffByRoomId(Long id) {
|
public List<Long> selectWisdomStaffByRoomId(Long id) {
|
||||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("wisdom_room_id",id);
|
wrapper.eq("wisdom_room_id",id);
|
||||||
|
wrapper.groupBy("staff_id");
|
||||||
List<WisdomStaff> wisdomStaffs = wisdomStaffMapper.selectList(wrapper);
|
List<WisdomStaff> wisdomStaffs = wisdomStaffMapper.selectList(wrapper);
|
||||||
List<Long> collect = wisdomStaffs.stream().map(WisdomStaff::getStaffId).collect(Collectors.toList());
|
List<Long> collect = wisdomStaffs.stream().map(WisdomStaff::getStaffId).collect(Collectors.toList());
|
||||||
return collect;
|
return collect;
|
||||||
|
@ -24,6 +24,16 @@ public class Sample {
|
|||||||
return new com.aliyun.dysmsapi20170525.Client(config);
|
return new com.aliyun.dysmsapi20170525.Client(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* message:上海长阳短信验证功能
|
||||||
|
* date:2024-06-22
|
||||||
|
* @param phone 手机号
|
||||||
|
* @param name 名称
|
||||||
|
* @param date 日期
|
||||||
|
* @param meetingName 会议室名称
|
||||||
|
* @param thing
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
public static void send1(String phone, String name, Date date,String meetingName,String thing) throws Exception {
|
public static void send1(String phone, String name, Date date,String meetingName,String thing) throws Exception {
|
||||||
com.aliyun.dysmsapi20170525.Client client = Sample.createClient();
|
com.aliyun.dysmsapi20170525.Client client = Sample.createClient();
|
||||||
// 1.发送短信
|
// 1.发送短信
|
||||||
|
@ -49,7 +49,7 @@ public class SignUtils {
|
|||||||
|
|
||||||
Map<String, String > heads = new HashMap<>();
|
Map<String, String > heads = new HashMap<>();
|
||||||
|
|
||||||
String body = HttpRequest.post("http://116.227.212.175:8888/cootoo/openLock")
|
String body = HttpRequest.post("http://222.67.49.6:8888/cootoo/openLock")
|
||||||
.headerMap(heads, false)
|
.headerMap(heads, false)
|
||||||
.body(on.toString()).timeout(30 * 1000).execute().body();
|
.body(on.toString()).timeout(30 * 1000).execute().body();
|
||||||
System.out.println(body);
|
System.out.println(body);
|
||||||
|
@ -237,10 +237,11 @@ public class ApiEquipmentController extends BaseController {
|
|||||||
|
|
||||||
WisdomDevice wisdomDevice = new WisdomDevice();
|
WisdomDevice wisdomDevice = new WisdomDevice();
|
||||||
|
|
||||||
//大会议室
|
//大会议室 52 茶室 53 小会议室 54
|
||||||
if(roomRecord.getRoomId() == 237L ){
|
if(roomRecord.getRoomId() == 237L ){
|
||||||
wisdomDevice.setEquipmentNum("238");
|
wisdomDevice.setEquipmentNum("238");
|
||||||
}else if (roomRecord.getRoomId() == 238L){
|
}else if (roomRecord.getRoomId() == 238L){
|
||||||
|
|
||||||
wisdomDevice.setEquipmentNum("240");
|
wisdomDevice.setEquipmentNum("240");
|
||||||
}else if (roomRecord.getRoomId() == 239L){
|
}else if (roomRecord.getRoomId() == 239L){
|
||||||
wisdomDevice.setEquipmentNum("239");
|
wisdomDevice.setEquipmentNum("239");
|
||||||
|
@ -139,7 +139,8 @@ public class ApiRoomContentController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 展示会议列表,当天会议室的预约时间
|
* 查询长阳展示会议列表,当天会议室的预约时间
|
||||||
|
* date:2024-06-25
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("member:center:view")
|
@RequiresPermissions("member:center:view")
|
||||||
@GetMapping("/getMeetingRoomRecord/{meetingRoomId}")
|
@GetMapping("/getMeetingRoomRecord/{meetingRoomId}")
|
||||||
@ -153,8 +154,8 @@ public class ApiRoomContentController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询空闲的会议室
|
* 查询长阳空闲的会议室
|
||||||
*
|
* date:2024-06-24
|
||||||
* @param reservation
|
* @param reservation
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -204,7 +205,10 @@ public class ApiRoomContentController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上海会议预约记录
|
* message:上海会议预约记录
|
||||||
|
* project:上海长阳
|
||||||
|
* date:2024-06-23
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("member:center:view")
|
@RequiresPermissions("member:center:view")
|
||||||
@PostMapping("/saveChangyangMeetingRecord")
|
@PostMapping("/saveChangyangMeetingRecord")
|
||||||
@ -747,6 +751,7 @@ public class ApiRoomContentController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取人员列表(上海长阳)
|
* 获取人员列表(上海长阳)
|
||||||
|
* date:2024-06-19
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("member:center:view")
|
@RequiresPermissions("member:center:view")
|
||||||
@GetMapping("getChangyangPersonList")
|
@GetMapping("getChangyangPersonList")
|
||||||
|
@ -2,6 +2,8 @@ package com.ics.controller.mobile.wisdom;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.date.DateField;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ics.admin.domain.*;
|
import com.ics.admin.domain.*;
|
||||||
@ -84,6 +86,7 @@ public class WisdomApiController extends BaseController {
|
|||||||
@RequiresPermissions("member:center:view")
|
@RequiresPermissions("member:center:view")
|
||||||
@RequestMapping("/getAllDeviceInfoByRoomId")
|
@RequestMapping("/getAllDeviceInfoByRoomId")
|
||||||
public R getAllDeviceInfoByRoomId(Long id) {
|
public R getAllDeviceInfoByRoomId(Long id) {
|
||||||
|
|
||||||
long currentUserId = getLoginStaffId();
|
long currentUserId = getLoginStaffId();
|
||||||
|
|
||||||
//获取用户id 判断会议预约还是管理员
|
//获取用户id 判断会议预约还是管理员
|
||||||
@ -166,7 +169,12 @@ public class WisdomApiController extends BaseController {
|
|||||||
if (count1 == 0) {
|
if (count1 == 0) {
|
||||||
List<WisdomStaff> list = wisdomStaffService.selectListByUserIdAndRoomId(loginStaffId, "1");
|
List<WisdomStaff> list = wisdomStaffService.selectListByUserIdAndRoomId(loginStaffId, "1");
|
||||||
for (WisdomStaff wisdomStaff : list) {
|
for (WisdomStaff wisdomStaff : list) {
|
||||||
boolean in = DateUtil.isIn(new Date(), wisdomStaff.getStartTime(), wisdomStaff.getEndDate());
|
Date startTime = wisdomStaff.getStartTime();
|
||||||
|
Date endDate = wisdomStaff.getEndDate();
|
||||||
|
Date offset = DateUtil.offset(startTime, DateField.MINUTE, -10);
|
||||||
|
Date offset1 = DateUtil.offset(endDate, DateField.MINUTE, -10);
|
||||||
|
|
||||||
|
boolean in = DateUtil.isIn(new Date(), offset, offset1);
|
||||||
if (!in) return R.error("该用户没有权限开锁");
|
if (!in) return R.error("该用户没有权限开锁");
|
||||||
SignUtils.lock(wisdomDevice.getEquipmentNum());
|
SignUtils.lock(wisdomDevice.getEquipmentNum());
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ spring:
|
|||||||
main:
|
main:
|
||||||
allow-bean-definition-overriding: true
|
allow-bean-definition-overriding: true
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user