修改了对应的PC页面

This commit is contained in:
chendaze 2024-03-26 09:53:05 +08:00
parent ae2bc977e0
commit a4a1ee0343
27 changed files with 362 additions and 167 deletions

View File

@ -151,9 +151,9 @@ public class CustomerController extends BaseController {
@RequiresPermissions("admin:customer:add")
@PostMapping("save")
public R addSave(@RequestBody Customer customer) {
if (User.isAdmin(getCurrentUserId())) {
return R.error("不允许超级管理员用户新增");
}
// if (User.isAdmin(getCurrentUserId())) {
// return R.error("不允许超级管理员用户新增");
// }
ValidatorUtils.validateEntity(customer);
customer.setCreateBy(getLoginName());
return toAjax(customerService.insertCustomer(customer));
@ -165,9 +165,9 @@ public class CustomerController extends BaseController {
@RequiresPermissions("admin:customer:edit")
@PostMapping("update")
public R editSave(@RequestBody Customer customer) {
if (User.isAdmin(getCurrentUserId())) {
return R.error("不允许超级管理员用户修改");
}
// if (User.isAdmin(getCurrentUserId())) {
// return R.error("不允许超级管理员用户修改");
// }
ValidatorUtils.validateEntity(customer);
customer.setUpdateBy(getLoginName());
return toAjax(customerService.updateCustomer(customer));

View File

@ -14,6 +14,7 @@ import org.wf.jwtp.annotation.Ignore;
import org.wf.jwtp.annotation.RequiresPermissions;
import java.util.Date;
import java.util.List;
/**
* 企业员工 提供者
@ -72,6 +73,26 @@ public class CustomerStaffController extends BaseController {
}
@Ignore
@GetMapping("getStaffListByUser")
public R getStaffListByUser(IcsCustomerStaff icsCustomerStaff) {
startPage();
String customerId = icsCustomerStaff.getCustomerId();
if (customerId != null && !"".equals(customerId)) {
icsCustomerStaff.setIcsCustomerId(Long.valueOf(customerId));
}
List<IcsCustomerStaff> staffListByUser = icsCustomerStaffService.getStaffListByUser(icsCustomerStaff);
if (icsCustomerStaff.getStaffId() != null){
IcsCustomerStaff customerStaff = icsCustomerStaffService.selectIcsCustomerStaffById(icsCustomerStaff.getStaffId());
if (null != customerStaff){
staffListByUser.add(customerStaff);
}
}
return result(staffListByUser);
}
/**
* 新增保存企业员工
@ -97,6 +118,7 @@ public class CustomerStaffController extends BaseController {
/**
* 修改保存企业员工
*/
@Ignore
@PostMapping("update")
public R editSave(@RequestBody IcsCustomerStaff icsCustomerStaff) {
IcsCustomerStaff customerStaff = icsCustomerStaffService.selectIcsCustomerStaffById(icsCustomerStaff.getId());
@ -104,7 +126,7 @@ public class CustomerStaffController extends BaseController {
customerStaff.setIcsCustomerId(Long.valueOf(icsCustomerStaff.getCustomerId()));
icsCustomerStaff.setUpdateTime(new Date());
icsCustomerStaff.setUpdateBy(getLoginName());
// icsCustomerStaff.setUpdateBy(getLoginName());
return toAjax(icsCustomerStaffService.updateIcsCustomerStaff(customerStaff));
}

View File

@ -67,7 +67,7 @@ public class ReservationController extends BaseController {
reservation.setUserName(customerStaff.getUsername());
reservation.setPhone(customerStaff.getMobile());
RoomContent roomContent = iRoomContentService.selectRoomContentById(reservation.getRoomContentId());
roomContent.setTypeName(roomContent.getType().getName());
// roomContent.setTypeName(roomContent.getType().getName());
//会议室名称
reservation.setRoomContent(roomContent);
Customer customer = customerService.selectCustomerById(reservation.getCustomerId());
@ -88,7 +88,7 @@ public class ReservationController extends BaseController {
List<Reservation> reservations = reservationService.selectReservationList(reservation);
for (Reservation reservation1 : reservations) {
RoomContent roomContent = iRoomContentService.selectRoomContentById(reservation1.getRoomContentId());
roomContent.setTypeName(roomContent.getType().getName());
// roomContent.setTypeName(roomContent.getType().getName());
//会议室名称
reservation1.setRoomContent(roomContent);
reservation1.setStatusName(reservation1.getStauts().getName());

View File

@ -66,11 +66,11 @@ public class RoomContentController extends BaseController {
public RoomContent get(@PathVariable("id") Long id) {
RoomContent roomContent = roomContentService.selectRoomContentById(id);
roomContent.setTypeName(roomContent.getType().getName());
roomContent.setTypeValue(roomContent.getType().getValue());
// roomContent.setTypeName(roomContent.getType().getName());
// roomContent.setTypeValue(roomContent.getType().getValue());
Long roomId = roomContent.getRoomId();
Room room = roomService.selectRoomById(roomId);
roomContent.setBuildId(room.getBuildingId().toString());
roomContent.setBuildId(room.getBuildingId());
roomContent.setArea(room.getArea());
roomContent.setRoomName(room.getName());
BuildingDetail buildingDetail = buildingDetailService.selectBuildingDetailById(room.getBuildingDetailId());
@ -98,8 +98,13 @@ public class RoomContentController extends BaseController {
List<RoomItemByRoom> roomItemByRooms = roomItemByRoomService.selectRoomItemByRoomList(roomItemByRoom);
content.setItemCount(roomItemByRooms.size());
content.setTypeValue(content.getType().getValue());
content.setTypeName(content.getType().getName());
Long roomId = content.getRoomId();
Room room = roomService.selectRoomById(roomId);
if (room != null){
content.setBuildId(room.getBuildingDetailId());
content.setArea(room.getArea());
}
}
return result(roomContents);
}
@ -111,6 +116,9 @@ public class RoomContentController extends BaseController {
@PostMapping("save")
public R addSave(@RequestBody RoomContent roomContent) {
System.out.println(roomContent);
if (roomContent.getIsToll() ==1){
roomContent.setMoney("0");
}
int i = roomContentService.insertRoomContent(roomContent);
Assert.isTrue(i > 0, "新增失败");
@ -131,6 +139,9 @@ public class RoomContentController extends BaseController {
@PostMapping("update")
public R editSave(@RequestBody RoomContent roomContent) {
System.out.println(roomContent.getType());;
if (roomContent.getIsToll() ==1){
roomContent.setMoney("0");
}
return toAjax(roomContentService.updateRoomContent(roomContent));
}
@ -205,7 +216,6 @@ public class RoomContentController extends BaseController {
@GetMapping("/getRoomListByFloorId")
public R list(Room room) {
room.setDeleteFlag(0);
room.setStatus(Room.Status.NO);
room.setBuildingDetailId(room.getBuildingDetailId());
return R.ok().put("data",roomService.selectRoomList(room));
}

View File

@ -5,6 +5,7 @@ import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ArrayUtil;
import com.ics.admin.domain.Customer;
import com.ics.admin.domain.meeting.CustomerTicket;
import com.ics.admin.domain.meeting.vo.TicketCustomerVo;
import com.ics.admin.service.ICustomerService;
import com.ics.admin.service.meeting.ICustomerTicketService;
import com.ics.system.domain.User;
@ -27,6 +28,8 @@ import org.wf.jwtp.annotation.RequiresPermissions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -58,13 +61,27 @@ public class TicketController extends BaseController {
@GetMapping("get/{id}")
public Ticket get(@PathVariable("id") Long id) {
Ticket ticket = ticketService.selectTicketById(id);
List<CustomerTicket> customerTickets = customerTicketService.selectCustomerTicketByTicketId(id);
List<Long> collect = customerTickets.stream().map(item -> {
return item.getCustomerId();
}).collect(Collectors.toList());
Long[] array = collect.toArray(new Long[collect.size()]);
ticket.setEnterpriseIds(array);
List<Customer> customers = customerService.selectCustomerList(new Customer());
List<Customer> customerList = new ArrayList<>();
List<Customer> selectList = new ArrayList<>();
List<CustomerTicket> customerTickets = customerTicketService.selectListByTicketId(id);
Map<Long, Customer> customerMap = customers.stream().collect(Collectors.toMap(Customer::getId, Function.identity()));
for (CustomerTicket customerTicket : customerTickets) {
//根据外层遍历的学信息id get学生住宿信息Map中的Key
Customer customer = customerMap.get(customerTicket.getCustomerId());
//如果能get到数据!=null 说明id一样
if (customer != null) {
selectList.add(customer);
}else {
customerList.add(customer);
}
}
ticket.setSelectCustomerList(selectList);
ticket.setNotSelectCustomerList(customerList);
return ticket;
}
@ -86,32 +103,36 @@ public class TicketController extends BaseController {
@PostMapping("save")
public R addSave(@RequestBody Ticket ticket) {
System.out.println(ticket);
int i = ticketService.insertTicket(ticket);
CustomerTicket customerTicket = customerTicketService.selectCustomerTicketById(ticket.getId());
// if (ticket.getType() == 1){
// for (int j = 0; j < ticket.get; j++) {
//
// }
if (customerTicket ==null){
if (ticket.getType() == 1) {
for (Long enterpriseId : ticket.getEnterpriseIds()) {
for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) {
CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId());
customerTicket1.setCustomerId(enterpriseId);
customerTicket1.setIsVerification(0);
customerTicketService.insertCustomerTicket(customerTicket1);
for (int j = 0; j < ticketCustomerVo.getSumNum(); j++) {
CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId());
customerTicket1.setCustomerId(ticketCustomerVo.getId());
customerTicket1.setIsVerification(0);
customerTicketService.insertCustomerTicket(customerTicket1);
}
}
}else {
for (Long enterpriseId : ticket.getEnterpriseIds()) {
CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId());
customerTicket1.setCustomerId(enterpriseId);
customerTicket1.setIsVerification(0);
customerTicketService.insertCustomerTicket(customerTicket1);
for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) {
for (int j = 0; j < ticketCustomerVo.getSumNum(); j++) {
CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId());
customerTicket1.setCustomerId(ticketCustomerVo.getId());
customerTicket1.setIsVerification(0);
customerTicketService.insertCustomerTicket(customerTicket1);
}
}
}
}
return toAjax(ticketService.insertTicket(ticket));
return toAjax(i);
}
/**
@ -131,22 +152,42 @@ public class TicketController extends BaseController {
// }
if (customerTicket ==null){
if (ticket.getType() == 1) {
for (Long enterpriseId : ticket.getEnterpriseIds()) {
// 循环数量
CustomerTicket customerTicket1 = new CustomerTicket();
for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) {
for (int j = 0; j < ticketCustomerVo.getSumNum(); j++) {
CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId());
customerTicket1.setCustomerId(enterpriseId);
customerTicket1.setCustomerId(ticketCustomerVo.getId());
customerTicket1.setIsVerification(0);
customerTicketService.insertCustomerTicket(customerTicket1);
}
}
// for (Long enterpriseId : ticket.getEnterpriseIds()) {
// // 循环数量
// CustomerTicket customerTicket1 = new CustomerTicket();
// customerTicket1.setTicketId(ticket.getId());
// customerTicket1.setCustomerId(enterpriseId);
// customerTicket1.setIsVerification(0);
// customerTicketService.insertCustomerTicket(customerTicket1);
// }
}else {
for (Long enterpriseId : ticket.getEnterpriseIds()) {
CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId());
customerTicket1.setCustomerId(enterpriseId);
customerTicket1.setIsVerification(0);
customerTicketService.insertCustomerTicket(customerTicket1);
for (TicketCustomerVo ticketCustomerVo : ticket.getTicketCustomerVo()) {
for (int j = 0; j < ticketCustomerVo.getSumNum(); j++) {
CustomerTicket customerTicket1 = new CustomerTicket();
customerTicket1.setTicketId(ticket.getId());
customerTicket1.setCustomerId(ticketCustomerVo.getId());
customerTicket1.setIsVerification(0);
customerTicketService.insertCustomerTicket(customerTicket1);
}
}
// for (Long enterpriseId : ticket.getEnterpriseIds()) {
// CustomerTicket customerTicket1 = new CustomerTicket();
// customerTicket1.setTicketId(ticket.getId());
// customerTicket1.setCustomerId(enterpriseId);
// customerTicket1.setIsVerification(0);
// customerTicketService.insertCustomerTicket(customerTicket1);
// }
}
}
@ -159,7 +200,22 @@ public class TicketController extends BaseController {
@RequiresPermissions("meeting:ticket:remove")
@PostMapping("remove")
public R remove(String ids) {
return toAjax(ticketService.deleteTicketByIds(ids));
int i = ticketService.deleteTicketByIds(ids);
String[] split = ids.split(",");
for (String id : split) {
List<CustomerTicket> customerTickets = customerTicketService.selectCustomerTicketByTicketId(Long.valueOf(id));
if (CollUtil.isNotEmpty(customerTickets)){
for (CustomerTicket customerTicket : customerTickets) {
if (null !=customerTicket){
customerTicketService.deleteCustomerTicketById(customerTicket.getId());
}
}
}
}
return toAjax(i);
}
@ -173,12 +229,7 @@ public class TicketController extends BaseController {
startPage();
List<Customer> customers = customerService.selectCustomerList(customer);
for (Customer customer1 : customers) {
User user = userService.selectUserByCustomer(customer1.getId());
if (user != null){
customer1.setUser(user);
}
}
return result(customers);
}

View File

@ -143,6 +143,9 @@ public class Room extends BaseEntity<Room> {
*/
private Layout layout;
@TableField(exist = false)
private Integer type;
/**
* 房型
*/

View File

@ -1,45 +1,45 @@
package com.ics.admin.domain.enumHandler;
import com.ics.admin.domain.Activity;
import com.ics.admin.domain.meeting.RoomContent;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;
import org.apache.ibatis.type.MappedTypes;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* @author 29361
*/
@MappedJdbcTypes({JdbcType.INTEGER})
@MappedTypes({RoomContent.Type.class})
public class RoomContentTypeEnumHandler extends BaseTypeHandler<RoomContent.Type> {
@Override
public void setNonNullParameter(PreparedStatement preparedStatement, int i, RoomContent.Type status, JdbcType jdbcType) throws SQLException {
preparedStatement.setInt(i,status.getValue());
}
@Override
public RoomContent.Type getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
int value = resultSet.getInt(columnName);
RoomContent.Type instance = RoomContent.Type.parse(value);
return instance;
}
@Override
public RoomContent.Type getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
int value = resultSet.getInt(columnIndex);
RoomContent.Type instance = RoomContent.Type.parse(value);
return instance;
}
@Override
public RoomContent.Type getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
return null;
}
}
//package com.ics.admin.domain.enumHandler;
//
//import com.ics.admin.domain.Activity;
//import com.ics.admin.domain.meeting.RoomContent;
//import org.apache.ibatis.type.BaseTypeHandler;
//import org.apache.ibatis.type.JdbcType;
//import org.apache.ibatis.type.MappedJdbcTypes;
//import org.apache.ibatis.type.MappedTypes;
//
//import java.sql.CallableStatement;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//
//
///**
// * @author 29361
// */
//@MappedJdbcTypes({JdbcType.INTEGER})
//@MappedTypes({RoomContent.Type.class})
//public class RoomContentTypeEnumHandler extends BaseTypeHandler<RoomContent.Type> {
// @Override
// public void setNonNullParameter(PreparedStatement preparedStatement, int i, RoomContent.Type status, JdbcType jdbcType) throws SQLException {
// preparedStatement.setInt(i,status.getValue());
// }
//
// @Override
// public RoomContent.Type getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
// int value = resultSet.getInt(columnName);
// RoomContent.Type instance = RoomContent.Type.parse(value);
// return instance;
// }
//
// @Override
// public RoomContent.Type getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
// int value = resultSet.getInt(columnIndex);
// RoomContent.Type instance = RoomContent.Type.parse(value);
// return instance;
// }
//
// @Override
// public RoomContent.Type getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
// return null;
// }
//}

View File

@ -24,16 +24,16 @@ public class RoomContent extends BaseEntity<RoomContent> {
/** 类型(会议室、办公室、茶室、路演厅) */
private Type type;
private Integer type;
/** 名称 */
private String meetingName;
/** 容纳人数 */
private Integer capacityNum;
private String capacityNum;
/** 扩充人数 */
private Integer expandNum;
private String expandNum;
/** 室内图片url */
private String indoorPicUrl;
@ -55,6 +55,7 @@ public class RoomContent extends BaseEntity<RoomContent> {
/** 时长 */
private Integer duration;
/** 形状U型O型 */
private String shape;
@ -91,52 +92,52 @@ public class RoomContent extends BaseEntity<RoomContent> {
@TableField(exist = false)
private Integer typeValue;
public enum Type implements IEnum<Integer> {
/**
* 报名未开始
*/
MEETING_ROOM("会议室", 1),
ROADSHOW_HALL("路演厅", 2),
/**
* 报名中
*/
DATA_WAREHOUSE("数仓", 3),
COUNT_BUTTON("数纽", 4),
NEGOTIATION_ROOM("洽谈室", 5),
LIVE_ROOM("直播间", 6),
TEE_ROOM("茶室", 7);
private String name;
private int value;
Type(String name, int value) {
this.name = name;
this.value = value;
}
@Override
public Integer getValue() {
return this.value;
}
public String getName() {
return this.name;
}
public static Type parse(Integer value) {
for (Type type1 : values()) {
if (type1.getValue().equals(value)) {
return type1;
}
}
return null;
}
}
// public enum Type implements IEnum<Integer> {
//
// /**
// * 报名未开始
// */
// MEETING_ROOM("会议室", 1),
//
//
// ROADSHOW_HALL("路演厅", 2),
// /**
// * 报名中
// */
// DATA_WAREHOUSE("数仓", 3),
// COUNT_BUTTON("数纽", 4),
// NEGOTIATION_ROOM("洽谈室", 5),
//
// LIVE_ROOM("直播间", 6),
//
// TEE_ROOM("茶室", 7);
//
// private String name;
// private int value;
//
// Type(String name, int value) {
// this.name = name;
// this.value = value;
// }
//
// @Override
// public Integer getValue() {
// return this.value;
// }
//
// public String getName() {
// return this.name;
// }
//
// public static Type parse(Integer value) {
// for (Type type1 : values()) {
// if (type1.getValue().equals(value)) {
// return type1;
// }
// }
// return null;
// }
// }
@TableField(exist = false)
private List<RoomItem> roomItemList;
@ -151,7 +152,7 @@ public class RoomContent extends BaseEntity<RoomContent> {
private String build;
@TableField(exist = false)
private String buildId;
private Long buildId;
@TableField(exist = false)
private List<RoomServe> roomServeList;

View File

@ -3,9 +3,12 @@ package com.ics.admin.domain.meeting;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ics.admin.domain.Customer;
import com.ics.admin.domain.meeting.vo.TicketCustomerVo;
import com.ics.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* 优惠卷对象 tb_ticket
@ -58,4 +61,19 @@ public class Ticket extends BaseEntity<Ticket> {
@TableField(exist = false)
private Long[] enterpriseIds;
@TableField(exist = false)
private Integer num;
@TableField(exist = false)
private List<TicketCustomerVo> ticketCustomerVo;
@TableField(exist = false)
private List<Customer> selectCustomerList;
@TableField(exist = false)
private List<Customer> NotSelectCustomerList;
}

View File

@ -0,0 +1,13 @@
package com.ics.admin.domain.meeting.vo;
import lombok.Data;
@Data
public class TicketCustomerVo {
private Integer sumNum;
private Integer moreNum;
private Long id;
}

View File

@ -64,4 +64,6 @@ public interface CustomerTicketMapper extends BaseMapper<CustomerTicket> {
int deleteCustomerTicketByIds(String[] ids);
List<CustomerTicket> selectListByCustomerId(UserCustomerVo userCustomerVo);
List<CustomerTicket> selectListByTicketId(Long id);
}

View File

@ -75,4 +75,8 @@ public interface IIcsCustomerStaffService extends IService<IcsCustomerStaff> {
List<IcsCustomerStaff> getStaffListNotId(IcsCustomerStaff icsCustomerStaff);
List<IcsCustomerStaff> getStaffListByUser(IcsCustomerStaff icsCustomerStaff);
IcsCustomerStaff selectByPhone(String mobile);
}

View File

@ -7,6 +7,8 @@ import com.ics.admin.mapper.IcsCustomerStaffMapper;
import com.ics.admin.service.IIcsCustomerStaffService;
import com.ics.common.core.domain.IcsCustomerStaff;
import com.ics.common.utils.StringUtils;
import com.ics.system.domain.User;
import com.ics.system.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -23,6 +25,9 @@ public class IcsCustomerStaffServiceImpl extends ServiceImpl<IcsCustomerStaffMap
@Autowired
private IcsCustomerStaffMapper icsCustomerStaffMapper;
@Autowired
private UserMapper userMapper;
/**
* 查询企业员工
*
@ -119,11 +124,30 @@ public class IcsCustomerStaffServiceImpl extends ServiceImpl<IcsCustomerStaffMap
@Override
public List<IcsCustomerStaff> getStaffListNotId(IcsCustomerStaff icsCustomerStaff) {
QueryWrapper<IcsCustomerStaff> objectQueryWrapper = new QueryWrapper<>();
objectQueryWrapper.ne(icsCustomerStaff.getIcsCustomerId() != null,"ics_customer_Id",icsCustomerStaff.getIcsCustomerId()).or().isNull("ics_customer_Id");
QueryWrapper<IcsCustomerStaff> wrapper = new QueryWrapper<>();
// wrapper.ne(icsCustomerStaff.getIcsCustomerId() != null,"ics_customer_Id",icsCustomerStaff.getIcsCustomerId());
wrapper.isNull("ics_customer_Id");
return icsCustomerStaffMapper.selectList(wrapper);
}
return icsCustomerStaffMapper.selectList(objectQueryWrapper);
@Override
public List<IcsCustomerStaff> getStaffListByUser(IcsCustomerStaff icsCustomerStaff) {
List<Long> list =userMapper.getStaffListByUser();
System.out.println(list);
QueryWrapper<IcsCustomerStaff> wrapper = new QueryWrapper<>();
wrapper.notIn(CollUtil.isNotEmpty(list),"id",list);
return icsCustomerStaffMapper.selectList(wrapper);
}
@Override
public IcsCustomerStaff selectByPhone(String mobile) {
QueryWrapper<IcsCustomerStaff> wrapper = new QueryWrapper<>();
wrapper.eq("mobile",mobile);
return icsCustomerStaffMapper.selectOne(wrapper);
}
}

View File

@ -44,6 +44,8 @@ public class RoomServeByRoomServiceImpl extends ServiceImpl<RoomServeByRoomMappe
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("rome_content_Id", roomServeByRoom.getRomeContentId());
return roomServeByRoomMapper.selectList(queryWrapper);
}
/**

View File

@ -148,4 +148,11 @@ public class CustomerTicketServiceImpl extends ServiceImpl<CustomerTicketMapper,
wrapper.groupBy("customer_id");
return customerTicketMapper.selectList(wrapper);
}
@Override
public List<CustomerTicket> selectListByTicketId(Long id) {
return customerTicketMapper.selectListByTicketId(id);
}
}

View File

@ -277,7 +277,7 @@ public class ReservationServiceImpl extends ServiceImpl<ReservationMapper, Reser
long v = d2 - d1;
long start = startTime.getTime();
long end = endTime.getTime();
if (((d1 - start) <= 0) && ((end - d2) <= 0) || ((d2 - start) >= 0) && ((d1 - end) <= 0)) {
if (((d1 - start) < 0) && ((end - d2) < 0) || ((d2 - start) > 0) && ((d1 - end) < 0)) {
return true;
}
return false;

View File

@ -24,6 +24,8 @@ import com.ics.admin.service.IRoomService;
import com.ics.admin.service.meeting.*;
import com.ics.common.core.domain.IcsCustomerStaff;
import com.ics.common.utils.DateUtils;
import com.ics.system.domain.DictData;
import com.ics.system.mapper.DictDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ics.admin.mapper.meeting.RoomContentMapper;
@ -73,6 +75,9 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
@Autowired
private IIcsCustomerStaffService staffService;
@Autowired
private DictDataMapper dictDataMapper;
/**
* 查询房间主体内容
*
@ -169,8 +174,8 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
return selectRoomContentList(collect1);
}else {
if (roomContent.getType() != null) {
RoomContent.Type type = roomContent.getType();
roomContent.setTypeValue(type.ordinal());
// RoomContent.Type type = roomContent.getType();
// roomContent.setTypeValue(type.ordinal());
}
List<RoomContent> roomContents = roomContentMapper.selectRoomContentList(roomContent);
return selectRoomContentList(roomContents);
@ -180,8 +185,10 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
public List<RoomContent> selectRoomContentList(List<RoomContent> roomContents) {
for (RoomContent content : roomContents) {
content.setTypeValue(content.getType().getValue());
content.setTypeName(content.getType().getName());
String typeName = dictDataMapper.selectDictLabel("meeting_type", String.valueOf(content.getType()));
// content.setTypeValue(content.getType().getValue());
content.setTypeName(typeName);
ArrayList<RoomItem> items = new ArrayList<>();
//查询房间号
@ -215,13 +222,16 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
//获取房间所有服务信息
RoomServeByRoom roomServeByRoom = new RoomServeByRoom();
roomServeByRoom.setRomeContentId(id);
List<RoomServe> roomServe1 = new ArrayList<>();
List<RoomItem> roomItemList = new ArrayList<>();
List<RoomServeByRoom> roomServeByRooms = iRoomServeByRoomService.selectRoomServeByRoomList(roomServeByRoom);
if (CollUtil.isNotEmpty(roomServeByRooms)){
for (RoomServeByRoom serveByRoom : roomServeByRooms) {
RoomServe roomServe = iRoomServeService.selectRoomServeById(serveByRoom.getServeId());
roomServe1.add(roomServe);
if (roomServe.getServeType()== 1){
roomServe1.add(roomServe);
}
}
roomContent.setRoomServeList(roomServe1);
}
@ -275,8 +285,10 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
}
List<RoomContent> roomContents = roomContentMapper.selectList(queryWrapper);
for (RoomContent roomContent : roomContents) {
roomContent.setTypeValue(roomContent.getType().getValue());
roomContent.setTypeName(roomContent.getType().getName());
String typeName = dictDataMapper.selectDictLabel("meeting_type", String.valueOf(roomContent.getType()));
roomContent.setTypeValue(roomContent.getType());
roomContent.setTypeName(typeName);
}
map.put("roomContents",roomContents);
return map;

View File

@ -66,4 +66,6 @@ public interface ICustomerTicketService extends IService<CustomerTicket> {
void updateCustomerTicketBYUserId(CustomerTicket customerTicket);
List<CustomerTicket> selectCustomerTicketByTicketId(Long id);
List<CustomerTicket> selectListByTicketId(Long id);
}

View File

@ -117,6 +117,7 @@
'%')
</if>
<if test="status != null">AND ir.status = #{status.value}</if>
<if test="type != null">AND ir.status = #{type}</if>
<if test="isMarketable != null">AND ir.is_marketable = #{isMarketable}</if>
<if test="deleteFlag != null"> and ir.delete_flag = #{deleteFlag} </if>
</where>

View File

@ -40,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and tt.is_show = 0
group by tct.ticket_id
</select>
<select id="selectListByTicketId" resultMap="CustomerTicketResult">
select customer_id,count(1) from tb_customer_ticket where ticket_id = #{id} GROUP BY customer_id
</select>
<insert id="insertCustomerTicket" parameterType="CustomerTicket">
INSERT INTO tb_customer_ticket

View File

@ -80,4 +80,7 @@ public class IcsCustomerStaff extends BaseEntity<IcsCustomerStaff> {
@TableField(exist = false)
private String customerId;
@TableField(exist = false)
private Long staffId;
}

View File

@ -3,6 +3,7 @@ package com.ics.system.controller;
import com.ics.common.annotation.LoginUser;
import com.ics.common.constant.UserConstants;
import com.ics.common.core.controller.BaseController;
import com.ics.common.core.domain.IcsCustomerStaff;
import com.ics.common.core.domain.R;
import com.ics.common.utils.RandomUtil;
import com.ics.system.domain.User;
@ -31,6 +32,8 @@ public class UserController extends BaseController {
@Autowired
private IMenuService menuService;
/**
* 查询用户
*/
@ -77,6 +80,7 @@ public class UserController extends BaseController {
} else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
return R.error("新增用户'" + user.getUsername() + "'失败,邮箱账号已存在");
}
user.setCreateBy(getLoginName());
user.setSalt(RandomUtil.randomStr(6));
user.setPassword(PasswordUtils.encryptPassword(user.getUsername(), user.getPassword(), user.getSalt()));
@ -97,6 +101,8 @@ public class UserController extends BaseController {
} else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
return R.error("修改用户'" + user.getUsername() + "'失败,邮箱账号已存在");
}
user.setUpdateBy(getLoginName());
return toAjax(userService.updateUser(user));
}

View File

@ -22,8 +22,10 @@ public class MyParkLineHandler implements TenantLineHandler {
private static final String[] tableList = {"tables", "columns", "sys_tenant", "ics_park", "sys_config", "sys_dict_type", "sys_dict_data", "sys_districts",
"sys_job", "sys_job_log", "sys_login_info", "sys_menu", "sys_notice", "sys_oper_log", "sys_oss", "sys_role", "sys_role_dept", "sys_role_menu",
"sys_sn", "sys_user_role", "sys_dept", "ics_customer_contract_room", "ics_park", "ics_apply_room", "ics_customer_contract_refund_room", "ics_apply_park_file",
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff",
"tb_room_content","tb_room_item","tb_room_item_by_room,tb_equipment"};
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff","tb_customer_ticket","tb_reservation","tb_reservation_person",
"tb_room_content","tb_room_item","tb_room_item_by_room","tb_room_serve_by_room","tb_room_serve","tb_equipment",
"tb_room_equipment","tb_room_record","tb_room_serve","tb_showroom","tb_showroom_record","tb_ticket","tb_user_equipment","tb_visitor_person"
};
/**
* 多租户标识

View File

@ -22,8 +22,10 @@ public class MyTenantLineHandler implements TenantLineHandler {
private static final String[] tableList = {"tables", "columns", "sys_tenant", "sys_config", "sys_role", "sys_dict_type", "sys_dict_data", "sys_districts",
"sys_job", "sys_job_log", "sys_login_info", "sys_menu", "sys_notice", "sys_oper_log", "sys_oss", "sys_role_dept", "sys_role_menu",
"sys_sn", "sys_user_role", "ics_customer_contract_room", "ics_apply_room", "ics_customer_contract_refund_room", "ics_apply_park_file",
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff",
"tb_room_content","tb_room_item","tb_room_item_by_room,tb_equipment"};
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff","tb_customer_ticket","tb_reservation","tb_reservation_person",
"tb_room_content","tb_room_item","tb_room_item_by_room","tb_room_serve_by_room","tb_room_serve","tb_equipment",
"tb_room_equipment","tb_room_record","tb_room_serve","tb_showroom","tb_showroom_record","tb_ticket","tb_user_equipment","tb_visitor_person"
};
/**
* 多租户标识

View File

@ -163,4 +163,7 @@ public interface UserMapper {
int insertAppUser(User user);
User selectUserByCustomer(Long id);
List<Long> getStaffListByUser();
}

View File

@ -280,6 +280,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_user u
where u.customer_id = #{id}
</select>
<select id="getStaffListByUser" resultType="java.lang.Long">
SELECT staff_id FROM sys_user where staff_id is not null GROUP BY staff_id
</select>
<delete id="deleteUserById" parameterType="Long">
DELETE FROM sys_user WHERE id = #{id}

View File

@ -260,8 +260,8 @@ public class ApiRoomContentController extends BaseController {
Room room = roomService.selectRoomById(roomContent.getRoomId());
if (room != null) {
roomContent.setRoomId(room.getId());
roomContent.setTypeValue(roomContent.getType().getValue());
roomContent.setTypeName(roomContent.getType().getName());
// roomContent.setTypeValue(roomContent.getType().getValue());
// roomContent.setTypeName(roomContent.getType().getName());
roomContent.setRoomName(room.getName());
roomContent.setArea(room.getArea());
roomContent.setRenArea(room.getRentArea());