完成请假模块
This commit is contained in:
@ -60,4 +60,16 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
||||
*/
|
||||
List<BgtProjectRecruitApplyVO> appQueryList(BgtProjectRecruitApplyQueryDTO dto);
|
||||
|
||||
/**
|
||||
* LC-APP相关
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* 根据用户唯一标识去查询当前进场的工地信息
|
||||
*/
|
||||
BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id);
|
||||
|
||||
}
|
||||
|
@ -66,4 +66,17 @@ public interface IBgtProjectRecruitService extends IServicePlus<BgtProjectRecrui
|
||||
* @return
|
||||
*/
|
||||
BgtProjectRecruitDetailVO appQueryById(Long id);
|
||||
|
||||
/**
|
||||
* LC-APP相关
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* 根据招工id获取到具体招工信息
|
||||
*/
|
||||
BgtProjectRecruit getAppById(Long id);
|
||||
|
||||
}
|
||||
|
@ -87,4 +87,30 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
public List<BgtProjectRecruitApplyVO> appQueryList(BgtProjectRecruitApplyQueryDTO dto) {
|
||||
return baseMapper.appQueryList(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* LC-APP相关
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* 根据用户唯一标识去查询当前进场的工地信息
|
||||
*/
|
||||
@Override
|
||||
public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) {
|
||||
LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(BgtProjectRecruitApply::getUserId, id).
|
||||
eq(BgtProjectRecruitApply::getStatus, "1").
|
||||
isNotNull(BgtProjectRecruitApply::getEntryTime).
|
||||
ne(BgtProjectRecruitApply::getEntryTime, "");
|
||||
List<BgtProjectRecruitApply> bgtProjectRecruitApplies = baseMapper.selectList(lqw);
|
||||
if (bgtProjectRecruitApplies.size()>1){
|
||||
throw new RuntimeException("异常,查询到用户同时在多个工地务工!");
|
||||
}
|
||||
return bgtProjectRecruitApplies.get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -138,4 +138,17 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* LC-APP相关
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
* =================================================================================================================
|
||||
*/
|
||||
|
||||
@Override
|
||||
public BgtProjectRecruit getAppById(Long id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
26
ruoyi-system/src/main/java/com/ruoyi/common/bo/PageReq.java
Normal file
26
ruoyi-system/src/main/java/com/ruoyi/common/bo/PageReq.java
Normal file
@ -0,0 +1,26 @@
|
||||
package com.ruoyi.common.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@ApiModel(value = "PageReq对象", description = "分页请求对象")
|
||||
public class PageReq implements Serializable {
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.wgz.bo.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("请假·取消请假请求对象")
|
||||
public class WgzAppCancelLeaveReq implements Serializable {
|
||||
@ApiModelProperty("主键自增ID")
|
||||
private Long id;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.ruoyi.wgz.bo.req;
|
||||
|
||||
import com.ruoyi.common.bo.PageReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("请假·历史请假记录请求对象")
|
||||
public class WgzAppLeaveHistoryListPageReq extends PageReq {
|
||||
}
|
@ -1,8 +1,5 @@
|
||||
package com.ruoyi.wgz.bo.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -12,13 +9,12 @@ import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("务工者APP-提交请假请求对象")
|
||||
public class WgzAppSubmitLeaveRes implements Serializable {
|
||||
public class WgzAppSubmitLeaveReq implements Serializable {
|
||||
/** 请假类型(字典) */
|
||||
@Excel(name = "请假类型" , readConverterExp = "字=典")
|
||||
@ApiModelProperty("请假类型(字典)")
|
@ -0,0 +1,81 @@
|
||||
package com.ruoyi.wgz.bo.res;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("请假-历史请假列表返回对象")
|
||||
public class WgzAppLeaveHistoryListPageRes implements Serializable {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long recruitId;
|
||||
|
||||
@ApiModelProperty("招工主题")
|
||||
private String subject;
|
||||
|
||||
@ApiModelProperty("请假类型(字典)")
|
||||
private String leaveType;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty("请假事由")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty("审核人ID")
|
||||
private Long auditorUserId;
|
||||
|
||||
@ApiModelProperty("审核人头像")
|
||||
private Long auditorHead;
|
||||
|
||||
@ApiModelProperty("审核人名称")
|
||||
private Long auditorName;
|
||||
|
||||
@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝 4已取消)")
|
||||
private String auditorType;
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditorOpinion;
|
||||
|
||||
@ApiModelProperty("同意|拒绝时间")
|
||||
private LocalDateTime auditorTime;
|
||||
|
||||
@ApiModelProperty("上班时间")
|
||||
private LocalTime workingTime;
|
||||
|
||||
@ApiModelProperty("下班时间")
|
||||
private LocalTime closingTime;
|
||||
|
||||
@ApiModelProperty("取消请假")
|
||||
private LocalDateTime cancelLeave;
|
||||
|
||||
@ApiModelProperty("创建者")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty("请假时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新者")
|
||||
private String updateBy;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.wgz.bo.res;
|
||||
|
||||
import com.ruoyi.wgz.bo.rests.WgzAppAttachmentAcquisitionTwo;
|
||||
import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -9,14 +8,13 @@ import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("日报日历结构返回对象")
|
||||
public class WfzUserDailyCalendarRes implements Serializable {
|
||||
public class WgzUserDailyCalendarRes implements Serializable {
|
||||
@ApiModelProperty("日报日历")
|
||||
private Map<String, WgzAppAttachmentAcquisitionTwo> dailyCalendar;
|
||||
}
|
@ -72,8 +72,8 @@ public class WgzLeave implements Serializable {
|
||||
private Long auditorUserId;
|
||||
|
||||
/** 审核状态(0待审核 1审核中 2已同意 3已拒绝) */
|
||||
@Excel(name = "审核状态" , readConverterExp = "0=待审核,1=审核中,2=已同意,3=已拒绝")
|
||||
@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝)")
|
||||
@Excel(name = "审核状态" , readConverterExp = "0=待审核,1=审核中,2=已同意,3=已拒绝,4=已取消")
|
||||
@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝 4=已取消)")
|
||||
private String auditorType;
|
||||
|
||||
/** 审核意见 */
|
||||
@ -96,6 +96,11 @@ public class WgzLeave implements Serializable {
|
||||
@ApiModelProperty("下班时间")
|
||||
private LocalTime closingTime;
|
||||
|
||||
/** 取消请假 */
|
||||
@Excel(name = "取消请假" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("取消请假")
|
||||
private LocalDateTime cancelLeave;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.ruoyi.wgz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||
import com.ruoyi.wgz.domain.WgzLeave;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
@ -15,4 +18,11 @@ import org.apache.ibatis.annotations.CacheNamespace;
|
||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||
public interface WgzLeaveMapper extends BaseMapperPlus<WgzLeave> {
|
||||
|
||||
/**
|
||||
* 查询关联数据并支持分页
|
||||
* @param page 分页对象
|
||||
* @return 分页查询结果
|
||||
*/
|
||||
Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(Page<WgzAppLeaveHistoryListPageRes> page);
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
package com.ruoyi.wgz.service;
|
||||
|
||||
import com.ruoyi.wgz.bo.req.WgzAppJobListingReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.res.WfzUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.domain.WgzDailyClock;
|
||||
import com.ruoyi.wgz.bo.WgzDailyClockQueryBo;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
@ -67,5 +66,5 @@ public interface IWgzDailyClockService extends IServicePlus<WgzDailyClock> {
|
||||
/**
|
||||
* 日报日历
|
||||
*/
|
||||
WfzUserDailyCalendarRes userDailyCalendar(@Validated WgzAppUserDailyCalendarRes req);
|
||||
WgzUserDailyCalendarRes userDailyCalendar(@Validated WgzAppUserDailyCalendarRes req);
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
package com.ruoyi.wgz.service;
|
||||
|
||||
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveRes;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppCancelLeaveReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||
import com.ruoyi.wgz.domain.WgzLeave;
|
||||
import com.ruoyi.wgz.bo.WgzLeaveQueryBo;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.sun.org.apache.xpath.internal.operations.Bool;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@ -68,5 +70,15 @@ public interface IWgzLeaveService extends IServicePlus<WgzLeave> {
|
||||
/*
|
||||
* 提交请假申请
|
||||
*/
|
||||
Boolean userSubmitLeave(@Validated @RequestBody WgzAppSubmitLeaveRes req);
|
||||
Boolean userSubmitLeave(@Validated @RequestBody WgzAppSubmitLeaveReq req);
|
||||
|
||||
/*
|
||||
* 历史请假申请记录
|
||||
*/
|
||||
TableDataInfo<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(@Validated WgzAppLeaveHistoryListPageReq req);
|
||||
|
||||
/*
|
||||
* 取消请假申请
|
||||
*/
|
||||
Boolean userCancelLeave(@Validated @RequestBody WgzAppCancelLeaveReq req);
|
||||
}
|
||||
|
@ -5,10 +5,9 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.core.page.PagePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.res.WfzUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.rests.WgzAppAttachmentAcquisitionTwo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
@ -108,7 +107,7 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
*/
|
||||
|
||||
@Override
|
||||
public WfzUserDailyCalendarRes userDailyCalendar(WgzAppUserDailyCalendarRes req) {
|
||||
public WgzUserDailyCalendarRes userDailyCalendar(WgzAppUserDailyCalendarRes req) {
|
||||
//1、获取当月的所有日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
@ -144,6 +143,6 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
}
|
||||
});
|
||||
});
|
||||
return new WfzUserDailyCalendarRes().setDailyCalendar(fh);
|
||||
return new WgzUserDailyCalendarRes().setDailyCalendar(fh);
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,24 @@ package com.ruoyi.wgz.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectTaskProgressQueryDTO;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.core.page.PagePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveRes;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppCancelLeaveReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||
import com.ruoyi.wgz.domain.WgzDailyClock;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -15,7 +28,10 @@ import com.ruoyi.wgz.bo.WgzLeaveQueryBo;
|
||||
import com.ruoyi.wgz.domain.WgzLeave;
|
||||
import com.ruoyi.wgz.mapper.WgzLeaveMapper;
|
||||
import com.ruoyi.wgz.service.IWgzLeaveService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
@ -28,6 +44,11 @@ import java.util.Collection;
|
||||
*/
|
||||
@Service
|
||||
public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeave> implements IWgzLeaveService {
|
||||
@Autowired
|
||||
private IBgtProjectRecruitApplyService iBgtProjectRecruitApplyService;
|
||||
|
||||
@Autowired
|
||||
private IBgtProjectRecruitService iBgtProjectRecruitService;
|
||||
|
||||
@Override
|
||||
public WgzLeave queryById(Long id){
|
||||
@ -102,8 +123,45 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
||||
*/
|
||||
|
||||
@Override
|
||||
public Boolean userSubmitLeave(WgzAppSubmitLeaveRes req) {
|
||||
//1、
|
||||
return null;
|
||||
@Transactional
|
||||
public Boolean userSubmitLeave(WgzAppSubmitLeaveReq req) {
|
||||
//1、现获取用户的唯一标识
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
//2、根据唯一标识获取到当前用户的招工
|
||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
//3、根据招工id获取到具体招工信息
|
||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getId());
|
||||
//4、获取上下班时间 是从appById中获取,但是表中还未创建字段,先省略
|
||||
LocalTime s = LocalTime.of(9, 0);
|
||||
LocalTime x = LocalTime.of(18, 0);
|
||||
//5、组装请假对象数据 并插入
|
||||
WgzLeave wgzLeave = new WgzLeave().
|
||||
setRecruitId(by.getId()).
|
||||
setSubject(appById.getRecruitName()).
|
||||
setLeaveType(req.getLeaveType()).
|
||||
setStartTime(req.getStartTime()).
|
||||
setEndTime(req.getEndTime()).
|
||||
setReason(req.getReason()).
|
||||
setAuditorUserId(appById.getUserId()).
|
||||
setWorkingTime(s).
|
||||
setClosingTime(x);
|
||||
return baseMapper.insert(wgzLeave)>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(WgzAppLeaveHistoryListPageReq req) {
|
||||
Page<WgzAppLeaveHistoryListPageRes> queryDTOPage = new Page<>();
|
||||
queryDTOPage.setCurrent(req.getPageNum());
|
||||
queryDTOPage.setSize(req.getPageSize());
|
||||
return PageUtils.buildDataInfo(baseMapper.userLeaveHistoryListPage(queryDTOPage));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean userCancelLeave(WgzAppCancelLeaveReq req) {
|
||||
WgzLeave wgzLeave = new WgzLeave().
|
||||
setId(req.getId()).
|
||||
setAuditorType("4").
|
||||
setCancelLeave(LocalDateTime.now());
|
||||
return baseMapper.updateById(wgzLeave)>0;
|
||||
}
|
||||
}
|
||||
|
@ -26,5 +26,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="userLeaveHistoryListPage" resultType="com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes">
|
||||
SELECT
|
||||
a.*,
|
||||
b.username,
|
||||
b.avatar_name as avatarName
|
||||
FROM
|
||||
wgz_leave a
|
||||
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
|
||||
WHERE
|
||||
a.del_flag = 0
|
||||
ORDER BY
|
||||
a.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user