完成日报模块
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
package com.ruoyi.web.controller.wgz.controller;
|
||||
|
||||
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
import com.ruoyi.common.bo.AnnexQueryBo;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@ -10,6 +13,7 @@ import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.domain.Annex;
|
||||
import com.ruoyi.common.service.IAnnexService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
import com.ruoyi.wgz.bo.res.*;
|
||||
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperThree;
|
||||
@ -28,8 +32,12 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* APP务工者Controller
|
||||
@ -70,6 +78,9 @@ public class WgzAppController {
|
||||
@Autowired
|
||||
private IWgzLeaveService iWgzLeaveService;
|
||||
|
||||
@Autowired
|
||||
private IBgtProjectRecruitApplyService iBgtProjectRecruitApplyService;
|
||||
|
||||
|
||||
/**
|
||||
* 【注册】务工者注册
|
||||
@ -204,11 +215,41 @@ public class WgzAppController {
|
||||
@ApiOperation("日报-日报日历")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyCalendar')")
|
||||
@GetMapping("/WgzUserDailyCalendar")
|
||||
public AjaxResult<WgzUserDailyCalendarRes> userDailyCalendar(@Validated WgzAppUserDailyCalendarRes req) {
|
||||
public AjaxResult<WgzUserDailyCalendarRes> userDailyCalendar(@Validated WgzAppUserDailyCalendarReq req) {
|
||||
WgzUserDailyCalendarRes wfzUserDailyCalendarRes = iWgzDailyClockService.userDailyCalendar(req);
|
||||
return AjaxResult.success(wfzUserDailyCalendarRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【日报】日报日历·日报记录
|
||||
*/
|
||||
@ApiOperation("日报-日报日历·日报记录")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyRecord')")
|
||||
@GetMapping("/WgzUserDailyRecord")
|
||||
public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(@Validated WgzAppUserDailyRecordReq req) {
|
||||
return iWgzDailyClockService.userDailyRecord(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【日报】日报日历·日报记录
|
||||
*/
|
||||
@ApiOperation("日报-日报日历·查看日报")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCheckDailyNewspaper')")
|
||||
@GetMapping("/WgzUserCheckDailyNewspaper/{id}")
|
||||
public AjaxResult<WgzDailyClock> userCheckDailyNewspaper(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iWgzDailyClockService.userCheckDailyNewspaper(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡】 提交上下班打卡
|
||||
*/
|
||||
@ApiOperation("【考勤打卡】【打卡】 提交上下班打卡)")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitTheClock')")
|
||||
@PostMapping("/WgzAppUserSubmitTheClock")
|
||||
public AjaxResult<Boolean> userSubmitTheClock() {
|
||||
return AjaxResult.success(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
@ -260,6 +301,26 @@ public class WgzAppController {
|
||||
return AjaxResult.success(wgzAppAttachmentAcquisitionRes.setWgzAutonymAnnex(resData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【我的】【请假】 获取上下班时间
|
||||
* 【考勤打卡】【打卡】 获取上下班时间
|
||||
*/
|
||||
@ApiOperation("通用·获取上下班时间")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetCommutingTime')")
|
||||
@GetMapping("/WgzAppUserGetCommutingTime")//PageReq
|
||||
public AjaxResult<Map<String, LocalTime>> userGetCommutingTime() {
|
||||
//1、获取当前人、当前工的上下班时间范围
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
//2、根据唯一标识获取到当前用户的招工
|
||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
//3、根据招工id获取到具体招工信息
|
||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getId());
|
||||
Map<String, LocalTime> mp = new HashMap<>();
|
||||
mp.put("beginWorkTime", appById.getBeginWorkTime());
|
||||
mp.put("endWorkTime", appById.getEndWorkTime());
|
||||
return AjaxResult.success(mp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -3,8 +3,8 @@ gen:
|
||||
# 作者
|
||||
author: ruoyi
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.ruoyi.common
|
||||
packageName: com.ruoyi.wgz
|
||||
# 自动去除表前缀,默认是false
|
||||
autoRemovePre: true
|
||||
autoRemovePre: false
|
||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||
tablePrefix: common_
|
||||
tablePrefix: wgz_
|
||||
|
@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 包工头招工对象 bgt_project_recruit
|
||||
@ -125,10 +126,10 @@ public class BgtProjectRecruit implements Serializable {
|
||||
private String recruitRequirement;
|
||||
|
||||
@ApiModelProperty("上班时间")
|
||||
private String beginWorkTime;
|
||||
private LocalTime beginWorkTime;
|
||||
|
||||
@ApiModelProperty("下班时间")
|
||||
private String endWorkTime;
|
||||
private LocalTime endWorkTime;
|
||||
|
||||
@ApiModelProperty("创建者ID")
|
||||
private Long userId;
|
||||
|
@ -13,7 +13,7 @@ import java.io.Serializable;
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("务工者APP-日报日历请求对象")
|
||||
public class WgzAppUserDailyCalendarRes implements Serializable {
|
||||
public class WgzAppUserDailyCalendarReq implements Serializable {
|
||||
@ApiModelProperty("年月日期:2025-02")
|
||||
@NotBlank(message = "年月不能为空")
|
||||
private String yearMonth;
|
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.wgz.bo.req;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.bo.PageReq;
|
||||
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;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("日报打卡·日报记录请求对象")
|
||||
public class WgzAppUserDailyRecordReq extends PageReq {
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.ruoyi.wgz.bo.res;
|
||||
|
||||
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;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("日报打卡·日报记录返回对象")
|
||||
public class WgzAppUserDailyRecordRes implements Serializable {
|
||||
|
||||
@ApiModelProperty("自增ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long recruitId;
|
||||
|
||||
@ApiModelProperty("人员ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("人员姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("人员头像")
|
||||
private String avatarName;
|
||||
|
||||
@ApiModelProperty("日报时间")
|
||||
private LocalDateTime dilyTime;
|
||||
|
||||
@ApiModelProperty("今日完成工作")
|
||||
private String finishToday;
|
||||
|
||||
@ApiModelProperty("审核状态(0未读 1未审核 2已审核)")
|
||||
private String auditorType;
|
||||
|
||||
}
|
@ -102,15 +102,10 @@ public class WgzDailyClock implements Serializable {
|
||||
private String auditorOpinion;
|
||||
|
||||
/** 已读|审核时间 */
|
||||
@Excel(name = "已读|审核时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("已读|审核时间")
|
||||
@Excel(name = "未审核|审核时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("未审核|审核时间")
|
||||
private LocalDateTime auditorTime;
|
||||
|
||||
/** 类型(0正常 1迟到 2早退 3上班缺卡 4下班缺卡 5补卡 6请假) */
|
||||
@Excel(name = "类型" , readConverterExp = "0=正常,1=迟到,2=早退,3=上班缺卡,4=下班缺卡,5=补卡,6=请假")
|
||||
@ApiModelProperty("类型(0正常 1迟到 2早退 3上班缺卡 4下班缺卡 5补卡 6请假)")
|
||||
private String exceptionType;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
|
@ -41,6 +41,11 @@ public class WgzLeave implements Serializable {
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long recruitId;
|
||||
|
||||
/** 项目ID */
|
||||
@Excel(name = "请假人")
|
||||
@ApiModelProperty("请假人")
|
||||
private Long userId;
|
||||
|
||||
/** 招工主题 */
|
||||
@Excel(name = "招工主题")
|
||||
@ApiModelProperty("招工主题")
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.ruoyi.wgz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes;
|
||||
import com.ruoyi.wgz.domain.WgzDailyClock;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
@ -14,5 +17,10 @@ import org.apache.ibatis.annotations.CacheNamespace;
|
||||
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||
public interface WgzDailyClockMapper extends BaseMapperPlus<WgzDailyClock> {
|
||||
|
||||
/**
|
||||
* 查询关联数据并支持分页
|
||||
* @param page 分页对象
|
||||
* @return 分页查询结果
|
||||
*/
|
||||
Page<WgzAppUserDailyRecordRes> userDailyRecordListPage(Page<WgzAppUserDailyRecordRes> page);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.wgz.service;
|
||||
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyCalendarReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyRecordReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.domain.WgzDailyClock;
|
||||
import com.ruoyi.wgz.bo.WgzDailyClockQueryBo;
|
||||
@ -66,5 +68,15 @@ public interface IWgzDailyClockService extends IServicePlus<WgzDailyClock> {
|
||||
/**
|
||||
* 日报日历
|
||||
*/
|
||||
WgzUserDailyCalendarRes userDailyCalendar(@Validated WgzAppUserDailyCalendarRes req);
|
||||
WgzUserDailyCalendarRes userDailyCalendar(@Validated WgzAppUserDailyCalendarReq req);
|
||||
|
||||
/**
|
||||
* 日报日历·日报记录(历史记录分页查询)
|
||||
*/
|
||||
TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(@Validated WgzAppUserDailyRecordReq req);
|
||||
|
||||
/**
|
||||
* 日报日历·日报记录(历史记录分页查询)
|
||||
*/
|
||||
WgzDailyClock userCheckDailyNewspaper(Long id);
|
||||
}
|
||||
|
@ -11,8 +11,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 请假Service接口
|
||||
@ -81,4 +83,9 @@ public interface IWgzLeaveService extends IServicePlus<WgzLeave> {
|
||||
* 取消请假申请
|
||||
*/
|
||||
Boolean userCancelLeave(@Validated @RequestBody WgzAppCancelLeaveReq req);
|
||||
|
||||
/*
|
||||
* 查看指定人、指定项目、指定月是否请假
|
||||
*/
|
||||
Map<LocalDate, LocalDate> selectByUserCancelLeave(String yearMonth);
|
||||
}
|
||||
|
@ -6,9 +6,14 @@ 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.TableDataInfo;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyCalendarReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppUserDailyRecordReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzUserDailyCalendarRes;
|
||||
import com.ruoyi.wgz.bo.rests.WgzAppAttachmentAcquisitionTwo;
|
||||
import com.ruoyi.wgz.service.IWgzLeaveService;
|
||||
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;
|
||||
@ -30,6 +35,8 @@ import java.util.*;
|
||||
*/
|
||||
@Service
|
||||
public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMapper, WgzDailyClock> implements IWgzDailyClockService {
|
||||
@Autowired
|
||||
private IWgzLeaveService iWgzLeaveService;
|
||||
|
||||
@Override
|
||||
public WgzDailyClock queryById(Long id){
|
||||
@ -64,7 +71,6 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getAuditorType()), WgzDailyClock::getAuditorType, bo.getAuditorType());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getAuditorOpinion()), WgzDailyClock::getAuditorOpinion, bo.getAuditorOpinion());
|
||||
lqw.eq(bo.getAuditorTime() != null, WgzDailyClock::getAuditorTime, bo.getAuditorTime());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getExceptionType()), WgzDailyClock::getExceptionType, bo.getExceptionType());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -107,7 +113,7 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
*/
|
||||
|
||||
@Override
|
||||
public WgzUserDailyCalendarRes userDailyCalendar(WgzAppUserDailyCalendarRes req) {
|
||||
public WgzUserDailyCalendarRes userDailyCalendar(WgzAppUserDailyCalendarReq req) {
|
||||
//1、获取当月的所有日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
@ -122,9 +128,9 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
QueryWrapper<WgzDailyClock> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.apply("DATE_FORMAT(dily_time, '%Y-%m') = {0}", req.getYearMonth()); // 使用 apply 方法添加自定义 SQL 条件
|
||||
List<WgzDailyClock> wgzDailyClocks = baseMapper.selectList(queryWrapper);
|
||||
//3、查看当前人,当前月是否有请假
|
||||
|
||||
//4、将获取的年月与数据库中的日期进行比对,然后填充数据
|
||||
//3、查看当前人、当前项目、当前月是否有请假
|
||||
Map<LocalDate, LocalDate> ll = iWgzLeaveService.selectByUserCancelLeave(req.getYearMonth());
|
||||
//4、将获取的年月与数据库中的日期进行比对,然后填充数据
|
||||
Map<String, WgzAppAttachmentAcquisitionTwo> fh = new HashMap<>();
|
||||
dates.forEach(date -> {
|
||||
wgzDailyClocks.forEach(wgzDailyClock -> {
|
||||
@ -136,13 +142,26 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
setId(wgzDailyClock.getId()).
|
||||
setDilyTime(wgzDailyClock.getDilyTime()).
|
||||
setPnchOsition(wgzDailyClock.getPnchOsition());
|
||||
// if (StrUtil.isNotBlank(wgzDailyClock.getDailyMark())) {
|
||||
// wgzAppAttachmentAcquisitionTwo.setStatus("2") //请假
|
||||
// }
|
||||
if (ll.get(clockDate).equals(clockDate)) {
|
||||
wgzAppAttachmentAcquisitionTwo.setStatus("2"); //全天请假
|
||||
}
|
||||
fh.put(date.toString(),wgzAppAttachmentAcquisitionTwo);
|
||||
}
|
||||
});
|
||||
});
|
||||
return new WgzUserDailyCalendarRes().setDailyCalendar(fh);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(WgzAppUserDailyRecordReq req) {
|
||||
Page<WgzAppUserDailyRecordRes> pe = new Page<>();
|
||||
pe.setCurrent(req.getPageNum());
|
||||
pe.setSize(req.getPageSize());
|
||||
return PageUtils.buildDataInfo(baseMapper.userDailyRecordListPage(pe));
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgzDailyClock userCheckDailyNewspaper(Long id) {
|
||||
return getById(id);
|
||||
}
|
||||
}
|
||||
|
@ -30,11 +30,11 @@ import com.ruoyi.wgz.mapper.WgzLeaveMapper;
|
||||
import com.ruoyi.wgz.service.IWgzLeaveService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 请假Service业务层处理
|
||||
@ -131,20 +131,18 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
||||
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、组装请假对象数据 并插入
|
||||
//6、组装请假对象数据 并插入
|
||||
WgzLeave wgzLeave = new WgzLeave().
|
||||
setRecruitId(by.getId()).
|
||||
setSubject(appById.getRecruitName()).
|
||||
setUserId(appUserId).
|
||||
setLeaveType(req.getLeaveType()).
|
||||
setStartTime(req.getStartTime()).
|
||||
setEndTime(req.getEndTime()).
|
||||
setReason(req.getReason()).
|
||||
setAuditorUserId(appById.getUserId()).
|
||||
setWorkingTime(s).
|
||||
setClosingTime(x);
|
||||
setWorkingTime(appById.getBeginWorkTime()).
|
||||
setClosingTime(appById.getEndWorkTime());
|
||||
return baseMapper.insert(wgzLeave)>0;
|
||||
}
|
||||
|
||||
@ -164,4 +162,26 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
||||
setCancelLeave(LocalDateTime.now());
|
||||
return baseMapper.updateById(wgzLeave)>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<LocalDate, LocalDate> selectByUserCancelLeave(String yearMonth) {
|
||||
Map<LocalDate, LocalDate> ld = new HashMap<>();
|
||||
//1、现获取用户的唯一标识
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
//2、根据唯一标识获取到当前用户的招工
|
||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
//2、查询请假表
|
||||
LambdaQueryWrapper<WgzLeave> apply = new LambdaQueryWrapper<WgzLeave>().
|
||||
eq(WgzLeave::getUserId, appUserId).
|
||||
eq(WgzLeave::getRecruitId, by.getId()).
|
||||
eq(WgzLeave::getAuditorType, "2")
|
||||
.apply("date_format(start_time,'%Y%m') = {0}", yearMonth);
|
||||
List<WgzLeave> wgzLeaves = baseMapper.selectList(apply);
|
||||
wgzLeaves.forEach( leave -> {
|
||||
LocalDateTime startTime = leave.getStartTime();
|
||||
LocalDate localDate = startTime.toLocalDate();
|
||||
ld.put(localDate,localDate);
|
||||
});
|
||||
return ld;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="auditorType" column="auditor_type"/>
|
||||
<result property="auditorOpinion" column="auditor_opinion"/>
|
||||
<result property="auditorTime" column="auditor_time"/>
|
||||
<result property="exceptionType" column="exception_type"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
@ -29,5 +28,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="userDailyRecordListPage" resultType="com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes">
|
||||
SELECT
|
||||
a.id,
|
||||
a.recruit_id,
|
||||
a.user_id,
|
||||
b.username,
|
||||
b.avatar_name,
|
||||
a.dily_time,
|
||||
a.finish_today,
|
||||
a.auditor_type
|
||||
FROM
|
||||
wgz_daily_clock a
|
||||
LEFT JOIN bgt_user b ON (a.user_id = b.user_id and b.del_flag = 0)
|
||||
WHERE
|
||||
a.del_flag = 0
|
||||
ORDER BY
|
||||
a.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT
|
||||
a.*,
|
||||
b.username,
|
||||
b.avatar_name as avatarName
|
||||
b.avatar_name
|
||||
FROM
|
||||
wgz_leave a
|
||||
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
|
||||
|
@ -5,7 +5,7 @@ VUE_APP_TITLE = RuoYi-Vue-Plus后台管理系统
|
||||
ENV = 'development'
|
||||
|
||||
# 若依管理系统/开发环境
|
||||
VUE_APP_BASE_API = 'http://192.168.110.3:9099/ruoyi'
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:9099/ruoyi'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
Reference in New Issue
Block a user