考勤与请假增加招工申请主键自增id

This commit is contained in:
2025-03-24 09:54:48 +08:00
parent 70e3107cbe
commit 63a63a2330
8 changed files with 29 additions and 5 deletions

View File

@ -17,6 +17,7 @@ import com.ruoyi.bgt.mapper.BgtProjectRecruitApplyMapper;
import com.ruoyi.bgt.service.IBgtMessageService; import com.ruoyi.bgt.service.IBgtMessageService;
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
import com.ruoyi.bgt.service.IBgtProjectRecruitService; import com.ruoyi.bgt.service.IBgtProjectRecruitService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
@ -32,6 +33,7 @@ import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.wgz.bo.req.WgzAppConfirmRegistrationReq; import com.ruoyi.wgz.bo.req.WgzAppConfirmRegistrationReq;
import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq; import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq;
import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes; import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes;
import com.ruoyi.wgz.bo.res.WgzAppUserScoreQuery;
import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo; import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo;
import com.ruoyi.wgz.domain.WgzMessage; import com.ruoyi.wgz.domain.WgzMessage;
import com.ruoyi.wgz.domain.WgzScoreRecord; import com.ruoyi.wgz.domain.WgzScoreRecord;
@ -107,6 +109,9 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
@Lazy @Lazy
private IWgzPayCalculationService payCalculationService; private IWgzPayCalculationService payCalculationService;
@Autowired
private IWgzQuestionSaveService iWgzQuestionSaveService;
@Override @Override
public BgtProjectRecruitApply queryById(Long id) { public BgtProjectRecruitApply queryById(Long id) {
return getById(id); return getById(id);
@ -370,6 +375,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
if (byId.getIdentityCard() == null || byId.getIdentityCard()=="") { if (byId.getIdentityCard() == null || byId.getIdentityCard()=="") {
throw new RuntimeException("当前用户还未实名认证!"); throw new RuntimeException("当前用户还未实名认证!");
} }
// //3-1、判断当前分数是否及格如若不及格不能申请项目
// WgzAppUserScoreQuery coreQuert = iWgzQuestionSaveService.userScoreQuery(appUserId);
// if (coreQuert.getIsPass().equals("2")){
// throw new RuntimeException("当前用户分数未及格!");
// }
//3-2、是否已有工地 //3-2、是否已有工地
Integer i = baseMapper.selectCount( Integer i = baseMapper.selectCount(
new LambdaQueryWrapper<BgtProjectRecruitApply>(). new LambdaQueryWrapper<BgtProjectRecruitApply>().

View File

@ -8,8 +8,8 @@ package com.ruoyi.common.util;
public class ValidUtil { public class ValidUtil {
public static boolean isValidIdentityCard(String identityCard) { public static boolean isValidIdentityCard(String identityCard) {
// 简单的身份证号校验逻辑,可以根据需要进行更复杂的校验 // 允许15位纯数字或者18位身份证18位身份证最后一位可以是数字或字母X/x
return identityCard != null && identityCard.matches("\\d{15}|\\d{18}"); return identityCard != null && identityCard.matches("\\d{15}|\\d{17}[\\dXx]");
} }
public static boolean isValidBankCard(String bankCard) { public static boolean isValidBankCard(String bankCard) {

View File

@ -193,9 +193,9 @@ public class BusinessTask
//表示有上班缺卡,添加缺卡信息 //表示有上班缺卡,添加缺卡信息
if (count == 0) { if (count == 0) {
//添加缺卡信息 //添加缺卡信息
System.out.println("上班缺卡-------"+by.getUserId());
WgzAttendance attendance = new WgzAttendance() WgzAttendance attendance = new WgzAttendance()
.setRecruitId(by.getRecruitId()) .setRecruitId(by.getRecruitId())
.setApplyKey(by.getId())
.setUserId(by.getUserId()) .setUserId(by.getUserId())
.setDailyWage(recruit.getRecruitAmount()) .setDailyWage(recruit.getRecruitAmount())
.setDate(now) .setDate(now)
@ -369,6 +369,7 @@ public class BusinessTask
//获取到请假天数 //获取到请假天数
WgzAttendance wgzAttendance = new WgzAttendance(). WgzAttendance wgzAttendance = new WgzAttendance().
setRecruitId(wgzLeave.getRecruitId()). setRecruitId(wgzLeave.getRecruitId()).
setApplyKey(wgzLeave.getApplyKey()).
setUserId(wgzLeave.getUserId()). setUserId(wgzLeave.getUserId()).
setLeaveMarkId(wgzLeave.getId()). setLeaveMarkId(wgzLeave.getId()).
setDate(formattedDate). setDate(formattedDate).

View File

@ -42,6 +42,11 @@ public class WgzAttendance implements Serializable {
@ApiModelProperty("项目ID") @ApiModelProperty("项目ID")
private Long recruitId; private Long recruitId;
/** 招工申请主键自增id */
@Excel(name = "招工申请主键自增id")
@ApiModelProperty("招工申请主键自增id")
private Long applyKey;
/** 人员ID */ /** 人员ID */
@Excel(name = "人员ID") @Excel(name = "人员ID")
@ApiModelProperty("人员ID") @ApiModelProperty("人员ID")

View File

@ -41,6 +41,12 @@ public class WgzLeave implements Serializable {
@ApiModelProperty("项目ID") @ApiModelProperty("项目ID")
private Long recruitId; private Long recruitId;
/** 招工申请主键自增id */
@Excel(name = "招工申请主键自增id")
@ApiModelProperty("招工申请主键自增id")
private Long applyKey;
/** 项目ID */ /** 项目ID */
@Excel(name = "请假人") @Excel(name = "请假人")
@ApiModelProperty("请假人") @ApiModelProperty("请假人")

View File

@ -182,6 +182,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
//6、组装完整的打卡信息 //6、组装完整的打卡信息
WgzAttendance wgzAttendance = new WgzAttendance(). WgzAttendance wgzAttendance = new WgzAttendance().
setRecruitId(appById.getId()). setRecruitId(appById.getId()).
setApplyKey(by.getId()).
setUserId(appUserId). setUserId(appUserId).
setDailyWage(appById.getRecruitAmount()). setDailyWage(appById.getRecruitAmount()).
setDate(LocalDate.now()); setDate(LocalDate.now());

View File

@ -178,6 +178,7 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
//6、组装请假对象数据 并插入 //6、组装请假对象数据 并插入
WgzLeave wgzLeave = new WgzLeave(). WgzLeave wgzLeave = new WgzLeave().
setRecruitId(by.getRecruitId()). setRecruitId(by.getRecruitId()).
setApplyKey(by.getId()).
setSubject(appById.getRecruitName()). setSubject(appById.getRecruitName()).
setUserId(appUserId). setUserId(appUserId).
setLeaveType(req.getLeaveType()). setLeaveType(req.getLeaveType()).

View File

@ -195,7 +195,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
.last("LIMIT " + req.getNum()) .last("LIMIT " + req.getNum())
); );
if (attList.size() < req.getNum()) { //判断剩余天数是否满足当前结算天数 if (attList.size() < req.getNum()) { //判断剩余天数是否满足当前结算天数
throw new RuntimeException("您剩余可结算天数为:"+attList.size()+",您当前想要结算的天数为:"+req.getNum()+"天,剩余天数不足"); throw new RuntimeException("您剩余可结算天数为:"+attList.size()+"天!");
} }
//3、把需要结算的数据标记为已结算 //3、把需要结算的数据标记为已结算
List<WgzAttendance> objects = new ArrayList<>(); List<WgzAttendance> objects = new ArrayList<>();