修改了对应的bug

This commit is contained in:
chendaze 2024-04-12 11:13:01 +08:00
parent 9a3d01fbf3
commit c4babf61ea
41 changed files with 572 additions and 162 deletions

View File

@ -137,7 +137,9 @@ public class CustomerController extends BaseController {
Tenant tenant = tenantService.selectTenantById(tenantId); Tenant tenant = tenantService.selectTenantById(tenantId);
customer1.setTenantName(tenant.getName()); customer1.setTenantName(tenant.getName());
Building building = buildingService.selectBuildingById(customer1.getBuildingId()); Building building = buildingService.selectBuildingById(customer1.getBuildingId());
if (null != building){
customer1.setBuildingName(building.getBuildingName()); customer1.setBuildingName(building.getBuildingName());
}
} }
return result(customers); return result(customers);

View File

@ -126,17 +126,17 @@ public class CustomerStaffController extends BaseController {
/** /**
* 查询企业员工列表 * 查询企业员工列表
*/ */
// @RequiresPermissions("admin:staff:list") @Ignore
// @GetMapping("list") @GetMapping("list")
// public R list(IcsCustomerStaff icsCustomerStaff) { public R list(IcsCustomerStaff icsCustomerStaff) {
// startPage(); startPage();
// String customerId = icsCustomerStaff.getCustomerId(); String customerId = icsCustomerStaff.getCustomerId();
// if (customerId != null && !"".equals(customerId)) { if (customerId != null && !"".equals(customerId)) {
// icsCustomerStaff.setIcsCustomerId(Long.valueOf(customerId)); icsCustomerStaff.setIcsCustomerId(Long.valueOf(customerId));
// } }
// icsCustomerStaff.setDataType(Constants.CUSTOMER_VISIT); icsCustomerStaff.setDataType(Constants.CUSTOMER_VISIT);
// return result(icsCustomerStaffService.selectIcsCustomerStaffList(icsCustomerStaff)); return result(icsCustomerStaffService.selectIcsCustomerStaffList(icsCustomerStaff));
// } }
/** /**
@ -326,7 +326,45 @@ public class CustomerStaffController extends BaseController {
@PostMapping("updateStaffByCustomer") @PostMapping("updateStaffByCustomer")
public R updateStaffByCustomer(@RequestBody IcsCustomerStaff icsCustomerStaff) { public R updateStaffByCustomer(@RequestBody IcsCustomerStaff icsCustomerStaff) {
StaffCustomer staffCustomer = staffCustomerService.selectStaffIdAndCustomerId(icsCustomerStaff.getIcsCustomerId(), icsCustomerStaff.getId()); StaffCustomer staffCustomer = staffCustomerService.selectStaffIdAndCustomerId(icsCustomerStaff.getIcsCustomerId(), icsCustomerStaff.getId());
return toAjax(staffCustomerService.deleteStaffCustomerById(staffCustomer.getId())); int i = staffCustomerService.deleteStaffCustomerById(staffCustomer.getId());
Assert.isTrue(i > 0, "删除失败");
//删除用户与设备
Long icsCustomerId = icsCustomerStaff.getIcsCustomerId();
ArrayList<Long> ids = new ArrayList<>();
//查询对应的企业
Customer customer = customerService.selectCustomerById(icsCustomerId);
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) {
RoomEquipment roomEquipment = roomEquipmentService.selectByRoomId(id);
if (null != roomEquipment) {
ids.add(roomEquipment.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) {
int i1 = userEquipmentService.deleteUserEquipmentByUserId(icsCustomerStaff.getId(), id);
//删除设备的用户
Equipment equipment = equipmentService.selectEquipmentById(id);
if (equipment !=null){
DeviceUtils.deletePersons(equipment.getIp(),icsCustomerStaff.getId());
}
}
}
return toAjax(i);
} }
/** /**
@ -352,7 +390,7 @@ public class CustomerStaffController extends BaseController {
//获取设备数量 //获取设备数量
UserEquipment userEquipment = new UserEquipment(); UserEquipment userEquipment = new UserEquipment();
userEquipment.setUserId(customerStaff.getId()); userEquipment.setUserId(customerStaff.getId());
List<UserEquipment> equipments = userEquipmentService.selectUserEquipmentList(userEquipment); List<UserEquipment> equipments = userEquipmentService.selectUserEquipmentNum(userEquipment);
customerStaff.setNum(equipments.size()); customerStaff.setNum(equipments.size());
} }
@ -362,7 +400,7 @@ public class CustomerStaffController extends BaseController {
// @RequiresPermissions("admin:staff:import") // @RequiresPermissions("admin:staff:import")
@Ignore @Ignore
@PostMapping("/importData") @PostMapping("/importData")
public R importData(MultipartFile file) throws Exception { public R importData(MultipartFile file,Long customerId) throws Exception {
// } // }
ExcelUtil<IcsCustomerStaff> util = new ExcelUtil<IcsCustomerStaff>(IcsCustomerStaff.class); ExcelUtil<IcsCustomerStaff> util = new ExcelUtil<IcsCustomerStaff>(IcsCustomerStaff.class);
List<IcsCustomerStaff> userList = util.importExcel(file.getInputStream()); List<IcsCustomerStaff> userList = util.importExcel(file.getInputStream());
@ -383,7 +421,7 @@ public class CustomerStaffController extends BaseController {
} }
} }
} }
String message = icsCustomerStaffService.importCustomerStaff(userList); String message = icsCustomerStaffService.importCustomerStaff(userList,customerId);
return R.data(message); return R.data(message);
} }

View File

@ -2,6 +2,7 @@ package com.ics.admin.controller;
import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.ics.admin.domain.Customer;
import com.ics.admin.domain.Park; import com.ics.admin.domain.Park;
import com.ics.admin.service.IParkService; import com.ics.admin.service.IParkService;
import com.ics.common.core.controller.BaseController; import com.ics.common.core.controller.BaseController;
@ -9,11 +10,14 @@ import com.ics.common.core.domain.R;
import com.ics.common.utils.DateUtils; import com.ics.common.utils.DateUtils;
import com.ics.common.utils.ValidatorUtils; import com.ics.common.utils.ValidatorUtils;
import com.ics.system.domain.Dept; import com.ics.system.domain.Dept;
import com.ics.system.domain.User;
import com.ics.system.service.ICurrentUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.wf.jwtp.annotation.Ignore; import org.wf.jwtp.annotation.Ignore;
import org.wf.jwtp.annotation.Logical; import org.wf.jwtp.annotation.Logical;
import org.wf.jwtp.annotation.RequiresPermissions; import org.wf.jwtp.annotation.RequiresPermissions;
import org.wf.jwtp.util.SubjectUtil;
import java.util.List; import java.util.List;
@ -31,7 +35,8 @@ public class ParkController extends BaseController {
@Autowired @Autowired
private IParkService parkService; private IParkService parkService;
@Autowired
private ICurrentUserService currentUserService;
/** /**
* 查询园区管理 * 查询园区管理
*/ */
@ -57,6 +62,14 @@ public class ParkController extends BaseController {
@GetMapping("list") @GetMapping("list")
public R list(Park park) { public R list(Park park) {
startPage(); startPage();
boolean isAdmin = SubjectUtil.hasRole(getRequest(),"manager");
if (isAdmin){
Long parkId = currentUserService.getParkId();
Long tenantId = currentUserService.getTenantId();
park.setId(parkId);
park.setTenantId(tenantId);
}
return result(parkService.selectParkList(park)); return result(parkService.selectParkList(park));
} }

View File

@ -143,6 +143,7 @@ public class EquipmentController extends BaseController {
RoomEquipment roomEquipment = roomEquipmentService.selectByEquipmentId(equipment2.getId()); RoomEquipment roomEquipment = roomEquipmentService.selectByEquipmentId(equipment2.getId());
if (roomEquipment != null) { if (roomEquipment != null) {
Room room = roomService.selectRoomById(roomEquipment.getRoomId()); Room room = roomService.selectRoomById(roomEquipment.getRoomId());
if (room !=null){
equipment2.setRoomId(room.getId()); equipment2.setRoomId(room.getId());
equipment2.setBuildId(room.getBuildingDetailId()); equipment2.setBuildId(room.getBuildingDetailId());
equipment2.setRoomName(room.getName()); equipment2.setRoomName(room.getName());
@ -151,9 +152,11 @@ public class EquipmentController extends BaseController {
equipment2.setBuildName(buildingDetail.getFloorName()); equipment2.setBuildName(buildingDetail.getFloorName());
} }
} }
}
UserEquipment userEquipment = new UserEquipment(); UserEquipment userEquipment = new UserEquipment();
userEquipment.setEquipmentId(equipment2.getId()); userEquipment.setEquipmentId(equipment2.getId());
List<UserEquipment> equipments = userEquipmentService.selectUserEquipmentList(userEquipment); List<UserEquipment> equipments = userEquipmentService.selectUserEquipmentNumByUserId(userEquipment);
equipment2.setPersonCount(equipments.size()); equipment2.setPersonCount(equipments.size());
} }
return result(equipment1); return result(equipment1);
@ -365,7 +368,7 @@ public class EquipmentController extends BaseController {
customerStaff.setIcsCustomerId(customer.getId()); customerStaff.setIcsCustomerId(customer.getId());
} }
} }
List<IcsCustomerStaff> icsCustomerStaffs = staffService.selectIcsCustomerStaffList(customerStaff); List<IcsCustomerStaff> icsCustomerStaffs = staffService.getUserList(customerStaff);
for (IcsCustomerStaff icsCustomerStaff : icsCustomerStaffs) { for (IcsCustomerStaff icsCustomerStaff : icsCustomerStaffs) {
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffId(icsCustomerStaff.getId()); List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerByStaffId(icsCustomerStaff.getId());

View File

@ -4,9 +4,13 @@ import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.Assert;
import com.ics.admin.domain.*; import com.ics.admin.domain.*;
import com.ics.admin.domain.meeting.CustomerTicket;
import com.ics.admin.domain.meeting.RoomContent; import com.ics.admin.domain.meeting.RoomContent;
import com.ics.admin.domain.meeting.Ticket;
import com.ics.admin.service.*; import com.ics.admin.service.*;
import com.ics.admin.service.meeting.ICustomerTicketService;
import com.ics.admin.service.meeting.IRoomContentService; import com.ics.admin.service.meeting.IRoomContentService;
import com.ics.admin.service.meeting.ITicketService;
import com.ics.common.core.domain.IcsCustomerStaff; import com.ics.common.core.domain.IcsCustomerStaff;
import com.ics.system.domain.Tenant; import com.ics.system.domain.Tenant;
import com.ics.system.domain.User; import com.ics.system.domain.User;
@ -79,6 +83,12 @@ public class ReservationController extends BaseController {
@Autowired @Autowired
private IBuildingDetailService buildingDetailService; private IBuildingDetailService buildingDetailService;
@Autowired
private ITicketService ticketService;
@Autowired
private ICustomerTicketService customerTicketService;
/** /**
* 查询预约记录 * 查询预约记录
*/ */
@ -112,6 +122,10 @@ public class ReservationController extends BaseController {
reservation.setParkName(park.getName()); reservation.setParkName(park.getName());
} }
Ticket ticket = ticketService.selectTicketById(reservation.getTicketId());
if (ticket !=null){
reservation.setTicketName(ticket.getTitle());
}
Tenant tenant = tenantService.selectTenantById(reservation.getTenantId()); Tenant tenant = tenantService.selectTenantById(reservation.getTenantId());
if (tenant !=null ){ if (tenant !=null ){
@ -214,6 +228,20 @@ public class ReservationController extends BaseController {
if (reservation.getCancelResaon() !=null){ if (reservation.getCancelResaon() !=null){
reservation.setCancelResaon("管理员取消原因为:"+reservation.getCancelResaon()); reservation.setCancelResaon("管理员取消原因为:"+reservation.getCancelResaon());
Long ticketId = reservation.getTicketId();
if (ticketId !=null){
Ticket ticket = ticketService.selectTicketById(ticketId);
if (ticket != null){
Long customerId = reservation.getCustomerId();
CustomerTicket customerTicket = new CustomerTicket();
customerTicket.setTicketId(ticketId);
customerTicket.setCustomerId(customerId);
customerTicket.setType(ticket.getType());
customerTicket.setIsVerification(0);
int i1 = customerTicketService.insertCustomerTicket(customerTicket);
}
}
} }
return toAjax(reservationService.updateReservation(reservation)); return toAjax(reservationService.updateReservation(reservation));

View File

@ -110,14 +110,19 @@ public class RoomContentController extends BaseController {
} }
boolean b = SubjectUtil.hasRole(getRequest(),"admin"); boolean b = SubjectUtil.hasRole(getRequest(),"admin");
if (b){ if (b){
User user = userService.selectUserById(getCurrentUserId()); Long parkId = currentUserService.getParkId();
if (null != user.getCustomerId()){ Long tenantId = currentUserService.getTenantId();
Customer customer = customerService.selectCustomerById(user.getCustomerId()); roomContent.setParkId(parkId);
String roomId = customer.getRoomId(); roomContent.setTenantId(tenantId);
List<String> roomIds = StrUtil.split(roomId, ',');
List<Long> collect = roomIds.stream().map(Long::valueOf).collect(Collectors.toList()); // User user = userService.selectUserById(getCurrentUserId());
roomContent.setRoomIds(collect); // if (null != user.getCustomerId()){
} // Customer customer = customerService.selectCustomerById(user.getCustomerId());
// String roomId = customer.getRoomId();
// List<String> roomIds = StrUtil.split(roomId, ',');
// List<Long> collect = roomIds.stream().map(Long::valueOf).collect(Collectors.toList());
// roomContent.setRoomIds(collect);
// }
} }
List<RoomContent> roomContents = roomContentService.selectRoomContentList(roomContent); List<RoomContent> roomContents = roomContentService.selectRoomContentList(roomContent);
for (RoomContent content : roomContents) { for (RoomContent content : roomContents) {
@ -251,10 +256,14 @@ public class RoomContentController extends BaseController {
room.setDeleteFlag(0); room.setDeleteFlag(0);
room.setBuildingDetailId(room.getBuildingDetailId()); room.setBuildingDetailId(room.getBuildingDetailId());
List<Room> rooms = roomService.selectRoomList(room); List<Room> rooms = roomService.selectRoomList(room);
if (room.getType() !=null){
if (room.getId() != null ){ if (room.getId() != null ){
Room room1 = roomService.selectRoomById(room.getId()); Room room1 = roomService.selectRoomById(room.getId());
rooms.add(room1); rooms.add(room1);
} }
}
return R.ok().put("data",rooms); return R.ok().put("data",rooms);
} }
@Ignore @Ignore
@ -287,7 +296,8 @@ public class RoomContentController extends BaseController {
return R.data(customers); return R.data(customers);
} }
@RequiresPermissions("meeting:roomContent:list") @Ignore
// @RequiresPermissions("meeting:roomContent:list")
@GetMapping("/roomContentList") @GetMapping("/roomContentList")
public R roomContentList(RoomContent roomContent) { public R roomContentList(RoomContent roomContent) {
@ -308,14 +318,20 @@ public class RoomContentController extends BaseController {
} }
boolean b = SubjectUtil.hasRole(getRequest(),"admin"); boolean b = SubjectUtil.hasRole(getRequest(),"admin");
if (b){ if (b){
User user = userService.selectUserById(getCurrentUserId());
if (null != user.getCustomerId()){ Long parkId = currentUserService.getParkId();
Customer customer = customerService.selectCustomerById(user.getCustomerId()); Long tenantId = currentUserService.getTenantId();
String roomId = customer.getRoomId(); roomContent.setParkId(parkId);
List<String> roomIds = StrUtil.split(roomId, ','); roomContent.setTenantId(tenantId);
List<Long> collect = roomIds.stream().map(Long::valueOf).collect(Collectors.toList());
roomContent.setRoomIds(collect); // User user = userService.selectUserById(getCurrentUserId());
} // if (null != user.getCustomerId()){
// Customer customer = customerService.selectCustomerById(user.getCustomerId());
// String roomId = customer.getRoomId();
// List<String> roomIds = StrUtil.split(roomId, ',');
// List<Long> collect = roomIds.stream().map(Long::valueOf).collect(Collectors.toList());
// roomContent.setRoomIds(collect);
// }
} }
return R.data(roomContentService.selectRoomContentList(roomContent)); return R.data(roomContentService.selectRoomContentList(roomContent));
} }

View File

@ -74,9 +74,6 @@ public class TicketController extends BaseController {
List<CustomerTicket> customerTickets = customerTicketService.selectListByTicketId(id); List<CustomerTicket> customerTickets = customerTicketService.selectListByTicketId(id);
Optional<CustomerTicket> min = customerTickets.stream() Optional<CustomerTicket> min = customerTickets.stream()
.min(Comparator.comparing(CustomerTicket::getNum)); .min(Comparator.comparing(CustomerTicket::getNum));
if (ticket.getType() == 1){
ticket.setNum(min.get().getNum());
}
Map<Long, CustomerTicket> customerMap = customerTickets.stream().collect(Collectors.toMap(CustomerTicket::getCustomerId, Function.identity())); Map<Long, CustomerTicket> customerMap = customerTickets.stream().collect(Collectors.toMap(CustomerTicket::getCustomerId, Function.identity()));
for (Customer customer : customers) { for (Customer customer : customers) {
//根据外层遍历的学信息id get学生住宿信息Map中的Key //根据外层遍历的学信息id get学生住宿信息Map中的Key
@ -165,6 +162,7 @@ public class TicketController extends BaseController {
@RequiresPermissions("meeting:ticket:edit") @RequiresPermissions("meeting:ticket:edit")
@PostMapping("update") @PostMapping("update")
public R editSave(@RequestBody Ticket ticket) { public R editSave(@RequestBody Ticket ticket) {
// ticket.get
int i = ticketService.updateTicket(ticket); int i = ticketService.updateTicket(ticket);
Assert.isTrue(i == 1, "修改失败"); Assert.isTrue(i == 1, "修改失败");
//修改企业和优惠卷数据 如果类型是 抵用卷循环添加如果是优惠卷添加一条 //修改企业和优惠卷数据 如果类型是 抵用卷循环添加如果是优惠卷添加一条
@ -172,6 +170,7 @@ public class TicketController extends BaseController {
CustomerTicket customerTicket = customerTicketService.selectCustomerTicketById(ticket.getId()); CustomerTicket customerTicket = customerTicketService.selectCustomerTicketById(ticket.getId());
if (customerTicket ==null){ if (customerTicket ==null){
if (ticket.getType() == 1) { if (ticket.getType() == 1) {
if (ticket.getTicketCustomerVo() != null){
for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) { for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) {
//查询出所有的 id //查询出所有的 id
@ -198,11 +197,11 @@ public class TicketController extends BaseController {
customerTicketService.insertCustomerTicket(customerTicket1); customerTicketService.insertCustomerTicket(customerTicket1);
} }
} }
}
}else { }else {
if (ticket.getTicketCustomerVo()!=null){
for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) { for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) {
for (int j = 0; j < ticketCustomerVo.getSumNum(); j++) { for (int j = 0; j < ticketCustomerVo.getSumNum(); j++) {
CustomerTicket customerTicket1 = new CustomerTicket(); CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId()); customerTicket1.setTicketId(ticket.getId());
@ -213,6 +212,8 @@ public class TicketController extends BaseController {
} }
} }
}
} }

View File

@ -253,13 +253,13 @@ public class VisitorPersonController extends BaseController {
@PostMapping("update") @PostMapping("update")
public R editSave(@RequestBody VisitorPerson visitorPerson) { public R editSave(@RequestBody VisitorPerson visitorPerson) {
if (null != visitorPerson.getStatus()) { // if (null != visitorPerson.getStatus()) {
Long loginCustomerId = this.getLoginCustomerId(); // Long loginCustomerId = this.getLoginCustomerId();
//
if (loginCustomerId != null) { // if (loginCustomerId != null) {
visitorPerson.setReviewersTime(new Date()); // visitorPerson.setReviewersTime(new Date());
} // }
} // }
if (visitorPerson.getStatus() == 1){ if (visitorPerson.getStatus() == 1){
Customer customer = customerService.selectCustomerById(visitorPerson.getCustomerId()); Customer customer = customerService.selectCustomerById(visitorPerson.getCustomerId());
@ -313,6 +313,9 @@ public class VisitorPersonController extends BaseController {
} }
} }
} }
}else if (visitorPerson.getStatus() == 2){
//如果状态为2
//则删除设备中的人员信息
} }

View File

@ -61,7 +61,6 @@ public class Ticket extends BaseEntity<Ticket> {
@TableField(exist = false) @TableField(exist = false)
private Long[] enterpriseIds; private Long[] enterpriseIds;
@TableField(exist = false)
private Integer num; private Integer num;
@TableField(exist = false) @TableField(exist = false)

View File

@ -74,4 +74,7 @@ public interface IcsCustomerStaffMapper extends BaseMapper<IcsCustomerStaff> {
int updateByCustomer(IcsCustomerStaff customerStaff); int updateByCustomer(IcsCustomerStaff customerStaff);
IcsCustomerStaff selectUserByMobile(String mobile); IcsCustomerStaff selectUserByMobile(String mobile);
List<IcsCustomerStaff> getUserList(IcsCustomerStaff customerStaff);
} }

View File

@ -83,5 +83,8 @@ public interface IIcsCustomerStaffService extends IService<IcsCustomerStaff> {
List<IcsCustomerStaff> selectCustomerStaffList(IcsCustomerStaff icsCustomerStaff); List<IcsCustomerStaff> selectCustomerStaffList(IcsCustomerStaff icsCustomerStaff);
String importCustomerStaff(List<IcsCustomerStaff> userList); String importCustomerStaff(List<IcsCustomerStaff> userList,Long customerId);
List<IcsCustomerStaff> getUserList(IcsCustomerStaff customerStaff);
} }

View File

@ -1,19 +1,35 @@
package com.ics.admin.service.impl; package com.ics.admin.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.aliyun.oss.ServiceException; import com.aliyun.oss.ServiceException;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ics.admin.domain.Customer;
import com.ics.admin.domain.Room;
import com.ics.admin.domain.meeting.DetailEquipment;
import com.ics.admin.domain.meeting.RoomEquipment;
import com.ics.admin.domain.meeting.StaffCustomer;
import com.ics.admin.domain.meeting.UserEquipment;
import com.ics.admin.mapper.IcsCustomerStaffMapper; import com.ics.admin.mapper.IcsCustomerStaffMapper;
import com.ics.admin.service.ICustomerService;
import com.ics.admin.service.IIcsCustomerStaffService; import com.ics.admin.service.IIcsCustomerStaffService;
import com.ics.admin.service.IRoomService;
import com.ics.admin.service.meeting.IDetailEquipmentService;
import com.ics.admin.service.meeting.IRoomEquipmentService;
import com.ics.admin.service.meeting.IStaffCustomerService;
import com.ics.admin.service.meeting.IUserEquipmentService;
import com.ics.common.core.domain.IcsCustomerStaff; import com.ics.common.core.domain.IcsCustomerStaff;
import com.ics.common.utils.StringUtils; import com.ics.common.utils.StringUtils;
import com.ics.system.domain.User; import com.ics.system.domain.User;
import com.ics.system.mapper.UserMapper; import com.ics.system.mapper.UserMapper;
import com.ics.system.service.ICurrentUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 企业员工Service业务层处理 * 企业员工Service业务层处理
@ -29,6 +45,26 @@ public class IcsCustomerStaffServiceImpl extends ServiceImpl<IcsCustomerStaffMap
@Autowired @Autowired
private UserMapper userMapper; private UserMapper userMapper;
@Autowired
private IStaffCustomerService staffCustomerService;
@Autowired
private ICustomerService customerService;
@Autowired
private IRoomService roomService;
@Autowired
private ICurrentUserService currentUserService;
@Autowired
private IRoomEquipmentService roomEquipmentService;
@Autowired
private IDetailEquipmentService detailEquipmentService;
@Autowired
private IUserEquipmentService userEquipmentService;
/** /**
* 查询企业员工 * 查询企业员工
* *
@ -119,7 +155,7 @@ public class IcsCustomerStaffServiceImpl extends ServiceImpl<IcsCustomerStaffMap
public List<IcsCustomerStaff> selectListByUserIds(List<Long> userIds) { public List<IcsCustomerStaff> selectListByUserIds(List<Long> userIds) {
QueryWrapper<IcsCustomerStaff> objectQueryWrapper = new QueryWrapper<>(); QueryWrapper<IcsCustomerStaff> objectQueryWrapper = new QueryWrapper<>();
objectQueryWrapper.in("id",userIds); objectQueryWrapper.in(CollUtil.isNotEmpty(userIds), "id", userIds);
return icsCustomerStaffMapper.selectList(objectQueryWrapper); return icsCustomerStaffMapper.selectList(objectQueryWrapper);
} }
@ -166,55 +202,126 @@ public class IcsCustomerStaffServiceImpl extends ServiceImpl<IcsCustomerStaffMap
} }
@Override @Override
public String importCustomerStaff(List<IcsCustomerStaff> userList) { public String importCustomerStaff(List<IcsCustomerStaff> userList,Long customerId) {
if (StringUtils.isNull(userList) || userList.size() == 0) if (StringUtils.isNull(userList) || userList.size() == 0) {
{
throw new ServiceException("导入用户数据不能为空!"); throw new ServiceException("导入用户数据不能为空!");
} }
int successNum = 0; int successNum = 0;
int failureNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder(); StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder(); StringBuilder failureMsg = new StringBuilder();
for (IcsCustomerStaff user : userList) for (IcsCustomerStaff user : userList) {
{ try {
try
{
// 验证是否存在这个用户 // 验证是否存在这个用户
IcsCustomerStaff u = icsCustomerStaffMapper.selectUserByMobile(user.getMobile()); IcsCustomerStaff u = icsCustomerStaffMapper.selectUserByMobile(user.getMobile());
if (StringUtils.isNull(u)) if (StringUtils.isNull(u)) {
{
user.setCardNo("0"); user.setCardNo("0");
user.setDataType("1"); user.setDataType("1");
user.setGender(user.getGender().equals("") ? "0" : "1"); user.setGender(user.getGender().equals("") ? "0" : "1");
icsCustomerStaffMapper.insert(user); int insert = icsCustomerStaffMapper.insert(user);
if (insert > 0) {
StaffCustomer staffCustomer =new StaffCustomer();
staffCustomer.setStaffId(user.getId());
staffCustomer.setIcsCustomerId(customerId);
StaffCustomer staffCustomer1 = staffCustomerService.selectStaffIdAndCustomerId(customerId, user.getId());
if (staffCustomer1 == null) {
staffCustomerService.insertStaffCustomer(staffCustomer);
}
//根据用户添加对应企业设备
queryDeviceByCustomerId(customerId,user.getId());
}
successNum++; successNum++;
successMsg.append("<br/>" + successNum + "、账号 " + user.getName() + " 导入成功"); successMsg.append("<br/>" + successNum + "、账号 " + user.getName() + " 导入成功");
} else {
u.setCardNo("0");
u.setDataType("1");
u.setGender(user.getGender().equals("") ? "0" : "1");
u.setUsername(user.getUsername());
u.setName(user.getName());
u.setAddress(user.getAddress());
u.setEmail(user.getEmail());
u.setDegree(user.getDegree());
u.setUrgent(user.getUrgent());
int insert = updateByCustomer(u);
StaffCustomer staffCustomer =new StaffCustomer();
staffCustomer.setStaffId(u.getId());
staffCustomer.setIcsCustomerId(customerId);
StaffCustomer staffCustomer1 = staffCustomerService.selectStaffIdAndCustomerId(customerId, u.getId());
if (staffCustomer1 == null) {
staffCustomerService.insertStaffCustomer(staffCustomer);
//根据用户添加对应企业设备
queryDeviceByCustomerId(customerId,u.getId());
successNum++;
successMsg.append("<br/>" + successNum + "、账号 " + user.getName() + " 已更新");
}else {
failureNum++;
failureMsg.append("<br/>" + successNum + "、账号 " + user.getName() + "已经存在");
} }
else
{
failureNum++;
failureMsg.append("<br/>" + failureNum + "、账号 " + user.getName() + " 已存在");
} }
} } catch (Exception e) {
catch (Exception e)
{
failureNum++; failureNum++;
String msg = "<br/>" + failureNum + "、账号 " + user.getName() + " 导入失败:"; String msg = "<br/>" + failureNum + "、账号 " + user.getName() + " 导入失败:";
failureMsg.append(msg + e.getMessage()); failureMsg.append(msg + e.getMessage());
log.error(msg, e); log.error(msg, e);
} }
} }
if (failureNum > 0) if (failureNum > 0) {
{
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
} throw new RuntimeException(failureMsg.toString());
else } else {
{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
} }
return successMsg.toString(); return successMsg.toString();
} }
@Override
public List<IcsCustomerStaff> getUserList(IcsCustomerStaff customerStaff) {
return icsCustomerStaffMapper.getUserList(customerStaff);
}
//根据企业查询对应的设备
public void queryDeviceByCustomerId(Long customerId,Long userId){
ArrayList<Long> ids = new ArrayList<>();
Customer customer = customerService.selectCustomerById(customerId);
//根据企业 查询对应的 房间和对应的楼层
String roomId = customer.getRoomId();
List<String> roomIds = StrUtil.split(roomId, ',');
List<Long> collect = roomIds.stream().map(Long::valueOf).collect(Collectors.toList());
for (Long roomid : collect) {
Room room = roomService.selectRoomById(roomid);
if (null != room) {
Long id = room.getId();
RoomEquipment roomEquipment = roomEquipmentService.selectByRoomId(id);
if (null != roomEquipment) {
ids.add(roomEquipment.getEquipmentId());
}
List<DetailEquipment> detailEquipments = detailEquipmentService.selectByRoomId(id);
if (CollUtil.isNotEmpty(detailEquipments)) {
for (DetailEquipment detailEquipment : detailEquipments) {
ids.add(detailEquipment.getEquipmentId());
}
}
}
}
//根据设备id
for (Long id : ids) {
UserEquipment userEquipment = new UserEquipment();
userEquipment.setEquipmentId(id);
userEquipment.setUserId(userId);
userEquipment.setStartTime(customer.getStartDate());
userEquipment.setEndDate(customer.getEndDate());
List<UserEquipment> equipments = userEquipmentService.selectUserEquipmentList(userEquipment);
if (CollUtil.isEmpty(equipments)) {
userEquipmentService.insertUserEquipment(userEquipment);
}
}
}
} }

View File

@ -43,6 +43,7 @@ public class TicketServiceImpl extends ServiceImpl<TicketMapper, Ticket> impleme
public List<Ticket> selectTicketList(Ticket ticket) { public List<Ticket> selectTicketList(Ticket ticket) {
QueryWrapper queryWrapper = new QueryWrapper(); QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(ticket.getParkId() !=null,"park_id", ticket.getParkId()); queryWrapper.eq(ticket.getParkId() !=null,"park_id", ticket.getParkId());
queryWrapper.eq(ticket.getTitle() !=null,"title", ticket.getTitle());
queryWrapper.eq(ticket.getTenantId() !=null,"tenant_id", ticket.getTenantId()); queryWrapper.eq(ticket.getTenantId() !=null,"tenant_id", ticket.getTenantId());
return ticketMapper.selectList(queryWrapper); return ticketMapper.selectList(queryWrapper);

View File

@ -232,6 +232,7 @@ public class UserEquipmentServiceImpl extends ServiceImpl<UserEquipmentMapper, U
public int deleteUserEquipmentByUserId(Long userId,Long deviceId) { public int deleteUserEquipmentByUserId(Long userId,Long deviceId) {
UpdateWrapper<UserEquipment> wrapper = new UpdateWrapper<>(); UpdateWrapper<UserEquipment> wrapper = new UpdateWrapper<>();
wrapper.eq("user_id", userId); wrapper.eq("user_id", userId);
wrapper.eq("equipment_id", deviceId);
return userEquipmentMapper.delete(wrapper); return userEquipmentMapper.delete(wrapper);
} }
@ -242,6 +243,32 @@ public class UserEquipmentServiceImpl extends ServiceImpl<UserEquipmentMapper, U
return userEquipmentMapper.selectCount(wrapper); return userEquipmentMapper.selectCount(wrapper);
} }
@Override
public List<UserEquipment> selectUserEquipmentNum(UserEquipment userEquipment) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(null != userEquipment.getEquipmentId(),"equipment_id",userEquipment.getEquipmentId());
queryWrapper.eq(null != userEquipment.getUserId(),"user_id",userEquipment.getUserId());
queryWrapper.eq(null != userEquipment.getStartTime(),"start_time",userEquipment.getStartTime());
queryWrapper.eq(null != userEquipment.getEndDate(),"end_date",userEquipment.getEndDate());
queryWrapper.in(CollUtil.isNotEmpty(userEquipment.getUserIds()),"user_id",userEquipment.getUserIds());
queryWrapper.groupBy("equipment_id");
return userEquipmentMapper.selectList(queryWrapper);
}
@Override
public List<UserEquipment> selectUserEquipmentNumByUserId(UserEquipment userEquipment) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(null != userEquipment.getEquipmentId(),"equipment_id",userEquipment.getEquipmentId());
queryWrapper.eq(null != userEquipment.getUserId(),"user_id",userEquipment.getUserId());
queryWrapper.eq(null != userEquipment.getStartTime(),"start_time",userEquipment.getStartTime());
queryWrapper.eq(null != userEquipment.getEndDate(),"end_date",userEquipment.getEndDate());
queryWrapper.in(CollUtil.isNotEmpty(userEquipment.getUserIds()),"user_id",userEquipment.getUserIds());
queryWrapper.groupBy("user_id");
return userEquipmentMapper.selectList(queryWrapper);
}
public void updateDeviceDataSource(List<Equipment> equipments) { public void updateDeviceDataSource(List<Equipment> equipments) {
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();

View File

@ -116,7 +116,6 @@ public class CustomerTicketServiceImpl extends ServiceImpl<CustomerTicketMapper,
if (roomContent.getIsTicket() == 1){ if (roomContent.getIsTicket() == 1){
return new ArrayList<CustomerTicket>(); return new ArrayList<CustomerTicket>();
} }
List<CustomerTicket> customerTickets = customerTicketMapper.selectListByCustomerId(userCustomerVo); List<CustomerTicket> customerTickets = customerTicketMapper.selectListByCustomerId(userCustomerVo);
for (CustomerTicket customerTicket : customerTickets) { for (CustomerTicket customerTicket : customerTickets) {
@ -129,6 +128,9 @@ public class CustomerTicketServiceImpl extends ServiceImpl<CustomerTicketMapper,
customerTicket.setDuration(ticket.getDuration()); customerTicket.setDuration(ticket.getDuration());
customerTicket.setType(ticket.getType()); customerTicket.setType(ticket.getType());
customerTicket.setDiscount(ticket.getDiscount()); customerTicket.setDiscount(ticket.getDiscount());
int i = customerTicketMapper.selectByTicketIdAndCustomer(customerTicket.getTicketId(), customerTicket.getCustomerId());
customerTicket.setNum(i);
} }
return customerTickets; return customerTickets;
} }
@ -138,6 +140,7 @@ public class CustomerTicketServiceImpl extends ServiceImpl<CustomerTicketMapper,
QueryWrapper<CustomerTicket> wrapper = new QueryWrapper<>(); QueryWrapper<CustomerTicket> wrapper = new QueryWrapper<>();
wrapper.eq("customer_id", customerTicket.getCustomerId()); wrapper.eq("customer_id", customerTicket.getCustomerId());
wrapper.eq("ticket_id", customerTicket.getTicketId()); wrapper.eq("ticket_id", customerTicket.getTicketId());
wrapper.eq("is_verification", 0);
wrapper.groupBy("ticket_id"); wrapper.groupBy("ticket_id");
CustomerTicket customerTicket1 = customerTicketMapper.selectOne(wrapper); CustomerTicket customerTicket1 = customerTicketMapper.selectOne(wrapper);
customerTicket1.setStaffId(customerTicket.getStaffId()); customerTicket1.setStaffId(customerTicket.getStaffId());

View File

@ -13,6 +13,8 @@ import com.ics.admin.domain.meeting.RoomRecord;
import com.ics.admin.mapper.RoomMapper; import com.ics.admin.mapper.RoomMapper;
import com.ics.admin.mapper.meeting.RoomRecordMapper; import com.ics.admin.mapper.meeting.RoomRecordMapper;
import com.ics.admin.service.meeting.IVisitorPersonService; import com.ics.admin.service.meeting.IVisitorPersonService;
import com.ics.system.domain.User;
import com.ics.system.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ics.admin.mapper.meeting.VisitorPersonMapper; import com.ics.admin.mapper.meeting.VisitorPersonMapper;
@ -33,6 +35,9 @@ public class IVisitorPersonServiceImpl extends ServiceImpl<VisitorPersonMapper,
@Autowired @Autowired
private RoomRecordMapper roomRecordMapper; private RoomRecordMapper roomRecordMapper;
@Autowired
private IUserService userService;
/** /**
* 查询预约参观人员 * 查询预约参观人员
* *
@ -109,6 +114,18 @@ public class IVisitorPersonServiceImpl extends ServiceImpl<VisitorPersonMapper,
@Override @Override
public IPage<VisitorPerson> selectVisitorRecord(Long userId, Integer pageNum, Integer pageSize) { public IPage<VisitorPerson> selectVisitorRecord(Long userId, Integer pageNum, Integer pageSize) {
//根据当前的用户id 去查询 系统用户的 用户id
User user = userService.selectUserByStaffId(userId);
if (null != user){
Long customerId = user.getCustomerId();
QueryWrapper<VisitorPerson> wrapper = new QueryWrapper<VisitorPerson>().eq("customer_id", customerId);
wrapper.orderByDesc("create_time");
IPage<VisitorPerson> pages = new Page<>(pageNum,pageSize);
IPage<VisitorPerson> userIPage = visitorPersonMapper.selectPage(pages,wrapper);
return userIPage;
}else {
QueryWrapper<VisitorPerson> wrapper = new QueryWrapper<VisitorPerson>().eq("user_id", userId); QueryWrapper<VisitorPerson> wrapper = new QueryWrapper<VisitorPerson>().eq("user_id", userId);
wrapper.orderByDesc("create_time"); wrapper.orderByDesc("create_time");
@ -117,6 +134,8 @@ public class IVisitorPersonServiceImpl extends ServiceImpl<VisitorPersonMapper,
return userIPage; return userIPage;
} }
}
@Override @Override
public IPage<VisitorPerson> selectVisitorRecordByIntervieweeId(Long intervieweeId, Integer pageNum, Integer pageSize) { public IPage<VisitorPerson> selectVisitorRecordByIntervieweeId(Long intervieweeId, Integer pageNum, Integer pageSize) {
QueryWrapper<VisitorPerson> wrapper = new QueryWrapper<VisitorPerson>().eq("interviewee_id", intervieweeId); QueryWrapper<VisitorPerson> wrapper = new QueryWrapper<VisitorPerson>().eq("interviewee_id", intervieweeId);

View File

@ -136,6 +136,7 @@ public class ReservationServiceImpl extends ServiceImpl<ReservationMapper, Reser
QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>(); QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("room_content_id",reservation.getRoomContentId()); queryWrapper.eq("room_content_id",reservation.getRoomContentId());
queryWrapper.ne("stauts",4);
Date startTime = reservation.getStartTime(); Date startTime = reservation.getStartTime();
Date endDate = reservation.getEndDate(); Date endDate = reservation.getEndDate();

View File

@ -52,6 +52,7 @@ public class ShowroomRecordServiceImpl extends ServiceImpl<ShowroomRecordMapper,
@Override @Override
public List<ShowroomRecord> selectShowroomRecordList(ShowroomRecord showroomRecord) { public List<ShowroomRecord> selectShowroomRecordList(ShowroomRecord showroomRecord) {
QueryWrapper queryWrapper = new QueryWrapper(); QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(showroomRecord.getTitle() !=null,"title", showroomRecord.getTitle());
queryWrapper.eq(showroomRecord.getParkId() !=null,"park_id", showroomRecord.getParkId()); queryWrapper.eq(showroomRecord.getParkId() !=null,"park_id", showroomRecord.getParkId());
queryWrapper.eq(showroomRecord.getTenantId() !=null,"tenant_id", showroomRecord.getTenantId()); queryWrapper.eq(showroomRecord.getTenantId() !=null,"tenant_id", showroomRecord.getTenantId());
queryWrapper.eq(CollUtil.isNotEmpty(showroomRecord.getStaffIds()),"user_id", showroomRecord.getStaffIds()); queryWrapper.eq(CollUtil.isNotEmpty(showroomRecord.getStaffIds()),"user_id", showroomRecord.getStaffIds());
@ -115,6 +116,7 @@ public class ShowroomRecordServiceImpl extends ServiceImpl<ShowroomRecordMapper,
// 查询会议室记录 // 查询会议室记录
QueryWrapper<ShowroomRecord> wrapper = new QueryWrapper<>(); QueryWrapper<ShowroomRecord> wrapper = new QueryWrapper<>();
wrapper.eq("showroom_id",showroomRecord.getShowroomId()); wrapper.eq("showroom_id",showroomRecord.getShowroomId());
wrapper.ne("status",4);
wrapper.gt("start_time", DateUtil.format(dateTime,"yyyy-MM-dd")+ " 00:00:00"); wrapper.gt("start_time", DateUtil.format(dateTime,"yyyy-MM-dd")+ " 00:00:00");
wrapper.lt("end_date",DateUtil.format(dateTime,"yyyy-MM-dd") + " 23:59:59"); wrapper.lt("end_date",DateUtil.format(dateTime,"yyyy-MM-dd") + " 23:59:59");
List<ShowroomRecord> showroomRecords = showroomRecordMapper.selectList(wrapper); List<ShowroomRecord> showroomRecords = showroomRecordMapper.selectList(wrapper);
@ -132,6 +134,7 @@ public class ShowroomRecordServiceImpl extends ServiceImpl<ShowroomRecordMapper,
QueryWrapper<ShowroomRecord> queryWrapper = new QueryWrapper<>(); QueryWrapper<ShowroomRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("showroom_id",showroomRecord.getShowroomId()); queryWrapper.eq("showroom_id",showroomRecord.getShowroomId());
queryWrapper.ne("status",4);
Date startTime = showroomRecord.getStartTime(); Date startTime = showroomRecord.getStartTime();
Date endDate = showroomRecord.getEndDate(); Date endDate = showroomRecord.getEndDate();
@ -154,6 +157,7 @@ public class ShowroomRecordServiceImpl extends ServiceImpl<ShowroomRecordMapper,
QueryWrapper<ShowroomRecord> queryWrapper = new QueryWrapper<>(); QueryWrapper<ShowroomRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id",showroomRecord.getUserId()); queryWrapper.eq("user_id",showroomRecord.getUserId());
queryWrapper.orderByDesc("create_time");
IPage<ShowroomRecord> pages = new Page<>(pageNum,pageSize); IPage<ShowroomRecord> pages = new Page<>(pageNum,pageSize);
IPage<ShowroomRecord> showroomRecordIPage = baseMapper.selectPage(pages, queryWrapper); IPage<ShowroomRecord> showroomRecordIPage = baseMapper.selectPage(pages, queryWrapper);

View File

@ -43,6 +43,7 @@ public class ShowroomServiceImpl extends ServiceImpl<ShowroomMapper, Showroom> i
public List<Showroom> selectShowroomList(Showroom showroom) { public List<Showroom> selectShowroomList(Showroom showroom) {
QueryWrapper queryWrapper = new QueryWrapper(); QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(showroom.getParkId() !=null,"park_id", showroom.getParkId()); queryWrapper.eq(showroom.getParkId() !=null,"park_id", showroom.getParkId());
queryWrapper.eq(showroom.getMeetingName() !=null,"meeting_name", showroom.getMeetingName());
queryWrapper.eq(showroom.getTenantId() !=null,"tenant_id", showroom.getTenantId()); queryWrapper.eq(showroom.getTenantId() !=null,"tenant_id", showroom.getTenantId());
queryWrapper.eq(showroom.getRoomId() !=null,"room_id", showroom.getRoomId()); queryWrapper.eq(showroom.getRoomId() !=null,"room_id", showroom.getRoomId());
queryWrapper.in(showroom.getRoomIds() !=null,"room_id", showroom.getRoomIds()); queryWrapper.in(showroom.getRoomIds() !=null,"room_id", showroom.getRoomIds());

View File

@ -72,4 +72,8 @@ public interface IUserEquipmentService extends IService<UserEquipment> {
int deleteUserEquipmentByUserId(Long userId,Long deviceId); int deleteUserEquipmentByUserId(Long userId,Long deviceId);
int selectListByUserId(Long userId); int selectListByUserId(Long userId);
List<UserEquipment> selectUserEquipmentNum(UserEquipment userEquipment);
List<UserEquipment> selectUserEquipmentNumByUserId(UserEquipment userEquipment);
} }

View File

@ -47,16 +47,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
cs.delete_flag, cs.ics_customer_id, cs.openid, cs.avatar, cs.gender, cs.status, cs.park_id,cs.card_no,cs.data_type cs.delete_flag, cs.ics_customer_id, cs.openid, cs.avatar, cs.gender, cs.status, cs.park_id,cs.card_no,cs.data_type
FROM ics_customer_staff cs FROM ics_customer_staff cs
left join tb_staff_customer tsc on cs.id = tsc.staff_id left join tb_staff_customer tsc on cs.id = tsc.staff_id
left join ics_customer icc on tsc.ics_customer_id = icc.id
<where> <where>
<if test="username != null and username != ''"> AND cs.username LIKE CONCAT('%', #{username}, '%') </if> <if test="username != null and username != ''"> AND cs.username LIKE CONCAT('%', #{username}, '%') </if>
<if test="icsCustomerId != null and icsCustomerId != ''"> AND tsc.ics_customer_id = #{icsCustomerId} </if> <if test="icsCustomerId != null and icsCustomerId != ''"> AND tsc.ics_customer_id = #{icsCustomerId} </if>
<if test="mobile != null and mobile != ''"> AND cs.mobile LIKE CONCAT('%', #{mobile}, '%') </if> <if test="mobile != null and mobile != ''"> AND cs.mobile LIKE CONCAT('%', #{mobile}, '%') </if>
<if test="name != null and name != ''"> AND cs.name LIKE CONCAT('%', #{name}, '%') </if> <if test="name != null and name != ''"> AND cs.name LIKE CONCAT('%', #{name}, '%') </if>
<if test="dataType != null and dataType != ''"> AND cs.data_type = #{dataType} </if> <if test="parkId != null and parkId != ''"> AND icc.park_id = #{parkId} </if>
<if test="parkId != null and parkId != ''"> AND cs.park_id = #{parkId} </if>
<if test="tenantId != null and tenantId != ''"> AND cs.tenant_id = #{tenantId} </if> <if test="tenantId != null and tenantId != ''"> AND cs.tenant_id = #{tenantId} </if>
</where> </where>
</select> </select>
<select id="selectIcsCustomerStaffById" parameterType="Long" resultMap="IcsCustomerStaffResult"> <select id="selectIcsCustomerStaffById" parameterType="Long" resultMap="IcsCustomerStaffResult">
@ -196,6 +195,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectIcsCustomerStaffVo"/> <include refid="selectIcsCustomerStaffVo"/>
WHERE mobile=#{mobile} WHERE mobile=#{mobile}
</select> </select>
<select id="getUserList" resultType="com.ics.common.core.domain.IcsCustomerStaff">
SELECT cs.id, cs.username, cs.mobile, cs.create_by, cs.create_time, cs.update_by,cs.name,cs.photo,cs.address,cs.email,cs.degree,cs.urgent,cs.update_time,
cs.delete_flag, cs.ics_customer_id, cs.openid, cs.avatar, cs.gender, cs.status, cs.park_id,cs.card_no,cs.data_type
FROM ics_customer_staff cs
left join tb_staff_customer tsc on cs.id = tsc.staff_id
<where>
<if test="username != null and username != ''"> AND cs.username LIKE CONCAT('%', #{username}, '%') </if>
<if test="icsCustomerId != null and icsCustomerId != ''"> AND tsc.ics_customer_id = #{icsCustomerId} </if>
<if test="mobile != null and mobile != ''"> AND cs.mobile LIKE CONCAT('%', #{mobile}, '%') </if>
<if test="name != null and name != ''"> AND cs.name LIKE CONCAT('%', #{name}, '%') </if>
<if test="dataType != null and dataType != ''"> AND cs.data_type = #{dataType} </if>
<if test="parkId != null and parkId != ''"> AND cs.park_id = #{parkId} </if>
<if test="tenantId != null and tenantId != ''"> AND cs.tenant_id = #{tenantId} </if>
</where>
group by cs.id
</select>
</mapper> </mapper>

View File

@ -75,6 +75,7 @@
<where> <where>
<if test="name != null and name != ''"> and ip.name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and ip.name like concat('%', #{name}, '%')</if>
<if test="tenantId != null"> and ip.tenant_id = #{tenantId}</if> <if test="tenantId != null"> and ip.tenant_id = #{tenantId}</if>
<if test="id != null"> and ip.id = #{id}</if>
and ip.delete_flag = 0 and ip.delete_flag = 0
</where> </where>
</select> </select>

View File

@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select customer_id,count(1) as num from tb_customer_ticket where ticket_id = #{id} GROUP BY customer_id select customer_id,count(1) as num from tb_customer_ticket where ticket_id = #{id} GROUP BY customer_id
</select> </select>
<select id="selectByTicketIdAndCustomer" resultType="java.lang.Integer"> <select id="selectByTicketIdAndCustomer" resultType="java.lang.Integer">
select count(1) as num from tb_customer_ticket where ticket_id = #{id} and customer_id =#{customerId} GROUP BY customer_id select count(1) as num from tb_customer_ticket where ticket_id = #{id} and customer_id =#{customerId} and is_verification = 0 GROUP BY customer_id
</select> </select>

View File

@ -35,6 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parkId != null and parkId != ''"> AND e.park_id = #{parkId}</if> <if test="parkId != null and parkId != ''"> AND e.park_id = #{parkId}</if>
<if test="tenantId != null and tenantId != ''"> AND e.tenant_id = #{tenantId}</if> <if test="tenantId != null and tenantId != ''"> AND e.tenant_id = #{tenantId}</if>
<if test="roomId != null and roomId != ''"> AND re.room_id = #{roomId}</if> <if test="roomId != null and roomId != ''"> AND re.room_id = #{roomId}</if>
<if test="roomIds != null and roomIds.size() > 0">
AND re.room_id IN
<foreach collection="roomIds" item="roomId" open="(" separator="," close=")">
#{roomId}
</foreach>
</if>
<if test="buildingDetailIds != null and buildingDetailIds.size() > 0"> <if test="buildingDetailIds != null and buildingDetailIds.size() > 0">
AND re.building_detail_id IN AND re.building_detail_id IN
<foreach collection="buildingDetailIds" item="buildingDetailId" open="(" separator="," close=")"> <foreach collection="buildingDetailIds" item="buildingDetailId" open="(" separator="," close=")">

View File

@ -44,7 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectListByDate" resultType="java.util.Date"> <select id="selectListByDate" resultType="java.util.Date">
select date_format(start_time, '%Y-%m-%d') from tb_showroom_record where start_time >= date_format(now(), '%Y-%m-%d') select date_format(start_time, '%Y-%m-%d') from tb_showroom_record where start_time >= date_format(now(), '%Y-%m-%d')
and showroom_id = #{showroomId} group by date_format(start_time, '%Y-%m-%d'); and showroom_id = #{showroomId} and status != 4
group by date_format(start_time, '%Y-%m-%d');
</select> </select>
<insert id="insertShowroomRecord" parameterType="ShowroomRecord" useGeneratedKeys="true" keyProperty="id"> <insert id="insertShowroomRecord" parameterType="ShowroomRecord" useGeneratedKeys="true" keyProperty="id">

View File

@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="startTime" column="start_time" /> <result property="startTime" column="start_time" />
<result property="endDate" column="end_date" /> <result property="endDate" column="end_date" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="num" column="num" />
<result property="isDefault" column="is_default" /> <result property="isDefault" column="is_default" />
<result property="version" column="version" /> <result property="version" column="version" />
<result property="deleteFlag" column="delete_flag" /> <result property="deleteFlag" column="delete_flag" />
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTicketVo"> <sql id="selectTicketVo">
SELECT id, title, content, type, duration, address, is_verification,discount, is_show, start_time, end_date, remark, is_default, version, delete_flag, create_by, create_time, update_by, update_time FROM tb_ticket SELECT id, title, content, type, duration, address, is_verification,discount,num, is_show, start_time, end_date, remark, is_default, version, delete_flag, create_by, create_time, update_by, update_time FROM tb_ticket
</sql> </sql>
<select id="selectTicketList" parameterType="Ticket" resultMap="TicketResult"> <select id="selectTicketList" parameterType="Ticket" resultMap="TicketResult">
@ -54,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isShow != null ">is_show,</if> <if test="isShow != null ">is_show,</if>
<if test="startTime != null ">start_time,</if> <if test="startTime != null ">start_time,</if>
<if test="endDate != null ">end_date,</if> <if test="endDate != null ">end_date,</if>
<if test="num != null ">num,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="isDefault != null ">is_default,</if> <if test="isDefault != null ">is_default,</if>
<if test="version != null ">version,</if> <if test="version != null ">version,</if>
@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="discount != null and discount != ''">#{discount},</if> <if test="discount != null and discount != ''">#{discount},</if>
<if test="address != null and address != ''">#{address},</if> <if test="address != null and address != ''">#{address},</if>
<if test="isVerification != null ">#{isVerification},</if> <if test="isVerification != null ">#{isVerification},</if>
<if test="num != null ">#{num},</if>
<if test="isShow != null ">#{isShow},</if> <if test="isShow != null ">#{isShow},</if>
<if test="startTime != null ">#{startTime},</if> <if test="startTime != null ">#{startTime},</if>
<if test="endDate != null ">#{endDate},</if> <if test="endDate != null ">#{endDate},</if>
@ -94,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="duration != null and duration != ''">duration = #{duration},</if> <if test="duration != null and duration != ''">duration = #{duration},</if>
<if test="discount != null and discount != ''">discount = #{discount},</if> <if test="discount != null and discount != ''">discount = #{discount},</if>
<if test="address != null and address != ''">address = #{address},</if> <if test="address != null and address != ''">address = #{address},</if>
<if test="num != null and num != ''">num = #{num},</if>
<if test="isVerification != null ">is_verification = #{isVerification},</if> <if test="isVerification != null ">is_verification = #{isVerification},</if>
<if test="isShow != null ">is_show = #{isShow},</if> <if test="isShow != null ">is_show = #{isShow},</if>
<if test="startTime != null ">start_time = #{startTime},</if> <if test="startTime != null ">start_time = #{startTime},</if>

View File

@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCountByUserIdAndDeviceId" resultType="java.lang.Integer"> <select id="selectCountByUserIdAndDeviceId" resultType="java.lang.Integer">
SELECT COUNT(1) FROM tb_user_equipment SELECT COUNT(1) FROM tb_user_equipment
WHERE user_id = #{userId} AND equipment_id = #{equipmentId} WHERE user_id = #{userId} AND equipment_id = #{equipmentId}
AND now() &gt; DATE_SUB(create_time, INTERVAL 15 MINUTE) AND now() &gt; DATE_SUB(start_time, INTERVAL 15 MINUTE)
AND now() &lt; end_date AND now() &lt; end_date
</select> </select>

View File

@ -25,11 +25,16 @@ public class IcsCustomerStaff extends BaseEntity<IcsCustomerStaff> {
@Excel(name = "姓名") @Excel(name = "姓名")
private String name; private String name;
/** 用户性别0男 1女 2未知 */
@Excel(name = "性别")
private String gender;
private String photo; private String photo;
@Excel(name = "地址") @Excel(name = "地址")
private String address; private String address;
@Excel(name = "身份证号")
private String cardNo;
@Excel(name = "邮箱") @Excel(name = "邮箱")
private String email; private String email;
@ -56,9 +61,7 @@ public class IcsCustomerStaff extends BaseEntity<IcsCustomerStaff> {
/** 用户头像 */ /** 用户头像 */
private String avatar; private String avatar;
/** 用户性别0男 1女 2未知 */
@Excel(name = "性别")
private String gender;
/** 帐号状态0正常 1停用 */ /** 帐号状态0正常 1停用 */
private String status; private String status;
@ -73,8 +76,7 @@ public class IcsCustomerStaff extends BaseEntity<IcsCustomerStaff> {
private String cardType; private String cardType;
/**证件号码**/ /**证件号码**/
@Excel(name = "身份证号")
private String cardNo;
/**来访时间*/ /**来访时间*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

View File

@ -22,6 +22,7 @@ import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -185,6 +186,23 @@ public class DeviceUtils {
return msg; return msg;
} }
/**
* 删除人员信息
*/
public static String deletePersons(String ip,Long personId) {
String url = ip + "/api/viso/v2/deletePersons";
ArrayList<DevicePersonDto> dtos = new ArrayList<>();
DevicePersonsDto devicePersonDto = new DevicePersonsDto();
DevicePersonDto dto = new DevicePersonDto();
dto.setPersonId(String.valueOf(personId));
dtos.add(dto);
devicePersonDto.setPersons(dtos);
String json = JsonUtils.toJson(devicePersonDto);
String msg = HttpUtil.post(url,json);
log.info("删除人员信息:{}", msg);
return msg;
}
/** /**
* 修改人脸 * 修改人脸
*/ */
@ -205,6 +223,8 @@ public class DeviceUtils {
/** /**
* 添加人脸照片 * 添加人脸照片
*/ */
@ -301,7 +321,8 @@ public class DeviceUtils {
public static void main(String[] args) { public static void main(String[] args) {
String s = addPersons(null,null); // String s = addPersons(null,null);
// deletePersons("192.168.0.12");
// System.out.println(s); // System.out.println(s);
// String s = queryPersons("10000"); // String s = queryPersons("10000");
// //

View File

@ -3,9 +3,14 @@ package com.ics.quartz.task;
import cn.hutool.core.date.DateField; import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.ics.admin.domain.meeting.CustomerTicket;
import com.ics.admin.domain.meeting.Reservation; import com.ics.admin.domain.meeting.Reservation;
import com.ics.admin.domain.meeting.Ticket;
import com.ics.admin.service.meeting.ICustomerTicketService;
import com.ics.admin.service.meeting.IReservationService; import com.ics.admin.service.meeting.IReservationService;
import com.ics.admin.service.meeting.ITicketService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -19,6 +24,13 @@ public class PayTimeOutTask {
@Autowired @Autowired
private IReservationService iReservationService; private IReservationService iReservationService;
@Autowired
private ICustomerTicketService customerTicketService;
@Autowired
private ITicketService ticketService;
// 支付超时处理 // 支付超时处理
public void payTimeOut() { public void payTimeOut() {
@ -35,6 +47,23 @@ public class PayTimeOutTask {
reservation1.setStauts(Reservation.Status.CANCELED); reservation1.setStauts(Reservation.Status.CANCELED);
reservation1.setCancelResaon("管理员取消原因为:支付超时"); reservation1.setCancelResaon("管理员取消原因为:支付超时");
iReservationService.updateReservation(reservation1); iReservationService.updateReservation(reservation1);
Long ticketId = reservation.getTicketId();
if (ticketId !=null){
Ticket ticket = ticketService.selectTicketById(ticketId);
if (ticket != null){
Long customerId = reservation.getCustomerId();
CustomerTicket customerTicket = new CustomerTicket();
customerTicket.setTicketId(ticketId);
customerTicket.setCustomerId(customerId);
customerTicket.setType(ticket.getType());
customerTicket.setIsVerification(0);
int i1 = customerTicketService.insertCustomerTicket(customerTicket);
}
}
log.info("支付超时处理任务执行成功"); log.info("支付超时处理任务执行成功");
} }
} }

View File

@ -175,6 +175,10 @@ public class User extends BaseEntity<User> {
*/ */
private Long staffId; private Long staffId;
private Long parkId;
private Long tenantId;
@TableField @TableField
private String parkName; private String parkName;

View File

@ -169,4 +169,5 @@ public interface UserMapper {
IcsCustomerStaff selectCustomerStaffById(Long customerId); IcsCustomerStaff selectCustomerStaffById(Long customerId);
User selectUserByStaffId(Long userId);
} }

View File

@ -206,4 +206,5 @@ public interface IUserService {
IcsCustomerStaff selectCustomerStaffById(Long customerId); IcsCustomerStaff selectCustomerStaffById(Long customerId);
User selectUserByStaffId(Long userId);
} }

View File

@ -425,6 +425,11 @@ public class UserServiceImpl implements IUserService {
return userMapper.selectCustomerStaffById(customerId); return userMapper.selectCustomerStaffById(customerId);
} }
@Override
public User selectUserByStaffId(Long userId) {
return userMapper.selectUserByStaffId(userId);
}
} }

View File

@ -289,6 +289,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM ics_customer_staff FROM ics_customer_staff
where id = #{customerId} where id = #{customerId}
</select> </select>
<select id="selectUserByStaffId" resultType="com.ics.system.domain.User">
select u.username,
u.nickname,
u.email,
u.mobile,
u.status,
u.staff_id,
u.customer_id
from sys_user u
where u.staff_id = #{userId}
</select>
<delete id="deleteUserById" parameterType="Long"> <delete id="deleteUserById" parameterType="Long">
@ -403,6 +414,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<set> <set>
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if> <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="parkId != null">park_id = #{parkId},</if> <if test="parkId != null">park_id = #{parkId},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="username != null and username != ''">username = #{username},</if> <if test="username != null and username != ''">username = #{username},</if>
<if test="nickname != null and nickname != ''">nickname = #{nickname},</if> <if test="nickname != null and nickname != ''">nickname = #{nickname},</if>
<if test="openid != null and openid != ''">openid = #{openid},</if> <if test="openid != null and openid != ''">openid = #{openid},</if>

View File

@ -187,8 +187,6 @@ public class WxLoginAPIController extends BaseController {
userEquipmentService.insertUserEquipment(userEquipment); userEquipmentService.insertUserEquipment(userEquipment);
} }
} }
customerStaff.setOpenid(openid); customerStaff.setOpenid(openid);
icsCustomerStaffService.updateIcsCustomerStaff(customerStaff); icsCustomerStaffService.updateIcsCustomerStaff(customerStaff);
} }

View File

@ -18,6 +18,7 @@ import com.ics.common.core.page.TableSupport;
import com.ics.common.json.JsonUtils; import com.ics.common.json.JsonUtils;
import com.ics.common.utils.DeviceUtils; import com.ics.common.utils.DeviceUtils;
import com.ics.common.utils.IpUtils; import com.ics.common.utils.IpUtils;
import com.ics.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -106,10 +107,8 @@ public class ApiEquipmentController extends BaseController {
return R.ok().put("data",openDoorRecord); return R.ok().put("data",openDoorRecord);
} }
/** /**
* 获取对比记录 * 获取对比记录,获取设备的对比记录设备往服务端传输数据
* @return * @return
*/ */
@Ignore @Ignore
@ -119,13 +118,10 @@ public class ApiEquipmentController extends BaseController {
// 对比personId 和用户 id // 对比personId 和用户 id
// 对比equipmentId 和设备id // 对比equipmentId 和设备id
if (data.getData() != null){ if (data.getData() != null && data.getData().getEventType() != 17 && StringUtils.isNotEmpty(data.getData().getPersonId())){
//用户id //用户id
String personId = data.getData().getPersonId(); String personId = data.getData().getPersonId();
String deviceId = data.getData().getDeviceId(); String deviceId = data.getData().getDeviceId();
Equipment equipment = equipmentService.selectByDeviceCode(deviceId); Equipment equipment = equipmentService.selectByDeviceCode(deviceId);
Assert.isTrue(equipment != null,"设备不存在"); Assert.isTrue(equipment != null,"设备不存在");
@ -136,7 +132,6 @@ public class ApiEquipmentController extends BaseController {
VisitorPerson visitorPerson =visitorPersonService.selectByUserId(personId); VisitorPerson visitorPerson =visitorPersonService.selectByUserId(personId);
record.setUserId(visitorPerson.getIntervieweeId()); record.setUserId(visitorPerson.getIntervieweeId());
} }
record.setParkId(equipment.getParkId()); record.setParkId(equipment.getParkId());
record.setType("1"); record.setType("1");
record.setDeviceId(equipment.getId()); record.setDeviceId(equipment.getId());

View File

@ -2,14 +2,15 @@ package com.ics.controller.mobile.meeting;
import com.ics.admin.domain.Park; import com.ics.admin.domain.Park;
import com.ics.admin.service.IParkService; import com.ics.admin.service.IParkService;
import com.ics.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable; import org.wf.jwtp.annotation.Ignore;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wf.jwtp.annotation.RequiresPermissions; import org.wf.jwtp.annotation.RequiresPermissions;
import java.util.List;
@CrossOrigin
@RestController @RestController
@RequestMapping("/api/admin/park") @RequestMapping("/api/admin/park")
public class ApiParkController { public class ApiParkController {
@ -23,4 +24,11 @@ public class ApiParkController {
return parkService.selectParkById(id); return parkService.selectParkById(id);
} }
@Ignore
@GetMapping("selectParkList")
public R selectParkList() {
List<Park> parkList = parkService.selectParkList(new Park());
return R.data(parkList);
}
} }

View File

@ -521,9 +521,31 @@ public class ApiRoomContentController extends BaseController {
Assert.notNull(reservation.getId(), "当前预约信息不存在"); Assert.notNull(reservation.getId(), "当前预约信息不存在");
reservation.setStauts(Reservation.Status.CANCELED); reservation.setStauts(Reservation.Status.CANCELED);
reservation.setCancelResaon("管理员取消原因:"+reservation.getCancelResaon()); reservation.setCancelResaon("用户取消原因:"+reservation.getCancelResaon());
reservation.setCancelTime(new Date()); reservation.setCancelTime(new Date());
int i = reservationService.updateReservation(reservation); int i = reservationService.updateReservation(reservation);
//取消订单返还优惠券
if (i > 0) {
Long ticketId = reservation.getTicketId();
if (ticketId !=null){
Ticket ticket = ticketService.selectTicketById(ticketId);
if (ticket != null){
Long customerId = reservation.getCustomerId();
CustomerTicket customerTicket = new CustomerTicket();
customerTicket.setTicketId(ticketId);
customerTicket.setCustomerId(customerId);
customerTicket.setType(ticket.getType());
customerTicket.setIsVerification(0);
int i1 = customerTicketService.insertCustomerTicket(customerTicket);
}
}
}
return toAjax(i); return toAjax(i);
} }

View File

@ -74,7 +74,7 @@ public class ApiRoomController extends BaseController {
/** /**
* 获取房间内容 * 获取房间内容
*/ */
@RequiresPermissions("member:center:view") @Ignore
@PostMapping("list") @PostMapping("list")
public R list() { public R list() {
List<RoomContent> roomContents = roomContentService.selectApiRoomList(new RoomContent()); List<RoomContent> roomContents = roomContentService.selectApiRoomList(new RoomContent());
@ -83,6 +83,15 @@ public class ApiRoomController extends BaseController {
if (null != roomEquipment){ if (null != roomEquipment){
roomContent.setEquipmentId(roomEquipment.getEquipmentId()); roomContent.setEquipmentId(roomEquipment.getEquipmentId());
} }
Long roomId = roomContent.getRoomId();
Room room = roomService.selectRoomById(roomId);
if (room != null){
roomContent.setRoomName(room.getName());
BuildingDetail buildingDetail = buildingDetailService.selectBuildingDetailById(room.getBuildingId());
if (buildingDetail != null) {
roomContent.setBuildingName(buildingDetail.getFloorName());
}
}
} }
return R.data(roomContents); return R.data(roomContents);
@ -91,7 +100,7 @@ public class ApiRoomController extends BaseController {
/** /**
* 查询今日的会议和正常进行的会议 * 查询今日的会议和正常进行的会议
*/ */
@RequiresPermissions("member:center:view") @Ignore
@PostMapping("todayMeeting") @PostMapping("todayMeeting")
public R todayMeeting(@RequestBody RoomContent roomContent) { public R todayMeeting(@RequestBody RoomContent roomContent) {
List<Reservation> roomContents=roomContentService.todayMeeting(roomContent); List<Reservation> roomContents=roomContentService.todayMeeting(roomContent);
@ -102,7 +111,7 @@ public class ApiRoomController extends BaseController {
/** /**
* 查询所有的园区 * 查询所有的园区
*/ */
@RequiresPermissions("member:center:view") @Ignore
@GetMapping("selectParkList") @GetMapping("selectParkList")
public R selectParkList() { public R selectParkList() {
List<Park> parkList = parkService.selectParkList(new Park()); List<Park> parkList = parkService.selectParkList(new Park());

View File

@ -135,7 +135,7 @@ public class ApiVisitorController extends BaseController {
visitorPerson.setStatusName("审核拒绝"); visitorPerson.setStatusName("审核拒绝");
} }
Long userId = visitorPerson.getUserId(); Long userId = visitorPerson1.getUserId();
IcsCustomerStaff icsCustomerStaff = customerStaffService.selectIcsCustomerStaffById(userId); IcsCustomerStaff icsCustomerStaff = customerStaffService.selectIcsCustomerStaffById(userId);
visitorPerson.setUserName(icsCustomerStaff.getUsername()); visitorPerson.setUserName(icsCustomerStaff.getUsername());
visitorPerson.setMobile(icsCustomerStaff.getMobile()); visitorPerson.setMobile(icsCustomerStaff.getMobile());