diff --git a/ics-admin/src/main/java/com/ics/admin/controller/CustomerController.java b/ics-admin/src/main/java/com/ics/admin/controller/CustomerController.java index 8d84b6f..c5d58f5 100644 --- a/ics-admin/src/main/java/com/ics/admin/controller/CustomerController.java +++ b/ics-admin/src/main/java/com/ics/admin/controller/CustomerController.java @@ -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)); diff --git a/ics-admin/src/main/java/com/ics/admin/controller/CustomerStaffController.java b/ics-admin/src/main/java/com/ics/admin/controller/CustomerStaffController.java index 8e6899c..4fc6492 100644 --- a/ics-admin/src/main/java/com/ics/admin/controller/CustomerStaffController.java +++ b/ics-admin/src/main/java/com/ics/admin/controller/CustomerStaffController.java @@ -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 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)); } diff --git a/ics-admin/src/main/java/com/ics/admin/controller/meeting/ReservationController.java b/ics-admin/src/main/java/com/ics/admin/controller/meeting/ReservationController.java index 93d27d6..d6cbb16 100644 --- a/ics-admin/src/main/java/com/ics/admin/controller/meeting/ReservationController.java +++ b/ics-admin/src/main/java/com/ics/admin/controller/meeting/ReservationController.java @@ -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 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()); diff --git a/ics-admin/src/main/java/com/ics/admin/controller/meeting/RoomContentController.java b/ics-admin/src/main/java/com/ics/admin/controller/meeting/RoomContentController.java index 35172b4..3dfe6c2 100644 --- a/ics-admin/src/main/java/com/ics/admin/controller/meeting/RoomContentController.java +++ b/ics-admin/src/main/java/com/ics/admin/controller/meeting/RoomContentController.java @@ -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 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)); } diff --git a/ics-admin/src/main/java/com/ics/admin/controller/meeting/TicketController.java b/ics-admin/src/main/java/com/ics/admin/controller/meeting/TicketController.java index 7f5fffb..8cdfc75 100644 --- a/ics-admin/src/main/java/com/ics/admin/controller/meeting/TicketController.java +++ b/ics-admin/src/main/java/com/ics/admin/controller/meeting/TicketController.java @@ -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 customerTickets = customerTicketService.selectCustomerTicketByTicketId(id); - List collect = customerTickets.stream().map(item -> { - return item.getCustomerId(); - }).collect(Collectors.toList()); - Long[] array = collect.toArray(new Long[collect.size()]); - ticket.setEnterpriseIds(array); + List customers = customerService.selectCustomerList(new Customer()); + + List customerList = new ArrayList<>(); + List selectList = new ArrayList<>(); + List customerTickets = customerTicketService.selectListByTicketId(id); + + Map 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 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 customers = customerService.selectCustomerList(customer); - for (Customer customer1 : customers) { - User user = userService.selectUserByCustomer(customer1.getId()); - if (user != null){ - customer1.setUser(user); - } - } + return result(customers); } diff --git a/ics-admin/src/main/java/com/ics/admin/domain/Room.java b/ics-admin/src/main/java/com/ics/admin/domain/Room.java index e683926..15698b4 100644 --- a/ics-admin/src/main/java/com/ics/admin/domain/Room.java +++ b/ics-admin/src/main/java/com/ics/admin/domain/Room.java @@ -143,6 +143,9 @@ public class Room extends BaseEntity { */ private Layout layout; + @TableField(exist = false) + private Integer type; + /** * 房型 */ diff --git a/ics-admin/src/main/java/com/ics/admin/domain/enumHandler/RoomContentTypeEnumHandler.java b/ics-admin/src/main/java/com/ics/admin/domain/enumHandler/RoomContentTypeEnumHandler.java index 486428c..b0b12e9 100644 --- a/ics-admin/src/main/java/com/ics/admin/domain/enumHandler/RoomContentTypeEnumHandler.java +++ b/ics-admin/src/main/java/com/ics/admin/domain/enumHandler/RoomContentTypeEnumHandler.java @@ -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 { - @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 { +// @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; +// } +//} diff --git a/ics-admin/src/main/java/com/ics/admin/domain/meeting/RoomContent.java b/ics-admin/src/main/java/com/ics/admin/domain/meeting/RoomContent.java index 2a7bcab..0145801 100644 --- a/ics-admin/src/main/java/com/ics/admin/domain/meeting/RoomContent.java +++ b/ics-admin/src/main/java/com/ics/admin/domain/meeting/RoomContent.java @@ -24,16 +24,16 @@ public class RoomContent extends BaseEntity { /** 类型(会议室、办公室、茶室、路演厅) */ - 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 { /** 时长 */ private Integer duration; + /** 形状(U型,O型) */ private String shape; @@ -91,52 +92,52 @@ public class RoomContent extends BaseEntity { @TableField(exist = false) private Integer typeValue; - public enum Type implements IEnum { - - /** - * 报名未开始 - */ - 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 { +// +// /** +// * 报名未开始 +// */ +// 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 roomItemList; @@ -151,7 +152,7 @@ public class RoomContent extends BaseEntity { private String build; @TableField(exist = false) - private String buildId; + private Long buildId; @TableField(exist = false) private List roomServeList; diff --git a/ics-admin/src/main/java/com/ics/admin/domain/meeting/Ticket.java b/ics-admin/src/main/java/com/ics/admin/domain/meeting/Ticket.java index f8aa202..c3eeb92 100644 --- a/ics-admin/src/main/java/com/ics/admin/domain/meeting/Ticket.java +++ b/ics-admin/src/main/java/com/ics/admin/domain/meeting/Ticket.java @@ -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 { @TableField(exist = false) private Long[] enterpriseIds; + @TableField(exist = false) + private Integer num; + + @TableField(exist = false) + private List ticketCustomerVo; + + @TableField(exist = false) + private List selectCustomerList; + + @TableField(exist = false) + private List NotSelectCustomerList; + + + + } diff --git a/ics-admin/src/main/java/com/ics/admin/domain/meeting/vo/TicketCustomerVo.java b/ics-admin/src/main/java/com/ics/admin/domain/meeting/vo/TicketCustomerVo.java new file mode 100644 index 0000000..443e39d --- /dev/null +++ b/ics-admin/src/main/java/com/ics/admin/domain/meeting/vo/TicketCustomerVo.java @@ -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; +} diff --git a/ics-admin/src/main/java/com/ics/admin/mapper/meeting/CustomerTicketMapper.java b/ics-admin/src/main/java/com/ics/admin/mapper/meeting/CustomerTicketMapper.java index 6c53566..582a5db 100644 --- a/ics-admin/src/main/java/com/ics/admin/mapper/meeting/CustomerTicketMapper.java +++ b/ics-admin/src/main/java/com/ics/admin/mapper/meeting/CustomerTicketMapper.java @@ -64,4 +64,6 @@ public interface CustomerTicketMapper extends BaseMapper { int deleteCustomerTicketByIds(String[] ids); List selectListByCustomerId(UserCustomerVo userCustomerVo); + + List selectListByTicketId(Long id); } diff --git a/ics-admin/src/main/java/com/ics/admin/service/IIcsCustomerStaffService.java b/ics-admin/src/main/java/com/ics/admin/service/IIcsCustomerStaffService.java index 09c8f90..1521f64 100644 --- a/ics-admin/src/main/java/com/ics/admin/service/IIcsCustomerStaffService.java +++ b/ics-admin/src/main/java/com/ics/admin/service/IIcsCustomerStaffService.java @@ -75,4 +75,8 @@ public interface IIcsCustomerStaffService extends IService { List getStaffListNotId(IcsCustomerStaff icsCustomerStaff); + List getStaffListByUser(IcsCustomerStaff icsCustomerStaff); + + IcsCustomerStaff selectByPhone(String mobile); + } diff --git a/ics-admin/src/main/java/com/ics/admin/service/impl/IcsCustomerStaffServiceImpl.java b/ics-admin/src/main/java/com/ics/admin/service/impl/IcsCustomerStaffServiceImpl.java index 0c87e9d..d45504a 100644 --- a/ics-admin/src/main/java/com/ics/admin/service/impl/IcsCustomerStaffServiceImpl.java +++ b/ics-admin/src/main/java/com/ics/admin/service/impl/IcsCustomerStaffServiceImpl.java @@ -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 getStaffListNotId(IcsCustomerStaff icsCustomerStaff) { - QueryWrapper objectQueryWrapper = new QueryWrapper<>(); - objectQueryWrapper.ne(icsCustomerStaff.getIcsCustomerId() != null,"ics_customer_Id",icsCustomerStaff.getIcsCustomerId()).or().isNull("ics_customer_Id"); + QueryWrapper 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 getStaffListByUser(IcsCustomerStaff icsCustomerStaff) { + List list =userMapper.getStaffListByUser(); + System.out.println(list); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.notIn(CollUtil.isNotEmpty(list),"id",list); + + return icsCustomerStaffMapper.selectList(wrapper); + } + + @Override + public IcsCustomerStaff selectByPhone(String mobile) { + QueryWrapper wrapper = new QueryWrapper<>(); + + wrapper.eq("mobile",mobile); + + return icsCustomerStaffMapper.selectOne(wrapper); } } diff --git a/ics-admin/src/main/java/com/ics/admin/service/impl/RoomServeByRoomServiceImpl.java b/ics-admin/src/main/java/com/ics/admin/service/impl/RoomServeByRoomServiceImpl.java index 74cfca3..5cae6dc 100644 --- a/ics-admin/src/main/java/com/ics/admin/service/impl/RoomServeByRoomServiceImpl.java +++ b/ics-admin/src/main/java/com/ics/admin/service/impl/RoomServeByRoomServiceImpl.java @@ -44,6 +44,8 @@ public class RoomServeByRoomServiceImpl extends ServiceImpl selectListByTicketId(Long id) { + return customerTicketMapper.selectListByTicketId(id); + + + } } diff --git a/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/ReservationServiceImpl.java b/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/ReservationServiceImpl.java index f521839..85ea90c 100644 --- a/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/ReservationServiceImpl.java +++ b/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/ReservationServiceImpl.java @@ -277,7 +277,7 @@ public class ReservationServiceImpl extends ServiceImpl= 0) && ((d1 - end) <= 0)) { + if (((d1 - start) < 0) && ((end - d2) < 0) || ((d2 - start) > 0) && ((d1 - end) < 0)) { return true; } return false; diff --git a/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/RoomContentServiceImpl.java b/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/RoomContentServiceImpl.java index ca608ac..73496c3 100644 --- a/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/RoomContentServiceImpl.java +++ b/ics-admin/src/main/java/com/ics/admin/service/impl/meeting/RoomContentServiceImpl.java @@ -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 roomContents = roomContentMapper.selectRoomContentList(roomContent); return selectRoomContentList(roomContents); @@ -180,8 +185,10 @@ public class RoomContentServiceImpl extends ServiceImpl selectRoomContentList(List 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 items = new ArrayList<>(); //查询房间号 @@ -215,13 +222,16 @@ public class RoomContentServiceImpl extends ServiceImpl roomServe1 = new ArrayList<>(); List roomItemList = new ArrayList<>(); List 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 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; diff --git a/ics-admin/src/main/java/com/ics/admin/service/meeting/ICustomerTicketService.java b/ics-admin/src/main/java/com/ics/admin/service/meeting/ICustomerTicketService.java index 37e7112..aef0f03 100644 --- a/ics-admin/src/main/java/com/ics/admin/service/meeting/ICustomerTicketService.java +++ b/ics-admin/src/main/java/com/ics/admin/service/meeting/ICustomerTicketService.java @@ -66,4 +66,6 @@ public interface ICustomerTicketService extends IService { void updateCustomerTicketBYUserId(CustomerTicket customerTicket); List selectCustomerTicketByTicketId(Long id); + + List selectListByTicketId(Long id); } diff --git a/ics-admin/src/main/resources/mapper/admin/RoomMapper.xml b/ics-admin/src/main/resources/mapper/admin/RoomMapper.xml index 994b9d3..4c90115 100644 --- a/ics-admin/src/main/resources/mapper/admin/RoomMapper.xml +++ b/ics-admin/src/main/resources/mapper/admin/RoomMapper.xml @@ -117,6 +117,7 @@ '%') AND ir.status = #{status.value} + AND ir.status = #{type} AND ir.is_marketable = #{isMarketable} and ir.delete_flag = #{deleteFlag} diff --git a/ics-admin/src/main/resources/mapper/admin/meeting/CustomerTicketMapper.xml b/ics-admin/src/main/resources/mapper/admin/meeting/CustomerTicketMapper.xml index 72247fa..7f44ee4 100644 --- a/ics-admin/src/main/resources/mapper/admin/meeting/CustomerTicketMapper.xml +++ b/ics-admin/src/main/resources/mapper/admin/meeting/CustomerTicketMapper.xml @@ -40,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and tt.is_show = 0 group by tct.ticket_id + INSERT INTO tb_customer_ticket diff --git a/ics-common/ics-common-core/src/main/java/com/ics/common/core/domain/IcsCustomerStaff.java b/ics-common/ics-common-core/src/main/java/com/ics/common/core/domain/IcsCustomerStaff.java index 62c9502..5d2cd2a 100644 --- a/ics-common/ics-common-core/src/main/java/com/ics/common/core/domain/IcsCustomerStaff.java +++ b/ics-common/ics-common-core/src/main/java/com/ics/common/core/domain/IcsCustomerStaff.java @@ -80,4 +80,7 @@ public class IcsCustomerStaff extends BaseEntity { @TableField(exist = false) private String customerId; + @TableField(exist = false) + private Long staffId; + } diff --git a/ics-system/src/main/java/com/ics/system/controller/UserController.java b/ics-system/src/main/java/com/ics/system/controller/UserController.java index 65fc58c..d046312 100644 --- a/ics-system/src/main/java/com/ics/system/controller/UserController.java +++ b/ics-system/src/main/java/com/ics/system/controller/UserController.java @@ -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)); } diff --git a/ics-system/src/main/java/com/ics/system/handlers/MyParkLineHandler.java b/ics-system/src/main/java/com/ics/system/handlers/MyParkLineHandler.java index 0c4462e..6afee71 100644 --- a/ics-system/src/main/java/com/ics/system/handlers/MyParkLineHandler.java +++ b/ics-system/src/main/java/com/ics/system/handlers/MyParkLineHandler.java @@ -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" + }; /** * 多租户标识 diff --git a/ics-system/src/main/java/com/ics/system/handlers/MyTenantLineHandler.java b/ics-system/src/main/java/com/ics/system/handlers/MyTenantLineHandler.java index d33c97c..b58171e 100644 --- a/ics-system/src/main/java/com/ics/system/handlers/MyTenantLineHandler.java +++ b/ics-system/src/main/java/com/ics/system/handlers/MyTenantLineHandler.java @@ -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" + }; /** * 多租户标识 diff --git a/ics-system/src/main/java/com/ics/system/mapper/UserMapper.java b/ics-system/src/main/java/com/ics/system/mapper/UserMapper.java index a5244b5..811d8dc 100644 --- a/ics-system/src/main/java/com/ics/system/mapper/UserMapper.java +++ b/ics-system/src/main/java/com/ics/system/mapper/UserMapper.java @@ -163,4 +163,7 @@ public interface UserMapper { int insertAppUser(User user); User selectUserByCustomer(Long id); + + List getStaffListByUser(); + } diff --git a/ics-system/src/main/resources/mapper/system/UserMapper.xml b/ics-system/src/main/resources/mapper/system/UserMapper.xml index b203786..88d924b 100644 --- a/ics-system/src/main/resources/mapper/system/UserMapper.xml +++ b/ics-system/src/main/resources/mapper/system/UserMapper.xml @@ -280,6 +280,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_user u where u.customer_id = #{id} + + DELETE FROM sys_user WHERE id = #{id} diff --git a/ics-web/src/main/java/com/ics/controller/mobile/meeting/ApiRoomContentController.java b/ics-web/src/main/java/com/ics/controller/mobile/meeting/ApiRoomContentController.java index 46eda5e..5cd6d4d 100644 --- a/ics-web/src/main/java/com/ics/controller/mobile/meeting/ApiRoomContentController.java +++ b/ics-web/src/main/java/com/ics/controller/mobile/meeting/ApiRoomContentController.java @@ -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());