Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
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:
commit
1d474d735e
@ -50,7 +50,7 @@ public class AttendanceArrangementController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("Property:arrangement:explore")
|
@SaCheckPermission("Property:arrangement:explore")
|
||||||
@GetMapping("/explore")
|
@GetMapping("/explore")
|
||||||
public List<AttendanceArrangementVo> list(AttendanceArrangementBo bo) {
|
public TableDataInfo<AttendanceArrangementVo> list(AttendanceArrangementBo bo) {
|
||||||
return attendanceArrangementService.queryList(bo);
|
return attendanceArrangementService.queryList(bo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
package org.dromara.property.controller;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.dromara.common.web.core.BaseController;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排班考勤组的中间表控制层
|
|
||||||
* 前端访问路由地址为:/Property/arrangementGroup
|
|
||||||
*
|
|
||||||
* @author mocheng
|
|
||||||
* @date 2025-07-15
|
|
||||||
*/
|
|
||||||
@Validated
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/arrangementGroup")
|
|
||||||
public class AttendanceArrangementGroupController extends BaseController {
|
|
||||||
|
|
||||||
}
|
|
@ -7,7 +7,9 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.dromara.common.tenant.core.TenantEntity;
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排班对象 attendance_arrangement
|
* 排班对象 attendance_arrangement
|
||||||
@ -52,12 +54,12 @@ public class AttendanceArrangement extends TenantEntity {
|
|||||||
/**
|
/**
|
||||||
* 开始日期
|
* 开始日期
|
||||||
*/
|
*/
|
||||||
private Date startDate;
|
private LocalDate startDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结束日期(仅date_type=3时有效)
|
* 结束日期(仅date_type=3时有效)
|
||||||
*/
|
*/
|
||||||
private Date endDate;
|
private LocalDate endDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态:0-未生效,1-已生效
|
* 状态:0-未生效,1-已生效
|
||||||
@ -65,4 +67,5 @@ public class AttendanceArrangement extends TenantEntity {
|
|||||||
private Long status;
|
private Long status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
package org.dromara.property.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.dromara.common.tenant.core.TenantEntity;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤排班组中间表对象 attendance_arrangement_group
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2025-07-30
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("attendance_arrangement_group")
|
|
||||||
public class AttendanceArrangementGroup extends TenantEntity
|
|
||||||
{
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
/** 主键ID */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 排班id */
|
|
||||||
private Long arrangementId;
|
|
||||||
|
|
||||||
/** 考勤组ID */
|
|
||||||
private Long groupId;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -101,6 +101,10 @@ public class ServiceWorkOrders extends TenantEntity {
|
|||||||
* 图片
|
* 图片
|
||||||
*/
|
*/
|
||||||
private String imgUrl;
|
private String imgUrl;
|
||||||
|
/**
|
||||||
|
* 工单图片
|
||||||
|
*/
|
||||||
|
private String orderImgUrl;
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ -12,6 +12,7 @@ import org.dromara.property.domain.AttendanceScheduleCycle;
|
|||||||
import org.dromara.property.domain.AttendanceUserGroup;
|
import org.dromara.property.domain.AttendanceUserGroup;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.YearMonth;
|
import java.time.YearMonth;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -58,19 +59,19 @@ public class AttendanceArrangementBo extends BaseEntity {
|
|||||||
* 开始日期
|
* 开始日期
|
||||||
*/
|
*/
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date startDate;
|
private LocalDate startDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结束日期(仅date_type=3时有效)
|
* 结束日期(仅date_type=3时有效)
|
||||||
*/
|
*/
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date endDate;
|
private LocalDate endDate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 前端传某天的当前日期
|
* 前端传某天的当前日期
|
||||||
*/
|
*/
|
||||||
private Date currentDate;
|
private LocalDate currentDate;
|
||||||
/**
|
/**
|
||||||
* 日期月份
|
* 日期月份
|
||||||
*/
|
*/
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
package org.dromara.property.domain.bo;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.dromara.property.domain.AttendanceArrangementGroup;
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
import org.dromara.property.domain.AttendanceScheduleCycle;
|
|
||||||
import org.dromara.property.domain.AttendanceUserGroup;
|
|
||||||
import org.dromara.property.domain.AttendanceWeekSet;
|
|
||||||
import org.dromara.property.domain.AttendanceShift;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.YearMonth;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤排班组业务对象 attendance_arrangement_group
|
|
||||||
*
|
|
||||||
* @author mocheng
|
|
||||||
* @date 2025-07-30
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@AutoMapper(target = AttendanceArrangementGroup.class, reverseConvertGenerate = false)
|
|
||||||
public class AttendanceArrangementGroupBo extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "主键ID不能为空", groups = {EditGroup.class})
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排班名称
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "排班id不能为空", groups = {AddGroup.class, EditGroup.class})
|
|
||||||
private Long arrangementId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤组ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "考勤组ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
|
||||||
private Long groupId;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -90,11 +90,6 @@ public class CleanOrderBo extends BaseEntity {
|
|||||||
@NotBlank(message = "结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
|
@NotBlank(message = "结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* 单位id
|
|
||||||
*/
|
|
||||||
@NotNull(message = "单位id不能为空", groups = {AddGroup.class, EditGroup.class})
|
|
||||||
/**
|
/**
|
||||||
* 评价
|
* 评价
|
||||||
*/
|
*/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.dromara.property.domain.constant;
|
package org.dromara.property.domain.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态常量,启用或者禁用
|
* 状态常量
|
||||||
*/
|
*/
|
||||||
public class StatusConstant {
|
public class StatusConstant {
|
||||||
|
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
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.*;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤排班组视图对象 attendance_arrangement_group
|
|
||||||
*
|
|
||||||
* @author mocheng
|
|
||||||
* @date 2025-07-30
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
@AutoMapper(target = AttendanceArrangementGroup.class)
|
|
||||||
public class AttendanceArrangementGroupVo implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "主键ID")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排班名称
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "排班id")
|
|
||||||
private Long arrangementId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤组ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "考勤组ID")
|
|
||||||
private Long groupId;
|
|
||||||
|
|
||||||
}
|
|
@ -9,6 +9,7 @@ import org.dromara.property.domain.*;
|
|||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@ -74,6 +75,8 @@ public class AttendanceArrangementVo implements Serializable {
|
|||||||
@ExcelProperty(value = "状态:0-未生效,1-已生效")
|
@ExcelProperty(value = "状态:0-未生效,1-已生效")
|
||||||
private Long status;
|
private Long status;
|
||||||
|
|
||||||
|
private AttendanceGroup attendanceGroup;
|
||||||
|
|
||||||
private List<AttendanceUserGroup> userGroupList;
|
private List<AttendanceUserGroup> userGroupList;
|
||||||
|
|
||||||
private AttendanceWeekSet weekSet;
|
private AttendanceWeekSet weekSet;
|
||||||
@ -82,4 +85,6 @@ public class AttendanceArrangementVo implements Serializable {
|
|||||||
|
|
||||||
private AttendanceScheduleCycle cycle;
|
private AttendanceScheduleCycle cycle;
|
||||||
|
|
||||||
|
private AttendanceUserGroup userGroup;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,11 @@ public class ServiceWorkOrdersInfoVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "工单类型")
|
@ExcelProperty(value = "工单类型")
|
||||||
private Long type;
|
private Long type;
|
||||||
|
/**
|
||||||
|
* 权重
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "权重")
|
||||||
|
private String processingWeight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态
|
* 状态
|
||||||
@ -127,6 +132,22 @@ public class ServiceWorkOrdersInfoVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "创建时间")
|
@ExcelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 评价文本
|
||||||
|
*/
|
||||||
|
private String serviceEvaluaText;
|
||||||
|
/**
|
||||||
|
* 工单图片
|
||||||
|
*/
|
||||||
|
private String orderImgUrl;
|
||||||
|
/**
|
||||||
|
* 图片
|
||||||
|
*/
|
||||||
|
private String imgUrl;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
/**
|
/**
|
||||||
*工单记录
|
*工单记录
|
||||||
*/
|
*/
|
||||||
|
@ -131,6 +131,10 @@ public class ServiceWorkOrdersVo implements Serializable {
|
|||||||
* 评价文本
|
* 评价文本
|
||||||
*/
|
*/
|
||||||
private String serviceEvaluaText;
|
private String serviceEvaluaText;
|
||||||
|
/**
|
||||||
|
* 工单图片
|
||||||
|
*/
|
||||||
|
private String orderImgUrl;
|
||||||
/**
|
/**
|
||||||
* 图片
|
* 图片
|
||||||
*/
|
*/
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package org.dromara.property.mapper;
|
|
||||||
|
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
||||||
import org.dromara.property.domain.AttendanceArrangementGroup;
|
|
||||||
import org.dromara.property.domain.vo.AttendanceArrangementGroupVo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排班Mapper接口
|
|
||||||
*
|
|
||||||
* @author mocheng
|
|
||||||
* @date 2025-07-15
|
|
||||||
*/
|
|
||||||
public interface AttendanceArrangementGroupMapper extends BaseMapperPlus<AttendanceArrangementGroup, AttendanceArrangementGroupVo> {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
package org.dromara.property.service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排班Service接口
|
|
||||||
*
|
|
||||||
* @author mocheng
|
|
||||||
* @date 2025-07-15
|
|
||||||
*/
|
|
||||||
public interface IAttendanceArrangementGroupService {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -39,7 +39,7 @@ public interface IAttendanceArrangementService {
|
|||||||
* @param bo 查询条件
|
* @param bo 查询条件
|
||||||
* @return 排班列表
|
* @return 排班列表
|
||||||
*/
|
*/
|
||||||
List<AttendanceArrangementVo> queryList(AttendanceArrangementBo bo);
|
TableDataInfo<AttendanceArrangementVo> queryList(AttendanceArrangementBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增排班
|
* 新增排班
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
package org.dromara.property.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.property.domain.*;
|
|
||||||
import org.dromara.property.domain.bo.AttendanceArrangementBo;
|
|
||||||
import org.dromara.property.domain.constant.StatusConstant;
|
|
||||||
import org.dromara.property.domain.vo.AttendanceArrangementVo;
|
|
||||||
import org.dromara.property.mapper.*;
|
|
||||||
import org.dromara.property.service.IAttendanceArrangementGroupService;
|
|
||||||
import org.dromara.property.service.IAttendanceArrangementService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排班Service业务层处理
|
|
||||||
*
|
|
||||||
* @author mocheng
|
|
||||||
* @date 2025-07-15
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
|
||||||
public class AttendanceArrangementGroupServiceImpl implements IAttendanceArrangementGroupService {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.beanutils.BeanUtils;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
@ -41,11 +42,11 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
|
|
||||||
private final AttendanceGroupMapper attendanceGroupMapper;
|
private final AttendanceGroupMapper attendanceGroupMapper;
|
||||||
|
|
||||||
private final AttendanceArrangementGroupMapper arrangementGroupMapper;
|
// private final AttendanceArrangementGroupMapper arrangementGroupMapper;
|
||||||
|
|
||||||
private final AttendanceWeekSetMapper weekSetMapper;
|
private final AttendanceWeekSetMapper weekSetMapper;
|
||||||
|
|
||||||
private final AttendanceShiftMapper attendanceShiftMapper;
|
private final AttendanceShiftMapper attendanceShiftMapper;
|
||||||
|
|
||||||
private final AttendanceScheduleCycleMapper scheduleCycleMapper;
|
private final AttendanceScheduleCycleMapper scheduleCycleMapper;
|
||||||
|
|
||||||
@ -81,65 +82,72 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
|
|
||||||
|
|
||||||
Page<AttendanceArrangementVo> attendanceArrangementVoPage = result.setRecords(result.getRecords().stream().peek(vo -> {
|
Page<AttendanceArrangementVo> attendanceArrangementVoPage = result.setRecords(result.getRecords().stream().peek(vo -> {
|
||||||
//1.根据当前日期查询在开始时间和结束时间之间的排班信息
|
//1.根据当前日期查询在开始时间和结束时间之间的排班信息
|
||||||
//查询指定日期在哪些排班中
|
//查询指定日期查询在哪些排班中,并返回arrangementList
|
||||||
List<AttendanceArrangement> arrangementList = baseMapper.selectList(Wrappers.<AttendanceArrangement>lambdaQuery().ge(AttendanceArrangement::getStartDate, bo.getCurrentDate()).le(AttendanceArrangement::getEndDate, bo.getCurrentDate()));
|
List<AttendanceArrangement> arrangementList = baseMapper.selectList(
|
||||||
//根据排班查询出考勤组id
|
Wrappers.<AttendanceArrangement>lambdaQuery()
|
||||||
List<Long> groupIds = arrangementList.stream().map(AttendanceArrangement::getGroupId).distinct().toList();
|
.ge(AttendanceArrangement::getStartDate, bo.getCurrentDate())
|
||||||
|
.le(AttendanceArrangement::getEndDate, bo.getCurrentDate())
|
||||||
|
);
|
||||||
|
//根据排班查询出考勤组id
|
||||||
|
List<Long> groupIds = arrangementList.stream().map(AttendanceArrangement::getGroupId).distinct().toList();
|
||||||
|
|
||||||
// 2.循环将所有的考勤组id设置到考勤组中
|
// 2.循环将所有的考勤组id设置到考勤组中
|
||||||
//循环groupIds,循环和AttendanceGroup中的id做对比,如果有相同的,则取出attendanceGroup中的所有数据
|
//循环groupIds,循环和AttendanceGroup中的id做对比,如果有相同的,则取出attendanceGroup中的所有数据
|
||||||
groupIds.forEach(
|
groupIds.forEach(
|
||||||
groupId -> {
|
groupId -> {
|
||||||
//从数据库查询出当前考勤组的所有数据
|
//从数据库查询出当前考勤组的所有数据
|
||||||
AttendanceGroup group = attendanceGroupMapper.selectOne(Wrappers.<AttendanceGroup>lambdaQuery().eq(AttendanceGroup::getId, groupId));
|
AttendanceGroup group = attendanceGroupMapper.selectOne(Wrappers.<AttendanceGroup>lambdaQuery().eq(AttendanceGroup::getId, groupId));
|
||||||
|
|
||||||
// 3.查询出当前考勤组的所有数据,从考勤组判断当前id是固定班制还是排班制
|
// 3.查询出当前考勤组的所有数据,从考勤组判断当前id是固定班制还是排班制
|
||||||
if (group.getAttendanceType().equals(StatusConstant.FIXEDSCHEDULE)) {
|
if (group.getAttendanceType().equals(StatusConstant.FIXEDSCHEDULE)) {
|
||||||
// 3.1固定班制:将当前的日期转为周几,然后与数据库中的班次周数作对比,取出当前日期的班次信息
|
// 3.1固定班制:将当前的日期转为周几,然后与数据库中的班次周数作对比,取出当前日期的班次信息
|
||||||
//将传来的日期参数转为周几
|
//将传来的日期参数转为周几
|
||||||
int week = DateUtil.dayOfWeek(bo.getCurrentDate());
|
// int week = DateUtil.dayOfWeek(bo.getCurrentDate());
|
||||||
//取出当前日期的周数,与数据库中的班次周数作对比,取出当前日期的班次信息
|
int week = 1;
|
||||||
AttendanceWeekSet weekSet = weekSetMapper.selectOne(Wrappers.<AttendanceWeekSet>lambdaQuery().eq(AttendanceWeekSet::getGroupId, groupId).eq(AttendanceWeekSet::getDayOfWeek, week));
|
//取出当前日期的周数,与数据库中的班次周数作对比,取出当前日期的班次信息
|
||||||
//将weekSet存到结果中
|
AttendanceWeekSet weekSet = weekSetMapper.selectOne(Wrappers.<AttendanceWeekSet>lambdaQuery().eq(AttendanceWeekSet::getGroupId, groupId).eq(AttendanceWeekSet::getDayOfWeek, week));
|
||||||
AttendanceArrangementVo arrangementVo = new AttendanceArrangementVo();
|
//将weekSet存到结果中
|
||||||
arrangementVo.setWeekSet(weekSet);
|
vo.setWeekSet(weekSet);
|
||||||
//根据weekSet取出id,根据id查询出attendanceWeekSetShift表中的shiftId
|
//根据weekSet取出id,根据id查询出attendanceWeekSetShift表中的shiftId
|
||||||
Long shiftId = weekSet.getId();
|
Long shiftId = weekSet.getId();
|
||||||
//根据shiftId查询attendanceShift表中对应的id的数据
|
//根据shiftId查询attendanceShift表中对应的id的数据
|
||||||
AttendanceShift shift = attendanceShiftMapper.selectById(shiftId);
|
AttendanceShift shift = attendanceShiftMapper.selectById(shiftId);
|
||||||
//将shift存到结果中
|
//将shift存到结果中
|
||||||
arrangementVo.setShift(shift);
|
vo.setShift(shift);
|
||||||
|
} else if (group.getAttendanceType().equals(StatusConstant.SHIFTSCHEDULE)) {
|
||||||
|
// 3.2排班制:判断第一天是从几号开始,循环判断,判断当前是循环中的第几天,取出当前天数的班次信息。
|
||||||
|
//取出排班中的开始时间和结束时间
|
||||||
|
LocalDate startDate = bo.getStartDate();
|
||||||
|
LocalDate endDate = bo.getEndDate();
|
||||||
|
LocalDate currentDate = bo.getCurrentDate();
|
||||||
|
//统计当前考勤组有多少条数据
|
||||||
|
int count = Math.toIntExact(scheduleCycleMapper.selectCount(Wrappers.<AttendanceScheduleCycle>lambdaQuery().eq(AttendanceScheduleCycle::getGroupId, groupId)));
|
||||||
|
|
||||||
} else if (group.getAttendanceType().equals(StatusConstant.SHIFTSCHEDULE)) {
|
|
||||||
// 3.2排班制:判断第一天是从几号开始,循环判断,判断当前是循环中的第几天,取出当前天数的班次信息。
|
//todo: 匹配天数
|
||||||
//取出排班中的开始时间和结束时间
|
|
||||||
Date startDate = bo.getStartDate();
|
|
||||||
Date endDate = bo.getEndDate();
|
//取出attendanceScheduleCycle表中的天数
|
||||||
Date currentDate = bo.getCurrentDate();
|
Integer cycleDays = scheduleCycleMapper.selectOne(Wrappers.<AttendanceScheduleCycle>lambdaQuery().eq(AttendanceScheduleCycle::getGroupId, groupId)).getDayNumber();
|
||||||
//取出attendanceScheduleCycle表中的天数
|
//在startDate和endDate之间循环,判端当前日期是cycleDays中的第几天
|
||||||
Integer cycleDays = scheduleCycleMapper.selectOne(Wrappers.<AttendanceScheduleCycle>lambdaQuery().eq(AttendanceScheduleCycle::getGroupId, groupId)).getDayNumber();
|
int cycleDay = 0;
|
||||||
//在startDate和endDate之间循环,判端当前日期是cycleDays中的第几天
|
while (startDate.isBefore(currentDate) || endDate.isAfter(currentDate)) {
|
||||||
int cycleDay = 0;
|
cycleDay++;
|
||||||
while (startDate.before(currentDate) || endDate.after(currentDate)) {
|
// startDate = DateUtil.offsetDay(startDate, 1);
|
||||||
cycleDay++;
|
//判断当前日期是clcleDays中的第几天
|
||||||
startDate = DateUtil.offsetDay(startDate, 1);
|
if (cycleDay > cycleDays) {
|
||||||
//判断当前日期是clcleDays中的第几天
|
cycleDay = 1;
|
||||||
if (cycleDay > cycleDays) {
|
}
|
||||||
cycleDay = 1;
|
|
||||||
}
|
}
|
||||||
|
//根据cycleDay查询出当前日期的班次信息
|
||||||
|
AttendanceScheduleCycle cycle = scheduleCycleMapper.selectOne(Wrappers.<AttendanceScheduleCycle>lambdaQuery().eq(AttendanceScheduleCycle::getGroupId, groupId).eq(AttendanceScheduleCycle::getDayNumber, cycleDay));
|
||||||
|
//将cycle存到结果中
|
||||||
|
vo.setCycle(cycle);
|
||||||
|
|
||||||
}
|
}
|
||||||
//根据cycleDay查询出当前日期的班次信息
|
|
||||||
AttendanceScheduleCycle cycle = scheduleCycleMapper.selectOne(Wrappers.<AttendanceScheduleCycle>lambdaQuery().eq(AttendanceScheduleCycle::getGroupId, groupId).eq(AttendanceScheduleCycle::getDayNumber, cycleDay));
|
|
||||||
//将cycle存到结果中
|
|
||||||
AttendanceArrangementVo arrangementVo = new AttendanceArrangementVo();
|
|
||||||
arrangementVo.setCycle(cycle);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// AttendanceArrangementVo arrangementvo = baseMapper.selectVoByTime(bo.getCurrentDate());
|
// AttendanceArrangementVo arrangementvo = baseMapper.selectVoByTime(bo.getCurrentDate());
|
||||||
@ -167,7 +175,7 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
* @return 排班列表
|
* @return 排班列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<AttendanceArrangementVo> queryList(AttendanceArrangementBo bo) {
|
public TableDataInfo<AttendanceArrangementVo> queryList(AttendanceArrangementBo bo) {
|
||||||
|
|
||||||
LocalDate month = bo.getMonth().atEndOfMonth();
|
LocalDate month = bo.getMonth().atEndOfMonth();
|
||||||
// 1. 拿到日历的开始时间和结束时间
|
// 1. 拿到日历的开始时间和结束时间
|
||||||
@ -178,13 +186,22 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
// 2.1 循环日历的开始时间和结束时间,判断 calendarStartDate 在哪些排班中
|
// 2.1 循环日历的开始时间和结束时间,判断 calendarStartDate 在哪些排班中
|
||||||
List<AttendanceArrangementVo> result = new ArrayList<>();
|
List<AttendanceArrangementVo> result = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
for (LocalDate date = calendarStartDate; date.isBefore(calendarEndDate); date = date.plusDays(1)) {
|
for (LocalDate date = calendarStartDate; date.isBefore(calendarEndDate); date = date.plusDays(1)) {
|
||||||
|
// 2.2 根据当前日期查询在开始时间和结束时间之间的排班信息
|
||||||
|
//查询当前日期在哪些排班中,当前日期大于等于排班开始日期,小于等于排班结束日期
|
||||||
// 查询指定日期在哪些排班中
|
// 查询指定日期在哪些排班中
|
||||||
List<AttendanceArrangement> arrangementList = baseMapper.selectList(
|
List<AttendanceArrangement> arrangementList = baseMapper.selectList(
|
||||||
Wrappers.<AttendanceArrangement>lambdaQuery()
|
Wrappers.<AttendanceArrangement>lambdaQuery()
|
||||||
.ge(AttendanceArrangement::getStartDate, date.atStartOfDay(ZoneId.systemDefault()).toInstant())
|
.between(AttendanceArrangement::getStartDate, date.atStartOfDay(ZoneId.systemDefault()).toInstant(),
|
||||||
.le(AttendanceArrangement::getEndDate, date.atStartOfDay(ZoneId.systemDefault()).plusDays(1).toInstant().minusSeconds(1))
|
date.atStartOfDay(ZoneId.systemDefault()).plusDays(1).toInstant().minusSeconds(1)));
|
||||||
);
|
|
||||||
|
// //根据arrangementList查询出排班的id
|
||||||
|
// List<Long> scheduleIdList = arrangementList.stream().map(AttendanceArrangement::getId).toList();
|
||||||
|
// //根据排班的id查询出排班的人员详细信息
|
||||||
|
// List<AttendanceUserGroup> userGroupList = userGroupMapper.selectList(Wrappers.<AttendanceUserGroup>lambdaQuery().in(AttendanceUserGroup::getScheduleId, scheduleIdList));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 根据排班查询出考勤组id
|
// 根据排班查询出考勤组id
|
||||||
List<Long> groupIds = arrangementList.stream()
|
List<Long> groupIds = arrangementList.stream()
|
||||||
@ -203,21 +220,33 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
if (attendanceGroup != null) {
|
if (attendanceGroup != null) {
|
||||||
// 创建 AttendanceArrangementVo 对象并设置属性
|
// 创建 AttendanceArrangementVo 对象并设置属性
|
||||||
AttendanceArrangementVo vo = new AttendanceArrangementVo();
|
AttendanceArrangementVo vo = new AttendanceArrangementVo();
|
||||||
vo.setStartDate(LocalDate.from(date.atStartOfDay(ZoneId.systemDefault())));
|
vo.setStartDate(arrangementList.get(0).getStartDate());
|
||||||
vo.setEndDate(LocalDate.from(date.atStartOfDay(ZoneId.systemDefault()).plusDays(1).toInstant().minusSeconds(1)));
|
vo.setEndDate(arrangementList.get(0).getEndDate());
|
||||||
// 设置其他属性...
|
|
||||||
|
//获取到第一个排班的id
|
||||||
|
Long arrangementId = arrangementList.get(0).getId();
|
||||||
|
//根据arrangementId查询出人员组的详细信息
|
||||||
|
AttendanceGroup group = attendanceGroupMapper.selectById(arrangementId);
|
||||||
|
//将group存到vo中
|
||||||
|
vo.setAttendanceGroup(group);
|
||||||
|
|
||||||
|
//根据arrangementList查询出排班的id
|
||||||
|
List<Long> scheduleIdList = arrangementList.stream().map(AttendanceArrangement::getId).distinct().toList();
|
||||||
|
//根据排班的id查询出排班的人员详细信息
|
||||||
|
List<AttendanceUserGroup> userGroupList = userGroupMapper.selectList(Wrappers.<AttendanceUserGroup>lambdaQuery().in(AttendanceUserGroup::getScheduleId, scheduleIdList));
|
||||||
|
|
||||||
|
|
||||||
|
//新建attendanceGroup对象,将排班信息和考勤组信息添加到vo中
|
||||||
|
vo.setAttendanceGroup(attendanceGroup);
|
||||||
|
//将排班人员信息添加到排班信息中
|
||||||
|
vo.setUserGroupList(userGroupList);
|
||||||
|
|
||||||
result.add(vo);
|
result.add(vo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果 collected 不为空,则返回 result
|
|
||||||
if (!result.isEmpty()) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return TableDataInfo.build(result);
|
||||||
// 循环结束后如果 result 仍为空,则返回空列表
|
|
||||||
return Collections.emptyList();
|
|
||||||
|
|
||||||
// // 计算交集的开始时间(取较晚的开始时间)和结束时间(取较早的结束时间)
|
// // 计算交集的开始时间(取较晚的开始时间)和结束时间(取较早的结束时间)
|
||||||
// Date overlapStart = calendarStartDate.after(startDate)
|
// Date overlapStart = calendarStartDate.after(startDate)
|
||||||
@ -228,7 +257,6 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
//根据交集的时间范围查询排班信息
|
//根据交集的时间范围查询排班信息
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -243,6 +271,7 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
lqw.eq(bo.getStartDate() != null, AttendanceArrangement::getStartDate, bo.getStartDate());
|
lqw.eq(bo.getStartDate() != null, AttendanceArrangement::getStartDate, bo.getStartDate());
|
||||||
lqw.eq(bo.getEndDate() != null, AttendanceArrangement::getEndDate, bo.getEndDate());
|
lqw.eq(bo.getEndDate() != null, AttendanceArrangement::getEndDate, bo.getEndDate());
|
||||||
lqw.eq(bo.getStatus() != null, AttendanceArrangement::getStatus, bo.getStatus());
|
lqw.eq(bo.getStatus() != null, AttendanceArrangement::getStatus, bo.getStatus());
|
||||||
|
// lqw.eq(bo.getCurrentDate() != null, AttendanceArrangement::getCurrentDate, bo.getCurrentDate());
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,11 +294,11 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
|
|
||||||
judgeDate(bo, add);
|
judgeDate(bo, add);
|
||||||
|
|
||||||
AttendanceArrangementGroup attendanceArrangementGroup = new AttendanceArrangementGroup();
|
// AttendanceArrangementGroup attendanceArrangementGroup = new AttendanceArrangementGroup();
|
||||||
//向排班和考勤组中间表中插入数据
|
// //向排班和考勤组中间表中插入数据
|
||||||
attendanceArrangementGroup.setGroupId(add.getGroupId());
|
// attendanceArrangementGroup.setGroupId(add.getGroupId());
|
||||||
attendanceArrangementGroup.setArrangementId(bo.getId());
|
// attendanceArrangementGroup.setArrangementId(bo.getId());
|
||||||
arrangementGroupMapper.insert(attendanceArrangementGroup);
|
// arrangementGroupMapper.insert(attendanceArrangementGroup);
|
||||||
|
|
||||||
//取出当前新增的排班的id
|
//取出当前新增的排班的id
|
||||||
Long ArrangementId = add.getId();
|
Long ArrangementId = add.getId();
|
||||||
@ -294,7 +323,7 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
if (bo.getDateType().equals(StatusConstant.LONGTIME)) {
|
if (bo.getDateType().equals(StatusConstant.LONGTIME)) {
|
||||||
//设置长期时间为2099年12月31日
|
//设置长期时间为2099年12月31日
|
||||||
LocalDate longTimeEndDate = LocalDate.of(2099, 12, 31);
|
LocalDate longTimeEndDate = LocalDate.of(2099, 12, 31);
|
||||||
add.setEndDate(Date.from(longTimeEndDate.atStartOfDay(ZoneId.systemDefault()).toInstant()));
|
add.setEndDate(longTimeEndDate);
|
||||||
}
|
}
|
||||||
if (bo.getDateType().equals(StatusConstant.SHORTTIME)) {
|
if (bo.getDateType().equals(StatusConstant.SHORTTIME)) {
|
||||||
add.setEndDate(bo.getEndDate());
|
add.setEndDate(bo.getEndDate());
|
||||||
@ -351,7 +380,7 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
|||||||
List<Long> idList = new ArrayList<>(ids);
|
List<Long> idList = new ArrayList<>(ids);
|
||||||
|
|
||||||
//根据当前排班的id 删除attendanceArrangementGroup表中的数据
|
//根据当前排班的id 删除attendanceArrangementGroup表中的数据
|
||||||
arrangementGroupMapper.delete(Wrappers.<AttendanceArrangementGroup>lambdaQuery().in(AttendanceArrangementGroup::getArrangementId, idList));
|
// arrangementGroupMapper.delete(Wrappers.<AttendanceArrangementGroup>lambdaQuery().in(AttendanceArrangementGroup::getArrangementId, idList));
|
||||||
|
|
||||||
//根据获取的id删除attendanceUserGroup表中的数据
|
//根据获取的id删除attendanceUserGroup表中的数据
|
||||||
userGroupMapper.delete(Wrappers.<AttendanceUserGroup>lambdaQuery().in(AttendanceUserGroup::getScheduleId, idList));
|
userGroupMapper.delete(Wrappers.<AttendanceUserGroup>lambdaQuery().in(AttendanceUserGroup::getScheduleId, idList));
|
||||||
|
@ -216,6 +216,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
|||||||
* 修改前的数据校验
|
* 修改前的数据校验
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeUpdate(ServiceWorkOrders entity) {
|
private void validEntityBeforeUpdate(ServiceWorkOrders entity) {
|
||||||
|
Assert.isTrue(ObjectUtil.isNotEmpty(entity.getStatus()),"状态不能为空!");
|
||||||
LambdaQueryWrapper<ServiceWorkOrdersRecord> ordersLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ServiceWorkOrdersRecord> ordersLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getOrderId, entity.getId());
|
ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getOrderId, entity.getId());
|
||||||
ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getStatus, entity.getStatus());
|
ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getStatus, entity.getStatus());
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="org.dromara.property.mapper.AttendanceArrangementGroupMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
@ -159,12 +159,17 @@ public class SisElevatorInfoVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 呼梯摄像头
|
* 呼梯摄像头
|
||||||
*/
|
*/
|
||||||
private List<Long> remoteCallElevatorDeviceId;
|
private List<DeviceInfo> remoteCallElevatorDeviceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 梯控摄像头
|
* 梯控摄像头
|
||||||
*/
|
*/
|
||||||
private Long elevatorControlDeviceId;
|
private DeviceInfo elevatorControlDeviceId;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class DeviceInfo {
|
||||||
|
private Long deviceId;
|
||||||
|
private String deviceIp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.sis.mapper;
|
package org.dromara.sis.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.dromara.sis.domain.SisElevatorInfo;
|
import org.dromara.sis.domain.SisElevatorInfo;
|
||||||
import org.dromara.sis.domain.vo.SisElevatorInfoVo;
|
import org.dromara.sis.domain.vo.SisElevatorInfoVo;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
@ -8,8 +9,9 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|||||||
* 电梯基本信息Mapper接口
|
* 电梯基本信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author lxj
|
* @author lxj
|
||||||
* @date 2025-07-10
|
* @since 2025-07-10
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface SisElevatorInfoMapper extends BaseMapperPlus<SisElevatorInfo, SisElevatorInfoVo> {
|
public interface SisElevatorInfoMapper extends BaseMapperPlus<SisElevatorInfo, SisElevatorInfoVo> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,13 @@ import java.util.stream.Collectors;
|
|||||||
@Component
|
@Component
|
||||||
public class E8ApiUtil {
|
public class E8ApiUtil {
|
||||||
|
|
||||||
@Value("e8.url")
|
@Value("${E8Plat.url}")
|
||||||
private String BASE_URL;
|
private String BASE_URL;
|
||||||
|
|
||||||
@Value("e8.secretKey")
|
@Value("${E8Plat.secretKey}")
|
||||||
private String SECRET_KEY;
|
private String SECRET_KEY;
|
||||||
|
|
||||||
@Value("e8.key")
|
@Value("${E8Plat.key}")
|
||||||
private String KEY;
|
private String KEY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
* 电梯基本信息Service接口
|
* 电梯基本信息Service接口
|
||||||
*
|
*
|
||||||
* @author lxj
|
* @author lxj
|
||||||
* @date 2025-07-10
|
* @since 2025-07-10
|
||||||
*/
|
*/
|
||||||
public interface ISisElevatorInfoService {
|
public interface ISisElevatorInfoService {
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ import static org.dromara.common.core.constant.CodePrefixConstants.ELEVATOR_CONT
|
|||||||
* 电梯基本信息Service业务层处理
|
* 电梯基本信息Service业务层处理
|
||||||
*
|
*
|
||||||
* @author lxj
|
* @author lxj
|
||||||
* @date 2025-07-10
|
* @since 2025-07-10
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@ -57,20 +57,21 @@ public class SisElevatorInfoServiceImpl implements ISisElevatorInfoService {
|
|||||||
public SisElevatorInfoVo queryById(Long elevatorId) {
|
public SisElevatorInfoVo queryById(Long elevatorId) {
|
||||||
SisElevatorInfoVo sisElevatorInfoVo = baseMapper.selectVoById(elevatorId);
|
SisElevatorInfoVo sisElevatorInfoVo = baseMapper.selectVoById(elevatorId);
|
||||||
if (sisElevatorInfoVo == null) {
|
if (sisElevatorInfoVo == null) {
|
||||||
return sisElevatorInfoVo;
|
return null;
|
||||||
}
|
}
|
||||||
List<SisDeviceBindRef> ref = deviceBindRefService.queryByBindId(elevatorId);
|
List<SisDeviceBindRef> ref = deviceBindRefService.queryByBindId(elevatorId);
|
||||||
if (CollUtil.isNotEmpty(ref)) {
|
if (CollUtil.isNotEmpty(ref)) {
|
||||||
List<Long> remoteCallElevatorDeviceId = new ArrayList<>(ref.size());
|
List<SisElevatorInfoVo.DeviceInfo> remoteCallElevatorDeviceId = new ArrayList<>(ref.size());
|
||||||
Long elevatorControlDeviceId = null;
|
|
||||||
for (SisDeviceBindRef item : ref) {
|
for (SisDeviceBindRef item : ref) {
|
||||||
|
SisElevatorInfoVo.DeviceInfo deviceInfo = new SisElevatorInfoVo.DeviceInfo();
|
||||||
|
deviceInfo.setDeviceId(item.getDeviceId());
|
||||||
|
deviceInfo.setDeviceIp(item.getDeviceIp());
|
||||||
if (Objects.equals(item.getControlType(), ControlTypeEnum.REMOTE_CALL_ELEVATOR.getCode())) {
|
if (Objects.equals(item.getControlType(), ControlTypeEnum.REMOTE_CALL_ELEVATOR.getCode())) {
|
||||||
remoteCallElevatorDeviceId.add(item.getDeviceId());
|
remoteCallElevatorDeviceId.add(deviceInfo);
|
||||||
} else {
|
}else {
|
||||||
elevatorControlDeviceId = item.getDeviceId();
|
sisElevatorInfoVo.setElevatorControlDeviceId(deviceInfo);
|
||||||
}
|
}
|
||||||
sisElevatorInfoVo.setRemoteCallElevatorDeviceId(remoteCallElevatorDeviceId);
|
sisElevatorInfoVo.setRemoteCallElevatorDeviceId(remoteCallElevatorDeviceId);
|
||||||
sisElevatorInfoVo.setElevatorControlDeviceId(elevatorControlDeviceId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sisElevatorInfoVo;
|
return sisElevatorInfoVo;
|
||||||
@ -261,7 +262,7 @@ public class SisElevatorInfoServiceImpl implements ISisElevatorInfoService {
|
|||||||
* @return 列表
|
* @return 列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SisElevatorInfoVo> queryListByIds(Collection<Long> ids){
|
public List<SisElevatorInfoVo> queryListByIds(Collection<Long> ids) {
|
||||||
return baseMapper.selectVoByIds(ids);
|
return baseMapper.selectVoByIds(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public class SyncLiftAuthTask {
|
|||||||
/**
|
/**
|
||||||
* 同步电梯权限
|
* 同步电梯权限
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "*/5 * 6-22 * * ?")
|
// @Scheduled(cron = "*/5 * 6-22 * * ?")
|
||||||
public void syncLiftAuth() {
|
public void syncLiftAuth() {
|
||||||
QueryDto dto = new QueryDto();
|
QueryDto dto = new QueryDto();
|
||||||
dto.setPageIndex(1);
|
dto.setPageIndex(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user