111
This commit is contained in:
@ -1,64 +1,64 @@
|
|||||||
package com.ruoyi.web.controller.wgz.controller;
|
package com.ruoyi.web.controller.wgz.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO;
|
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO;
|
||||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO;
|
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO;
|
||||||
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.bo.AnnexQueryBo;
|
import com.ruoyi.common.bo.AnnexQueryBo;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.domain.Annex;
|
import com.ruoyi.common.domain.Annex;
|
||||||
import com.ruoyi.common.service.IAnnexService;
|
import com.ruoyi.common.service.IAnnexService;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.system.service.ISysDictTypeService;
|
import com.ruoyi.system.service.ISysDictTypeService;
|
||||||
import com.ruoyi.wgz.bo.res.*;
|
import com.ruoyi.wgz.bo.res.*;
|
||||||
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperThree;
|
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperThree;
|
||||||
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperTwo;
|
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperTwo;
|
||||||
import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex;
|
import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex;
|
||||||
import com.ruoyi.wgz.bo.req.*;
|
import com.ruoyi.wgz.bo.req.*;
|
||||||
import com.ruoyi.wgz.domain.WgzDailyClock;
|
import com.ruoyi.wgz.domain.WgzDailyClock;
|
||||||
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
||||||
import com.ruoyi.wgz.domain.WgzQuestionsConfiguration;
|
import com.ruoyi.wgz.domain.WgzQuestionsConfiguration;
|
||||||
import com.ruoyi.wgz.service.*;
|
import com.ruoyi.wgz.service.*;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.var;
|
import lombok.var;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static com.ruoyi.common.constant.Constants.WGZ;
|
import static com.ruoyi.common.constant.Constants.WGZ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APP务工者Controller
|
* APP务工者Controller
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-02-14
|
* @date 2025-02-14
|
||||||
*/
|
*/
|
||||||
@Api(value = "APP务工者接口", tags = {"务工者-APP接口"})
|
@Api(value = "APP务工者接口", tags = {"务工者-APP接口"})
|
||||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
@RestController
|
@RestController
|
||||||
|
|
||||||
@RequestMapping("/wgz/app")
|
@RequestMapping("/wgz/app")
|
||||||
public class WgzAppController {
|
public class WgzAppController {
|
||||||
|
|
||||||
private final IWgzUserService iWgzUserService;
|
private final IWgzUserService iWgzUserService;
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ public class WgzAppController {
|
|||||||
* 【首页】【首页界面】招工列表
|
* 【首页】【首页界面】招工列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("【首页】【首页界面】招工列表")
|
@ApiOperation("【首页】【首页界面】招工列表")
|
||||||
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userJobListing')")
|
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userJobListing')")
|
||||||
@GetMapping("/WgzUserJobListing")
|
@GetMapping("/WgzUserJobListing")
|
||||||
public TableDataInfo<WgzAppJobListingRes> userJobListing(@Validated WgzAppJobListingReq req) {
|
public TableDataInfo<WgzAppJobListingRes> userJobListing(@Validated WgzAppJobListingReq req) {
|
||||||
return iBgtProjectRecruitService.userJobListing(req);
|
return iBgtProjectRecruitService.userJobListing(req);
|
||||||
@ -125,7 +125,7 @@ public class WgzAppController {
|
|||||||
* 【我的】修改用户头像
|
* 【我的】修改用户头像
|
||||||
*/
|
*/
|
||||||
@ApiOperation("【我的】修改用户头像")
|
@ApiOperation("【我的】修改用户头像")
|
||||||
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userModifyingUserProfilePicture')")
|
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userModifyingUserProfilePicture')")
|
||||||
@PutMapping("/wgzUserModifyingUserProfilePicture")
|
@PutMapping("/wgzUserModifyingUserProfilePicture")
|
||||||
public AjaxResult<Boolean> userModifyingUserProfilePicture(@Validated @RequestBody WgzAppModifyingUserProfilePictureReq req) {
|
public AjaxResult<Boolean> userModifyingUserProfilePicture(@Validated @RequestBody WgzAppModifyingUserProfilePictureReq req) {
|
||||||
return AjaxResult.success(iWgzUserService.userModifyingUserProfilePicture(req));
|
return AjaxResult.success(iWgzUserService.userModifyingUserProfilePicture(req));
|
||||||
@ -622,40 +622,40 @@ public class WgzAppController {
|
|||||||
/**
|
/**
|
||||||
* 【我的】【实名认证】实名认证·删除附件
|
* 【我的】【实名认证】实名认证·删除附件
|
||||||
*/
|
*/
|
||||||
// @ApiOperation("APP务工者-实名认证·删除附件")
|
// @ApiOperation("APP务工者-实名认证·删除附件")
|
||||||
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')")
|
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')")
|
||||||
// @DeleteMapping("/WgzUserDeleteAttachment/{attachmentId}")
|
// @DeleteMapping("/WgzUserDeleteAttachment/{attachmentId}")
|
||||||
// public AjaxResult<Boolean> userDeleteAttachment(@NotEmpty(message = "主键不能为空") @PathVariable Long attachmentId) {
|
// public AjaxResult<Boolean> userDeleteAttachment(@NotEmpty(message = "主键不能为空") @PathVariable Long attachmentId) {
|
||||||
// return AjaxResult.success(iAnnexService.deleteByIds(attachmentId));
|
// return AjaxResult.success(iAnnexService.deleteByIds(attachmentId));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【首页】【项目进行中】 项目进行中·申请工资结算(查询)
|
* 【首页】【项目进行中】 项目进行中·申请工资结算(查询)
|
||||||
*/
|
*/
|
||||||
// @ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(查询)")
|
// @ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(查询)")
|
||||||
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementFind')")
|
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementFind')")
|
||||||
// @GetMapping("/WgzAppUserApplyForPayrollSettlementFind")
|
// @GetMapping("/WgzAppUserApplyForPayrollSettlementFind")
|
||||||
// public AjaxResult<WgzApplyForPayrollSettlementFindRes> userApplyForPayrollSettlementFind(@Validated WgzApplyForPayrollSettlementFindReq req) {
|
// public AjaxResult<WgzApplyForPayrollSettlementFindRes> userApplyForPayrollSettlementFind(@Validated WgzApplyForPayrollSettlementFindReq req) {
|
||||||
// Long appUserId = SecurityUtils.getAppUserId();
|
// Long appUserId = SecurityUtils.getAppUserId();
|
||||||
// BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
// BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||||
// BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getId());
|
// BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getId());
|
||||||
// //1、查询入场时间、退场时间、单天金额
|
// //1、查询入场时间、退场时间、单天金额
|
||||||
// BigDecimal recruitAmount = appById.getRecruitAmount();
|
// BigDecimal recruitAmount = appById.getRecruitAmount();
|
||||||
// //2、查询实际考勤时间(只要有打卡就算出勤一条,异常也视为正常出勤,也就是说只要有上班or下班至少有一个有数据,那就证明出勤ok)
|
// //2、查询实际考勤时间(只要有打卡就算出勤一条,异常也视为正常出勤,也就是说只要有上班or下班至少有一个有数据,那就证明出勤ok)
|
||||||
// Integer i = iWgzAttendanceService.attendanceDetail(appUserId, appById.getId(), req.getNum());
|
// Integer i = iWgzAttendanceService.attendanceDetail(appUserId, appById.getId(), req.getNum());
|
||||||
// if (i == 0){
|
// if (i == 0){
|
||||||
// throw new RuntimeException("您还未打卡");
|
// throw new RuntimeException("您还未打卡");
|
||||||
// }
|
// }
|
||||||
// //3、单天金额*实际考勤总天数=实际工资
|
// //3、单天金额*实际考勤总天数=实际工资
|
||||||
// BigDecimal totalAmount = recruitAmount.multiply(BigDecimal.valueOf(i));
|
// BigDecimal totalAmount = recruitAmount.multiply(BigDecimal.valueOf(i));
|
||||||
// WgzApplyForPayrollSettlementFindRes res = new WgzApplyForPayrollSettlementFindRes().
|
// WgzApplyForPayrollSettlementFindRes res = new WgzApplyForPayrollSettlementFindRes().
|
||||||
// setEntryTime(by.getEntryTime()).
|
// setEntryTime(by.getEntryTime()).
|
||||||
// setLeaveTime(by.getLeaveTime()).
|
// setLeaveTime(by.getLeaveTime()).
|
||||||
// setAmount(recruitAmount).
|
// setAmount(recruitAmount).
|
||||||
// setNum(i).
|
// setNum(i).
|
||||||
// setTotalAmount(totalAmount);
|
// setTotalAmount(totalAmount);
|
||||||
// return AjaxResult.success(res);
|
// return AjaxResult.success(res);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -524,7 +524,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
BgtProjectRecruitApply recruitApply = queryById(req.getRecruitApplyId());
|
BgtProjectRecruitApply recruitApply = queryById(req.getRecruitApplyId());
|
||||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
|
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
|
||||||
//数据库行级锁
|
//数据库行级锁
|
||||||
String s = new WgzMessageServiceImpl().JudgingRecruitment(req.getRecruitApplyId(), recruit.getRecruitStaffNum(), recruit.getRecruitEndTime());
|
String s = iWgzMessageService.JudgingRecruitment(req.getRecruitApplyId(), recruit.getRecruitStaffNum(), recruit.getRecruitEndTime());
|
||||||
switch (s) {
|
switch (s) {
|
||||||
case "1":
|
case "1":
|
||||||
throw new RuntimeException("已招满!");
|
throw new RuntimeException("已招满!");
|
||||||
|
@ -47,6 +47,10 @@ public class WgzAppJobListingRes implements Serializable {
|
|||||||
@ApiModelProperty("工种")
|
@ApiModelProperty("工种")
|
||||||
private String typeOfWork;
|
private String typeOfWork;
|
||||||
|
|
||||||
|
@ApiModelProperty("工种名称")
|
||||||
|
private String typeOfWorkLabel;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("申请者数量")
|
@ApiModelProperty("申请者数量")
|
||||||
private Integer numberOfRegistered;
|
private Integer numberOfRegistered;
|
||||||
|
|
||||||
|
@ -74,6 +74,12 @@ public class WgzAppProjectDetailsRes implements Serializable {
|
|||||||
@ApiModelProperty("招工要求")
|
@ApiModelProperty("招工要求")
|
||||||
private String recruitRequirement;
|
private String recruitRequirement;
|
||||||
|
|
||||||
|
@ApiModelProperty("工种")
|
||||||
|
private String typeOfWork;
|
||||||
|
|
||||||
|
@ApiModelProperty("工种名称")
|
||||||
|
private String typeOfWorkLabel;
|
||||||
|
|
||||||
//---------
|
//---------
|
||||||
//---------
|
//---------
|
||||||
//---------
|
//---------
|
||||||
|
@ -32,7 +32,7 @@ public class WgzAppRegisteredProjectRes implements Serializable {
|
|||||||
@ApiModelProperty("招工名称")
|
@ApiModelProperty("招工名称")
|
||||||
private String recruitName;
|
private String recruitName;
|
||||||
|
|
||||||
@ApiModelProperty("创建时间")
|
@ApiModelProperty("创建时间/报名时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@ApiModelProperty("封面图(多个逗号分隔)")
|
@ApiModelProperty("封面图(多个逗号分隔)")
|
||||||
@ -59,5 +59,11 @@ public class WgzAppRegisteredProjectRes implements Serializable {
|
|||||||
@ApiModelProperty("已报名数量")
|
@ApiModelProperty("已报名数量")
|
||||||
private Integer numberOfRegistered;
|
private Integer numberOfRegistered;
|
||||||
|
|
||||||
|
@ApiModelProperty("工种")
|
||||||
|
private String typeOfWork;
|
||||||
|
|
||||||
|
@ApiModelProperty("工种名称")
|
||||||
|
private String typeOfWorkLabel;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,9 @@ public class WgzAppRegistrationInformationRes implements Serializable {
|
|||||||
@ApiModelProperty("招工是否正常(0正常 1已招满 2已失效)")
|
@ApiModelProperty("招工是否正常(0正常 1已招满 2已失效)")
|
||||||
private String full;
|
private String full;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工者同意拒绝状态:3务工者同意 4务工者拒绝")
|
||||||
|
private String status;
|
||||||
|
|
||||||
// @ApiModelProperty("附件实体数据")
|
// @ApiModelProperty("附件实体数据")
|
||||||
// private List<Annex> annex;
|
// private List<Annex> annex;
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import com.ruoyi.wgz.domain.WgzMessage;
|
|||||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||||
import org.apache.ibatis.annotations.CacheNamespace;
|
import org.apache.ibatis.annotations.CacheNamespace;
|
||||||
|
import org.apache.ibatis.annotations.Options;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
@ -35,6 +36,7 @@ public interface WgzMessageMapper extends BaseMapperPlus<WgzMessage> {
|
|||||||
//分页查询消息列表
|
//分页查询消息列表
|
||||||
Page<WgzAppGetMessageListRes> pagingQueryTheMessageList(@Param("page") Page<WgzAppGetMessageListReq> page,@Param("req") WgzAppGetMessageListReq req);
|
Page<WgzAppGetMessageListRes> pagingQueryTheMessageList(@Param("page") Page<WgzAppGetMessageListReq> page,@Param("req") WgzAppGetMessageListReq req);
|
||||||
|
|
||||||
@Select("SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = #{recruitId} and status in ('3','4')")
|
@Select("SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = #{recruitId} and status in ('3','4') FOR UPDATE")
|
||||||
int countRecruitApply(Long recruitId);
|
@Options(useCache = false) // 禁用 MyBatis 缓存
|
||||||
|
int countRecruitApply(@Param("recruitId") Long recruitId);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
|||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -87,6 +88,11 @@ public interface IWgzMessageService extends IServicePlus<WgzMessage> {
|
|||||||
*/
|
*/
|
||||||
WgzAppRegistrationInformationRes userRegistrationInformation(Long messageId);
|
WgzAppRegistrationInformationRes userRegistrationInformation(Long messageId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断招工是否已招满或已过期
|
||||||
|
*/
|
||||||
|
String JudgingRecruitment(Long recruitId, int num, LocalDate recruitEndTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改已读未读状态
|
* 修改已读未读状态
|
||||||
*/
|
*/
|
||||||
|
@ -160,16 +160,13 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
|||||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||||
//3、根据工地id得到完整的工地信息
|
//3、根据工地id得到完整的工地信息
|
||||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
||||||
// //4、查看当前用户是否有请假申请,有请假申请并且通过,那就无法进行打卡------------------>此处代码将改写逻辑为:每天凌晨1分的时候直接找出已请假的人然后定时插入数据到打卡记录中标记为请假
|
|
||||||
// String formattedDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
||||||
// WgzLeave wgzLeave = iWgzLeaveService.FindAskForLeaveOrNotInfo(appUserId, by.getId(), formattedDate);
|
|
||||||
// if (wgzLeave != null) { //表示有请假申请
|
|
||||||
// LocalDateTime startTime = wgzLeave.getStartTime();
|
|
||||||
// LocalDate localDate = startTime.toLocalDate();
|
|
||||||
// throw new RuntimeException("您有已通过的请假申请,请假时间为:"+localDate);
|
|
||||||
// }
|
|
||||||
//4、在进场时间时才能打卡,如果有退场记录就不允许打卡
|
//4、在进场时间时才能打卡,如果有退场记录就不允许打卡
|
||||||
|
if (by.getEntryTime() == null) {
|
||||||
|
throw new RuntimeException("需要进场才能实现打卡操作!");
|
||||||
|
}
|
||||||
|
if (by.getLeaveTime() != null) {
|
||||||
|
throw new RuntimeException("您已离场,无法进行打卡操作!");
|
||||||
|
}
|
||||||
//5、查看当前人、当前工地、当天的打卡记录
|
//5、查看当前人、当前工地、当天的打卡记录
|
||||||
String formattedDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
String formattedDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
WgzAttendance we = publicFindByUserIdWait(appUserId, by.getRecruitId(), formattedDate);
|
WgzAttendance we = publicFindByUserIdWait(appUserId, by.getRecruitId(), formattedDate);
|
||||||
|
@ -36,6 +36,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
||||||
import com.ruoyi.wgz.mapper.WgzMessageMapper;
|
import com.ruoyi.wgz.mapper.WgzMessageMapper;
|
||||||
import com.ruoyi.wgz.service.IWgzMessageService;
|
import com.ruoyi.wgz.service.IWgzMessageService;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -228,14 +230,10 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
* @param recruitEndTime 招工结束时间
|
* @param recruitEndTime 招工结束时间
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String JudgingRecruitment(Long recruitId,int num,LocalDate recruitEndTime) {
|
public String JudgingRecruitment(Long recruitId,int num,LocalDate recruitEndTime) {
|
||||||
//使用数据库行级锁
|
//使用数据库行级锁
|
||||||
int count = baseMapper.countRecruitApply(recruitId);
|
int count = baseMapper.countRecruitApply(recruitId);
|
||||||
// int count = iBgtProjectRecruitApplyService.count(
|
|
||||||
// Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
|
||||||
// .eq(BgtProjectRecruitApply::getRecruitId, recruitId)
|
|
||||||
// .in(BgtProjectRecruitApply::getStatus, Arrays.asList("3", "4"))
|
|
||||||
// );
|
|
||||||
if(count == num){
|
if(count == num){
|
||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
|
@ -47,10 +47,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
a.*,
|
a.*,
|
||||||
b.task_name,
|
b.task_name,
|
||||||
b.task_address,
|
b.task_address,
|
||||||
b.task_img
|
b.task_img,
|
||||||
|
d.dict_label AS typeOfWorkLabel
|
||||||
FROM
|
FROM
|
||||||
bgt_project_recruit as a
|
bgt_project_recruit as a
|
||||||
LEFT JOIN fbs_project_task as b ON (a.task_id = b.id AND b.del_flag = 0)
|
LEFT JOIN fbs_project_task as b ON (a.task_id = b.id AND b.del_flag = 0)
|
||||||
|
LEFT JOIN sys_dict_data AS d ON ( d.dict_type = 'type_of_work' AND d.dict_value = a.type_of_work )
|
||||||
WHERE
|
WHERE
|
||||||
a.id = #{id} AND a.del_flag = 0
|
a.id = #{id} AND a.del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
@ -62,11 +64,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
c.task_name,
|
c.task_name,
|
||||||
c.task_address,
|
c.task_address,
|
||||||
c.task_img,
|
c.task_img,
|
||||||
|
d.dict_label AS typeOfWorkLabel,
|
||||||
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = b.id) as numberOfRegistered
|
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = b.id) as numberOfRegistered
|
||||||
FROM
|
FROM
|
||||||
bgt_project_recruit_apply as a
|
bgt_project_recruit_apply as a
|
||||||
LEFT JOIN bgt_project_recruit as b on(a.recruit_id = b.id and b.del_flag = 0 )
|
LEFT JOIN bgt_project_recruit as b on(a.recruit_id = b.id and b.del_flag = 0 )
|
||||||
LEFT JOIN fbs_project_task as c ON (b.task_id = c.id AND c.del_flag = 0)
|
LEFT JOIN fbs_project_task as c ON (b.task_id = c.id AND c.del_flag = 0)
|
||||||
|
LEFT JOIN sys_dict_data AS d ON ( d.dict_type = 'type_of_work' AND d.dict_value = b.type_of_work )
|
||||||
WHERE
|
WHERE
|
||||||
a.user_id = #{userId} AND
|
a.user_id = #{userId} AND
|
||||||
(a.status = '0' or a.status = '1') AND
|
(a.status = '0' or a.status = '1') AND
|
||||||
@ -93,10 +97,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
c.task_name,
|
c.task_name,
|
||||||
c.task_address,
|
c.task_address,
|
||||||
c.task_img,
|
c.task_img,
|
||||||
|
d.dict_label as typeOfWorkLabel,
|
||||||
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = b.id) as numberOfRegistered
|
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = b.id) as numberOfRegistered
|
||||||
FROM
|
FROM
|
||||||
bgt_project_recruit as b
|
bgt_project_recruit as b
|
||||||
LEFT JOIN fbs_project_task as c ON (c.id = b.task_id)
|
LEFT JOIN fbs_project_task as c ON (c.id = b.task_id)
|
||||||
|
LEFT JOIN sys_dict_data as d ON (d.dict_type = 'type_of_work' and d.dict_value = b.type_of_work)
|
||||||
WHERE
|
WHERE
|
||||||
DATE_FORMAT(NOW(), '%Y-%m-%d') BETWEEN b.recruit_begin_time AND b.recruit_end_time and
|
DATE_FORMAT(NOW(), '%Y-%m-%d') BETWEEN b.recruit_begin_time AND b.recruit_end_time and
|
||||||
b.id not in (SELECT recruit_id FROM bgt_project_recruit_apply WHERE user_id = #{req.userId})and
|
b.id not in (SELECT recruit_id FROM bgt_project_recruit_apply WHERE user_id = #{req.userId})and
|
||||||
|
@ -132,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
SELECT
|
SELECT
|
||||||
a.id as recruitApplyId,
|
a.id as recruitApplyId,
|
||||||
a.entry_time as entryTime,
|
a.entry_time as entryTime,
|
||||||
|
a.status as status,
|
||||||
b.id as recruitId,
|
b.id as recruitId,
|
||||||
b.create_time as createTime,
|
b.create_time as createTime,
|
||||||
b.recruit_name as recruitName,
|
b.recruit_name as recruitName,
|
||||||
|
BIN
ruoyi/uploadPath/appResource/head/bgt.png
Normal file
BIN
ruoyi/uploadPath/appResource/head/bgt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
BIN
ruoyi/uploadPath/appResource/head/fbs.png
Normal file
BIN
ruoyi/uploadPath/appResource/head/fbs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
BIN
ruoyi/uploadPath/appResource/head/wgz.png
Normal file
BIN
ruoyi/uploadPath/appResource/head/wgz.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
BIN
ruoyi/uploadPath/appResource/head/zbs.png
Normal file
BIN
ruoyi/uploadPath/appResource/head/zbs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user