修改了会议预约记录列表bug
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
21c149bf0c
commit
eb1ec10c86
@ -13,6 +13,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||||
|
import org.dromara.property.domain.vo.MeetBookingDetailVo;
|
||||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||||
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
||||||
import org.dromara.property.service.IMeetBookingService;
|
import org.dromara.property.service.IMeetBookingService;
|
||||||
@ -65,7 +66,7 @@ public class MeetBookingController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
//@SaCheckPermission("property:meetbooking:query")
|
//@SaCheckPermission("property:meetbooking:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<MeetBookingVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<MeetBookingDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable("id") Long id) {
|
@PathVariable("id") Long id) {
|
||||||
return R.ok(meetBookingService.queryById(id));
|
return R.ok(meetBookingService.queryById(id));
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ public class ServerController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询服务管理列表
|
* 查询服务管理列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("property:server:list")
|
//@SaCheckPermission("property:server:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<ServerVo> list(ServerBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ServerVo> list(ServerBo bo, PageQuery pageQuery) {
|
||||||
return serverService.queryPageList(bo, pageQuery);
|
return serverService.queryPageList(bo, pageQuery);
|
||||||
@ -49,7 +49,7 @@ public class ServerController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导出服务管理列表
|
* 导出服务管理列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("property:server:export")
|
//@SaCheckPermission("property:server:export")
|
||||||
@Log(title = "服务管理", businessType = BusinessType.EXPORT)
|
@Log(title = "服务管理", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(ServerBo bo, HttpServletResponse response) {
|
public void export(ServerBo bo, HttpServletResponse response) {
|
||||||
@ -62,7 +62,7 @@ public class ServerController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("property:server:query")
|
//@SaCheckPermission("property:server:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<ServerVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<ServerVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable("id") Long id) {
|
@PathVariable("id") Long id) {
|
||||||
@ -72,7 +72,7 @@ public class ServerController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 新增服务管理
|
* 新增服务管理
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("property:server:add")
|
// @SaCheckPermission("property:server:add")
|
||||||
@Log(title = "服务管理", businessType = BusinessType.INSERT)
|
@Log(title = "服务管理", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
@ -83,7 +83,7 @@ public class ServerController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改服务管理
|
* 修改服务管理
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("property:server:edit")
|
// @SaCheckPermission("property:server:edit")
|
||||||
@Log(title = "服务管理", businessType = BusinessType.UPDATE)
|
@Log(title = "服务管理", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
@ -96,7 +96,7 @@ public class ServerController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param ids 主键串
|
* @param ids 主键串
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("property:server:remove")
|
// @SaCheckPermission("property:server:remove")
|
||||||
@Log(title = "服务管理", businessType = BusinessType.DELETE)
|
@Log(title = "服务管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@ -43,7 +43,7 @@ public class ServiceWarningController extends BaseController {
|
|||||||
* 查询业务管理-预警事件
|
* 查询业务管理-预警事件
|
||||||
列表
|
列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:warning:list")
|
//@SaCheckPermission("system:warning:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<ServiceWarningVo> list(ServiceWarningBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ServiceWarningVo> list(ServiceWarningBo bo, PageQuery pageQuery) {
|
||||||
return serviceWarningService.queryPageList(bo, pageQuery);
|
return serviceWarningService.queryPageList(bo, pageQuery);
|
||||||
@ -53,7 +53,7 @@ public class ServiceWarningController extends BaseController {
|
|||||||
* 导出业务管理-预警事件
|
* 导出业务管理-预警事件
|
||||||
列表
|
列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:warning:export")
|
//@SaCheckPermission("system:warning:export")
|
||||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.EXPORT)
|
@Log(title = "业务管理-预警事件", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(ServiceWarningBo bo, HttpServletResponse response) {
|
public void export(ServiceWarningBo bo, HttpServletResponse response) {
|
||||||
@ -62,12 +62,11 @@ public class ServiceWarningController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取业务管理-预警事件
|
* 获取业务管理-预警事件详细信息
|
||||||
详细信息
|
|
||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:warning:query")
|
//@SaCheckPermission("system:warning:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<ServiceWarningVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<ServiceWarningVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable("id") Long id) {
|
@PathVariable("id") Long id) {
|
||||||
@ -78,7 +77,7 @@ public class ServiceWarningController extends BaseController {
|
|||||||
* 新增业务管理-预警事件
|
* 新增业务管理-预警事件
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:warning:add")
|
//@SaCheckPermission("system:warning:add")
|
||||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.INSERT)
|
@Log(title = "业务管理-预警事件", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
@ -90,7 +89,7 @@ public class ServiceWarningController extends BaseController {
|
|||||||
* 修改业务管理-预警事件
|
* 修改业务管理-预警事件
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:warning:edit")
|
//@SaCheckPermission("system:warning:edit")
|
||||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.UPDATE)
|
@Log(title = "业务管理-预警事件", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
@ -104,7 +103,7 @@ public class ServiceWarningController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param ids 主键串
|
* @param ids 主键串
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:warning:remove")
|
//@SaCheckPermission("system:warning:remove")
|
||||||
@Log(title = "业务管理-预警事件", businessType = BusinessType.DELETE)
|
@Log(title = "业务管理-预警事件", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@ -78,7 +78,7 @@ public class MeetBooking extends TenantEntity {
|
|||||||
/**
|
/**
|
||||||
* 参会人数
|
* 参会人数
|
||||||
*/
|
*/
|
||||||
private Long personSum;
|
private int personSum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用
|
* 费用
|
||||||
|
@ -44,11 +44,21 @@ public class MeetBookingAppointmentVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "所属单位")
|
@ExcelProperty(value = "所属单位")
|
||||||
private String unit;
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 所属单位名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属单位名称")
|
||||||
|
private String unitName;
|
||||||
/**
|
/**
|
||||||
* 预定人
|
* 预定人
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "预定人")
|
@ExcelProperty(value = "预定人")
|
||||||
private String person;
|
private String person;
|
||||||
|
/**
|
||||||
|
* 预定人名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预定人名称")
|
||||||
|
private String personName;
|
||||||
/**
|
/**
|
||||||
* 会议室主题
|
* 会议室主题
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,143 @@
|
|||||||
|
package org.dromara.property.domain.vo;
|
||||||
|
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.property.domain.MeetBooking;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:yuyongle
|
||||||
|
* @Date:2025/7/9 10:18
|
||||||
|
* @Description:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = MeetBooking.class)
|
||||||
|
public class MeetBookingDetailVo implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "会议室名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "会议室id")
|
||||||
|
private Long meetId;
|
||||||
|
/**
|
||||||
|
* 会议室主题
|
||||||
|
*/
|
||||||
|
private String meetTheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室地址
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "会议室地址")
|
||||||
|
private String meetLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室地址名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "会议室地址名称")
|
||||||
|
private String locationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属单位")
|
||||||
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 所属单位名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属单位名称")
|
||||||
|
private String unitName;
|
||||||
|
/**
|
||||||
|
* 预定人
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预定人")
|
||||||
|
private String person;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定人
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预定人姓名")
|
||||||
|
private String personName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "联系方式")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预定开始时间")
|
||||||
|
private Date scheduledStarttime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定结束时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预定结束时间")
|
||||||
|
private Date scheduledEndtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参会人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "参会人数")
|
||||||
|
private Long personSum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "费用")
|
||||||
|
private Long price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否包含增值服务
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否包含增值服务")
|
||||||
|
private Long attach;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "支付状态")
|
||||||
|
private Long payState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态")
|
||||||
|
private Long state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ExcelProperty(value = "描述")
|
||||||
|
private String descs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
@ -43,11 +43,21 @@ public class MeetBookingWeekVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "所属单位")
|
@ExcelProperty(value = "所属单位")
|
||||||
private String unit;
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 所属单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属单位")
|
||||||
|
private String unitName;
|
||||||
/**
|
/**
|
||||||
* 预定人
|
* 预定人
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "预定人")
|
@ExcelProperty(value = "预定人")
|
||||||
private String person;
|
private String person;
|
||||||
|
/**
|
||||||
|
* 预定人名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预定人名称")
|
||||||
|
private String personName;
|
||||||
/**
|
/**
|
||||||
* 会议室主题
|
* 会议室主题
|
||||||
*/
|
*/
|
||||||
|
@ -2,6 +2,7 @@ package org.dromara.property.service;
|
|||||||
|
|
||||||
import org.dromara.property.domain.MeetBooking;
|
import org.dromara.property.domain.MeetBooking;
|
||||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
||||||
|
import org.dromara.property.domain.vo.MeetBookingDetailVo;
|
||||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
import org.dromara.property.domain.vo.MeetBookingVo;
|
||||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -27,7 +28,7 @@ public interface IMeetBookingService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 会议预约
|
* @return 会议预约
|
||||||
*/
|
*/
|
||||||
MeetBookingVo queryById(Long id);
|
MeetBookingDetailVo queryById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询会议预约列表
|
* 分页查询会议预约列表
|
||||||
|
@ -14,16 +14,16 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.property.domain.MeetAttachOrder;
|
import org.dromara.property.domain.MeetAttachOrder;
|
||||||
import org.dromara.property.domain.MeetBooking;
|
import org.dromara.property.domain.MeetBooking;
|
||||||
import org.dromara.property.domain.bo.MeetBookingBo;
|
import org.dromara.property.domain.bo.MeetBookingBo;
|
||||||
import org.dromara.property.domain.vo.MeetBookingAppointmentVo;
|
import org.dromara.property.domain.vo.*;
|
||||||
import org.dromara.property.domain.vo.MeetBookingVo;
|
import org.dromara.property.mapper.*;
|
||||||
import org.dromara.property.domain.vo.MeetBookingWeekVo;
|
|
||||||
import org.dromara.property.mapper.MeetAttachOrderMapper;
|
|
||||||
import org.dromara.property.mapper.MeetBookingMapper;
|
|
||||||
import org.dromara.property.service.IMeetBookingService;
|
import org.dromara.property.service.IMeetBookingService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -40,6 +40,9 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
|
|
||||||
private final MeetBookingMapper baseMapper;
|
private final MeetBookingMapper baseMapper;
|
||||||
private final MeetAttachOrderMapper meetAttachOrderMapper;
|
private final MeetAttachOrderMapper meetAttachOrderMapper;
|
||||||
|
private final ResidentPersonMapper residentPersonMapper;
|
||||||
|
private final TbRoomMapper roomMapper;
|
||||||
|
private final ResidentUnitMapper residentUnitMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询会议预约
|
* 查询会议预约
|
||||||
@ -48,8 +51,17 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
* @return 会议预约
|
* @return 会议预约
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public MeetBookingVo queryById(Long id){
|
public MeetBookingDetailVo queryById(Long id) {
|
||||||
return baseMapper.selectVoById(id);
|
MeetBookingVo meetBookingVo = baseMapper.selectVoById(id);
|
||||||
|
MeetBookingDetailVo meetBookingDetailVo = BeanUtil.copyProperties(meetBookingVo, MeetBookingDetailVo.class);
|
||||||
|
String locationName = roomMapper.queryRoomName(Long.valueOf(meetBookingDetailVo.getMeetLocation()));
|
||||||
|
meetBookingDetailVo.setLocationName(locationName);
|
||||||
|
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetBookingDetailVo.getPerson());
|
||||||
|
meetBookingDetailVo.setPersonName(residentPersonVo.getUserName());
|
||||||
|
meetBookingDetailVo.setPerson(residentPersonVo.getPhone());
|
||||||
|
ResidentUnitVo residentUnitVo = residentUnitMapper.selectVoById(meetBookingDetailVo.getUnit());
|
||||||
|
meetBookingDetailVo.setUnitName(residentUnitVo.getName());
|
||||||
|
return meetBookingDetailVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,41 +80,58 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*查询该日期的会议记录
|
*查询该日期的会议记录
|
||||||
* @param appointmentDate
|
* @param appointmentDateStr
|
||||||
* @return 当天的会议预约记录
|
* @return 当天的会议预约记录
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MeetBookingAppointmentVo> appointmentList(String appointmentDate) {
|
public List<MeetBookingAppointmentVo> appointmentList(String appointmentDateStr) {
|
||||||
LambdaQueryWrapper<MeetBooking> meetBookingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<MeetBooking> meetBookingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
if (appointmentDate != null) {
|
LocalDate date = LocalDate.parse(appointmentDateStr);
|
||||||
meetBookingLambdaQueryWrapper.le(MeetBooking::getScheduledStarttime, appointmentDate)
|
LocalDateTime startOfDay = date.atStartOfDay();
|
||||||
.ge(MeetBooking::getScheduledEndtime, appointmentDate);
|
LocalDateTime endOfDay = date.atTime(LocalTime.MAX);
|
||||||
}
|
meetBookingLambdaQueryWrapper
|
||||||
|
.le(MeetBooking::getScheduledStarttime, endOfDay)
|
||||||
|
.ge(MeetBooking::getScheduledEndtime, startOfDay);
|
||||||
List<MeetBooking> meetBookings = baseMapper.selectList(meetBookingLambdaQueryWrapper);
|
List<MeetBooking> meetBookings = baseMapper.selectList(meetBookingLambdaQueryWrapper);
|
||||||
List<MeetBookingAppointmentVo> meetBookingAppointmentVoList = BeanUtil.copyToList(meetBookings, MeetBookingAppointmentVo.class);
|
List<MeetBookingAppointmentVo> meetBookingAppointmentVoList = BeanUtil.copyToList(meetBookings, MeetBookingAppointmentVo.class);
|
||||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||||
|
List<String> units = meetBookingAppointmentVoList.stream()
|
||||||
|
.map(vo -> vo.getUnit())
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<String> persons = meetBookingAppointmentVoList.stream()
|
||||||
|
.map(vo -> vo.getPerson())
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoByIds(units);
|
||||||
|
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoByIds(persons);
|
||||||
meetBookingAppointmentVoList.stream().forEach(
|
meetBookingAppointmentVoList.stream().forEach(
|
||||||
s->{
|
s -> {
|
||||||
String str = df.format(s.getScheduledStarttime());
|
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||||
int a = Integer.parseInt(str);
|
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||||
if (a >= 0 && a <= 6) {
|
s.setUnitName(residentUnitVo.getName());
|
||||||
s.setSlots("凌晨");
|
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||||
}
|
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||||
if (a > 6 && a <= 12) {
|
s.setPersonName(residentPersonVo.getUserName());
|
||||||
s.setSlots("上午");
|
String str = df.format(s.getScheduledStarttime());
|
||||||
}
|
int a = Integer.parseInt(str);
|
||||||
if (a > 12 && a <= 13) {
|
if (a >= 0 && a <= 6) {
|
||||||
s.setSlots("中午");
|
s.setSlots("凌晨");
|
||||||
}
|
}
|
||||||
if (a > 13 && a <= 18) {
|
if (a > 6 && a <= 12) {
|
||||||
s.setSlots("下午");
|
s.setSlots("上午");
|
||||||
}
|
}
|
||||||
if (a > 18 && a <= 24) {
|
if (a > 12 && a <= 13) {
|
||||||
s.setSlots("晚上");
|
s.setSlots("中午");
|
||||||
}
|
}
|
||||||
|
if (a > 13 && a <= 18) {
|
||||||
|
s.setSlots("下午");
|
||||||
|
}
|
||||||
|
if (a > 18 && a <= 24) {
|
||||||
|
s.setSlots("晚上");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return meetBookingAppointmentVoList;
|
return meetBookingAppointmentVoList;
|
||||||
}
|
}
|
||||||
@ -137,14 +166,48 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
.le(MeetBooking::getScheduledEndtime, endOfWeek);
|
.le(MeetBooking::getScheduledEndtime, endOfWeek);
|
||||||
List<MeetBookingVo> meetBookingVoList = baseMapper.selectVoList(bookingLambdaQueryWrapper);
|
List<MeetBookingVo> meetBookingVoList = baseMapper.selectVoList(bookingLambdaQueryWrapper);
|
||||||
List<MeetBookingWeekVo> meetBookingWeekVoList = BeanUtil.copyToList(meetBookingVoList, MeetBookingWeekVo.class);
|
List<MeetBookingWeekVo> meetBookingWeekVoList = BeanUtil.copyToList(meetBookingVoList, MeetBookingWeekVo.class);
|
||||||
String[] weekStr={"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
|
String[] weekStr = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
|
||||||
List<MeetBookingWeekVo> meetBookingWeekList= new ArrayList<>();
|
List<MeetBookingWeekVo> meetBookingWeekList = new ArrayList<>();
|
||||||
meetBookingWeekVoList.stream().forEach(s->{
|
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||||
|
List<String> units = meetBookingVoList.stream()
|
||||||
|
.map(vo -> vo.getUnit())
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<String> persons = meetBookingVoList.stream()
|
||||||
|
.map(vo -> vo.getPerson())
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoByIds(units);
|
||||||
|
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoByIds(persons);
|
||||||
|
meetBookingWeekVoList.stream().forEach(s -> {
|
||||||
|
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||||
|
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||||
|
s.setUnitName(residentUnitVo.getName());
|
||||||
|
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||||
|
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||||
|
s.setPersonName(residentPersonVo.getUserName());
|
||||||
//设置指定的Date对象不设置默认返回当天的星期
|
//设置指定的Date对象不设置默认返回当天的星期
|
||||||
calendar.setTime(s.getScheduledStarttime());
|
calendar.setTime(s.getScheduledStarttime());
|
||||||
//获取当前时间的星期
|
//获取当前时间的星期
|
||||||
int firstDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
|
int firstDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
|
||||||
s.setWeek(weekStr[firstDayOfWeek - 1]);
|
s.setWeek(weekStr[firstDayOfWeek - 1]);
|
||||||
|
String str = df.format(s.getScheduledStarttime());
|
||||||
|
int a = Integer.parseInt(str);
|
||||||
|
if (a >= 0 && a <= 6) {
|
||||||
|
s.setSlots("凌晨");
|
||||||
|
}
|
||||||
|
if (a > 6 && a <= 12) {
|
||||||
|
s.setSlots("上午");
|
||||||
|
}
|
||||||
|
if (a > 12 && a <= 13) {
|
||||||
|
s.setSlots("中午");
|
||||||
|
}
|
||||||
|
if (a > 13 && a <= 18) {
|
||||||
|
s.setSlots("下午");
|
||||||
|
}
|
||||||
|
if (a > 18 && a <= 24) {
|
||||||
|
s.setSlots("晚上");
|
||||||
|
}
|
||||||
meetBookingWeekList.add(s);
|
meetBookingWeekList.add(s);
|
||||||
});
|
});
|
||||||
return meetBookingWeekList;
|
return meetBookingWeekList;
|
||||||
@ -161,7 +224,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), MeetBooking::getPhone, bo.getPhone());
|
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), MeetBooking::getPhone, bo.getPhone());
|
||||||
lqw.eq(bo.getScheduledStarttime() != null, MeetBooking::getScheduledStarttime, bo.getScheduledStarttime());
|
lqw.eq(bo.getScheduledStarttime() != null, MeetBooking::getScheduledStarttime, bo.getScheduledStarttime());
|
||||||
lqw.eq(bo.getScheduledEndtime() != null, MeetBooking::getScheduledEndtime, bo.getScheduledEndtime());
|
lqw.eq(bo.getScheduledEndtime() != null, MeetBooking::getScheduledEndtime, bo.getScheduledEndtime());
|
||||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getPersonSum()), MeetBooking::getPersonSum, bo.getPersonSum());
|
// lqw.eq(ObjectUtil.isNotEmpty(bo.getPersonSum()), MeetBooking::getPersonSum, bo.getPersonSum());
|
||||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getPrice()), MeetBooking::getPrice, bo.getPrice());
|
lqw.eq(ObjectUtil.isNotEmpty(bo.getPrice()), MeetBooking::getPrice, bo.getPrice());
|
||||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getAttach()), MeetBooking::getAttach, bo.getAttach());
|
lqw.eq(ObjectUtil.isNotEmpty(bo.getAttach()), MeetBooking::getAttach, bo.getAttach());
|
||||||
lqw.eq(ObjectUtil.isNotEmpty(bo.getPayState()), MeetBooking::getPayState, bo.getPayState());
|
lqw.eq(ObjectUtil.isNotEmpty(bo.getPayState()), MeetBooking::getPayState, bo.getPayState());
|
||||||
@ -184,11 +247,11 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setId(add.getId());
|
bo.setId(add.getId());
|
||||||
}
|
}
|
||||||
List<MeetAttachOrder> meetAttachList = new ArrayList<>();
|
List<MeetAttachOrder> meetAttachList = new ArrayList<>();
|
||||||
if(ObjectUtil.isNotEmpty(bo.getMeetAttachOrderBoList()) ){
|
if (ObjectUtil.isNotEmpty(bo.getMeetAttachOrderBoList())) {
|
||||||
bo.getMeetAttachOrderBoList().forEach(
|
bo.getMeetAttachOrderBoList().forEach(
|
||||||
s->{
|
s -> {
|
||||||
s.setMeetBookingId(add.getId());
|
s.setMeetBookingId(add.getId());
|
||||||
MeetAttachOrder meetAttachOrder = BeanUtil.copyProperties(s, MeetAttachOrder.class);
|
MeetAttachOrder meetAttachOrder = BeanUtil.copyProperties(s, MeetAttachOrder.class);
|
||||||
meetAttachList.add(meetAttachOrder);
|
meetAttachList.add(meetAttachOrder);
|
||||||
}
|
}
|
||||||
@ -216,7 +279,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
/**
|
/**
|
||||||
* 保存前的数据校验
|
* 保存前的数据校验
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(MeetBooking entity){
|
private void validEntityBeforeSave(MeetBooking entity) {
|
||||||
//TODO 做一些数据校验,如唯一约束
|
//TODO 做一些数据校验,如唯一约束
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +292,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
if(isValid){
|
if (isValid) {
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
@ -249,7 +312,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
|||||||
throw new IllegalArgumentException("Unknown type: " + type);
|
throw new IllegalArgumentException("Unknown type: " + type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public List<MeetBooking> getList(){
|
|
||||||
|
public List<MeetBooking> getList() {
|
||||||
LambdaQueryWrapper<MeetBooking> meetQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<MeetBooking> meetQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
return baseMapper.selectList(meetQueryWrapper);
|
return baseMapper.selectList(meetQueryWrapper);
|
||||||
|
|
||||||
|
@ -75,17 +75,7 @@ public class MeetServiceImpl implements IMeetService {
|
|||||||
public TableDataInfo<MeetVo> queryPageList(MeetBo bo, PageQuery pageQuery) {
|
public TableDataInfo<MeetVo> queryPageList(MeetBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<Meet> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<Meet> lqw = buildQueryWrapper(bo);
|
||||||
Page<MeetVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<MeetVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
List<MeetVo> rows = result.getRecords();
|
return TableDataInfo.build(result);
|
||||||
List<MeetVo> row = new ArrayList<>();
|
|
||||||
rows.forEach(s -> {
|
|
||||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(s.getPrincipals());
|
|
||||||
s.setPrincipalsName(residentPersonVo.getUserName());
|
|
||||||
s.setPhoneNo(residentPersonVo.getPhone());
|
|
||||||
String locationName = roomMapper.queryRoomName(Long.valueOf(s.getLocation()));
|
|
||||||
s.setLocationName(locationName);
|
|
||||||
row.add(s);
|
|
||||||
});
|
|
||||||
return TableDataInfo.build(new Page().setRecords(row));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user