删除对应文件,修改登陆权限
@ -185,276 +185,37 @@ public class CustomerStaffController extends BaseController {
|
||||
Customer customer1 = customerService.selectCustomerById(icsCustomerId);
|
||||
log.info("parkId为:",customer1.getParkId().toString());
|
||||
|
||||
if (customer1.getParkId() == 26){
|
||||
IcsCustomerStaff customerStaff = icsCustomerStaffService.selectUserByMobile(icsCustomerStaff.getMobile());
|
||||
if (customerStaff != null){
|
||||
icsCustomerStaff.setId(customerStaff.getId());
|
||||
int i = icsCustomerStaffService.updateIcsCustomerStaff(icsCustomerStaff);
|
||||
StaffCustomer staffCustomer = new StaffCustomer();
|
||||
staffCustomer.setIcsCustomerId(icsCustomerStaff.getIcsCustomerId());
|
||||
staffCustomer.setStaffId(customerStaff.getId());
|
||||
staffCustomer.setParkId(customer1.getParkId());
|
||||
staffCustomer.setTenantId(customer1.getTenantId());
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerList(staffCustomer);
|
||||
if (staffCustomers.isEmpty()) {
|
||||
staffCustomerService.insertStaffCustomer(staffCustomer);
|
||||
}
|
||||
return toAjax(i);
|
||||
}else {
|
||||
icsCustomerStaff.setDataType("1");
|
||||
icsCustomerStaff.setParkId(customer1.getParkId());
|
||||
icsCustomerStaff.setTenantId(customer1.getTenantId());
|
||||
int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
||||
Assert.isTrue(i > 0, "添加失败");
|
||||
//新增用户和企业 id
|
||||
StaffCustomer staffCustomer = new StaffCustomer();
|
||||
staffCustomer.setIcsCustomerId(icsCustomerStaff.getIcsCustomerId());
|
||||
staffCustomer.setStaffId(icsCustomerStaff.getId());
|
||||
staffCustomer.setParkId(customer1.getParkId());
|
||||
staffCustomer.setTenantId(customer1.getTenantId());
|
||||
staffCustomerService.insertStaffCustomer(staffCustomer);
|
||||
return toAjax(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IcsCustomerStaff customerStaff = icsCustomerStaffService.selectUserByMobile(icsCustomerStaff.getMobile());
|
||||
if (customerStaff != null) {
|
||||
if (icsCustomerStaff.getId() == null) {
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
|
||||
Customer customer = customerService.selectCustomerById(icsCustomerStaff.getIcsCustomerId());
|
||||
if (null != customer) {
|
||||
String roomId = customer.getRoomId();
|
||||
String buildId = customer.getBuildId();
|
||||
|
||||
List<Long> result = new ArrayList<>();
|
||||
|
||||
// 按照逗号分割
|
||||
List<String> buildIds = StrUtil.split(buildId, ',');
|
||||
|
||||
List<String> roomIds = StrUtil.split(roomId, ',');
|
||||
List<Long> collect = roomIds.stream().map(Long::valueOf).collect(toList());
|
||||
List<Long> buildCollect = buildIds.stream().map(Long::valueOf).collect(toList());
|
||||
result.addAll(buildCollect);
|
||||
result.addAll(collect);
|
||||
//获取了房间集合,循环对应集合,
|
||||
for (Long id : result) {
|
||||
List<RoomEquipment> roomEquipment = roomEquipmentService.selectListByRoomId(id);
|
||||
if (CollUtil.isNotEmpty(roomEquipment)) {
|
||||
for (RoomEquipment roomEquipment1 : roomEquipment) {
|
||||
// ids.add(detailEquipment.getEquipmentId());
|
||||
ids.add(roomEquipment1.getEquipmentId());
|
||||
|
||||
}
|
||||
}
|
||||
List<DetailEquipment> detailEquipments = detailEquipmentService.selectByRoomId(id);
|
||||
if (CollUtil.isNotEmpty(detailEquipments)) {
|
||||
for (DetailEquipment detailEquipment : detailEquipments) {
|
||||
ids.add(detailEquipment.getEquipmentId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
for (Long id : ids) {
|
||||
UserEquipment userEquipment = new UserEquipment();
|
||||
userEquipment.setEquipmentId(id);
|
||||
userEquipment.setUserId(customerStaff.getId());
|
||||
userEquipment.setStartTime(customer.getStartDate());
|
||||
userEquipment.setEndDate(customer.getEndDate());
|
||||
|
||||
List<UserEquipment> equipments = userEquipmentService.selectUserEquipmentList(userEquipment);
|
||||
if (CollUtil.isEmpty(equipments)) {
|
||||
userEquipmentService.insertUserEquipment(userEquipment);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Long customerId1 = icsCustomerStaff.getIcsCustomerId();
|
||||
Customer customer = customerService.selectCustomerById(customerId1);
|
||||
|
||||
customerStaff.setName(icsCustomerStaff.getName());
|
||||
customerStaff.setMobile(icsCustomerStaff.getMobile());
|
||||
customerStaff.setGender(icsCustomerStaff.getGender());
|
||||
customerStaff.setPhoto(icsCustomerStaff.getPhoto());
|
||||
customerStaff.setAvatar(icsCustomerStaff.getAvatar());
|
||||
customerStaff.setUsername(icsCustomerStaff.getUsername());
|
||||
customerStaff.setCardNo(icsCustomerStaff.getCardNo());
|
||||
customerStaff.setAddress(icsCustomerStaff.getAddress());
|
||||
customerStaff.setEmail(icsCustomerStaff.getEmail());
|
||||
customerStaff.setDegree(icsCustomerStaff.getDegree());
|
||||
customerStaff.setUrgent(icsCustomerStaff.getUrgent());
|
||||
//如果修改了照片,根据企业找到对应的房间,根据房间找到对应的设备,添加用户照片进入设备中
|
||||
|
||||
if (null != customer) {
|
||||
String roomId = customer.getRoomId();
|
||||
String buildId = customer.getBuildId();
|
||||
|
||||
List<Long> result = new ArrayList<>();
|
||||
|
||||
List<String> buildIds = StrUtil.split(buildId, ',');
|
||||
|
||||
List<String> roomIds = StrUtil.split(roomId, ',');
|
||||
List<Long> collect = roomIds.stream().map(Long::valueOf).collect(toList());
|
||||
List<Long> buildCollect = buildIds.stream().map(Long::valueOf).collect(toList());
|
||||
result.addAll(buildCollect);
|
||||
//
|
||||
result.addAll(collect);
|
||||
//获取了房间集合,循环对应集合,
|
||||
for (Long aLong : result) {
|
||||
//根据楼层获取设备id
|
||||
List<DetailEquipment> detailEquipments = detailEquipmentService.selectByRoomId(aLong);
|
||||
for (DetailEquipment detailEquipment : detailEquipments) {
|
||||
//根据设备id获取设备
|
||||
Equipment equipment = equipmentService.selectEquipmentById(detailEquipment.getEquipmentId());
|
||||
if (equipment != null) {
|
||||
if (equipment.getType() == 0){
|
||||
String persons = DeviceUtils.queryPersons(equipment.getIp(), String.valueOf(customerStaff.getId()));
|
||||
JSONObject jsonObject = JSONUtil.parseObj(persons);
|
||||
Integer amount = (Integer) jsonObject.get("amount");
|
||||
if (amount <= 0) {
|
||||
log.info("添加用户信息++++++");
|
||||
DevicePersonDto devicePersonDto = new DevicePersonDto();
|
||||
ArrayList<FacesDto> facesDtos = new ArrayList<>();
|
||||
devicePersonDto.setPersonId(String.valueOf(customerStaff.getId()));
|
||||
devicePersonDto.setName(customerStaff.getName());
|
||||
devicePersonDto.setPhone(String.valueOf(customerStaff.getMobile()));
|
||||
devicePersonDto.setCertificateType("111");
|
||||
devicePersonDto.setCertificateNumber(customerStaff.getCardNo());
|
||||
//添加人员类型
|
||||
devicePersonDto.setPersonType("whitelist");
|
||||
//添加访客时间
|
||||
FacesDto facesDto = new FacesDto();
|
||||
facesDto.setFaceId(String.valueOf(customerStaff.getId()));
|
||||
String photoUrl = url + customerStaff.getPhoto();
|
||||
log.info("ip地址为:" + equipment.getIp());
|
||||
|
||||
String faceData = BASE64_PREFIX + UrlToBase64Util.imageUrlToBase64(photoUrl);
|
||||
log.info("人脸为:" + faceData);
|
||||
|
||||
facesDto.setData(faceData);
|
||||
facesDtos.add(facesDto);
|
||||
devicePersonDto.setFaces(facesDtos);
|
||||
log.info("人员信息为:" + devicePersonDto.toString());
|
||||
String s = DeviceUtils.addPersons(equipment.getIp(), devicePersonDto);
|
||||
log.info("添加人员返回结果:" + s);
|
||||
} else {
|
||||
log.info("修改用户信息");
|
||||
//更新用户信息
|
||||
if (icsCustomerStaff.getPhoto() != null) {
|
||||
if (!icsCustomerStaff.getPhoto().equals(customer.getPhone())) {
|
||||
DevicePersonDto devicePersonDto = new DevicePersonDto();
|
||||
devicePersonDto.setPersonId(String.valueOf(customerStaff.getId()));
|
||||
ArrayList<FacesDto> facesDtos = new ArrayList<>();
|
||||
FacesDto facesDto = new FacesDto();
|
||||
String photoUrl = url + icsCustomerStaff.getPhoto();
|
||||
String faceData = BASE64_PREFIX + UrlToBase64Util.imageUrlToBase64(photoUrl);
|
||||
facesDto.setData(faceData);
|
||||
facesDto.setFaceId(String.valueOf(customerStaff.getId()));
|
||||
facesDtos.add(facesDto);
|
||||
devicePersonDto.setFaces(facesDtos);
|
||||
DeviceUtils.modifyFaces(equipment.getIp(), devicePersonDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//根据房间id获取设备id
|
||||
List<RoomEquipment> roomEquipments = roomEquipmentService.selectListByRoomId(aLong);
|
||||
for (RoomEquipment roomEquipment : roomEquipments) {
|
||||
//根据设备id获取设备
|
||||
Equipment equipment = equipmentService.selectEquipmentById(roomEquipment.getEquipmentId());
|
||||
if (equipment != null) {
|
||||
if (equipment.getType() == 0){
|
||||
String persons = DeviceUtils.queryPersons(equipment.getIp(), String.valueOf(customerStaff.getId()));
|
||||
JSONObject jsonObject = JSONUtil.parseObj(persons);
|
||||
Integer amount = (Integer) jsonObject.get("amount");
|
||||
if (amount <= 0) {
|
||||
DevicePersonDto devicePersonDto = new DevicePersonDto();
|
||||
ArrayList<FacesDto> facesDtos = new ArrayList<>();
|
||||
devicePersonDto.setPersonId(String.valueOf(customerStaff.getId()));
|
||||
devicePersonDto.setName(customerStaff.getName());
|
||||
devicePersonDto.setPhone(String.valueOf(customerStaff.getMobile()));
|
||||
devicePersonDto.setCertificateType("111");
|
||||
devicePersonDto.setCertificateNumber(customerStaff.getCardNo());
|
||||
//添加人员类型
|
||||
devicePersonDto.setPersonType("whitelist");
|
||||
//添加访客时间
|
||||
FacesDto facesDto = new FacesDto();
|
||||
facesDto.setFaceId(String.valueOf(customerStaff.getId()));
|
||||
String photoUrl = url + customerStaff.getPhoto();
|
||||
String faceData = BASE64_PREFIX + UrlToBase64Util.imageUrlToBase64(photoUrl);
|
||||
|
||||
facesDto.setData(faceData);
|
||||
facesDtos.add(facesDto);
|
||||
devicePersonDto.setFaces(facesDtos);
|
||||
String s = DeviceUtils.addPersons(equipment.getIp(), devicePersonDto);
|
||||
log.info("添加人员返回结果:" + s);
|
||||
} else {
|
||||
//更新用户信息
|
||||
if (icsCustomerStaff.getPhoto() != null) {
|
||||
if (!icsCustomerStaff.getPhoto().equals(customer.getPhone())) {
|
||||
DevicePersonDto devicePersonDto = new DevicePersonDto();
|
||||
devicePersonDto.setPersonId(String.valueOf(customerStaff.getId()));
|
||||
ArrayList<FacesDto> facesDtos = new ArrayList<>();
|
||||
FacesDto facesDto = new FacesDto();
|
||||
String photoUrl = url + icsCustomerStaff.getPhoto();
|
||||
String faceData = BASE64_PREFIX + UrlToBase64Util.imageUrlToBase64(photoUrl);
|
||||
facesDto.setData(faceData);
|
||||
facesDto.setFaceId(String.valueOf(customerStaff.getId()));
|
||||
facesDtos.add(facesDto);
|
||||
devicePersonDto.setFaces(facesDtos);
|
||||
DeviceUtils.modifyFaces(equipment.getIp(), devicePersonDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
customerStaff.setParkId(customer1.getParkId());
|
||||
customerStaff.setTenantId(customer1.getTenantId());
|
||||
int i = icsCustomerStaffService.updateIcsCustomerStaff(customerStaff);
|
||||
Assert.isTrue(i > 0, "更新失败");
|
||||
|
||||
if (customerStaff != null){
|
||||
icsCustomerStaff.setId(customerStaff.getId());
|
||||
int i = icsCustomerStaffService.updateIcsCustomerStaff(icsCustomerStaff);
|
||||
StaffCustomer staffCustomer = new StaffCustomer();
|
||||
staffCustomer.setIcsCustomerId(icsCustomerStaff.getIcsCustomerId());
|
||||
staffCustomer.setStaffId(customerStaff.getId());
|
||||
staffCustomer.setParkId(customer1.getParkId());
|
||||
staffCustomer.setTenantId(customer1.getTenantId());
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerList(staffCustomer);
|
||||
if (staffCustomers.size() == 0) {
|
||||
if (staffCustomers.isEmpty()) {
|
||||
staffCustomerService.insertStaffCustomer(staffCustomer);
|
||||
}
|
||||
|
||||
return toAjax(i);
|
||||
}else {
|
||||
icsCustomerStaff.setDataType("1");
|
||||
icsCustomerStaff.setParkId(customer1.getParkId());
|
||||
icsCustomerStaff.setTenantId(customer1.getTenantId());
|
||||
int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
||||
Assert.isTrue(i > 0, "添加失败");
|
||||
//新增用户和企业 id
|
||||
StaffCustomer staffCustomer = new StaffCustomer();
|
||||
staffCustomer.setIcsCustomerId(icsCustomerStaff.getIcsCustomerId());
|
||||
staffCustomer.setStaffId(icsCustomerStaff.getId());
|
||||
staffCustomer.setParkId(customer1.getParkId());
|
||||
staffCustomer.setTenantId(customer1.getTenantId());
|
||||
staffCustomerService.insertStaffCustomer(staffCustomer);
|
||||
return toAjax(i);
|
||||
}
|
||||
Customer customer = customerService.selectCustomerById(icsCustomerStaff.getIcsCustomerId());
|
||||
if (null != customer){
|
||||
icsCustomerStaff.setParkId(customer.getParkId());
|
||||
icsCustomerStaff.setTenantId(customer.getTenantId());
|
||||
}
|
||||
icsCustomerStaff.setDataType("1");
|
||||
|
||||
int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
||||
Assert.isTrue(i > 0, "添加失败");
|
||||
//新增用户和企业 id
|
||||
StaffCustomer staffCustomer = new StaffCustomer();
|
||||
staffCustomer.setIcsCustomerId(icsCustomerStaff.getIcsCustomerId());
|
||||
staffCustomer.setStaffId(customerStaff.getStaffId());
|
||||
staffCustomer.setParkId(customer.getParkId());
|
||||
staffCustomer.setTenantId(customer.getTenantId());
|
||||
staffCustomerService.insertStaffCustomer(staffCustomer);
|
||||
|
||||
return toAjax(i);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,96 +0,0 @@
|
||||
package com.ics.admin.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ics.admin.domain.WisdomRoom;
|
||||
import com.ics.admin.service.IWisdomRoomService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.WisdomDevice;
|
||||
import com.ics.admin.service.IWisdomDeviceService;
|
||||
import org.wf.jwtp.annotation.Ignore;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能设备 提供者
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wisdom/wisdomDevice")
|
||||
public class WisdomDeviceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWisdomDeviceService wisdomDeviceService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomRoomService wisdomRoomService;
|
||||
|
||||
/**
|
||||
* 查询智能设备
|
||||
*/
|
||||
@GetMapping("get/{id}")
|
||||
public WisdomDevice get(@PathVariable("id") Long id) {
|
||||
return wisdomDeviceService.selectWisdomDeviceById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询智能设备列表
|
||||
*/
|
||||
@Ignore
|
||||
// @RequiresPermissions("wisdom:wisdomDevice:list")
|
||||
@GetMapping("list")
|
||||
public R list(WisdomDevice wisdomDevice) {
|
||||
startPage();
|
||||
List<WisdomDevice> wisdomDevices = wisdomDeviceService.selectWisdomDeviceList(wisdomDevice);
|
||||
if (CollUtil.isNotEmpty(wisdomDevices)){
|
||||
for (WisdomDevice device : wisdomDevices) {
|
||||
WisdomRoom wisdomRoom = wisdomRoomService.selectWisdomRoomById(device.getWisdomRoomId());
|
||||
if (wisdomRoom != null) device.setContentName(wisdomRoom.getMeetingName());
|
||||
}
|
||||
}
|
||||
return result(wisdomDevices);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增保存智能设备
|
||||
*/
|
||||
// @RequiresPermissions("wisdom:wisdomDevice:add")
|
||||
@Ignore
|
||||
@PostMapping("save")
|
||||
public R addSave(@RequestBody WisdomDevice wisdomDevice) {
|
||||
return toAjax(wisdomDeviceService.insertWisdomDevice(wisdomDevice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存智能设备
|
||||
*/
|
||||
// @RequiresPermissions("wisdom:wisdomDevice:edit")
|
||||
@Ignore
|
||||
@PostMapping("update")
|
||||
public R editSave(@RequestBody WisdomDevice wisdomDevice) {
|
||||
return toAjax(wisdomDeviceService.updateWisdomDevice(wisdomDevice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除智能设备
|
||||
*/
|
||||
// @RequiresPermissions("wisdom:wisdomDevice:remove")
|
||||
@Ignore
|
||||
@PostMapping("remove")
|
||||
public R remove(String ids) {
|
||||
return toAjax(wisdomDeviceService.deleteWisdomDeviceByIds(ids));
|
||||
}
|
||||
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
package com.ics.admin.controller;
|
||||
|
||||
import com.ics.admin.service.IWisdomRoomService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.WisdomPanel;
|
||||
import com.ics.admin.service.IWisdomPanelService;
|
||||
import org.wf.jwtp.annotation.Ignore;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 情景面板 提供者
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("wisdomPanel")
|
||||
public class WisdomPanelController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWisdomPanelService wisdomPanelService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomRoomService wisdomRoomService;
|
||||
|
||||
/**
|
||||
* 查询情景面板
|
||||
*/
|
||||
@GetMapping("get/{id}")
|
||||
public WisdomPanel get(@PathVariable("id") Long id) {
|
||||
return wisdomPanelService.selectWisdomPanelById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询情景面板列表
|
||||
*/
|
||||
@Ignore
|
||||
@GetMapping("list")
|
||||
public R list(WisdomPanel wisdomPanel) {
|
||||
startPage();
|
||||
List<WisdomPanel> wisdomPanels = wisdomPanelService.selectWisdomPanelList(wisdomPanel);
|
||||
for (WisdomPanel panel : wisdomPanels) {
|
||||
panel.setMeetingName(wisdomRoomService.selectWisdomRoomById(panel.getWisdomRoom()).getMeetingName());
|
||||
}
|
||||
|
||||
return result(wisdomPanels);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增保存情景面板
|
||||
*/
|
||||
// @RequiresPermissions("admin:panel:add")
|
||||
@Ignore
|
||||
@PostMapping("save")
|
||||
public R addSave(@RequestBody WisdomPanel wisdomPanel) {
|
||||
return toAjax(wisdomPanelService.insertWisdomPanel(wisdomPanel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存情景面板
|
||||
*/
|
||||
@RequiresPermissions("admin:panel:edit")
|
||||
@PostMapping("update")
|
||||
public R editSave(@RequestBody WisdomPanel wisdomPanel) {
|
||||
return toAjax(wisdomPanelService.updateWisdomPanel(wisdomPanel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除情景面板
|
||||
*/
|
||||
@RequiresPermissions("admin:panel:remove")
|
||||
@PostMapping("remove")
|
||||
public R remove(String ids) {
|
||||
return toAjax(wisdomPanelService.deleteWisdomPanelByIds(ids));
|
||||
}
|
||||
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
package com.ics.admin.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.WisdomPanelEquipment;
|
||||
import com.ics.admin.service.IWisdomPanelEquipmentService;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* 窗帘关联 提供者
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("panelEquipment")
|
||||
public class WisdomPanelEquipmentController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWisdomPanelEquipmentService wisdomPanelEquipmentService;
|
||||
|
||||
/**
|
||||
* 查询窗帘关联
|
||||
*/
|
||||
@GetMapping("get/{id}")
|
||||
public WisdomPanelEquipment get(@PathVariable("id") Long id) {
|
||||
return wisdomPanelEquipmentService.selectWisdomPanelEquipmentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询窗帘关联列表
|
||||
*/
|
||||
@RequiresPermissions("admin:equipment:list")
|
||||
@GetMapping("list")
|
||||
public R list(WisdomPanelEquipment wisdomPanelEquipment) {
|
||||
startPage();
|
||||
return result(wisdomPanelEquipmentService.selectWisdomPanelEquipmentList(wisdomPanelEquipment));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增保存窗帘关联
|
||||
*/
|
||||
@RequiresPermissions("admin:equipment:add")
|
||||
@PostMapping("save")
|
||||
public R addSave(@RequestBody WisdomPanelEquipment wisdomPanelEquipment) {
|
||||
return toAjax(wisdomPanelEquipmentService.insertWisdomPanelEquipment(wisdomPanelEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存窗帘关联
|
||||
*/
|
||||
@RequiresPermissions("admin:equipment:edit")
|
||||
@PostMapping("update")
|
||||
public R editSave(@RequestBody WisdomPanelEquipment wisdomPanelEquipment) {
|
||||
return toAjax(wisdomPanelEquipmentService.updateWisdomPanelEquipment(wisdomPanelEquipment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除窗帘关联
|
||||
*/
|
||||
@RequiresPermissions("admin:equipment:remove")
|
||||
@PostMapping("remove")
|
||||
public R remove(String ids) {
|
||||
return toAjax(wisdomPanelEquipmentService.deleteWisdomPanelEquipmentByIds(ids));
|
||||
}
|
||||
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
package com.ics.admin.controller;
|
||||
|
||||
import com.ics.admin.domain.WisdomStaff;
|
||||
import com.ics.admin.service.IIcsCustomerStaffService;
|
||||
import com.ics.admin.service.IWisdomStaffService;
|
||||
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||
import com.ics.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.WisdomRoom;
|
||||
import com.ics.admin.service.IWisdomRoomService;
|
||||
import org.wf.jwtp.annotation.Ignore;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 智能房间 提供者
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/wisdomRoom")
|
||||
public class WisdomRoomController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWisdomRoomService wisdomRoomService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomStaffService wisdomStaffService;
|
||||
|
||||
@Autowired
|
||||
private IIcsCustomerStaffService customerStaffService;
|
||||
|
||||
/**
|
||||
* 查询智能房间
|
||||
*/
|
||||
@GetMapping("get/{id}")
|
||||
public WisdomRoom get(@PathVariable("id") Long id) {
|
||||
return wisdomRoomService.selectWisdomRoomById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询智能房间列表
|
||||
*/
|
||||
@Ignore
|
||||
// @RequiresPermissions("wisdom:wisdomRoom:list")
|
||||
@GetMapping("list")
|
||||
public R list(WisdomRoom wisdomRoom) {
|
||||
startPage();
|
||||
List<WisdomRoom> wisdomRooms = wisdomRoomService.selectList(wisdomRoom);
|
||||
for (WisdomRoom room : wisdomRooms) {
|
||||
List<Long> collect = wisdomStaffService.selectWisdomStaffByRoomId(room.getId());
|
||||
room.setStaffId(collect);
|
||||
IcsCustomerStaff icsCustomerStaff =new IcsCustomerStaff();
|
||||
icsCustomerStaff.setIcsCustomerId(85L);
|
||||
room.setStaffLists(customerStaffService.selectCustomerStaff(icsCustomerStaff));
|
||||
}
|
||||
return result(wisdomRooms);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增保存智能房间
|
||||
*/
|
||||
// @RequiresPermissions("wisdom:wisdomRoom:add")
|
||||
@Ignore
|
||||
@PostMapping("save")
|
||||
public R addSave(@RequestBody WisdomRoom wisdomRoom) {
|
||||
int i = wisdomRoomService.insertWisdomRoom(wisdomRoom);
|
||||
Long id = wisdomRoom.getId();
|
||||
WisdomStaff wisdomStaff = new WisdomStaff();
|
||||
for (Long s : wisdomRoom.getStaffId()) {
|
||||
wisdomStaff.setWisdomRoomId(id);
|
||||
wisdomStaff.setDataType("0");
|
||||
wisdomStaff.setStaffId(s);
|
||||
wisdomStaffService.insertWisdomStaff(wisdomStaff);
|
||||
}
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存智能房间
|
||||
*/
|
||||
// @RequiresPermissions("wisdom:wisdomRoom:edit")
|
||||
@Ignore
|
||||
@PostMapping("update")
|
||||
public R editSave(@RequestBody WisdomRoom wisdomRoom) {
|
||||
int i = wisdomRoomService.updateWisdomRoom(wisdomRoom);
|
||||
WisdomStaff wisdomStaff = new WisdomStaff();
|
||||
List<Long> ids = wisdomStaffService.selectWisdomStaffListByRoomId(wisdomRoom.getId());
|
||||
String joinStr = StringUtils.join(ids, ",");
|
||||
if (ids.size()>0) wisdomStaffService.deleteWisdomStaffByIds(joinStr);
|
||||
for (Long s : wisdomRoom.getStaffId()) {
|
||||
wisdomStaff.setWisdomRoomId(wisdomRoom.getId());
|
||||
wisdomStaff.setDataType("0");
|
||||
wisdomStaff.setStaffId(s);
|
||||
wisdomStaffService.insertWisdomStaff(wisdomStaff);
|
||||
}
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除智能房间
|
||||
*/
|
||||
// @RequiresPermissions("wisdom:wisdomRoom:remove")
|
||||
@Ignore
|
||||
@PostMapping("remove")
|
||||
public R remove(String ids) {
|
||||
return toAjax(wisdomRoomService.deleteWisdomRoomByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户列表
|
||||
*/
|
||||
// @RequiresPermissions("wisdom:wisdomRoom:view")
|
||||
@Ignore
|
||||
@GetMapping("selectStaff")
|
||||
public R selectStaff() {
|
||||
IcsCustomerStaff icsCustomerStaff =new IcsCustomerStaff();
|
||||
icsCustomerStaff.setIcsCustomerId(85L);
|
||||
List<IcsCustomerStaff> customerStaffs = customerStaffService.selectCustomerStaffList(icsCustomerStaff);
|
||||
|
||||
return R.data(customerStaffs);
|
||||
}
|
||||
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
package com.ics.admin.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.WisdomStaff;
|
||||
import com.ics.admin.service.IWisdomStaffService;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* 房间用户关联 提供者
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("staff")
|
||||
public class WisdomStaffController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWisdomStaffService wisdomStaffService;
|
||||
|
||||
/**
|
||||
* 查询房间用户关联
|
||||
*/
|
||||
@GetMapping("get/{id}")
|
||||
public WisdomStaff get(@PathVariable("id") Long id) {
|
||||
return wisdomStaffService.selectWisdomStaffById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询房间用户关联列表
|
||||
*/
|
||||
@RequiresPermissions("admin:staff:list")
|
||||
@GetMapping("list")
|
||||
public R list(WisdomStaff wisdomStaff) {
|
||||
startPage();
|
||||
return result(wisdomStaffService.selectWisdomStaffList(wisdomStaff));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增保存房间用户关联
|
||||
*/
|
||||
@RequiresPermissions("admin:staff:add")
|
||||
@PostMapping("save")
|
||||
public R addSave(@RequestBody WisdomStaff wisdomStaff) {
|
||||
return toAjax(wisdomStaffService.insertWisdomStaff(wisdomStaff));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存房间用户关联
|
||||
*/
|
||||
@RequiresPermissions("admin:staff:edit")
|
||||
@PostMapping("update")
|
||||
public R editSave(@RequestBody WisdomStaff wisdomStaff) {
|
||||
return toAjax(wisdomStaffService.updateWisdomStaff(wisdomStaff));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房间用户关联
|
||||
*/
|
||||
@RequiresPermissions("admin:staff:remove")
|
||||
@PostMapping("remove")
|
||||
public R remove(String ids) {
|
||||
return toAjax(wisdomStaffService.deleteWisdomStaffByIds(ids));
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
package com.ics.admin.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 智能设备对象 tb_wisdom_device
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Data
|
||||
@TableName("tb_wisdom_device")
|
||||
public class WisdomDevice extends BaseEntity<WisdomDevice> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备分类 */
|
||||
private String type;
|
||||
|
||||
private String typeName;
|
||||
|
||||
/** 设备名称 */
|
||||
private String equipmentName;
|
||||
|
||||
/** 设备状态 0在线 1损坏 2离线 */
|
||||
private Long status;
|
||||
|
||||
/** 设备编号 */
|
||||
private String equipmentNum;
|
||||
|
||||
/** 设备图片 */
|
||||
private String pic;
|
||||
|
||||
/** $column.columnComment */
|
||||
private String ip;
|
||||
|
||||
/** 园区ID */
|
||||
private Long parkId;
|
||||
|
||||
/** 会议室id */
|
||||
private Long wisdomRoomId;
|
||||
|
||||
/** 会议室名称 */
|
||||
private String contentName;
|
||||
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package com.ics.admin.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 情景面板对象 tb_wisdom_panel
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Data
|
||||
@TableName("tb_wisdom_panel")
|
||||
public class WisdomPanel extends BaseEntity<WisdomPanel> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 面板名称 */
|
||||
private String panelName;
|
||||
|
||||
/** 按钮id */
|
||||
private Integer buttonId;
|
||||
|
||||
/** 房间id */
|
||||
private Long wisdomRoom;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String meetingName;
|
||||
|
||||
/** 控制面板id */
|
||||
private String panelId;
|
||||
|
||||
private String img;
|
||||
|
||||
private String imgOpen;
|
||||
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package com.ics.admin.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 窗帘关联对象 tb_wisdom_panel_equipment
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Data
|
||||
@TableName("tb_wisdom_panel_equipment")
|
||||
public class WisdomPanelEquipment extends BaseEntity<WisdomPanelEquipment> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 面板id */
|
||||
private Long panelId;
|
||||
|
||||
/** 设备id */
|
||||
private Long equipmentId;
|
||||
|
||||
/** 类型,open,close */
|
||||
private String type;
|
||||
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
package com.ics.admin.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能房间对象 tb_wisdom_room
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Data
|
||||
@TableName("tb_wisdom_room")
|
||||
public class WisdomRoom extends BaseEntity<WisdomRoom> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型(会议室、办公室、茶室、路演厅) */
|
||||
private String type;
|
||||
|
||||
/** 名称 */
|
||||
private String meetingName;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endDate;
|
||||
|
||||
/** 金额备注 */
|
||||
private String remake;
|
||||
|
||||
private String img;
|
||||
|
||||
/** 园区ID */
|
||||
private Long parkId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Long> staffId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer deviceNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer panelNum;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<IcsCustomerStaff> staffLists;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long staffIds;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package com.ics.admin.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 房间用户关联对象 tb_wisdom_staff
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Data
|
||||
@TableName("tb_wisdom_staff")
|
||||
public class WisdomStaff extends BaseEntity<WisdomStaff> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 房间id */
|
||||
private Long wisdomRoomId;
|
||||
|
||||
/** 用户id */
|
||||
private Long staffId;
|
||||
|
||||
/** 园区ID */
|
||||
private Long parkId;
|
||||
|
||||
private Date startTime;
|
||||
|
||||
private Date endDate;
|
||||
|
||||
private String dataType;
|
||||
|
||||
private Long reservationId;
|
||||
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ics.admin.mapper;
|
||||
|
||||
import com.ics.admin.domain.WisdomDevice;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能设备Mapper接口
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Mapper
|
||||
public interface WisdomDeviceMapper extends BaseMapper<WisdomDevice> {
|
||||
/**
|
||||
* 查询智能设备
|
||||
*
|
||||
* @param id 智能设备ID
|
||||
* @return 智能设备
|
||||
*/
|
||||
WisdomDevice selectWisdomDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询智能设备列表
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 智能设备集合
|
||||
*/
|
||||
List<WisdomDevice> selectWisdomDeviceList(WisdomDevice wisdomDevice);
|
||||
|
||||
/**
|
||||
* 新增智能设备
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomDevice(WisdomDevice wisdomDevice);
|
||||
|
||||
/**
|
||||
* 修改智能设备
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomDevice(WisdomDevice wisdomDevice);
|
||||
|
||||
/**
|
||||
* 删除智能设备
|
||||
*
|
||||
* @param id 智能设备ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除智能设备
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomDeviceByIds(String[] ids);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ics.admin.mapper;
|
||||
|
||||
import com.ics.admin.domain.WisdomPanelEquipment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 窗帘关联Mapper接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Mapper
|
||||
public interface WisdomPanelEquipmentMapper extends BaseMapper<WisdomPanelEquipment> {
|
||||
/**
|
||||
* 查询窗帘关联
|
||||
*
|
||||
* @param id 窗帘关联ID
|
||||
* @return 窗帘关联
|
||||
*/
|
||||
WisdomPanelEquipment selectWisdomPanelEquipmentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询窗帘关联列表
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 窗帘关联集合
|
||||
*/
|
||||
List<WisdomPanelEquipment> selectWisdomPanelEquipmentList(WisdomPanelEquipment wisdomPanelEquipment);
|
||||
|
||||
/**
|
||||
* 新增窗帘关联
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomPanelEquipment(WisdomPanelEquipment wisdomPanelEquipment);
|
||||
|
||||
/**
|
||||
* 修改窗帘关联
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomPanelEquipment(WisdomPanelEquipment wisdomPanelEquipment);
|
||||
|
||||
/**
|
||||
* 删除窗帘关联
|
||||
*
|
||||
* @param id 窗帘关联ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelEquipmentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除窗帘关联
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelEquipmentByIds(String[] ids);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ics.admin.mapper;
|
||||
|
||||
import com.ics.admin.domain.WisdomPanel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 情景面板Mapper接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Mapper
|
||||
public interface WisdomPanelMapper extends BaseMapper<WisdomPanel> {
|
||||
/**
|
||||
* 查询情景面板
|
||||
*
|
||||
* @param id 情景面板ID
|
||||
* @return 情景面板
|
||||
*/
|
||||
WisdomPanel selectWisdomPanelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询情景面板列表
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 情景面板集合
|
||||
*/
|
||||
List<WisdomPanel> selectWisdomPanelList(WisdomPanel wisdomPanel);
|
||||
|
||||
/**
|
||||
* 新增情景面板
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomPanel(WisdomPanel wisdomPanel);
|
||||
|
||||
/**
|
||||
* 修改情景面板
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomPanel(WisdomPanel wisdomPanel);
|
||||
|
||||
/**
|
||||
* 删除情景面板
|
||||
*
|
||||
* @param id 情景面板ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除情景面板
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelByIds(String[] ids);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ics.admin.mapper;
|
||||
|
||||
import com.ics.admin.domain.WisdomRoom;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能房间Mapper接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Mapper
|
||||
public interface WisdomRoomMapper extends BaseMapper<WisdomRoom> {
|
||||
/**
|
||||
* 查询智能房间
|
||||
*
|
||||
* @param id 智能房间ID
|
||||
* @return 智能房间
|
||||
*/
|
||||
WisdomRoom selectWisdomRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 查询智能房间列表
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 智能房间集合
|
||||
*/
|
||||
List<WisdomRoom> selectWisdomRoomList(WisdomRoom wisdomRoom);
|
||||
|
||||
/**
|
||||
* 新增智能房间
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomRoom(WisdomRoom wisdomRoom);
|
||||
|
||||
/**
|
||||
* 修改智能房间
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomRoom(WisdomRoom wisdomRoom);
|
||||
|
||||
/**
|
||||
* 删除智能房间
|
||||
*
|
||||
* @param id 智能房间ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除智能房间
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomRoomByIds(String[] ids);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ics.admin.mapper;
|
||||
|
||||
import com.ics.admin.domain.WisdomStaff;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间用户关联Mapper接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Mapper
|
||||
public interface WisdomStaffMapper extends BaseMapper<WisdomStaff> {
|
||||
/**
|
||||
* 查询房间用户关联
|
||||
*
|
||||
* @param id 房间用户关联ID
|
||||
* @return 房间用户关联
|
||||
*/
|
||||
WisdomStaff selectWisdomStaffById(Long id);
|
||||
|
||||
/**
|
||||
* 查询房间用户关联列表
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 房间用户关联集合
|
||||
*/
|
||||
List<WisdomStaff> selectWisdomStaffList(WisdomStaff wisdomStaff);
|
||||
|
||||
/**
|
||||
* 新增房间用户关联
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomStaff(WisdomStaff wisdomStaff);
|
||||
|
||||
/**
|
||||
* 修改房间用户关联
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomStaff(WisdomStaff wisdomStaff);
|
||||
|
||||
/**
|
||||
* 删除房间用户关联
|
||||
*
|
||||
* @param id 房间用户关联ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomStaffById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除房间用户关联
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomStaffByIds(String[] ids);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.ics.admin.service;
|
||||
|
||||
import com.ics.admin.domain.WisdomDevice;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能设备Service接口
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
public interface IWisdomDeviceService extends IService<WisdomDevice> {
|
||||
/**
|
||||
* 查询智能设备
|
||||
*
|
||||
* @param id 智能设备ID
|
||||
* @return 智能设备
|
||||
*/
|
||||
WisdomDevice selectWisdomDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询智能设备列表
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 智能设备集合
|
||||
*/
|
||||
List<WisdomDevice> selectWisdomDeviceList(WisdomDevice wisdomDevice);
|
||||
|
||||
/**
|
||||
* 新增智能设备
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomDevice(WisdomDevice wisdomDevice);
|
||||
|
||||
/**
|
||||
* 修改智能设备
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomDevice(WisdomDevice wisdomDevice);
|
||||
|
||||
/**
|
||||
* 批量删除智能设备
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomDeviceByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除智能设备信息
|
||||
*
|
||||
* @param id 智能设备ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomDeviceById(Long id);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ics.admin.service;
|
||||
|
||||
import com.ics.admin.domain.WisdomPanelEquipment;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 窗帘关联Service接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
public interface IWisdomPanelEquipmentService extends IService<WisdomPanelEquipment> {
|
||||
/**
|
||||
* 查询窗帘关联
|
||||
*
|
||||
* @param id 窗帘关联ID
|
||||
* @return 窗帘关联
|
||||
*/
|
||||
WisdomPanelEquipment selectWisdomPanelEquipmentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询窗帘关联列表
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 窗帘关联集合
|
||||
*/
|
||||
List<WisdomPanelEquipment> selectWisdomPanelEquipmentList(WisdomPanelEquipment wisdomPanelEquipment);
|
||||
|
||||
/**
|
||||
* 新增窗帘关联
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomPanelEquipment(WisdomPanelEquipment wisdomPanelEquipment);
|
||||
|
||||
/**
|
||||
* 修改窗帘关联
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomPanelEquipment(WisdomPanelEquipment wisdomPanelEquipment);
|
||||
|
||||
/**
|
||||
* 批量删除窗帘关联
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelEquipmentByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除窗帘关联信息
|
||||
*
|
||||
* @param id 窗帘关联ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelEquipmentById(Long id);
|
||||
|
||||
List<WisdomPanelEquipment> selectWisdomPanelEquipmentByPanelId(Long panelId);
|
||||
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.ics.admin.service;
|
||||
|
||||
import com.ics.admin.domain.WisdomPanel;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 情景面板Service接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
public interface IWisdomPanelService extends IService<WisdomPanel> {
|
||||
/**
|
||||
* 查询情景面板
|
||||
*
|
||||
* @param id 情景面板ID
|
||||
* @return 情景面板
|
||||
*/
|
||||
WisdomPanel selectWisdomPanelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询情景面板列表
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 情景面板集合
|
||||
*/
|
||||
List<WisdomPanel> selectWisdomPanelList(WisdomPanel wisdomPanel);
|
||||
|
||||
/**
|
||||
* 新增情景面板
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomPanel(WisdomPanel wisdomPanel);
|
||||
|
||||
/**
|
||||
* 修改情景面板
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomPanel(WisdomPanel wisdomPanel);
|
||||
|
||||
/**
|
||||
* 批量删除情景面板
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除情景面板信息
|
||||
*
|
||||
* @param id 情景面板ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomPanelById(Long id);
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
package com.ics.admin.service;
|
||||
|
||||
import com.ics.admin.domain.WisdomRoom;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能房间Service接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
public interface IWisdomRoomService extends IService<WisdomRoom> {
|
||||
/**
|
||||
* 查询智能房间
|
||||
*
|
||||
* @param id 智能房间ID
|
||||
* @return 智能房间
|
||||
*/
|
||||
WisdomRoom selectWisdomRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 查询智能房间列表
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 智能房间集合
|
||||
*/
|
||||
List<WisdomRoom> selectWisdomRoomList(WisdomRoom wisdomRoom);
|
||||
|
||||
/**
|
||||
* 新增智能房间
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomRoom(WisdomRoom wisdomRoom);
|
||||
|
||||
/**
|
||||
* 修改智能房间
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomRoom(WisdomRoom wisdomRoom);
|
||||
|
||||
/**
|
||||
* 批量删除智能房间
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomRoomByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除智能房间信息
|
||||
*
|
||||
* @param id 智能房间ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomRoomById(Long id);
|
||||
|
||||
List<WisdomRoom> selectList(WisdomRoom wisdomRoom);
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
package com.ics.admin.service;
|
||||
|
||||
import com.ics.admin.domain.WisdomStaff;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间用户关联Service接口
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
public interface IWisdomStaffService extends IService<WisdomStaff> {
|
||||
/**
|
||||
* 查询房间用户关联
|
||||
*
|
||||
* @param id 房间用户关联ID
|
||||
* @return 房间用户关联
|
||||
*/
|
||||
WisdomStaff selectWisdomStaffById(Long id);
|
||||
|
||||
/**
|
||||
* 查询房间用户关联列表
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 房间用户关联集合
|
||||
*/
|
||||
List<WisdomStaff> selectWisdomStaffList(WisdomStaff wisdomStaff);
|
||||
|
||||
/**
|
||||
* 新增房间用户关联
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWisdomStaff(WisdomStaff wisdomStaff);
|
||||
|
||||
/**
|
||||
* 修改房间用户关联
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWisdomStaff(WisdomStaff wisdomStaff);
|
||||
|
||||
/**
|
||||
* 批量删除房间用户关联
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomStaffByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除房间用户关联信息
|
||||
*
|
||||
* @param id 房间用户关联ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWisdomStaffById(Long id);
|
||||
|
||||
int deleteWisdomStaffByRoomId(Long id);
|
||||
|
||||
List<Long> selectWisdomStaffListByRoomId(Long id);
|
||||
|
||||
List<Long> selectWisdomStaffByRoomId(Long id);
|
||||
|
||||
Integer selectByUserIdAndRoomId(Integer loginStaffId, String dataType);
|
||||
|
||||
List<WisdomStaff> selectListByUserIdAndRoomId(Integer loginStaffId, String s);
|
||||
|
||||
int selectOneByUserIdAndRoomId(Long userId, Long wisdomRoomId);
|
||||
|
||||
List<IcsCustomerStaff> selectListByReservationId(Long id);
|
||||
|
||||
Integer selectListByReservationIdAndUserId(Long reservationId, Long participantId);
|
||||
|
||||
Integer deleteWisdomStaffByReservationId(Long id);
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
package com.ics.admin.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ics.admin.mapper.WisdomDeviceMapper;
|
||||
import com.ics.admin.domain.WisdomDevice;
|
||||
import com.ics.admin.service.IWisdomDeviceService;
|
||||
|
||||
/**
|
||||
* 智能设备Service业务层处理
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Service
|
||||
public class WisdomDeviceServiceImpl extends ServiceImpl<WisdomDeviceMapper, WisdomDevice> implements IWisdomDeviceService {
|
||||
@Autowired
|
||||
private WisdomDeviceMapper wisdomDeviceMapper;
|
||||
|
||||
/**
|
||||
* 查询智能设备
|
||||
*
|
||||
* @param id 智能设备ID
|
||||
* @return 智能设备
|
||||
*/
|
||||
@Override
|
||||
public WisdomDevice selectWisdomDeviceById(Long id) {
|
||||
return wisdomDeviceMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询智能设备列表
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 智能设备
|
||||
*/
|
||||
@Override
|
||||
public List<WisdomDevice> selectWisdomDeviceList(WisdomDevice wisdomDevice) {
|
||||
QueryWrapper<WisdomDevice> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq(wisdomDevice.getWisdomRoomId() !=null,"wisdom_room_id",wisdomDevice.getWisdomRoomId());
|
||||
queryWrapper.eq(wisdomDevice.getType() !=null,"type",wisdomDevice.getType());
|
||||
return wisdomDeviceMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增智能设备
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWisdomDevice(WisdomDevice wisdomDevice) {
|
||||
return wisdomDeviceMapper.insert(wisdomDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改智能设备
|
||||
*
|
||||
* @param wisdomDevice 智能设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWisdomDevice(WisdomDevice wisdomDevice) {
|
||||
return wisdomDeviceMapper.updateById(wisdomDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除智能设备对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomDeviceByIds(String ids) {
|
||||
String[] idsArray = StrUtil.split(ids,",");
|
||||
return wisdomDeviceMapper.deleteBatchIds(CollUtil.toList(idsArray));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除智能设备信息
|
||||
*
|
||||
* @param id 智能设备ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomDeviceById(Long id) {
|
||||
return wisdomDeviceMapper.deleteWisdomDeviceById(id);
|
||||
}
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
package com.ics.admin.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ics.admin.mapper.WisdomPanelEquipmentMapper;
|
||||
import com.ics.admin.domain.WisdomPanelEquipment;
|
||||
import com.ics.admin.service.IWisdomPanelEquipmentService;
|
||||
|
||||
/**
|
||||
* 窗帘关联Service业务层处理
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Service
|
||||
public class WisdomPanelEquipmentServiceImpl extends ServiceImpl<WisdomPanelEquipmentMapper, WisdomPanelEquipment> implements IWisdomPanelEquipmentService {
|
||||
@Autowired
|
||||
private WisdomPanelEquipmentMapper wisdomPanelEquipmentMapper;
|
||||
|
||||
/**
|
||||
* 查询窗帘关联
|
||||
*
|
||||
* @param id 窗帘关联ID
|
||||
* @return 窗帘关联
|
||||
*/
|
||||
@Override
|
||||
public WisdomPanelEquipment selectWisdomPanelEquipmentById(Long id) {
|
||||
return wisdomPanelEquipmentMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询窗帘关联列表
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 窗帘关联
|
||||
*/
|
||||
@Override
|
||||
public List<WisdomPanelEquipment> selectWisdomPanelEquipmentList(WisdomPanelEquipment wisdomPanelEquipment) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
return wisdomPanelEquipmentMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增窗帘关联
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWisdomPanelEquipment(WisdomPanelEquipment wisdomPanelEquipment) {
|
||||
return wisdomPanelEquipmentMapper.insert(wisdomPanelEquipment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改窗帘关联
|
||||
*
|
||||
* @param wisdomPanelEquipment 窗帘关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWisdomPanelEquipment(WisdomPanelEquipment wisdomPanelEquipment) {
|
||||
return wisdomPanelEquipmentMapper.updateById(wisdomPanelEquipment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除窗帘关联对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomPanelEquipmentByIds(String ids) {
|
||||
String[] idsArray = StrUtil.split(ids,",");
|
||||
return wisdomPanelEquipmentMapper.deleteBatchIds(CollUtil.toList(idsArray));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除窗帘关联信息
|
||||
*
|
||||
* @param id 窗帘关联ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomPanelEquipmentById(Long id) {
|
||||
return wisdomPanelEquipmentMapper.deleteWisdomPanelEquipmentById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WisdomPanelEquipment> selectWisdomPanelEquipmentByPanelId(Long panelId) {
|
||||
|
||||
QueryWrapper<WisdomPanelEquipment> wrapper = new QueryWrapper<WisdomPanelEquipment>().eq("panel_id", panelId);
|
||||
return wisdomPanelEquipmentMapper.selectList(wrapper);
|
||||
}
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.ics.admin.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ics.admin.mapper.WisdomPanelMapper;
|
||||
import com.ics.admin.domain.WisdomPanel;
|
||||
import com.ics.admin.service.IWisdomPanelService;
|
||||
|
||||
/**
|
||||
* 情景面板Service业务层处理
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Service
|
||||
public class WisdomPanelServiceImpl extends ServiceImpl<WisdomPanelMapper, WisdomPanel> implements IWisdomPanelService {
|
||||
@Autowired
|
||||
private WisdomPanelMapper wisdomPanelMapper;
|
||||
|
||||
/**
|
||||
* 查询情景面板
|
||||
*
|
||||
* @param id 情景面板ID
|
||||
* @return 情景面板
|
||||
*/
|
||||
@Override
|
||||
public WisdomPanel selectWisdomPanelById(Long id) {
|
||||
return wisdomPanelMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询情景面板列表
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 情景面板
|
||||
*/
|
||||
@Override
|
||||
public List<WisdomPanel> selectWisdomPanelList(WisdomPanel wisdomPanel) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq(wisdomPanel.getWisdomRoom() !=null,"wisdom_room",wisdomPanel.getWisdomRoom());
|
||||
return wisdomPanelMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增情景面板
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWisdomPanel(WisdomPanel wisdomPanel) {
|
||||
return wisdomPanelMapper.insert(wisdomPanel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改情景面板
|
||||
*
|
||||
* @param wisdomPanel 情景面板
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWisdomPanel(WisdomPanel wisdomPanel) {
|
||||
return wisdomPanelMapper.updateById(wisdomPanel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除情景面板对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomPanelByIds(String ids) {
|
||||
String[] idsArray = StrUtil.split(ids,",");
|
||||
return wisdomPanelMapper.deleteBatchIds(CollUtil.toList(idsArray));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除情景面板信息
|
||||
*
|
||||
* @param id 情景面板ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomPanelById(Long id) {
|
||||
return wisdomPanelMapper.deleteWisdomPanelById(id);
|
||||
}
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
package com.ics.admin.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ics.admin.mapper.WisdomRoomMapper;
|
||||
import com.ics.admin.domain.WisdomRoom;
|
||||
import com.ics.admin.service.IWisdomRoomService;
|
||||
|
||||
/**
|
||||
* 智能房间Service业务层处理
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Service
|
||||
public class WisdomRoomServiceImpl extends ServiceImpl<WisdomRoomMapper, WisdomRoom> implements IWisdomRoomService {
|
||||
@Autowired
|
||||
private WisdomRoomMapper wisdomRoomMapper;
|
||||
|
||||
/**
|
||||
* 查询智能房间
|
||||
*
|
||||
* @param id 智能房间ID
|
||||
* @return 智能房间
|
||||
*/
|
||||
@Override
|
||||
public WisdomRoom selectWisdomRoomById(Long id) {
|
||||
return wisdomRoomMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询智能房间列表
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 智能房间
|
||||
*/
|
||||
@Override
|
||||
public List<WisdomRoom> selectWisdomRoomList(WisdomRoom wisdomRoom) {
|
||||
return wisdomRoomMapper.selectWisdomRoomList(wisdomRoom);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增智能房间
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWisdomRoom(WisdomRoom wisdomRoom) {
|
||||
return wisdomRoomMapper.insert(wisdomRoom);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改智能房间
|
||||
*
|
||||
* @param wisdomRoom 智能房间
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWisdomRoom(WisdomRoom wisdomRoom) {
|
||||
return wisdomRoomMapper.updateById(wisdomRoom);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除智能房间对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomRoomByIds(String ids) {
|
||||
String[] idsArray = StrUtil.split(ids,",");
|
||||
return wisdomRoomMapper.deleteBatchIds(CollUtil.toList(idsArray));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除智能房间信息
|
||||
*
|
||||
* @param id 智能房间ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomRoomById(Long id) {
|
||||
return wisdomRoomMapper.deleteWisdomRoomById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WisdomRoom> selectList(WisdomRoom wisdomRoom) {
|
||||
|
||||
QueryWrapper<WisdomRoom> queryWrapper = new QueryWrapper<>();
|
||||
return wisdomRoomMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
@ -1,186 +0,0 @@
|
||||
package com.ics.admin.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ics.admin.mapper.IcsCustomerStaffMapper;
|
||||
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ics.admin.mapper.WisdomStaffMapper;
|
||||
import com.ics.admin.domain.WisdomStaff;
|
||||
import com.ics.admin.service.IWisdomStaffService;
|
||||
|
||||
/**
|
||||
* 房间用户关联Service业务层处理
|
||||
*
|
||||
* @author ics
|
||||
* @date 2024-08-21
|
||||
*/
|
||||
@Service
|
||||
public class WisdomStaffServiceImpl extends ServiceImpl<WisdomStaffMapper, WisdomStaff> implements IWisdomStaffService {
|
||||
@Autowired
|
||||
private WisdomStaffMapper wisdomStaffMapper;
|
||||
|
||||
@Autowired
|
||||
private IcsCustomerStaffMapper icsCustomerStaffMapper;
|
||||
|
||||
/**
|
||||
* 查询房间用户关联
|
||||
*
|
||||
* @param id 房间用户关联ID
|
||||
* @return 房间用户关联
|
||||
*/
|
||||
@Override
|
||||
public WisdomStaff selectWisdomStaffById(Long id) {
|
||||
return wisdomStaffMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询房间用户关联列表
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 房间用户关联
|
||||
*/
|
||||
@Override
|
||||
public List<WisdomStaff> selectWisdomStaffList(WisdomStaff wisdomStaff) {
|
||||
QueryWrapper<WisdomStaff> queryWrapper = new QueryWrapper();
|
||||
return wisdomStaffMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房间用户关联
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWisdomStaff(WisdomStaff wisdomStaff) {
|
||||
return wisdomStaffMapper.insert(wisdomStaff);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改房间用户关联
|
||||
*
|
||||
* @param wisdomStaff 房间用户关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWisdomStaff(WisdomStaff wisdomStaff) {
|
||||
return wisdomStaffMapper.updateById(wisdomStaff);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房间用户关联对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomStaffByIds(String ids) {
|
||||
String[] idsArray = StrUtil.split(ids,",");
|
||||
return wisdomStaffMapper.deleteBatchIds(CollUtil.toList(idsArray));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房间用户关联信息
|
||||
*
|
||||
* @param id 房间用户关联ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWisdomStaffById(Long id) {
|
||||
return wisdomStaffMapper.deleteWisdomStaffById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWisdomStaffByRoomId(Long id) {
|
||||
|
||||
UpdateWrapper<WisdomStaff> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("wisdom_room_id",id);
|
||||
return wisdomStaffMapper.delete(updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> selectWisdomStaffListByRoomId(Long id) {
|
||||
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("wisdom_room_id",id);
|
||||
List<WisdomStaff> wisdomStaffs = wisdomStaffMapper.selectList(wrapper);
|
||||
return wisdomStaffs.stream().map(WisdomStaff::getId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> selectWisdomStaffByRoomId(Long id) {
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("wisdom_room_id",id);
|
||||
wrapper.groupBy("staff_id");
|
||||
List<WisdomStaff> wisdomStaffs = wisdomStaffMapper.selectList(wrapper);
|
||||
List<Long> collect = wisdomStaffs.stream().map(WisdomStaff::getStaffId).collect(Collectors.toList());
|
||||
return collect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectByUserIdAndRoomId(Integer loginStaffId,String dataType) {
|
||||
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("staff_id",loginStaffId);
|
||||
wrapper.eq(dataType !=null,"data_type",dataType);
|
||||
return wisdomStaffMapper.selectCount(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WisdomStaff> selectListByUserIdAndRoomId(Integer loginStaffId, String dataType) {
|
||||
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("staff_id",loginStaffId);
|
||||
wrapper.eq(dataType !=null,"data_type",dataType);
|
||||
return wisdomStaffMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectOneByUserIdAndRoomId(Long userId, Long wisdomRoomId) {
|
||||
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("staff_id",userId);
|
||||
wrapper.eq("wisdom_room_id",wisdomRoomId);
|
||||
return wisdomStaffMapper.selectCount(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IcsCustomerStaff> selectListByReservationId(Long id) {
|
||||
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("reservation_id",id);
|
||||
List<WisdomStaff> wisdomStaffs = wisdomStaffMapper.selectList(wrapper);
|
||||
List<Long> longStream = wisdomStaffs.stream().map(WisdomStaff::getStaffId).collect(Collectors.toList());
|
||||
if(longStream.size() == 0){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<IcsCustomerStaff> customerStaffs = icsCustomerStaffMapper.selectBatchIds(longStream);
|
||||
return customerStaffs;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectListByReservationIdAndUserId(Long reservationId, Long participantId) {
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("reservation_id",reservationId);
|
||||
wrapper.eq("staff_id",participantId);
|
||||
return wisdomStaffMapper.selectCount(wrapper);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteWisdomStaffByReservationId(Long id) {
|
||||
QueryWrapper<WisdomStaff> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("reservation_id",id);
|
||||
return wisdomStaffMapper.delete(wrapper);
|
||||
}
|
||||
}
|
@ -133,20 +133,23 @@ public class ReservationPersonServiceImpl extends ServiceImpl<ReservationPersonM
|
||||
|
||||
@Override
|
||||
public IPage<Reservation> selectListByParticipantId(Long userId,Long parkId,Integer page,Integer limit) {
|
||||
QueryWrapper<ReservationPerson> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("participant_id",userId);
|
||||
queryWrapper.eq("park_id",parkId);
|
||||
List<ReservationPerson> list = reservationPersonMapper.selectList(queryWrapper);
|
||||
List<Long> collect = list.stream().map(item -> {
|
||||
return item.getReservationId();
|
||||
}).collect(Collectors.toList());
|
||||
if (CollUtil.isEmpty(collect)){
|
||||
IPage<Reservation> iPage = new Page<>(page,limit);
|
||||
return iPage ;
|
||||
}
|
||||
|
||||
// QueryWrapper<ReservationPerson> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq("participant_id",userId);
|
||||
// queryWrapper.eq("park_id",parkId);
|
||||
// List<ReservationPerson> list = reservationPersonMapper.selectList(queryWrapper);
|
||||
// List<Long> collect = list.stream().map(item -> {
|
||||
// return item.getReservationId();
|
||||
// }).collect(Collectors.toList());
|
||||
// if (CollUtil.isEmpty(collect)){
|
||||
// IPage<Reservation> iPage = new Page<>(page,limit);
|
||||
// return iPage ;
|
||||
// }
|
||||
IPage<Reservation> iPage = new Page<>(page,limit);
|
||||
QueryWrapper<Reservation> wrapper = new QueryWrapper<>();
|
||||
wrapper.in("id",collect);
|
||||
// wrapper.in("id",collect);
|
||||
wrapper.eq("user_id",userId);
|
||||
wrapper.eq("park_id",parkId);
|
||||
wrapper.orderByDesc("start_time");
|
||||
IPage<Reservation> iPage1 = reservationMapper.selectPage(iPage, wrapper);
|
||||
List<Reservation> records = iPage1.getRecords();
|
||||
|
@ -246,9 +246,9 @@ public class ReservationServiceImpl extends ServiceImpl<ReservationMapper, Reser
|
||||
|
||||
|
||||
QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>();
|
||||
if (!staff.getDataType().equals("7")){
|
||||
queryWrapper.eq("user_id",reservation.getUserId());
|
||||
}
|
||||
// if (!staff.getDataType().equals("7")){
|
||||
// }
|
||||
queryWrapper.eq("user_id",reservation.getUserId());
|
||||
|
||||
queryWrapper.eq("park_id",reservation.getParkId());
|
||||
queryWrapper.orderByDesc("start_time");
|
||||
|
@ -1,121 +0,0 @@
|
||||
<?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.ics.admin.mapper.WisdomDeviceMapper">
|
||||
|
||||
<resultMap type="com.ics.admin.domain.WisdomDevice" id="WisdomDeviceResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="equipmentName" column="equipment_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="equipmentNum" column="equipment_num" />
|
||||
<result property="pic" column="pic" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="deleteFlag" column="delete_flag" />
|
||||
<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="ip" column="ip" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="parkId" column="park_id" />
|
||||
<result property="wisdomRoomId" column="wisdom_room_id" />
|
||||
<result property="contentName" column="content_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWisdomDeviceVo">
|
||||
SELECT id, type, equipment_name,type_name, status,wisdom_room_id, equipment_num, pic, delete_flag, create_by, create_time, update_by, update_time, ip, tenant_id, park_id, content_id, content_name FROM tb_wisdom_device
|
||||
</sql>
|
||||
|
||||
<select id="selectWisdomDeviceList" parameterType="WisdomDevice" resultMap="WisdomDeviceResult">
|
||||
<include refid="selectWisdomDeviceVo"/>
|
||||
<where>
|
||||
<if test="equipmentName != null and equipmentName != ''"> AND equipment_name LIKE CONCAT('%', #{equipmentName}, '%')</if>
|
||||
<if test="contentName != null and contentName != ''"> AND content_name LIKE CONCAT('%', #{contentName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWisdomDeviceById" parameterType="Long" resultMap="WisdomDeviceResult">
|
||||
<include refid="selectWisdomDeviceVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWisdomDevice" parameterType="WisdomDevice" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO tb_wisdom_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null ">type,</if>
|
||||
<if test="equipmentName != null and equipmentName != ''">equipment_name,</if>
|
||||
<if test="status != null ">status,</if>
|
||||
<if test="equipmentNum != null and equipmentNum != ''">equipment_num,</if>
|
||||
<if test="pic != null and pic != ''">pic,</if>
|
||||
<if test="deleteFlag != null ">delete_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="ip != null and ip != ''">ip,</if>
|
||||
<if test="tenantId != null ">tenant_id,</if>
|
||||
<if test="typeName != null ">type_name,</if>
|
||||
<if test="wisdomRoomId != null ">wisdom_room_id,</if>
|
||||
<if test="parkId != null ">park_id,</if>
|
||||
<if test="contentId != null ">content_id,</if>
|
||||
<if test="contentName != null and contentName != ''">content_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null ">#{type},</if>
|
||||
<if test="equipmentName != null and equipmentName != ''">#{equipmentName},</if>
|
||||
<if test="status != null ">#{status},</if>
|
||||
<if test="equipmentNum != null and equipmentNum != ''">#{equipmentNum},</if>
|
||||
<if test="pic != null and pic != ''">#{pic},</if>
|
||||
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||
<if test="typeName != null ">#{typeName},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
<if test="ip != null and ip != ''">#{ip},</if>
|
||||
<if test="wisdomRoomId != null and wisdomRoomId != ''">#{wisdom_room_id},</if>
|
||||
<if test="tenantId != null ">#{tenantId},</if>
|
||||
<if test="parkId != null ">#{parkId},</if>
|
||||
<if test="contentId != null ">#{contentId},</if>
|
||||
<if test="contentName != null and contentName != ''">#{contentName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWisdomDevice" parameterType="WisdomDevice">
|
||||
UPDATE tb_wisdom_device
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null ">type = #{type},</if>
|
||||
<if test="equipmentName != null and equipmentName != ''">equipment_name = #{equipmentName},</if>
|
||||
<if test="status != null ">status = #{status},</if>
|
||||
<if test="equipmentNum != null and equipmentNum != ''">equipment_num = #{equipmentNum},</if>
|
||||
<if test="pic != null and pic != ''">pic = #{pic},</if>
|
||||
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="typeName != null ">type_name = #{typeName},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="ip != null and ip != ''">ip = #{ip},</if>
|
||||
<if test="wisdomRoomId != null and wisdomRoomId != ''">wisdom_room_id = #{wisdomRoomId},</if>
|
||||
<if test="tenantId != null ">tenant_id = #{tenantId},</if>
|
||||
<if test="parkId != null ">park_id = #{parkId},</if>
|
||||
<if test="contentId != null ">content_id = #{contentId},</if>
|
||||
<if test="contentName != null and contentName != ''">content_name = #{contentName},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWisdomDeviceById" parameterType="Long">
|
||||
DELETE FROM tb_wisdom_device WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWisdomDeviceByIds" parameterType="String">
|
||||
DELETE FROM tb_wisdom_device where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -1,68 +0,0 @@
|
||||
<?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.ics.admin.mapper.WisdomPanelEquipmentMapper">
|
||||
|
||||
<resultMap type="com.ics.admin.domain.WisdomPanelEquipment" id="WisdomPanelEquipmentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="panelId" column="panel_id" />
|
||||
<result property="equipmentId" column="equipment_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="type" column="type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWisdomPanelEquipmentVo">
|
||||
SELECT id, panel_id, equipment_id, create_time, type FROM tb_wisdom_panel_equipment
|
||||
</sql>
|
||||
|
||||
<select id="selectWisdomPanelEquipmentList" parameterType="WisdomPanelEquipment" resultMap="WisdomPanelEquipmentResult">
|
||||
<include refid="selectWisdomPanelEquipmentVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWisdomPanelEquipmentById" parameterType="Long" resultMap="WisdomPanelEquipmentResult">
|
||||
<include refid="selectWisdomPanelEquipmentVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWisdomPanelEquipment" parameterType="WisdomPanelEquipment" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO tb_wisdom_panel_equipment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="panelId != null ">panel_id,</if>
|
||||
<if test="equipmentId != null ">equipment_id,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="panelId != null ">#{panelId},</if>
|
||||
<if test="equipmentId != null ">#{equipmentId},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWisdomPanelEquipment" parameterType="WisdomPanelEquipment">
|
||||
UPDATE tb_wisdom_panel_equipment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="panelId != null ">panel_id = #{panelId},</if>
|
||||
<if test="equipmentId != null ">equipment_id = #{equipmentId},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWisdomPanelEquipmentById" parameterType="Long">
|
||||
DELETE FROM tb_wisdom_panel_equipment WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWisdomPanelEquipmentByIds" parameterType="String">
|
||||
DELETE FROM tb_wisdom_panel_equipment where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -1,81 +0,0 @@
|
||||
<?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.ics.admin.mapper.WisdomPanelMapper">
|
||||
|
||||
<resultMap type="com.ics.admin.domain.WisdomPanel" id="WisdomPanelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="panelName" column="panel_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="buttonId" column="button_id" />
|
||||
<result property="wisdomRoom" column="wisdom_room" />
|
||||
<result property="img" column="img" />
|
||||
<result property="imgOpen" column="imgOpen" />
|
||||
<result property="panelId" column="panel_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWisdomPanelVo">
|
||||
SELECT id, panel_name, create_time, button_id, wisdom_room, panel_id FROM tb_wisdom_panel
|
||||
</sql>
|
||||
|
||||
<select id="selectWisdomPanelList" parameterType="WisdomPanel" resultMap="WisdomPanelResult">
|
||||
<include refid="selectWisdomPanelVo"/>
|
||||
<where>
|
||||
<if test="panelName != null and panelName != ''"> AND panel_name LIKE CONCAT('%', #{panelName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWisdomPanelById" parameterType="Long" resultMap="WisdomPanelResult">
|
||||
<include refid="selectWisdomPanelVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWisdomPanel" parameterType="WisdomPanel" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO tb_wisdom_panel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="panelName != null and panelName != ''">panel_name,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="buttonId != null ">button_id,</if>
|
||||
<if test="wisdomRoom != null ">wisdom_room,</if>
|
||||
<if test="img != null ">img,</if>
|
||||
<if test="imgOpen != null ">img_open,</if>
|
||||
<if test="panelId != null ">panel_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="panelName != null and panelName != ''">#{panelName},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="buttonId != null ">#{buttonId},</if>
|
||||
<if test="wisdomRoom != null ">#{wisdomRoom},</if>
|
||||
<if test="img != null ">#{img},</if>
|
||||
<if test="imgOpen != null ">#{imgOpen},</if>
|
||||
<if test="panelId != null ">#{panelId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWisdomPanel" parameterType="WisdomPanel">
|
||||
UPDATE tb_wisdom_panel
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="panelName != null and panelName != ''">panel_name = #{panelName},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="buttonId != null ">button_id = #{buttonId},</if>
|
||||
<if test="wisdomRoom != null ">wisdom_room = #{wisdomRoom},</if>
|
||||
<if test="img != null ">img = #{img},</if>
|
||||
<if test="imgOpen != null ">img_open = #{imgOpen},</if>
|
||||
<if test="panelId != null ">panel_id = #{panelId},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWisdomPanelById" parameterType="Long">
|
||||
DELETE FROM tb_wisdom_panel WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWisdomPanelByIds" parameterType="String">
|
||||
DELETE FROM tb_wisdom_panel where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -1,112 +0,0 @@
|
||||
<?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.ics.admin.mapper.WisdomRoomMapper">
|
||||
|
||||
<resultMap type="com.ics.admin.domain.WisdomRoom" id="WisdomRoomResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="meetingName" column="meeting_name" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="img" column="img" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="version" column="version" />
|
||||
<result property="deleteFlag" column="delete_flag" />
|
||||
<result property="remake" column="remake" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="parkId" column="park_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWisdomRoomVo">
|
||||
SELECT id, type, meeting_name, start_time, end_date,img, create_by, create_time, update_by, update_time, version, delete_flag, remake, tenant_id, park_id FROM tb_wisdom_room
|
||||
</sql>
|
||||
|
||||
<select id="selectWisdomRoomList" parameterType="WisdomRoom" resultMap="WisdomRoomResult">
|
||||
SELECT distinct wr.id, wr.type, wr.meeting_name, wr.start_time, wr.end_date,img, wr.create_by, wr.create_time,
|
||||
wr.update_by, wr.update_time, wr.version, wr.delete_flag, wr.remake, wr.tenant_id, wr.park_id FROM tb_wisdom_room wr
|
||||
left join tb_wisdom_staff ws on ws.wisdom_room_id = wr.id
|
||||
<where>
|
||||
<if test="meetingName != null and meetingName != ''"> AND wr.meeting_name LIKE CONCAT('%', #{meetingName}, '%')</if>
|
||||
<if test="staffIds != null and staffIds != ''"> AND ws.staff_id LIKE CONCAT('%', #{staffIds}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWisdomRoomById" parameterType="Long" resultMap="WisdomRoomResult">
|
||||
<include refid="selectWisdomRoomVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWisdomRoom" parameterType="WisdomRoom" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO tb_wisdom_room
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="meetingName != null and meetingName != ''">meeting_name,</if>
|
||||
<if test="startTime != null ">start_time,</if>
|
||||
<if test="endDate != null ">end_date,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="version != null ">version,</if>
|
||||
<if test="deleteFlag != null ">delete_flag,</if>
|
||||
<if test="img != null ">img,</if>
|
||||
<if test="remake != null and remake != ''">remake,</if>
|
||||
<if test="tenantId != null ">tenant_id,</if>
|
||||
<if test="parkId != null ">park_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="meetingName != null and meetingName != ''">#{meetingName},</if>
|
||||
<if test="startTime != null ">#{startTime},</if>
|
||||
<if test="endDate != null ">#{endDate},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
<if test="version != null ">#{version},</if>
|
||||
<if test="img != null ">#{img},</if>
|
||||
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||
<if test="remake != null and remake != ''">#{remake},</if>
|
||||
<if test="tenantId != null ">#{tenantId},</if>
|
||||
<if test="parkId != null ">#{parkId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWisdomRoom" parameterType="WisdomRoom">
|
||||
UPDATE tb_wisdom_room
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="meetingName != null and meetingName != ''">meeting_name = #{meetingName},</if>
|
||||
<if test="startTime != null ">start_time = #{startTime},</if>
|
||||
<if test="endDate != null ">end_date = #{endDate},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="version != null ">version = #{version},</if>
|
||||
<if test="img != null ">img = #{img},</if>
|
||||
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||
<if test="remake != null and remake != ''">remake = #{remake},</if>
|
||||
<if test="tenantId != null ">tenant_id = #{tenantId},</if>
|
||||
<if test="parkId != null ">park_id = #{parkId},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWisdomRoomById" parameterType="Long">
|
||||
DELETE FROM tb_wisdom_room WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWisdomRoomByIds" parameterType="String">
|
||||
DELETE FROM tb_wisdom_room where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -1,106 +0,0 @@
|
||||
<?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.ics.admin.mapper.WisdomStaffMapper">
|
||||
|
||||
<resultMap type="com.ics.admin.domain.WisdomStaff" id="WisdomStaffResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="wisdomRoomId" column="wisdom_room_id" />
|
||||
<result property="staffId" column="staff_id" />
|
||||
<result property="deleteFlag" column="delete_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="reservationId" column="reservation_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="parkId" column="park_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWisdomStaffVo">
|
||||
SELECT id, wisdom_room_id, staff_id,data_type,reservation_id, delete_flag,start_time,end_date, create_by, create_time, update_by, update_time, tenant_id, park_id FROM tb_wisdom_staff
|
||||
</sql>
|
||||
|
||||
<select id="selectWisdomStaffList" parameterType="WisdomStaff" resultMap="WisdomStaffResult">
|
||||
<include refid="selectWisdomStaffVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWisdomStaffById" parameterType="Long" resultMap="WisdomStaffResult">
|
||||
<include refid="selectWisdomStaffVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWisdomStaff" parameterType="WisdomStaff">
|
||||
INSERT INTO tb_wisdom_staff
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="wisdomRoomId != null ">wisdom_room_id,</if>
|
||||
<if test="staffId != null ">staff_id,</if>
|
||||
<if test="deleteFlag != null ">delete_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="startTime != null ">start_time,</if>
|
||||
<if test="dataType != null ">data_type,</if>
|
||||
<if test="reservationId != null ">reservation_id,</if>
|
||||
<if test="endDate != null ">end_date,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="tenantId != null ">tenant_id,</if>
|
||||
<if test="parkId != null ">park_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="wisdomRoomId != null ">#{wisdomRoomId},</if>
|
||||
<if test="staffId != null ">#{staffId},</if>
|
||||
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="dataType != null ">#{dataType},</if>
|
||||
<if test="startTime != null ">#{startTime},</if>
|
||||
<if test="reservationId != null ">#{reservationId},</if>
|
||||
<if test="endDate != null ">#{endDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
<if test="tenantId != null ">#{tenantId},</if>
|
||||
<if test="parkId != null ">#{parkId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWisdomStaff" parameterType="WisdomStaff">
|
||||
UPDATE tb_wisdom_staff
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wisdomRoomId != null ">wisdom_room_id = #{wisdomRoomId},</if>
|
||||
<if test="staffId != null ">staff_id = #{staffId},</if>
|
||||
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="startTime != null ">start_time = #{startTime},</if>
|
||||
<if test="dataType != null ">data_type = #{dataType},</if>
|
||||
<if test="reservationId != null ">reservation_id = #{reservationId},</if>
|
||||
<if test="endDate != null ">end_date = #{endDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="tenantId != null ">tenant_id = #{tenantId},</if>
|
||||
<if test="parkId != null ">park_id = #{parkId},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWisdomStaffById" parameterType="Long">
|
||||
DELETE FROM tb_wisdom_staff WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWisdomStaffByIds" parameterType="String">
|
||||
DELETE FROM tb_wisdom_staff where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -75,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
DATE_FORMAT( start_time, '%Y-%m-%d %H:%i:%S' ) >
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%S' )))
|
||||
and room_content_id =#{id}
|
||||
and `stauts` = 1
|
||||
ORDER BY start_time ASC
|
||||
|
||||
</select>
|
||||
@ -82,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectReservationVo"/>
|
||||
WHERE
|
||||
DATE_FORMAT( start_time, '%Y-%m-%d' ) = DATE_FORMAT(now(), '%Y-%m-%d' )
|
||||
and `stauts` = 1 and `park_id` = '26'
|
||||
and `stauts` = 1 and `park_id` = '27'
|
||||
</select>
|
||||
|
||||
<insert id="insertReservation" parameterType="Reservation">
|
||||
|
@ -110,39 +110,32 @@ public class WxLoginAPIController extends BaseController {
|
||||
//
|
||||
R ajax = R.ok();
|
||||
// 校验用户是否存在
|
||||
StaffOpen staffOpen = staffOpenService.selectStaffOpenByOpenId(openid);
|
||||
// 用户存在直接获取token
|
||||
if (staffOpen != null) {
|
||||
IcsCustomerStaff sysUser = icsCustomerStaffService.selectIcsCustomerStaffById(staffOpen.getStaffId());
|
||||
if (null != sysUser) {
|
||||
if (parkId != null) {
|
||||
Park park = parkService.selectParkById(Long.valueOf(parkId));
|
||||
sysUser.setParkName(park.getName());
|
||||
}
|
||||
log.info("parkId:{}",parkId);
|
||||
if (parkId != null && parkId.equals("26")){
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffIdAndParkId(sysUser.getId(),parkId);
|
||||
log.info("用户信息为staffCustomers+++++++++++++++:{}",staffCustomers);
|
||||
if (CollUtil.isEmpty(staffCustomers)) {
|
||||
throw new RuntimeException("外部人员注册,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
||||
User user = new User();
|
||||
PublishFactory.recordLoginInfo(sysUser.getUsername(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
|
||||
BeanUtils.copyBeanProp(user, sysUser);
|
||||
Map<String, Object> token = tokenService.createToken(user);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("user", sysUser);
|
||||
ajax.put("openid", openid);
|
||||
return ajax;
|
||||
IcsCustomerStaff sysUser = icsCustomerStaffService.selectUserByOpenid(openid);
|
||||
if (null != sysUser) {
|
||||
if (null != sysUser.getParkId()) {
|
||||
Park park = parkService.selectParkById(sysUser.getParkId());
|
||||
sysUser.setParkName(park.getName());
|
||||
}
|
||||
log.info("parkId:{}",parkId);
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffIdAndParkId(sysUser.getId(), String.valueOf(sysUser.getParkId()));
|
||||
if (CollUtil.isEmpty(staffCustomers)) {
|
||||
return R.error("外部人员注册,请联系管理员");
|
||||
}
|
||||
|
||||
User user = new User();
|
||||
PublishFactory.recordLoginInfo(sysUser.getUsername(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
|
||||
BeanUtils.copyBeanProp(user, sysUser);
|
||||
Map<String, Object> token = tokenService.createToken(user);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("user", sysUser);
|
||||
ajax.put("openid", openid);
|
||||
return ajax;
|
||||
} else { // 用户不存在返回openid进行注册登录
|
||||
}else {
|
||||
ajax.put("openid", openid);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -160,7 +153,7 @@ public class WxLoginAPIController extends BaseController {
|
||||
throw new RuntimeException("请传递code");
|
||||
}
|
||||
if (StringUtils.isBlank(openid)) {
|
||||
if (parkId.equals("26")){
|
||||
if (parkId.equals("26")) {
|
||||
throw new RuntimeException("外部人员注册,请联系管理员");
|
||||
}
|
||||
throw new RuntimeException("请传递openid");
|
||||
@ -183,7 +176,7 @@ public class WxLoginAPIController extends BaseController {
|
||||
return R.error("外部人员注册,请联系管理员");
|
||||
} else {
|
||||
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffIdAndParkId(customerStaff1.getId(),parkId);
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffIdAndParkId(customerStaff1.getId(), parkId);
|
||||
if (CollUtil.isEmpty(staffCustomers)) {
|
||||
Assert.isTrue(false, "外部人员注册,请联系管理员");
|
||||
return R.error("外部人员注册,请联系管理员");
|
||||
@ -248,56 +241,14 @@ public class WxLoginAPIController extends BaseController {
|
||||
icsCustomerStaff.setMobile(phoneNumber);
|
||||
IcsCustomerStaff customerStaff = icsCustomerStaffService.selectUserByMobile(phoneNumber);
|
||||
if (customerStaff != null) {
|
||||
|
||||
StaffOpen staffOpen = staffOpenService.selectStaffOpenByStaffIdAndOpenId(customerStaff.getId(),openid);
|
||||
|
||||
if (staffOpen != null) {
|
||||
// 根据 用户绑定的企业 绑定对应的设备
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
Customer customer = customerService.selectCustomerById(customerStaff.getIcsCustomerId());
|
||||
if (null != customer) {
|
||||
String roomId = customer.getRoomId();
|
||||
List<String> roomIds = StrUtil.split(roomId, ',');
|
||||
List<Long> collect = roomIds.stream().map(Long::valueOf).collect(Collectors.toList());
|
||||
//获取了房间集合,循环对应集合,
|
||||
for (Long id : collect) {
|
||||
List<RoomEquipment> roomEquipment = roomEquipmentService.selectByRoomId(id);
|
||||
if (CollUtil.isNotEmpty(roomEquipment)) {
|
||||
for (RoomEquipment equipment : roomEquipment) {
|
||||
ids.add(equipment.getEquipmentId());
|
||||
}
|
||||
}
|
||||
List<DetailEquipment> detailEquipments = detailEquipmentService.selectByRoomId(id);
|
||||
if (CollUtil.isNotEmpty(detailEquipments)) {
|
||||
for (DetailEquipment detailEquipment : detailEquipments) {
|
||||
ids.add(detailEquipment.getEquipmentId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
for (Long id : ids) {
|
||||
UserEquipment userEquipment = new UserEquipment();
|
||||
userEquipment.setEquipmentId(id);
|
||||
userEquipment.setUserId(customerStaff.getId());
|
||||
userEquipment.setStartTime(customer.getStartDate());
|
||||
userEquipment.setEndDate(customer.getEndDate());
|
||||
userEquipmentService.insertUserEquipment(userEquipment);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
StaffOpen staffOpen1 = new StaffOpen();
|
||||
staffOpen1.setOpenid(openid);
|
||||
staffOpen1.setStaffId(customerStaff.getId());
|
||||
// staffOpen1.setParkId(Long.valueOf(parkId));
|
||||
// staffOpen1.setTenantId(Long.valueOf(tenantId));
|
||||
staffOpenService.insertStaffOpen(staffOpen1);
|
||||
}
|
||||
if (parkId != null) {
|
||||
Park park = parkService.selectParkById(Long.valueOf(parkId));
|
||||
if (customerStaff.getParkId() != null) {
|
||||
Park park = parkService.selectParkById(customerStaff.getParkId());
|
||||
customerStaff.setParkName(park.getName());
|
||||
}
|
||||
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffIdAndParkId(customerStaff.getId(), String.valueOf(customerStaff.getParkId()));
|
||||
if (CollUtil.isEmpty(staffCustomers)) {
|
||||
return R.error("外部人员注册,请联系管理员");
|
||||
}
|
||||
|
||||
User user = new User();
|
||||
PublishFactory.recordLoginInfo(customerStaff.getUsername(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
|
||||
@ -314,50 +265,20 @@ public class WxLoginAPIController extends BaseController {
|
||||
icsCustomerStaff.setUsername(phoneNumber);
|
||||
icsCustomerStaff.setGender("0");
|
||||
icsCustomerStaff.setStatus("0");
|
||||
icsCustomerStaff.setParkId(27L);
|
||||
icsCustomerStaff.setOpenid(openid);
|
||||
int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
||||
|
||||
StaffOpen staffOpen1 = new StaffOpen();
|
||||
staffOpen1.setOpenid(openid);
|
||||
staffOpen1.setStaffId(icsCustomerStaff.getId());
|
||||
// staffOpen1.setParkId(Long.valueOf(parkId));
|
||||
// staffOpen1.setTenantId(Long.valueOf(tenantId));
|
||||
staffOpenService.insertStaffOpen(staffOpen1);
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffIdAndParkId(icsCustomerStaff.getId(), String.valueOf(icsCustomerStaff.getParkId()));
|
||||
if (CollUtil.isEmpty(staffCustomers)) {
|
||||
return R.error("外部人员注册,请联系管理员");
|
||||
}
|
||||
|
||||
Map<String, Object> token = tokenService.createStaffToken(icsCustomerStaff);
|
||||
R ajax = R.ok();
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("user", icsCustomerStaff);
|
||||
ajax.put("openid", openid);
|
||||
|
||||
|
||||
// IcsCustomerStaff customerStaff1 = icsCustomerStaffService.selectUserByMobile(phoneNumber);
|
||||
// //如果手机号等于null 就新增用户
|
||||
// if (null == customerStaff1) {
|
||||
// icsCustomerStaff.setUsername(phoneNumber);
|
||||
// icsCustomerStaff.setDataType(Constants.CUSTOMER_VISIT);
|
||||
// icsCustomerStaff.setOpenid(openid);
|
||||
// icsCustomerStaff.setGender("0");
|
||||
// icsCustomerStaff.setStatus("0");
|
||||
// int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
||||
// Map<String, Object> token = tokenService.createStaffToken(icsCustomerStaff);
|
||||
// R ajax = R.ok();
|
||||
// ajax.put(Constants.TOKEN, token);
|
||||
// ajax.put("user", icsCustomerStaff);
|
||||
// ajax.put("openid", openid);
|
||||
// return ajax;
|
||||
// } else {
|
||||
// String openid1 = customerStaff1.getOpenid();
|
||||
// customerStaff1.setOpenid(openid1 + "," + openid);
|
||||
// icsCustomerStaffService.updateIcsCustomerStaff(customerStaff1);
|
||||
// User user = new User();
|
||||
// PublishFactory.recordLoginInfo(customerStaff1.getUsername(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
|
||||
// BeanUtils.copyBeanProp(user, customerStaff1);
|
||||
// Map<String, Object> token = tokenService.createToken(user);
|
||||
// R ajax = R.ok();
|
||||
// ajax.put(Constants.TOKEN, token);
|
||||
// ajax.put("user", user);
|
||||
// ajax.put("openid", openid);
|
||||
return ajax;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -6,13 +6,8 @@ import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.ics.admin.domain.WisdomDevice;
|
||||
import com.ics.admin.domain.WisdomStaff;
|
||||
import com.ics.admin.domain.meeting.*;
|
||||
import com.ics.admin.domain.meeting.vo.DeviceData;
|
||||
import com.ics.admin.service.IWisdomDeviceService;
|
||||
import com.ics.admin.service.IWisdomRoomService;
|
||||
import com.ics.admin.service.IWisdomStaffService;
|
||||
import com.ics.admin.service.meeting.*;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
@ -56,14 +51,7 @@ public class ApiEquipmentController extends BaseController {
|
||||
@Autowired
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
|
||||
@Autowired
|
||||
private IWisdomRoomService wisdomRoomService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomDeviceService wisdomDeviceService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomStaffService wisdomStaffService;
|
||||
|
||||
String smallWxAccessTokenKey = "nantong-";
|
||||
|
||||
@ -233,64 +221,8 @@ public class ApiEquipmentController extends BaseController {
|
||||
return R.ok("开门成功");
|
||||
}
|
||||
|
||||
@RequiresPermissions("member:center:view")
|
||||
@GetMapping("/scanChangyangOpenDoor")
|
||||
public R scanChangyangOpenDoor(RoomRecord roomRecord) {
|
||||
|
||||
|
||||
WisdomDevice wisdomDevice = new WisdomDevice();
|
||||
log.info("2222222222222222222222会议室的id为{}", roomRecord.getRoomId());
|
||||
|
||||
//大会议室 52 茶室 53 小会议室 54
|
||||
if (roomRecord.getRoomId() == 237L) {
|
||||
wisdomDevice.setEquipmentNum("238");
|
||||
} else if (roomRecord.getRoomId() == 238L) {
|
||||
|
||||
wisdomDevice.setEquipmentNum("240");
|
||||
} else if (roomRecord.getRoomId() == 239L) {
|
||||
wisdomDevice.setEquipmentNum("239");
|
||||
} else if (roomRecord.getRoomId() == 242L) {
|
||||
wisdomDevice.setEquipmentNum("192.168.1.201");
|
||||
wisdomDevice.setType("开门控制器");
|
||||
} else if (roomRecord.getRoomId() == 243L) {
|
||||
wisdomDevice.setEquipmentNum("192.168.1.34");
|
||||
wisdomDevice.setType("开门控制器");
|
||||
}
|
||||
|
||||
|
||||
Integer count = wisdomStaffService.selectByUserIdAndRoomId(Integer.parseInt(String.valueOf(roomRecord.getUserId())), null);
|
||||
if (count == 0) return R.error("该用户没有权限开锁");
|
||||
Integer count1 = wisdomStaffService.selectByUserIdAndRoomId(Integer.parseInt(String.valueOf(roomRecord.getUserId())), "0");
|
||||
if (count1 == 0) {
|
||||
List<WisdomStaff> list = wisdomStaffService.selectListByUserIdAndRoomId(Integer.parseInt(String.valueOf(roomRecord.getUserId())), "1");
|
||||
int num = 0;
|
||||
for (WisdomStaff wisdomStaff : list) {
|
||||
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) {
|
||||
num++;
|
||||
}
|
||||
}
|
||||
if (num <= 0) return R.error("该用户没有权限开锁");
|
||||
if (wisdomDevice.getType() != null && wisdomDevice.getType().equals("开门控制器")) {
|
||||
WisDomDeviceUtils.openControlLock(wisdomDevice.getEquipmentNum());
|
||||
} else {
|
||||
SignUtils.lock(wisdomDevice.getEquipmentNum());
|
||||
}
|
||||
|
||||
} else {
|
||||
if (wisdomDevice.getType() != null && wisdomDevice.getType().equals("开门控制器")) {
|
||||
WisDomDeviceUtils.openControlLock(wisdomDevice.getEquipmentNum());
|
||||
} else {
|
||||
SignUtils.lock(wisdomDevice.getEquipmentNum());
|
||||
}
|
||||
}
|
||||
return R.ok("开门成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 扫描二维码开门 用户id 和设备id
|
||||
|
@ -0,0 +1,225 @@
|
||||
package com.ics.controller.mobile.meeting;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.service.meeting.IReservationService;
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.admin.domain.meeting.Reservation;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.IRoomContentService;
|
||||
import com.ics.admin.domain.Room;
|
||||
import org.wf.jwtp.annotation.Ignore;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* 预约记录 提供者
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-02-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/reservation")
|
||||
public class ApiReservationController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IReservationService reservationService;
|
||||
|
||||
@Autowired
|
||||
private IRoomContentService roomContentService;
|
||||
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
/**
|
||||
* 获取今日会议室预约数据
|
||||
*
|
||||
* @return 会议室预约数据
|
||||
*/
|
||||
@RequiresPermissions("member:center:view")
|
||||
@GetMapping("/today")
|
||||
public R getTodayReservations() {
|
||||
try {
|
||||
|
||||
// 获取当前用户ID
|
||||
Long currentUserId = getCurrentUserId();
|
||||
System.out.println();
|
||||
// 获取今日预约列表
|
||||
List<Reservation> todayReservations = reservationService.selectReservationListByDay();
|
||||
|
||||
// 按会议室分组的预约数据
|
||||
Map<String, Map<String, List<Double>>> roomBookingData = new HashMap<>();
|
||||
|
||||
// 处理预约数据
|
||||
for (Reservation reservation : todayReservations) {
|
||||
// 获取会议室内容
|
||||
Long roomContentId = reservation.getRoomContentId();
|
||||
if (roomContentId == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
RoomContent roomContent = roomContentService.selectRoomContentById(roomContentId);
|
||||
if (roomContent == null || roomContent.getRoomId() == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 获取会议室
|
||||
Room room = roomService.selectRoomById(roomContent.getRoomId());
|
||||
if (room == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 会议室名称作为key
|
||||
String roomKey = room.getName();
|
||||
|
||||
// 确保Map中有当前会议室的数据结构
|
||||
if (!roomBookingData.containsKey(roomKey)) {
|
||||
Map<String, List<Double>> bookingInfo = new HashMap<>();
|
||||
bookingInfo.put("myBookings", new ArrayList<>());
|
||||
bookingInfo.put("otherBookings", new ArrayList<>());
|
||||
roomBookingData.put(roomKey, bookingInfo);
|
||||
}
|
||||
|
||||
// 判断是当前用户的预约还是其他用户的预约
|
||||
String bookingType = reservation.getUserId().equals(currentUserId) ? "myBookings" : "otherBookings";
|
||||
|
||||
// 将预约时间转换为小时格式(例如:9.0, 9.5, 10.0 等)
|
||||
Date startTime = reservation.getStartTime();
|
||||
Date endTime = reservation.getEndDate();
|
||||
|
||||
if (startTime != null && endTime != null) {
|
||||
List<Double> timeSlots = convertToTimeSlots(startTime, endTime);
|
||||
roomBookingData.get(roomKey).get(bookingType).addAll(timeSlots);
|
||||
}
|
||||
}
|
||||
|
||||
// 将结果转换为需要的格式
|
||||
Map<String, Map<String, double[]>> finalRoomBookingData = new HashMap<>();
|
||||
for (Map.Entry<String, Map<String, List<Double>>> entry : roomBookingData.entrySet()) {
|
||||
Map<String, double[]> roomData = new HashMap<>();
|
||||
|
||||
List<Double> myBookings = entry.getValue().get("myBookings");
|
||||
List<Double> otherBookings = entry.getValue().get("otherBookings");
|
||||
|
||||
roomData.put("myBookings", myBookings.stream().mapToDouble(Double::doubleValue).toArray());
|
||||
roomData.put("otherBookings", otherBookings.stream().mapToDouble(Double::doubleValue).toArray());
|
||||
|
||||
finalRoomBookingData.put(entry.getKey(), roomData);
|
||||
}
|
||||
|
||||
// 如果数据库没有足够数据,添加一些虚拟数据用于演示
|
||||
// if (finalRoomBookingData.isEmpty() || finalRoomBookingData.size() < 6) {
|
||||
// addDemoData(finalRoomBookingData);
|
||||
// }
|
||||
|
||||
return R.ok().put("data", finalRoomBookingData);
|
||||
} catch (Exception e) {
|
||||
log.error("获取今日会议室预约数据失败", e);
|
||||
return R.error("获取今日会议室预约数据失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将开始时间和结束时间转换为0.5小时为单位的时间槽列表
|
||||
* 例如:9:00-10:30 转换为 [9.0, 9.5, 10.0]
|
||||
*/
|
||||
private List<Double> convertToTimeSlots(Date startTime, Date endTime) {
|
||||
List<Double> timeSlots = new ArrayList<>();
|
||||
|
||||
Calendar startCal = Calendar.getInstance();
|
||||
startCal.setTime(startTime);
|
||||
|
||||
Calendar endCal = Calendar.getInstance();
|
||||
endCal.setTime(endTime);
|
||||
|
||||
// 取整到最近的半小时
|
||||
int startHour = startCal.get(Calendar.HOUR_OF_DAY);
|
||||
int startMinute = startCal.get(Calendar.MINUTE);
|
||||
|
||||
double currentTimeSlot = startHour;
|
||||
if (startMinute >= 30) {
|
||||
currentTimeSlot += 0.5;
|
||||
}
|
||||
|
||||
// 将结束时间向上取整到最近的半小时
|
||||
int endHour = endCal.get(Calendar.HOUR_OF_DAY);
|
||||
int endMinute = endCal.get(Calendar.MINUTE);
|
||||
|
||||
double endTimeSlot = endHour;
|
||||
if (endMinute > 0) {
|
||||
endTimeSlot += 0.5;
|
||||
}
|
||||
|
||||
// 添加所有时间槽
|
||||
while (currentTimeSlot < endTimeSlot) {
|
||||
timeSlots.add(currentTimeSlot);
|
||||
currentTimeSlot += 0.5;
|
||||
}
|
||||
|
||||
return timeSlots;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加演示数据
|
||||
*/
|
||||
private void addDemoData(Map<String, Map<String, double[]>> finalRoomBookingData) {
|
||||
if (!finalRoomBookingData.containsKey("401")) {
|
||||
Map<String, double[]> room401 = new HashMap<>();
|
||||
room401.put("myBookings", new double[]{16, 16.5, 17});
|
||||
room401.put("otherBookings", new double[]{10, 10.5, 11, 11.5, 12});
|
||||
finalRoomBookingData.put("401", room401);
|
||||
}
|
||||
|
||||
if (!finalRoomBookingData.containsKey("709")) {
|
||||
Map<String, double[]> room709 = new HashMap<>();
|
||||
room709.put("myBookings", new double[]{15, 15.5, 16});
|
||||
room709.put("otherBookings", new double[]{9, 9.5, 10, 10.5, 11});
|
||||
finalRoomBookingData.put("709", room709);
|
||||
}
|
||||
|
||||
if (!finalRoomBookingData.containsKey("705")) {
|
||||
Map<String, double[]> room705 = new HashMap<>();
|
||||
room705.put("myBookings", new double[]{18, 18.5, 19});
|
||||
room705.put("otherBookings", new double[]{9, 9.5, 10, 10.5, 11});
|
||||
finalRoomBookingData.put("705", room705);
|
||||
}
|
||||
|
||||
if (!finalRoomBookingData.containsKey("302")) {
|
||||
Map<String, double[]> room302 = new HashMap<>();
|
||||
room302.put("myBookings", new double[]{14, 14.5, 15});
|
||||
room302.put("otherBookings", new double[]{11, 11.5, 12, 17, 17.5, 18});
|
||||
finalRoomBookingData.put("302", room302);
|
||||
}
|
||||
|
||||
if (!finalRoomBookingData.containsKey("305")) {
|
||||
Map<String, double[]> room305 = new HashMap<>();
|
||||
room305.put("myBookings", new double[]{9, 9.5, 10});
|
||||
room305.put("otherBookings", new double[]{14, 14.5, 15, 15.5, 16, 16.5, 17});
|
||||
finalRoomBookingData.put("305", room305);
|
||||
}
|
||||
|
||||
if (!finalRoomBookingData.containsKey("407")) {
|
||||
Map<String, double[]> room407 = new HashMap<>();
|
||||
room407.put("myBookings", new double[]{12, 12.5, 13});
|
||||
room407.put("otherBookings", new double[]{9, 9.5, 10, 16, 16.5, 17});
|
||||
finalRoomBookingData.put("407", room407);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,8 +87,7 @@ public class ApiRoomContentController extends BaseController {
|
||||
@Autowired
|
||||
private IRoomServeService roomServeService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomStaffService wisdomStaffService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -264,35 +263,7 @@ public class ApiRoomContentController extends BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
//新增预约人 门锁权限
|
||||
WisdomStaff wisdomStaff = new WisdomStaff();
|
||||
if (reservation.getRoomContentId() == 52L) wisdomStaff.setWisdomRoomId(3L);
|
||||
if (reservation.getRoomContentId() == 53L) wisdomStaff.setWisdomRoomId(4L);
|
||||
if (reservation.getRoomContentId() == 54L) wisdomStaff.setWisdomRoomId(6L);
|
||||
wisdomStaff.setStaffId(reservation.getUserId());
|
||||
wisdomStaff.setStartTime(reservation.getStartTime());
|
||||
wisdomStaff.setEndDate(reservation.getEndDate());
|
||||
wisdomStaff.setReservationId(reservation.getId());
|
||||
wisdomStaff.setDataType("1");
|
||||
|
||||
int i = wisdomStaffService.insertWisdomStaff(wisdomStaff);
|
||||
//新增参会人和对应门锁权限
|
||||
List<ReservationPerson> reservationPerson = reservation.getReservationPersonList();
|
||||
|
||||
for (ReservationPerson person : reservationPerson) {
|
||||
//新增预约人 门锁权限
|
||||
WisdomStaff wisdomStaff1 = new WisdomStaff();
|
||||
if (reservation.getRoomContentId() == 52L) wisdomStaff1.setWisdomRoomId(3L);
|
||||
if (reservation.getRoomContentId() == 53L) wisdomStaff1.setWisdomRoomId(4L);
|
||||
if (reservation.getRoomContentId() == 54L) wisdomStaff1.setWisdomRoomId(6L);
|
||||
wisdomStaff1.setStaffId(person.getUserId());
|
||||
wisdomStaff1.setStartTime(reservation.getStartTime());
|
||||
wisdomStaff1.setEndDate(reservation.getEndDate());
|
||||
wisdomStaff1.setReservationId(reservation.getId());
|
||||
wisdomStaff1.setDataType("1");
|
||||
|
||||
int count = wisdomStaffService.insertWisdomStaff(wisdomStaff1);
|
||||
}
|
||||
|
||||
Long id = reservation.getId();
|
||||
return toAjax(save).put("reservationId", id);
|
||||
@ -504,15 +475,7 @@ public class ApiRoomContentController extends BaseController {
|
||||
reservation.setAvatar(icsCustomerStaff.getAvatar());
|
||||
}
|
||||
|
||||
List<IcsCustomerStaff> wisdomStaffs = wisdomStaffService.selectListByReservationId(id);
|
||||
List<ReservationPerson> reservationPeople = new ArrayList<>();
|
||||
for (IcsCustomerStaff wisdomStaff : wisdomStaffs) {
|
||||
ReservationPerson reservationPerson = new ReservationPerson();
|
||||
reservationPerson.setUserId(wisdomStaff.getId());
|
||||
reservationPerson.setUserName(wisdomStaff.getUsername());
|
||||
reservationPeople.add(reservationPerson);
|
||||
}
|
||||
reservation.setReservationPersonList(reservationPeople);
|
||||
|
||||
|
||||
Ticket ticket = ticketService.selectTicketById(reservation.getTicketId());
|
||||
if (null != ticket) {
|
||||
@ -580,11 +543,7 @@ public class ApiRoomContentController extends BaseController {
|
||||
@PostMapping("/addVisitor")
|
||||
public R addVisitor(@RequestBody ReservationPerson reservationPerson) {
|
||||
|
||||
if (reservationPerson.getParkId() == 26L) {
|
||||
Long reservationId = reservationPerson.getReservationId();
|
||||
Integer count = wisdomStaffService.selectListByReservationIdAndUserId(reservationId, reservationPerson.getParticipantId());
|
||||
if (count <= 0) return R.error("您没有参会权限");
|
||||
}
|
||||
|
||||
|
||||
reservationPerson.setStatus("1");
|
||||
reservationPerson.setJoinTime(new Date());
|
||||
@ -761,51 +720,7 @@ public class ApiRoomContentController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@RequiresPermissions("member:center:view")
|
||||
@PostMapping("updatePersonList")
|
||||
public R updatePersonList(@RequestBody Reservation reservation) {
|
||||
|
||||
List<IcsCustomerStaff> customerStaffs = wisdomStaffService.selectListByReservationId(reservation.getId());
|
||||
if(CollUtil.isNotEmpty(customerStaffs)) {
|
||||
Integer integer = wisdomStaffService.deleteWisdomStaffByReservationId(reservation.getId());
|
||||
if (integer == 0) return R.error("删除失败");
|
||||
}
|
||||
|
||||
|
||||
//新增预约人 门锁权限
|
||||
WisdomStaff wisdomStaff = new WisdomStaff();
|
||||
if (reservation.getRoomContentId() == 52L) wisdomStaff.setWisdomRoomId(3L);
|
||||
if (reservation.getRoomContentId() == 53L) wisdomStaff.setWisdomRoomId(4L);
|
||||
if (reservation.getRoomContentId() == 54L) wisdomStaff.setWisdomRoomId(6L);
|
||||
wisdomStaff.setStaffId(reservation.getUserId());
|
||||
wisdomStaff.setStartTime(reservation.getStartTime());
|
||||
wisdomStaff.setEndDate(reservation.getEndDate());
|
||||
wisdomStaff.setReservationId(reservation.getId());
|
||||
wisdomStaff.setDataType("1");
|
||||
|
||||
int i = wisdomStaffService.insertWisdomStaff(wisdomStaff);
|
||||
|
||||
List<ReservationPerson> reservationPerson = reservation.getReservationPersonList();
|
||||
|
||||
for (ReservationPerson person : reservationPerson) {
|
||||
int count = wisdomStaffService.selectListByReservationIdAndUserId(reservation.getId(),person.getUserId() );
|
||||
if (count ==0){
|
||||
//新增预约人 门锁权限
|
||||
WisdomStaff wisdomStaff1 = new WisdomStaff();
|
||||
if (reservation.getRoomContentId() == 52L) wisdomStaff1.setWisdomRoomId(3L);
|
||||
if (reservation.getRoomContentId() == 53L) wisdomStaff1.setWisdomRoomId(4L);
|
||||
if (reservation.getRoomContentId() == 54L) wisdomStaff1.setWisdomRoomId(6L);
|
||||
wisdomStaff1.setStaffId(person.getUserId());
|
||||
wisdomStaff1.setStartTime(reservation.getStartTime());
|
||||
wisdomStaff1.setEndDate(reservation.getEndDate());
|
||||
wisdomStaff1.setReservationId(reservation.getId());
|
||||
wisdomStaff1.setDataType("1");
|
||||
|
||||
int num = wisdomStaffService.insertWisdomStaff(wisdomStaff1);
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
public static boolean timeIsInRound(String str1, String start, String end) {
|
||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.RandomUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.ics.admin.domain.BuildingDetail;
|
||||
import com.ics.admin.domain.Customer;
|
||||
import com.ics.admin.domain.Park;
|
||||
import com.ics.admin.domain.Room;
|
||||
import com.ics.admin.domain.meeting.*;
|
||||
@ -124,6 +125,30 @@ public class ApiRoomController extends BaseController {
|
||||
List<Park> parkList = parkService.selectParkList(park);
|
||||
return R.data(parkList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业
|
||||
*/
|
||||
@Ignore
|
||||
@PostMapping ("selectCustomerListByParkId")
|
||||
public R selectCustomerList(@RequestBody HashMap<String,Long> map) {
|
||||
Long parkId = map.get("parkId");
|
||||
Customer customer1 = new Customer();
|
||||
customer1.setParkId(parkId);
|
||||
return R.data(customerService.selectCustomerList(customer1));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询企业
|
||||
*/
|
||||
@Ignore
|
||||
@PostMapping ("selectCustomerList")
|
||||
public R selectCustomerList(@RequestBody RoomContent roomContent) {
|
||||
|
||||
Customer customer = customerService.selectCustomerById(roomContent.getCustomerId());
|
||||
return R.data(customer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,265 +0,0 @@
|
||||
package com.ics.controller.mobile.wisdom;
|
||||
|
||||
|
||||
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 com.alibaba.fastjson.JSONObject;
|
||||
import com.ics.admin.domain.*;
|
||||
import com.ics.admin.domain.meeting.Reservation;
|
||||
import com.ics.admin.service.*;
|
||||
import com.ics.admin.service.meeting.IReservationService;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.utils.device.SignUtils;
|
||||
import com.ics.common.utils.device.WisDomDeviceUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wf.jwtp.annotation.Ignore;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/api/wisdom")
|
||||
public class WisdomApiController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private IWisdomRoomService wisdomRoomService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomDeviceService wisdomDeviceService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomStaffService wisdomStaffService;
|
||||
|
||||
@Autowired
|
||||
private IIcsCustomerStaffService customerStaffService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomPanelService wisdomPanelService;
|
||||
|
||||
@Autowired
|
||||
private IWisdomPanelEquipmentService wisdomPanelEquipmentService;
|
||||
|
||||
@Autowired
|
||||
private IReservationService iReservationService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有房间信息
|
||||
*/
|
||||
@RequiresPermissions("member:center:view")
|
||||
@RequestMapping("/getAllRoomInfo")
|
||||
public R getAllRoomInfo(WisdomRoom wisdomRoom) {
|
||||
|
||||
long currentUserId = getLoginStaffId();
|
||||
wisdomRoom.setStaffIds(currentUserId);
|
||||
|
||||
List<WisdomRoom> wisdomRooms = wisdomRoomService.selectWisdomRoomList(wisdomRoom);
|
||||
for (WisdomRoom room : wisdomRooms) {
|
||||
WisdomDevice wisdomDevice = new WisdomDevice();
|
||||
wisdomDevice.setWisdomRoomId(room.getId());
|
||||
List<WisdomDevice> wisdomDevices = wisdomDeviceService.selectWisdomDeviceList(wisdomDevice);
|
||||
room.setDeviceNum(wisdomDevices.size());
|
||||
WisdomPanel wisdomPanel = new WisdomPanel();
|
||||
wisdomPanel.setWisdomRoom(room.getId());
|
||||
List<WisdomPanel> wisdomPanels = wisdomPanelService.selectWisdomPanelList(wisdomPanel);
|
||||
room.setPanelNum(wisdomPanels.size());
|
||||
}
|
||||
return R.data(wisdomRooms);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据房间获取对应设备列表
|
||||
*/
|
||||
|
||||
@RequiresPermissions("member:center:view")
|
||||
@RequestMapping("/getAllDeviceInfoByRoomId")
|
||||
public R getAllDeviceInfoByRoomId(Long id) {
|
||||
|
||||
long currentUserId = getLoginStaffId();
|
||||
|
||||
//获取用户id 判断会议预约还是管理员
|
||||
Integer integer = wisdomStaffService.selectByUserIdAndRoomId(Integer.parseInt(String.valueOf(currentUserId)), "0");
|
||||
if (integer > 0) {
|
||||
WisdomDevice wisdomDevice = new WisdomDevice();
|
||||
wisdomDevice.setWisdomRoomId(id);
|
||||
List<WisdomDevice> wisdomDevices = wisdomDeviceService.selectWisdomDeviceList(wisdomDevice);
|
||||
return R.data(wisdomDevices);
|
||||
} else {
|
||||
Integer count = wisdomStaffService.selectByUserIdAndRoomId(Integer.parseInt(String.valueOf(currentUserId)), "1");
|
||||
if (count <= 0) return R.error("您没有权限查看该房间设备");
|
||||
WisdomDevice wisdomDevice = new WisdomDevice();
|
||||
wisdomDevice.setWisdomRoomId(id);
|
||||
if (id == 3 || id == 4) {
|
||||
wisdomDevice.setType("门锁");
|
||||
} else if (id == 18 || id == 19) {
|
||||
wisdomDevice.setType("开门控制器");
|
||||
}
|
||||
List<WisdomDevice> wisdomDevices = wisdomDeviceService.selectWisdomDeviceList(wisdomDevice);
|
||||
return R.data(wisdomDevices);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据房间获取对应情景列表
|
||||
*/
|
||||
|
||||
@RequiresPermissions("member:center:view")
|
||||
@GetMapping("/getAllPanelInfoByRoomId")
|
||||
public R getAllPanelInfoByRoomId(Long id) {
|
||||
long currentUserId = getLoginStaffId();
|
||||
Integer integer = wisdomStaffService.selectByUserIdAndRoomId(Integer.parseInt(String.valueOf(currentUserId)), "0");
|
||||
if (integer <= 0) return R.data(new ArrayList<>());
|
||||
WisdomPanel wisdomPanel = new WisdomPanel();
|
||||
wisdomPanel.setWisdomRoom(id);
|
||||
List<WisdomPanel> wisdomPanels = wisdomPanelService.selectWisdomPanelList(wisdomPanel);
|
||||
return R.data(wisdomPanels);
|
||||
}
|
||||
|
||||
@RequiresPermissions("member:center:view")
|
||||
@GetMapping("getDeviceInfo")
|
||||
public R getDeviceInfo(Long id) {
|
||||
WisdomDevice wisdomDevice = wisdomDeviceService.selectWisdomDeviceById(id);
|
||||
if (wisdomDevice == null) return R.error("设备不存在");
|
||||
|
||||
if (wisdomDevice.getType().equals("开门控制器")) {
|
||||
return R.ok();
|
||||
}
|
||||
JSONObject deviceStatus = WisDomDeviceUtils.getDeviceStatus(wisdomDevice.getEquipmentNum(), wisdomDevice.getTypeName());
|
||||
|
||||
return R.ok(deviceStatus);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据设备id调用对接接口
|
||||
*/
|
||||
|
||||
@RequiresPermissions("member:center:view")
|
||||
// @Ignore
|
||||
@RequestMapping("/callApiByDeviceId")
|
||||
public R callApiByDeviceId(@RequestBody DeviceVo deviceVo) {
|
||||
|
||||
WisdomDevice wisdomDevice = wisdomDeviceService.selectWisdomDeviceById(deviceVo.getDeviceId());
|
||||
if (wisdomDevice.getType().equals("灯条"))
|
||||
WisDomDeviceUtils.deviceControl(wisdomDevice.getEquipmentNum(), deviceVo.getActionArg());
|
||||
if (wisdomDevice.getType().equals("调光灯")) {
|
||||
Boolean aBoolean = deviceVo.getBir() == null ? WisDomDeviceUtils.dimmingOpenControl(wisdomDevice.getEquipmentNum(), deviceVo.getActionArg()) : WisDomDeviceUtils.dimmingControl(wisdomDevice.getEquipmentNum(), deviceVo.getBir(), deviceVo.getColourTemperature());
|
||||
if (!aBoolean) return R.error("调光灯操作失败");
|
||||
}
|
||||
if (wisdomDevice.getType().equals("插座"))
|
||||
WisDomDeviceUtils.socketControl(wisdomDevice.getEquipmentNum(), deviceVo.getActionArg());
|
||||
if (wisdomDevice.getType().equals("雾化玻璃"))
|
||||
WisDomDeviceUtils.deviceControl(wisdomDevice.getEquipmentNum(), deviceVo.getActionArg());
|
||||
|
||||
//todo 窗帘接口
|
||||
if (wisdomDevice.getType().equals("窗帘"))
|
||||
WisDomDeviceUtils.openCover(wisdomDevice.getEquipmentNum(), deviceVo.getCoverType());
|
||||
if (wisdomDevice.getType().equals("门锁")) {
|
||||
Integer loginStaffId = this.getLoginStaffId();
|
||||
//获取用户id 判断改用户是否可以开锁
|
||||
|
||||
Integer count = wisdomStaffService.selectByUserIdAndRoomId(loginStaffId, null);
|
||||
if (count == 0) return R.error("该用户没有权限开锁");
|
||||
Integer count1 = wisdomStaffService.selectByUserIdAndRoomId(loginStaffId, "0");
|
||||
if (count1 == 0) {
|
||||
List<WisdomStaff> list = wisdomStaffService.selectListByUserIdAndRoomId(loginStaffId, "1");
|
||||
int num = 0;
|
||||
for (WisdomStaff wisdomStaff : list) {
|
||||
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) {
|
||||
num++;
|
||||
}
|
||||
}
|
||||
if (num <= 0) return R.error("该用户没有权限开锁");
|
||||
SignUtils.lock(wisdomDevice.getEquipmentNum());
|
||||
} else {
|
||||
// WisDomDeviceUtils.openControlLock(wisdomDevice.getEquipmentNum());
|
||||
|
||||
SignUtils.lock(wisdomDevice.getEquipmentNum());
|
||||
}
|
||||
}
|
||||
if (wisdomDevice.getType().equals("开门控制器"))
|
||||
WisDomDeviceUtils.openControlLock(wisdomDevice.getEquipmentNum());
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据情景面板id 调用对接
|
||||
*/
|
||||
@RequiresPermissions("member:center:view")
|
||||
@RequestMapping("/callApiByPanelId")
|
||||
public R callApiByPanelId(@RequestBody WisdomPanel panelVo) {
|
||||
WisdomPanel wisdomPanel = wisdomPanelService.selectWisdomPanelById(panelVo.getId());
|
||||
if (wisdomPanel != null) {
|
||||
Boolean aBoolean = WisDomDeviceUtils.shortControl(wisdomPanel.getPanelId(), wisdomPanel.getButtonId());
|
||||
//设备 窗帘
|
||||
|
||||
|
||||
List<WisdomPanelEquipment> list = wisdomPanelEquipmentService.selectWisdomPanelEquipmentByPanelId(wisdomPanel.getId());
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
//如果设备id不等于空
|
||||
for (WisdomPanelEquipment panelEquipment : list) {
|
||||
WisdomDevice equipment = wisdomDeviceService.getById(panelEquipment.getEquipmentId());
|
||||
if (null != equipment) {
|
||||
Boolean aBoolean1 = WisDomDeviceUtils.openCover(equipment.getEquipmentNum(), panelEquipment.getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@Ignore
|
||||
@RequestMapping("/meetingOpen")
|
||||
public R meetingOpen() {
|
||||
//获取当天所有预约的会议室
|
||||
List<Reservation> reservations = iReservationService.selectReservationListByDay();
|
||||
|
||||
for (Reservation reservation : reservations) {
|
||||
Date date = new Date();
|
||||
|
||||
Date next = DateUtil.offsetMinute(date, 15);
|
||||
String format = DateUtil.format(next, "HH:mm");
|
||||
Date startTime = reservation.getStartTime();
|
||||
String format1 = DateUtil.format(startTime, "HH:mm");
|
||||
log.info("时间为===============" + (format.equals(format1)));
|
||||
if (format.equals(format1)) {
|
||||
log.info("结果为------------");
|
||||
//大会议室
|
||||
if (reservation.getRoomContentId() == 52L) {
|
||||
Boolean aBoolean = WisDomDeviceUtils.shortControl("312", 1);
|
||||
log.info("大会议室情景结果为:" + aBoolean);
|
||||
} else if (reservation.getRoomContentId() == 53L) {//茶室
|
||||
Boolean aBoolean = WisDomDeviceUtils.shortControl("286", 1);
|
||||
log.info("茶室情景结果为:" + aBoolean);
|
||||
} else if (reservation.getRoomContentId() == 54L) { //小会议室
|
||||
WisDomDeviceUtils.deviceControl("244", true);
|
||||
WisDomDeviceUtils.deviceControl("245", true);
|
||||
WisDomDeviceUtils.deviceControl("246", true);
|
||||
log.info("小会议室情景结果为:");
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -20,9 +20,9 @@ spring:
|
||||
# url: jdbc:mysql://192.168.0.50:3306/dbd-meeting?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: boyuekeji2023
|
||||
url: jdbc:mysql://222.184.49.22:3306/dbd-meeting?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://8.130.174.239:3306/xiongan-meeting?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: boyue1!Z
|
||||
password: chenze-s&qPXhQ7CMQ0
|
||||
# 从库数据源
|
||||
slave:
|
||||
#从数据源开关/默认关闭
|
||||
@ -71,20 +71,22 @@ dfs:
|
||||
# 此处改成自己服务器存储位置
|
||||
#path: /Users/lihongyuan/IdeaProjects/saas-ics/ics/
|
||||
# domain: http://222.184.49.22:9227
|
||||
# path: D:/ruoyi/uploadPath
|
||||
domain: http://192.168.0.11:9227
|
||||
path: D:/博越/ruoyi/uploadPath
|
||||
path: D:/ruoyi/uploadPath/upload
|
||||
# path: /usr/local/uploadPath/
|
||||
# domain: http://8.130.174.239:9227/SaaS-ICS
|
||||
domain: http://192.168.0.15:9227
|
||||
# path: D:/博越/ruoyi/uploadPath
|
||||
|
||||
# 公众号配置(必填)
|
||||
wx:
|
||||
miniapp:
|
||||
# appid: wx22f0f66d57ce48f7
|
||||
# appid: wxd9f93ef41a607dd5
|
||||
appid: wx5582a07c1fbbcf06
|
||||
appid: wx88be95fc1c9f5c66
|
||||
appids:
|
||||
# secret: 3fe3c634a223cbdbfb7c8b7263031808
|
||||
# secret: 417507767334672bc46bb6eb3bf1c29b
|
||||
secret: ad24130a8919c613efd9538f69abafd3
|
||||
secret: 729428ea3d4f65ccff1b2e552e00ba09
|
||||
token:
|
||||
aesKey:
|
||||
msgDataFormat: JSON # 消息格式,XML或者JSON.
|
||||
@ -137,6 +139,7 @@ mybatis-plus:
|
||||
weixin:
|
||||
appid: wx5582a07c1fbbcf06 # appid
|
||||
mch-serial-no: 5899B7D34B161F9E24EFFCD50E95245521CA40AB # 证书序列号
|
||||
# private-key-path: /opt/pay/apiclient_key.pem # 证书路径
|
||||
private-key-path: D:/博越/cert/dbd/apiclient_key.pem # 证书路径
|
||||
mch-id: 1665472343 # 商户号
|
||||
key: CHANGYANGKONGGUhenanjianandianzi # APIv3密钥
|
||||
|
@ -1,5 +1,6 @@
|
||||
server:
|
||||
port: 9227
|
||||
|
||||
undertow:
|
||||
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
|
||||
# 每块buffer的空间大小,越小的空间被利用越充分,不要设置太大,以免影响其他应用,合适即可
|
||||
@ -27,7 +28,7 @@ spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
profiles:
|
||||
active: prod
|
||||
active: dev
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
|
Before Width: | Height: | Size: 570 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 570 KiB |
Before Width: | Height: | Size: 570 KiB |
Before Width: | Height: | Size: 498 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 517 KiB |
Before Width: | Height: | Size: 486 KiB |
Before Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 584 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 570 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 517 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 517 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 486 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 258 KiB |
Before Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 718 KiB |
Before Width: | Height: | Size: 486 KiB |
Before Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 517 KiB |
Before Width: | Height: | Size: 559 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 584 KiB |
Before Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 274 KiB |