优化
This commit is contained in:
@ -121,6 +121,11 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
||||
*/
|
||||
Boolean userApplyForRegistration(Long id);
|
||||
|
||||
/**
|
||||
* 务工者是否进入工地
|
||||
*/
|
||||
Boolean userIsInTheSite(Long wgzUserId);
|
||||
|
||||
/**
|
||||
* 同意申请
|
||||
*/
|
||||
|
@ -419,12 +419,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
throw new RuntimeException("未查询到您的考试信息!");
|
||||
}
|
||||
//3-2、是否已有工地
|
||||
Integer i = baseMapper.selectCount(
|
||||
new LambdaQueryWrapper<BgtProjectRecruitApply>().
|
||||
eq(BgtProjectRecruitApply::getUserId, appUserId).
|
||||
in(BgtProjectRecruitApply::getStatus, "3", "5")
|
||||
);
|
||||
if (i > 0) {
|
||||
|
||||
if (userIsInTheSite(appUserId)) {
|
||||
throw new RuntimeException("已有工地!不可再次申请!");
|
||||
}
|
||||
//3-3、是否重复申请同一工地(先检查最后一次是否离场或取消,如果是就还能再次申请这个项目,否则无法申请)
|
||||
@ -490,6 +486,16 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean userIsInTheSite(Long wgzUserId) {
|
||||
Integer i = baseMapper.selectCount(
|
||||
new LambdaQueryWrapper<BgtProjectRecruitApply>().
|
||||
eq(BgtProjectRecruitApply::getUserId, wgzUserId).
|
||||
in(BgtProjectRecruitApply::getStatus, "3", "5")
|
||||
);
|
||||
return i>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BgtProjectRecruitApplyVO> userList(BgtAttendanceDayDTO dto) {
|
||||
Page<BgtAttendanceDayDTO> queryDTOPage = new Page<>();
|
||||
|
Reference in New Issue
Block a user