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