优化
This commit is contained in:
		| @ -6,11 +6,8 @@ import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | ||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | ||||
| import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache; | ||||
| import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | ||||
| import com.ruoyi.common.core.page.TableDataInfo; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppJobListingReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq; | ||||
| import com.ruoyi.wgz.bo.res.*; | ||||
| import com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo; | ||||
| import org.apache.ibatis.annotations.CacheNamespace; | ||||
|  | ||||
| @ -10,6 +10,7 @@ import com.ruoyi.common.core.mybatisplus.core.IServicePlus; | ||||
| import com.ruoyi.common.core.page.TableDataInfo; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppJobListingReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppUserCancelRegistrationProjectDetailsReq; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppJobListingRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | ||||
| @ -122,7 +123,7 @@ public interface IBgtProjectRecruitService extends IServicePlus<BgtProjectRecrui | ||||
| 	/** | ||||
| 	 * 已报名项目·项目详情 | ||||
| 	 */ | ||||
| 	WgzAppCancelRegistrationProjectDetailsRes userCancelRegistrationProjectDetails(Long recruitId); | ||||
| 	WgzAppCancelRegistrationProjectDetailsRes userCancelRegistrationProjectDetails(WgzAppUserCancelRegistrationProjectDetailsReq req); | ||||
|  | ||||
| 	/** | ||||
| 	 * 招工列表 | ||||
|  | ||||
| @ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; | ||||
| import com.ruoyi.bgt.bo.BgtProjectRecruitQueryBo; | ||||
| import com.ruoyi.bgt.domain.BgtProjectRecruit; | ||||
| import com.ruoyi.bgt.domain.BgtProjectRecruitApply; | ||||
| @ -27,11 +28,14 @@ import com.ruoyi.fbs.domain.FbsProjectTask; | ||||
| import com.ruoyi.fbs.service.IFbsProjectTaskService; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppJobListingReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppUserCancelRegistrationProjectDetailsReq; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppJobListingRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes; | ||||
| import com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo; | ||||
| import com.ruoyi.wgz.domain.WgzMessage; | ||||
| import com.ruoyi.wgz.service.IWgzMessageService; | ||||
| import org.springframework.beans.BeanUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| @ -40,6 +44,8 @@ import java.time.LocalDate; | ||||
| import java.util.*; | ||||
| import java.util.stream.Collectors; | ||||
|  | ||||
| import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | ||||
|  | ||||
| /** | ||||
|  * 包工头招工Service业务层处理 | ||||
|  * | ||||
| @ -55,6 +61,9 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | ||||
| 	@Autowired | ||||
| 	private IBgtProjectRecruitApplyService bgtProjectRecruitApplyService; | ||||
|  | ||||
| 	@Autowired | ||||
| 	private IWgzMessageService iWgzMessageService; | ||||
|  | ||||
| 	/** | ||||
| 	 * 包工头招工任务能看到的申请状态 | ||||
| 	 */ | ||||
| @ -221,13 +230,21 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | ||||
| 		Page<WgzAppRegisteredProjectReq> pe = new Page<>(); | ||||
| 		pe.setCurrent(req.getPageNum()); | ||||
| 		pe.setSize(req.getPageSize()); | ||||
| 		return PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId)); | ||||
| 		TableDataInfo<WgzAppRegisteredProjectRes> wgzAppRegisteredProjectResTableDataInfo = PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId)); | ||||
| 		wgzAppRegisteredProjectResTableDataInfo.getRows().forEach(registeredProjectRes -> { | ||||
| 			//1、获取当前用户的取消、满员、失效、同意、拒绝状态 | ||||
| 			//1、获取当前项目下的成员 | ||||
| 			List<WgzAppCancelRegistrationProjectDetailsTwo> wgzUser = baseMapper.GetsTheMembersUnderTheCurrentProject(registeredProjectRes.getId()); | ||||
| 		}); | ||||
| 		return wgzAppRegisteredProjectResTableDataInfo; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public WgzAppCancelRegistrationProjectDetailsRes userCancelRegistrationProjectDetails(Long recruitId) { | ||||
| 	public WgzAppCancelRegistrationProjectDetailsRes userCancelRegistrationProjectDetails(WgzAppUserCancelRegistrationProjectDetailsReq req) { | ||||
| 		//0、获取当前用户 | ||||
| 		Long appUserId = SecurityUtils.getAppUserId(); | ||||
| 		//1、获取项目基础信息 | ||||
| 		WgzAppProjectDetailsRes wgzAppProjectDetailsRes = baseMapper.userProjectDetails(recruitId); | ||||
| 		WgzAppProjectDetailsRes wgzAppProjectDetailsRes = baseMapper.userProjectDetails(req.getRecruitId()); | ||||
| 		//2、获取当前项目下的成员 | ||||
| 		List<WgzAppCancelRegistrationProjectDetailsTwo> wgzUser = baseMapper.GetsTheMembersUnderTheCurrentProject(wgzAppProjectDetailsRes.getId()); | ||||
| 		//3、数据组装 | ||||
| @ -237,6 +254,21 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | ||||
| 		if (!wgzUser.isEmpty()){ | ||||
| 			res.setUserList(wgzUser); | ||||
| 		} | ||||
| 		//4、根据招工申请ID获取到消息 | ||||
| 		WgzMessage one = iWgzMessageService.getOne( | ||||
| 			Wrappers.<WgzMessage>lambdaQuery() | ||||
| 				.in(WgzMessage::getSenderType, USERTYPE_BGT) | ||||
| 				.in(WgzMessage::getSenderId, wgzAppProjectDetailsRes.getUserId()) | ||||
| 				.in(WgzMessage::getRecipientType, USERTYPE_WGZ) | ||||
| 				.in(WgzMessage::getRecipientId, appUserId) | ||||
| 				.in(WgzMessage::getTableId, req.getRecruitApplyId()) | ||||
| 				.in(WgzMessage::getTableName, SqlHelper.table(BgtProjectRecruitApply.class).getTableName()) | ||||
| 		); | ||||
| 		res.setIsOperation(one.getIsOperation()); | ||||
| 		res.setFull(wgzAppProjectDetailsRes.getStatus()); | ||||
| 		//5、获取当前申请人是否操作的对应状态 | ||||
| 		BgtProjectRecruitApply byId = bgtProjectRecruitApplyService.getById(req.getRecruitApplyId()); | ||||
| 		res.setStatus(byId.getStatus()); | ||||
| 		return res; | ||||
| 	} | ||||
|  | ||||
|  | ||||
| @ -0,0 +1,26 @@ | ||||
| package com.ruoyi.common.util; | ||||
|  | ||||
| import java.time.DayOfWeek; | ||||
| import java.time.LocalDate; | ||||
| import java.util.HashMap; | ||||
| import java.util.Map; | ||||
|  | ||||
| public class LocalDateToChineseWeekday { | ||||
| 	public static String getChineseWeekday(LocalDate localDate) { | ||||
| 		// 获取 LocalDate 对应的 DayOfWeek 枚举实例 | ||||
| 		DayOfWeek dayOfWeek = localDate.getDayOfWeek(); | ||||
|  | ||||
| 		// 定义一个映射关系,将 DayOfWeek 枚举值映射为中文的星期几 | ||||
| 		Map<DayOfWeek, String> weekdayMap = new HashMap<>(); | ||||
| 		weekdayMap.put(DayOfWeek.MONDAY, "星期一"); | ||||
| 		weekdayMap.put(DayOfWeek.TUESDAY, "星期二"); | ||||
| 		weekdayMap.put(DayOfWeek.WEDNESDAY, "星期三"); | ||||
| 		weekdayMap.put(DayOfWeek.THURSDAY, "星期四"); | ||||
| 		weekdayMap.put(DayOfWeek.FRIDAY, "星期五"); | ||||
| 		weekdayMap.put(DayOfWeek.SATURDAY, "星期六"); | ||||
| 		weekdayMap.put(DayOfWeek.SUNDAY, "星期日"); | ||||
|  | ||||
| 		// 根据映射关系获取对应的中文表示 | ||||
| 		return weekdayMap.get(dayOfWeek); | ||||
| 	} | ||||
| } | ||||
| @ -2,15 +2,10 @@ 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; | ||||
|  | ||||
| import java.io.Serializable; | ||||
| import java.math.BigDecimal; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
|  | ||||
| @Data | ||||
| @NoArgsConstructor | ||||
|  | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.ruoyi.wgz.bo.req; | ||||
|  | ||||
| import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | ||||
| import lombok.Data; | ||||
| import lombok.NoArgsConstructor; | ||||
| import lombok.experimental.Accessors; | ||||
|  | ||||
| import javax.validation.constraints.NotNull; | ||||
| import java.io.Serializable; | ||||
|  | ||||
| @Data | ||||
| @NoArgsConstructor | ||||
| @Accessors(chain = true) | ||||
| @ApiModel("已报名项目·项目详情请求对象") | ||||
| public class WgzAppUserCancelRegistrationProjectDetailsReq implements Serializable { | ||||
| 	@ApiModelProperty("招工主键ID") | ||||
| 	@NotNull | ||||
| 	private Long recruitId; | ||||
|  | ||||
| 	@ApiModelProperty("招工申请主键ID") | ||||
| 	@NotNull | ||||
| 	private Long recruitApplyId; | ||||
| } | ||||
| @ -101,4 +101,16 @@ public class WgzAppCancelRegistrationProjectDetailsRes implements Serializable { | ||||
|  | ||||
| 	@ApiModelProperty("招工地址") | ||||
| 	private String recruitAddress; | ||||
|  | ||||
| 	//----------- | ||||
| 	//----------- | ||||
| 	//----------- | ||||
| 	@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)") | ||||
| 	private String isOperation; | ||||
|  | ||||
| 	@ApiModelProperty("招工是否正常(0正常 1已招满 2已失效)") | ||||
| 	private String full; | ||||
|  | ||||
| 	@ApiModelProperty("务工者同意拒绝状态:3务工者同意  4务工者拒绝") | ||||
| 	private String status; | ||||
| } | ||||
|  | ||||
| @ -68,6 +68,12 @@ public class WgzAppProjectDetailsRes implements Serializable { | ||||
| 	@ApiModelProperty("联系电话") | ||||
| 	private String recruitContactPhone; | ||||
|  | ||||
| 	@ApiModelProperty("创建者") | ||||
| 	private String userId; | ||||
|  | ||||
| 	@ApiModelProperty("招工状态(1-进行中,2-已招满,3-已过期)") | ||||
| 	private String status; | ||||
|  | ||||
| 	@ApiModelProperty("备注") | ||||
| 	private String remark; | ||||
|  | ||||
|  | ||||
| @ -20,12 +20,9 @@ import java.time.LocalTime; | ||||
| @Accessors(chain = true) | ||||
| @ApiModel("已报名项目返回对象") | ||||
| public class WgzAppRegisteredProjectRes implements Serializable { | ||||
| 	@ApiModelProperty("招工ID") | ||||
| 	@ApiModelProperty("招工主键ID") | ||||
| 	private Long id; | ||||
|  | ||||
| //	@ApiModelProperty("招工ID") | ||||
| //	private Long projectId; | ||||
|  | ||||
| 	@ApiModelProperty("招工申请ID") | ||||
| 	private Long recruitApplyId; | ||||
|  | ||||
|  | ||||
| @ -0,0 +1,73 @@ | ||||
| package com.ruoyi.wgz.bo.res; | ||||
|  | ||||
| import com.ruoyi.common.annotation.Excel; | ||||
| import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | ||||
| import lombok.Data; | ||||
| import lombok.NoArgsConstructor; | ||||
| import lombok.experimental.Accessors; | ||||
|  | ||||
| import java.io.Serializable; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| @Data | ||||
| @NoArgsConstructor | ||||
| @Accessors(chain = true) | ||||
| @ApiModel("补卡记录·详情") | ||||
| public class WgzAppUserReplacementCardRecordDetailsRes implements Serializable { | ||||
|  | ||||
| 	@ApiModelProperty("主键ID") | ||||
| 	private Long id; | ||||
|  | ||||
| 	@ApiModelProperty("项目ID") | ||||
| 	private Long recruitId; | ||||
|  | ||||
| 	@ApiModelProperty("申请人ID") | ||||
| 	private Long userId; | ||||
|  | ||||
| 	@ApiModelProperty("申请人姓名") | ||||
| 	private String userName; | ||||
|  | ||||
| 	@ApiModelProperty("打卡ID") | ||||
| 	private Long attendanceId; | ||||
|  | ||||
| 	@ApiModelProperty("状态(0上班补卡 1下班补卡)") | ||||
| 	private String type; | ||||
|  | ||||
| 	@ApiModelProperty("项目名称") | ||||
| 	private String recruitName; | ||||
|  | ||||
| 	@ApiModelProperty("原打卡时间") | ||||
| 	private String rawTime; | ||||
|  | ||||
| 	@ApiModelProperty("现补卡时间") | ||||
| 	private LocalDateTime nowTime; | ||||
|  | ||||
| 	@ApiModelProperty("补卡理由") | ||||
| 	private String reason; | ||||
|  | ||||
| 	@ApiModelProperty("审核人ID") | ||||
| 	private Long auditorUserId; | ||||
|  | ||||
| 	@ApiModelProperty("审核人头像") | ||||
| 	private String auditorHead; | ||||
|  | ||||
| 	@ApiModelProperty("审核人名称") | ||||
| 	private String auditorname; | ||||
|  | ||||
| 	@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝)") | ||||
| 	private String auditorType; | ||||
|  | ||||
| 	@ApiModelProperty("审核意见") | ||||
| 	private String auditorOpinion; | ||||
|  | ||||
| 	/** 同意|拒绝时间 */ | ||||
| 	@Excel(name = "同意|拒绝时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") | ||||
| 	@ApiModelProperty("同意|拒绝时间") | ||||
| 	private LocalDateTime auditorTime; | ||||
|  | ||||
|  | ||||
| 	@ApiModelProperty("创建时间|申请时间") | ||||
| 	private LocalDateTime createTime; | ||||
|  | ||||
| } | ||||
| @ -3,6 +3,7 @@ package com.ruoyi.wgz.mapper; | ||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.ruoyi.bgt.domain.dto.BgtReissueacardListDTO; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppReplacementCardRecordReq; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes; | ||||
| import com.ruoyi.wgz.domain.WgzReissueacard; | ||||
| import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | ||||
| @ -28,4 +29,6 @@ public interface WgzReissueacardMapper extends BaseMapperPlus<WgzReissueacard> { | ||||
|  | ||||
| 	Page<WgzReplacementCardRecordRes> appQueryPageList(@Param("page") Page<BgtReissueacardListDTO> page,@Param("dto") BgtReissueacardListDTO dto); | ||||
|  | ||||
| 	WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(@Param("userId") Long id); | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -7,11 +7,14 @@ import com.ruoyi.common.core.page.TableDataInfo; | ||||
| import com.ruoyi.wgz.bo.WgzReissueacardQueryBo; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppCardReplacementApplicationReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppReplacementCardRecordReq; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes; | ||||
| import com.ruoyi.wgz.domain.WgzReissueacard; | ||||
| import org.springframework.validation.annotation.Validated; | ||||
| import org.springframework.web.bind.annotation.PathVariable; | ||||
| import org.springframework.web.bind.annotation.RequestBody; | ||||
|  | ||||
| import javax.validation.constraints.NotNull; | ||||
| import java.util.Collection; | ||||
| import java.util.List; | ||||
|  | ||||
| @ -87,4 +90,6 @@ public interface IWgzReissueacardService extends IServicePlus<WgzReissueacard> { | ||||
| 	 */ | ||||
| 	Boolean appUpdate(BgtReissueacardUpdateDTO dto); | ||||
|  | ||||
| 	WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(Long id); | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -17,6 +17,7 @@ import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; | ||||
| import com.ruoyi.common.core.page.TableDataInfo; | ||||
| import com.ruoyi.common.exception.BaseException; | ||||
| import com.ruoyi.common.util.DataUtil; | ||||
| import com.ruoyi.common.util.LocalDateToChineseWeekday; | ||||
| import com.ruoyi.common.utils.DateUtils; | ||||
| import com.ruoyi.common.utils.PageUtils; | ||||
| import com.ruoyi.common.utils.SecurityUtils; | ||||
| @ -333,17 +334,17 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe | ||||
|  | ||||
| 	@Override | ||||
| 	public WgzAppCardReplacementApplicationRes userCardReplacementApplication() { | ||||
| 		WgzAppCardReplacementApplicationRes wgzAppCardReplacementApplicationRes = new WgzAppCardReplacementApplicationRes(); | ||||
| 		//1、获取当前用户信息 | ||||
| 		Long appUserId = SecurityUtils.getAppUserId(); | ||||
| 		//2、获取当前用户所在的工地id | ||||
| 		BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); | ||||
| 		//3、根据工地id得到完整的工地信息 | ||||
| 		BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getId()); | ||||
| 		BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); | ||||
| 		//4、查询所有缺卡、迟到、早退的打卡记录 | ||||
| 		LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>(). | ||||
| 			eq(WgzAttendance::getUserId, appUserId). | ||||
| 			eq(WgzAttendance::getRecruitId, by.getId()). | ||||
| 			eq(WgzAttendance::getRecruitId, by.getId()) | ||||
| 			eq(WgzAttendance::getRecruitId, appById.getId()) | ||||
| 			.and(wrapper -> wrapper | ||||
| 				.eq(WgzAttendance::getLate, 1) | ||||
| 				.or() | ||||
| @ -371,7 +372,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe | ||||
| 				addRecord(wgzAttendance, 4, LocalDateTime.from(appById.getEndWorkTime()), list); | ||||
| 			} | ||||
| 		} | ||||
| 		return null; | ||||
| 		return wgzAppCardReplacementApplicationRes.setList(list); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| @ -587,13 +588,12 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe | ||||
| 	 */ | ||||
| 	private void addRecord(WgzAttendance wgzAttendance, int type, LocalDateTime fillingDataTime, List<WgzAppCardReplacementApplicationTwo> list) { | ||||
| 		LocalDate date = wgzAttendance.getDate(); | ||||
| 		DayOfWeek dayOfWeek = date.getDayOfWeek(); | ||||
| 		String week = dayOfWeek.toString(); | ||||
| 		String chineseWeekday = LocalDateToChineseWeekday.getChineseWeekday(date); | ||||
| 		WgzAppCardReplacementApplicationTwo two = new WgzAppCardReplacementApplicationTwo() | ||||
| 			.setId(wgzAttendance.getId()) | ||||
| 			.setType(type) | ||||
| 			.setFillingData(date) | ||||
| 			.setWeek(week) | ||||
| 			.setWeek(chineseWeekday) | ||||
| 			.setFillingDataTime(fillingDataTime); | ||||
| 		list.add(two); | ||||
| 	} | ||||
|  | ||||
| @ -235,10 +235,10 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz | ||||
| 		//使用数据库行级锁 | ||||
| 		int count = baseMapper.countRecruitApply(recruitId); | ||||
| 		if(count == num){ | ||||
| 			return "1"; | ||||
| 			return "1"; //已招满 | ||||
| 		} | ||||
| 		if (recruitEndTime.isAfter(LocalDate.now())){ | ||||
| 			return "2"; | ||||
| 			return "2"; //已失效 | ||||
| 		} | ||||
| 		return "0"; | ||||
| 	} | ||||
|  | ||||
| @ -22,6 +22,7 @@ import com.ruoyi.common.utils.SecurityUtils; | ||||
| import com.ruoyi.wgz.bo.WgzReissueacardQueryBo; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppCardReplacementApplicationReq; | ||||
| import com.ruoyi.wgz.bo.req.WgzAppReplacementCardRecordReq; | ||||
| import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes; | ||||
| import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes; | ||||
| import com.ruoyi.wgz.domain.WgzAttendance; | ||||
| import com.ruoyi.wgz.domain.WgzMessage; | ||||
| @ -286,4 +287,9 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM | ||||
| 		wgzMessageService.sendAMessage(wgzMessage); | ||||
| 		return b; | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	public WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(Long id) { | ||||
| 		return baseMapper.userReplacementCardRecordDetails(id); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -42,6 +42,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
|             a.id DESC | ||||
|     </select> | ||||
|  | ||||
|     <select id="userReplacementCardRecordDetails" resultType="com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes"> | ||||
|         SELECT | ||||
|             a.*, | ||||
|             b.username, | ||||
|             b.avatar_name, | ||||
|             c.username as userName | ||||
|         FROM | ||||
|             wgz_reissueacard a | ||||
|                 LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0) | ||||
|                 LEFT JOIN wgz_user c ON (a.user_id = c.user_id and c.del_flag = 0) | ||||
|         WHERE | ||||
|             a.user_id = #{userId} and a.del_flag = 0 | ||||
|         ORDER BY | ||||
|             a.id DESC | ||||
|     </select> | ||||
|  | ||||
|  | ||||
|     <select id="appQueryPageList" resultType="com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes"> | ||||
|         SELECT | ||||
|  | ||||
		Reference in New Issue
	
	Block a user