完善定时请假的逻辑

This commit is contained in:
2025-02-27 15:16:33 +08:00
parent 008cd430ef
commit f044bc2bd0
7 changed files with 161 additions and 6 deletions

View File

@ -2,6 +2,7 @@ package com.ruoyi.wgz.bo.req;
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;
@ -11,5 +12,6 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@ApiModel("日报打卡·日报记录请求对象")
public class WgzAppDailyRecordReq extends PageReq {
@ApiModelProperty(value = "务工者Id",hidden = true)
private Long userId;
}

View File

@ -15,6 +15,18 @@ import java.util.Map;
@Accessors(chain = true)
@ApiModel("日报日历结构返回对象")
public class WgzUserDailyCalendarRes implements Serializable {
@ApiModelProperty("招工主题")
private String recruitName;
@ApiModelProperty("审批人ID")
private Long userId;
@ApiModelProperty("审批人名称")
private String username;
@ApiModelProperty("审批人头像")
private String avatarName;
@ApiModelProperty("日报日历")
private Map<String, WgzAppAttachmentAcquisitionTwo> dailyCalendar;
}

View File

@ -25,7 +25,7 @@ public interface WgzDailyClockMapper extends BaseMapperPlus<WgzDailyClock> {
* @param page 分页对象
* @return 分页查询结果
*/
Page<WgzAppUserDailyRecordRes> userDailyRecordListPage(Page<WgzAppDailyRecordReq> page);
Page<WgzAppUserDailyRecordRes> userDailyRecordListPage(Page<WgzAppDailyRecordReq> page, @Param("req") WgzAppDailyRecordReq req);
Page<BgtDailyClockListVO> appQueryPageList(@Param("page") Page<BgtDailyClockListDTO> page, @Param("dto") BgtDailyClockListDTO dto);
}

View File

@ -63,6 +63,9 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
@Autowired
private IBgtProjectRecruitService iBgtProjectRecruitService;
@Autowired
private IBgtUserService iBgtUserService;
@Override
public WgzDailyClock queryById(Long id){
return getById(id);
@ -174,7 +177,19 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
}
});
});
return new WgzUserDailyCalendarRes().setDailyCalendar(fh);
//4、获取当前务工者的招工信息的主题及招工创建人的基本信息
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(SecurityUtils.getAppUserId());
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getId());
BgtUser one = iBgtUserService.getOne(
new LambdaQueryWrapper<BgtUser>().
eq(BgtUser::getUserId, appById.getUserId())
);
return new WgzUserDailyCalendarRes().
setDailyCalendar(fh).
setRecruitName(appById.getRecruitName()).
setUserId(one.getUserId()).
setUsername(one.getUsername()).
setAvatarName(one.getAvatarName());
}
@Override
@ -195,10 +210,11 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
@Override
public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(WgzAppDailyRecordReq req) {
req.setUserId(SecurityUtils.getAppUserId());
Page<WgzAppDailyRecordReq> pe = new Page<>();
pe.setCurrent(req.getPageNum());
pe.setSize(req.getPageSize());
return PageUtils.buildDataInfo(baseMapper.userDailyRecordListPage(pe));
return PageUtils.buildDataInfo(baseMapper.userDailyRecordListPage(pe,req));
}
@Override