完成已报名模块、且修正招工中间表类型
This commit is contained in:
		| @ -32,6 +32,7 @@ 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.NotNull; | import javax.validation.constraints.NotNull; | ||||||
| import java.time.LocalTime; | import java.time.LocalTime; | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| @ -317,7 +318,7 @@ public class WgzAppController { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * 【首页】【项目详情】 项目详情·申请报名 | 	 * 【首页】【项目详情】 项目详情·申请报名(还未校验工种是否匹配工地岗位) | ||||||
| 	 */ | 	 */ | ||||||
| 	@ApiOperation("【首页】【项目详情】 项目详情·申请报名)") | 	@ApiOperation("【首页】【项目详情】 项目详情·申请报名)") | ||||||
| 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForRegistration')") | 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForRegistration')") | ||||||
| @ -326,6 +327,45 @@ public class WgzAppController { | |||||||
| 		return AjaxResult.success(iBgtProjectRecruitApplyService.userApplyForRegistration(id)); | 		return AjaxResult.success(iBgtProjectRecruitApplyService.userApplyForRegistration(id)); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 【首页】【已报名项目】 已报名项目 | ||||||
|  | 	 */ | ||||||
|  | 	@ApiOperation("【首页】【已报名项目】 已报名项目)") | ||||||
|  | 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userRegisteredProject')") | ||||||
|  | 	@GetMapping("/WgzAppUserRegisteredProject") | ||||||
|  | 	public TableDataInfo<WgzAppRegisteredProjectRes> userRegisteredProject(@Validated WgzAppRegisteredProjectReq req) { | ||||||
|  | 		return iBgtProjectRecruitService.userRegisteredProject(req); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 【首页】【已报名项目】 已报名项目·取消报名 | ||||||
|  | 	 */ | ||||||
|  | 	@ApiOperation("【首页】【已报名项目】 已报名项目·取消报名)") | ||||||
|  | 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistration')") | ||||||
|  | 	@DeleteMapping("/WgzAppUserCancelRegistration/{recruitId}") | ||||||
|  | 	public AjaxResult<Boolean> userCancelRegistration(@NotEmpty(message = "招工主键不能为空") @PathVariable Long recruitId) { | ||||||
|  | 		return AjaxResult.success(iBgtProjectRecruitApplyService.userCancelRegistration(recruitId)); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 【首页】【已报名项目】 已报名项目·项目详情 | ||||||
|  | 	 */ | ||||||
|  | 	@ApiOperation("【首页】【已报名项目】 已报名项目·项目详情") | ||||||
|  | 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistrationProjectDetails')") | ||||||
|  | 	@GetMapping("/WgzAppUserCancelRegistrationProjectDetails/{recruitId}") | ||||||
|  | 	public AjaxResult<WgzAppCancelRegistrationProjectDetailsRes> userCancelRegistrationProjectDetails(@NotEmpty(message = "招工主键不能为空") @PathVariable Long recruitId) { | ||||||
|  | 		return AjaxResult.success(iBgtProjectRecruitService.userCancelRegistrationProjectDetails(recruitId)); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 【首页】【项目进行中】 项目进行中(分页,但是理论上这里始终只会有一条数据) | ||||||
|  | 	 */ | ||||||
|  | 	@ApiOperation("【首页】【项目进行中】 项目进行中") | ||||||
|  | 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userUnderway')") | ||||||
|  | 	@GetMapping("/WgzAppUserUnderway") | ||||||
|  | 	public TableDataInfo<WgzAppRegisteredProjectRes> userUnderway(@Validated WgzAppUnderwayReq req) { | ||||||
|  | 		return null; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|  | |||||||
| @ -42,7 +42,7 @@ public class BgtProjectRecruitApply implements Serializable { | |||||||
|     @ApiModelProperty("务工者用户ID") |     @ApiModelProperty("务工者用户ID") | ||||||
|     private Long userId; |     private Long userId; | ||||||
|  |  | ||||||
| 	@ApiModelProperty("选择状态(0未选择 1已选择)") | 	@ApiModelProperty("0报名 1包工同意  2包工头拒绝(截止时间)3务工者同意  4务工者拒绝  5进场 6离场") | ||||||
| 	private String status; | 	private String status; | ||||||
|  |  | ||||||
| 	@ApiModelProperty("进场时间") | 	@ApiModelProperty("进场时间") | ||||||
|  | |||||||
| @ -6,10 +6,16 @@ import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | |||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | ||||||
| import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache; | import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | ||||||
|  | import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes; | ||||||
|  | import com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo; | ||||||
| import org.apache.ibatis.annotations.CacheNamespace; | import org.apache.ibatis.annotations.CacheNamespace; | ||||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 包工头招工Mapper接口 |  * 包工头招工Mapper接口 | ||||||
|  * |  * | ||||||
| @ -23,4 +29,8 @@ public interface BgtProjectRecruitMapper extends BaseMapperPlus<BgtProjectRecrui | |||||||
| 	Page<BgtProjectRecruitVO> appQueryPageList(@Param("page") Page<BgtProjectRecruitQueryDTO> page, @Param("dto") BgtProjectRecruitQueryDTO dto); | 	Page<BgtProjectRecruitVO> appQueryPageList(@Param("page") Page<BgtProjectRecruitQueryDTO> page, @Param("dto") BgtProjectRecruitQueryDTO dto); | ||||||
|  |  | ||||||
| 	WgzAppProjectDetailsRes userProjectDetails(@Param("id") Long id); | 	WgzAppProjectDetailsRes userProjectDetails(@Param("id") Long id); | ||||||
|  |  | ||||||
|  | 	Page<WgzAppRegisteredProjectRes> userRegisteredProject(@Param("page") Page<WgzAppRegisteredProjectReq> page,@Param("userId") Long userId); | ||||||
|  |  | ||||||
|  | 	List<WgzAppCancelRegistrationProjectDetailsTwo> GetsTheMembersUnderTheCurrentProject (@Param("recruitId") Long recruitId); | ||||||
| } | } | ||||||
|  | |||||||
| @ -84,4 +84,10 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR | |||||||
| 	 */ | 	 */ | ||||||
| 	Boolean consent(BgtProjectRecruitApplyConsentDTO dto); | 	Boolean consent(BgtProjectRecruitApplyConsentDTO dto); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 务工者取消报名 | ||||||
|  | 	 */ | ||||||
|  | 	Boolean userCancelRegistration(Long recruitId); | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -7,9 +7,14 @@ import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO; | |||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.IServicePlus; | import com.ruoyi.common.core.mybatisplus.core.IServicePlus; | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.PathVariable; | import org.springframework.web.bind.annotation.PathVariable; | ||||||
|  |  | ||||||
|  | import javax.validation.constraints.NotEmpty; | ||||||
| import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| @ -87,4 +92,14 @@ public interface IBgtProjectRecruitService extends IServicePlus<BgtProjectRecrui | |||||||
| 	 */ | 	 */ | ||||||
| 	WgzAppProjectDetailsRes userProjectDetails(Long id); | 	WgzAppProjectDetailsRes userProjectDetails(Long id); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 首页-已报名项目(分页) | ||||||
|  | 	 */ | ||||||
|  | 	TableDataInfo<WgzAppRegisteredProjectRes> userRegisteredProject(@Validated WgzAppRegisteredProjectReq req); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 已报名项目·项目详情 | ||||||
|  | 	 */ | ||||||
|  | 	WgzAppCancelRegistrationProjectDetailsRes userCancelRegistrationProjectDetails(Long recruitId); | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ package com.ruoyi.bgt.service.impl; | |||||||
| import cn.hutool.core.bean.BeanUtil; | import cn.hutool.core.bean.BeanUtil; | ||||||
| import cn.hutool.core.collection.CollectionUtil; | import cn.hutool.core.collection.CollectionUtil; | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.injector.methods.DeleteById; | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.ruoyi.bgt.bo.BgtProjectRecruitApplyQueryBo; | import com.ruoyi.bgt.bo.BgtProjectRecruitApplyQueryBo; | ||||||
| @ -122,6 +123,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * LC-APP相关 | 	 * LC-APP相关 | ||||||
| 	 * ================================================================================================================= | 	 * ================================================================================================================= | ||||||
| @ -136,9 +138,9 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 	public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) { | 	public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) { | ||||||
| 		LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery(); | 		LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery(); | ||||||
| 		lqw.eq(BgtProjectRecruitApply::getUserId, id). | 		lqw.eq(BgtProjectRecruitApply::getUserId, id). | ||||||
| 			eq(BgtProjectRecruitApply::getStatus, "1"). | 			eq(BgtProjectRecruitApply::getStatus, "3"); //包工头同意、务工者同意才算进场ok | ||||||
| 			isNotNull(BgtProjectRecruitApply::getEntryTime). | //			isNotNull(BgtProjectRecruitApply::getEntryTime). | ||||||
| 			ne(BgtProjectRecruitApply::getEntryTime, ""); | //			ne(BgtProjectRecruitApply::getEntryTime, ""); | ||||||
| 		List<BgtProjectRecruitApply> bgtProjectRecruitApplies = baseMapper.selectList(lqw); | 		List<BgtProjectRecruitApply> bgtProjectRecruitApplies = baseMapper.selectList(lqw); | ||||||
| 		if (bgtProjectRecruitApplies.size()>1){ | 		if (bgtProjectRecruitApplies.size()>1){ | ||||||
| 			throw new RuntimeException("异常,查询到用户同时在多个工地务工!"); | 			throw new RuntimeException("异常,查询到用户同时在多个工地务工!"); | ||||||
| @ -151,6 +153,16 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 	public Boolean userApplyForRegistration(Long id) { | 	public Boolean userApplyForRegistration(Long id) { | ||||||
| 		//1、获取当前用户 | 		//1、获取当前用户 | ||||||
| 		Long appUserId = SecurityUtils.getAppUserId(); | 		Long appUserId = SecurityUtils.getAppUserId(); | ||||||
|  | 		//2、检查当前用户是否已经有工地了、检查当前用户是否满足对应工种 | ||||||
|  | 		Integer i = baseMapper.selectCount( | ||||||
|  | 			new LambdaQueryWrapper<BgtProjectRecruitApply>(). | ||||||
|  | 			eq(BgtProjectRecruitApply::getUserId, appUserId). | ||||||
|  | 			eq(BgtProjectRecruitApply::getStatus, "3") | ||||||
|  | //			isNotNull(BgtProjectRecruitApply::getEntryTime).ne(BgtProjectRecruitApply::getEntryTime, "") | ||||||
|  | 		); | ||||||
|  | 		if (i>0){ | ||||||
|  | 			throw new RuntimeException("已有工地!不可再次申请!"); | ||||||
|  | 		} | ||||||
| 		//2、插入数据 | 		//2、插入数据 | ||||||
| 		BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply(); | 		BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply(); | ||||||
| 		bgtProjectRecruitApply.setRecruitId(id); | 		bgtProjectRecruitApply.setRecruitId(id); | ||||||
| @ -158,4 +170,10 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 		return baseMapper.insert(bgtProjectRecruitApply) >0; | 		return baseMapper.insert(bgtProjectRecruitApply) >0; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	@Transactional | ||||||
|  | 	public Boolean userCancelRegistration(Long recruitId) { | ||||||
|  | 		return baseMapper.deleteById(new LambdaQueryWrapper<BgtProjectRecruitApply>().eq(BgtProjectRecruitApply::getRecruitId, recruitId)) >0; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -18,11 +18,19 @@ import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; | |||||||
| import com.ruoyi.common.core.page.TableDataInfo; | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
| import com.ruoyi.common.enums.RecruitApplyStatus; | import com.ruoyi.common.enums.RecruitApplyStatus; | ||||||
| import com.ruoyi.common.utils.PageUtils; | import com.ruoyi.common.utils.PageUtils; | ||||||
|  | import com.ruoyi.common.utils.SecurityUtils; | ||||||
| import com.ruoyi.fbs.domain.FbsProjectTask; | import com.ruoyi.fbs.domain.FbsProjectTask; | ||||||
| import com.ruoyi.fbs.service.IFbsProjectTaskService; | import com.ruoyi.fbs.service.IFbsProjectTaskService; | ||||||
|  | import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes; | ||||||
|  | import com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo; | ||||||
|  | import org.springframework.beans.BeanUtils; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  |  | ||||||
| import java.util.*; | import java.util.*; | ||||||
|  |  | ||||||
| @ -153,4 +161,27 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | |||||||
| 		return baseMapper.userProjectDetails(id); | 		return baseMapper.userProjectDetails(id); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public TableDataInfo<WgzAppRegisteredProjectRes> userRegisteredProject(WgzAppRegisteredProjectReq req) { | ||||||
|  | 		Long userId = SecurityUtils.getAppUserId(); | ||||||
|  | 		Page<WgzAppRegisteredProjectReq> pe = new Page<>(); | ||||||
|  | 		pe.setCurrent(req.getPageNum()); | ||||||
|  | 		pe.setSize(req.getPageSize()); | ||||||
|  | 		return PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId)); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public WgzAppCancelRegistrationProjectDetailsRes userCancelRegistrationProjectDetails(Long recruitId) { | ||||||
|  | 		//1、获取项目基础信息 | ||||||
|  | 		WgzAppProjectDetailsRes wgzAppProjectDetailsRes = baseMapper.userProjectDetails(recruitId); | ||||||
|  | 		//2、获取当前项目下的成员 | ||||||
|  | 		List<WgzAppCancelRegistrationProjectDetailsTwo> wgzUser = baseMapper.GetsTheMembersUnderTheCurrentProject(recruitId); | ||||||
|  | 		//3、数据组装 | ||||||
|  | 		WgzAppCancelRegistrationProjectDetailsRes res = new WgzAppCancelRegistrationProjectDetailsRes(); | ||||||
|  | 		BeanUtils.copyProperties(wgzAppProjectDetailsRes,res); | ||||||
|  | 		res.setNumberOfRegistered(wgzUser.size()); | ||||||
|  | 		res.setUserList(wgzUser); | ||||||
|  | 		return res; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,21 @@ | |||||||
|  | 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 | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("已报名项目请求对象") | ||||||
|  | public class WgzAppRegisteredProjectReq extends PageReq { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,16 @@ | |||||||
|  | package com.ruoyi.wgz.bo.req; | ||||||
|  |  | ||||||
|  | import com.ruoyi.common.bo.PageReq; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("项目进行中请求对象") | ||||||
|  | public class WgzAppUnderwayReq extends PageReq { | ||||||
|  | } | ||||||
| @ -0,0 +1,95 @@ | |||||||
|  | package com.ruoyi.wgz.bo.res; | ||||||
|  |  | ||||||
|  | import com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo; | ||||||
|  | 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; | ||||||
|  | import java.time.LocalTime; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("已报名·项目详情返回对象") | ||||||
|  | public class WgzAppCancelRegistrationProjectDetailsRes implements Serializable { | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("主键ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("项目ID") | ||||||
|  | 	private Long projectId; | ||||||
|  |  | ||||||
|  | 	//============== | ||||||
|  | 	@ApiModelProperty("封面图(多个逗号分隔)") | ||||||
|  | 	private String coverPlan; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工名称") | ||||||
|  | 	private String recruitName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工金额") | ||||||
|  | 	private BigDecimal recruitAmount; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工数量") | ||||||
|  | 	private Integer recruitStaffNum; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("任务ID") | ||||||
|  | 	private Long taskId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("任务名称") | ||||||
|  | 	private String taskName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("任务地址") | ||||||
|  | 	private String taskAddress; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工描述") | ||||||
|  | 	private String subDescribe; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工开始时间") | ||||||
|  | 	private String recruitBeginTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("联系人") | ||||||
|  | 	private String recruitContactPerson; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("联系电话") | ||||||
|  | 	private String recruitContactPhone; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工要求") | ||||||
|  | 	private String recruitRequirement; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("已报名数量") | ||||||
|  | 	private Integer numberOfRegistered; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("已报名务工者") | ||||||
|  | 	private List<WgzAppCancelRegistrationProjectDetailsTwo> userList; | ||||||
|  |  | ||||||
|  | 	//--------- | ||||||
|  | 	//--------- | ||||||
|  | 	//--------- | ||||||
|  | 	@ApiModelProperty("上班时间") | ||||||
|  | 	private LocalTime beginWorkTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("下班时间") | ||||||
|  | 	private LocalTime endWorkTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("标段ID") | ||||||
|  | 	private Long sectionId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("分包ID") | ||||||
|  | 	private Long subId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工地址") | ||||||
|  | 	private String recruitAddress; | ||||||
|  | } | ||||||
| @ -0,0 +1,17 @@ | |||||||
|  | package com.ruoyi.wgz.bo.res; | ||||||
|  |  | ||||||
|  | import com.ruoyi.common.bo.PageReq; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("项目进行中返回对象") | ||||||
|  | public class WgzAppDailyRecordRes implements Serializable { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -89,32 +89,4 @@ public class WgzAppProjectDetailsRes implements Serializable { | |||||||
| 	@ApiModelProperty("招工地址") | 	@ApiModelProperty("招工地址") | ||||||
| 	private String recruitAddress; | 	private String recruitAddress; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 	@ApiModelProperty("创建者ID") |  | ||||||
| 	private Long userId; |  | ||||||
|  |  | ||||||
| 	@ApiModelProperty("删除标志(0代表存在 2代表删除)") |  | ||||||
| 	private String delFlag; |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * 更新者 |  | ||||||
| 	 */ |  | ||||||
| 	@Excel(name = "更新者") |  | ||||||
| 	@ApiModelProperty("更新者") |  | ||||||
| 	@TableField(fill = FieldFill.INSERT_UPDATE) |  | ||||||
| 	private String updateBy; |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * 更新时间 |  | ||||||
| 	 */ |  | ||||||
| 	@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |  | ||||||
| 	@ApiModelProperty("更新时间") |  | ||||||
| 	@TableField(fill = FieldFill.INSERT_UPDATE) |  | ||||||
| 	private LocalDateTime updateTime; |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,60 @@ | |||||||
|  | package com.ruoyi.wgz.bo.res; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.FieldFill; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableField; | ||||||
|  | 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.math.BigDecimal; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.time.LocalTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("已报名项目返回对象") | ||||||
|  | public class WgzAppRegisteredProjectRes implements Serializable { | ||||||
|  | 	@ApiModelProperty("主键ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("项目ID") | ||||||
|  | 	private Long projectId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工名称") | ||||||
|  | 	private String recruitName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("封面图(多个逗号分隔)") | ||||||
|  | 	private String coverPlan; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工数量") | ||||||
|  | 	private Integer recruitStaffNum; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工金额") | ||||||
|  | 	private BigDecimal recruitAmount; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("任务ID") | ||||||
|  | 	private Long taskId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("任务名称") | ||||||
|  | 	private String taskName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("任务地址") | ||||||
|  | 	private String taskAddress; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工要求") | ||||||
|  | 	private String recruitRequirement; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("已报名数量") | ||||||
|  | 	private Integer numberOfRegistered; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,36 @@ | |||||||
|  | package com.ruoyi.wgz.bo.rests; | ||||||
|  |  | ||||||
|  | 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; | ||||||
|  | import java.time.LocalTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("已报名·项目详情返回对象") | ||||||
|  | public class WgzAppCancelRegistrationProjectDetailsTwo implements Serializable { | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("务工者ID") | ||||||
|  | 	private Long userId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("务工者名称") | ||||||
|  | 	private String username; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("务工者头像") | ||||||
|  | 	private String avatar_name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("务工者评分") | ||||||
|  | 	private Double score; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,6 +1,7 @@ | |||||||
| package com.ruoyi.wgz.mapper; | package com.ruoyi.wgz.mapper; | ||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.ruoyi.wgz.bo.req.WgzAppDailyRecordReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes; | import com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes; | ||||||
| import com.ruoyi.wgz.domain.WgzDailyClock; | import com.ruoyi.wgz.domain.WgzDailyClock; | ||||||
| @ -22,5 +23,5 @@ public interface WgzDailyClockMapper extends BaseMapperPlus<WgzDailyClock> { | |||||||
| 	 * @param page 分页对象 | 	 * @param page 分页对象 | ||||||
| 	 * @return 分页查询结果 | 	 * @return 分页查询结果 | ||||||
| 	 */ | 	 */ | ||||||
| 	Page<WgzAppUserDailyRecordRes> userDailyRecordListPage(Page<WgzAppUserDailyRecordRes> page); | 	Page<WgzAppUserDailyRecordRes> userDailyRecordListPage(Page<WgzAppDailyRecordReq> page); | ||||||
| } | } | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ package com.ruoyi.wgz.mapper; | |||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.core.metadata.IPage; | import com.baomidou.mybatisplus.core.metadata.IPage; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | ||||||
| import com.ruoyi.wgz.domain.WgzLeave; | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | ||||||
| @ -23,6 +24,6 @@ public interface WgzLeaveMapper extends BaseMapperPlus<WgzLeave> { | |||||||
|      * @param page 分页对象 |      * @param page 分页对象 | ||||||
|      * @return 分页查询结果 |      * @return 分页查询结果 | ||||||
|      */ |      */ | ||||||
|     Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(Page<WgzAppLeaveHistoryListPageRes> page); |     Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(Page<WgzAppLeaveHistoryListPageReq> page); | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| package com.ruoyi.wgz.mapper; | package com.ruoyi.wgz.mapper; | ||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.ruoyi.wgz.bo.req.WgzAppReplacementCardRecordReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes; | import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes; | ||||||
| import com.ruoyi.wgz.domain.WgzReissueacard; | import com.ruoyi.wgz.domain.WgzReissueacard; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | ||||||
| @ -21,5 +22,5 @@ public interface WgzReissueacardMapper extends BaseMapperPlus<WgzReissueacard> { | |||||||
| 	 * @param page 分页对象 | 	 * @param page 分页对象 | ||||||
| 	 * @return 分页查询结果 | 	 * @return 分页查询结果 | ||||||
| 	 */ | 	 */ | ||||||
| 	Page<WgzReplacementCardRecordRes> userReplacementCardRecordListPage(Page<WgzReplacementCardRecordRes> page); | 	Page<WgzReplacementCardRecordRes> userReplacementCardRecordListPage(Page<WgzAppReplacementCardRecordReq> page); | ||||||
| } | } | ||||||
|  | |||||||
| @ -153,7 +153,7 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe | |||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(WgzAppDailyRecordReq req) { |     public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(WgzAppDailyRecordReq req) { | ||||||
|         Page<WgzAppUserDailyRecordRes> pe = new Page<>(); |         Page<WgzAppDailyRecordReq> pe = new Page<>(); | ||||||
|         pe.setCurrent(req.getPageNum()); |         pe.setCurrent(req.getPageNum()); | ||||||
|         pe.setSize(req.getPageSize()); |         pe.setSize(req.getPageSize()); | ||||||
|         return PageUtils.buildDataInfo(baseMapper.userDailyRecordListPage(pe)); |         return PageUtils.buildDataInfo(baseMapper.userDailyRecordListPage(pe)); | ||||||
|  | |||||||
| @ -148,7 +148,7 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public TableDataInfo<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(WgzAppLeaveHistoryListPageReq req) { | 	public TableDataInfo<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(WgzAppLeaveHistoryListPageReq req) { | ||||||
| 		Page<WgzAppLeaveHistoryListPageRes> queryDTOPage = new Page<>(); | 		Page<WgzAppLeaveHistoryListPageReq> queryDTOPage = new Page<>(); | ||||||
| 		queryDTOPage.setCurrent(req.getPageNum()); | 		queryDTOPage.setCurrent(req.getPageNum()); | ||||||
| 		queryDTOPage.setSize(req.getPageSize()); | 		queryDTOPage.setSize(req.getPageSize()); | ||||||
| 		return PageUtils.buildDataInfo(baseMapper.userLeaveHistoryListPage(queryDTOPage)); | 		return PageUtils.buildDataInfo(baseMapper.userLeaveHistoryListPage(queryDTOPage)); | ||||||
|  | |||||||
| @ -163,7 +163,7 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM | |||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public TableDataInfo<WgzReplacementCardRecordRes> userReplacementCardRecord(WgzAppReplacementCardRecordReq req) { | 	public TableDataInfo<WgzReplacementCardRecordRes> userReplacementCardRecord(WgzAppReplacementCardRecordReq req) { | ||||||
| 		Page<WgzReplacementCardRecordRes> queryDTOPage = new Page<>(); | 		Page<WgzAppReplacementCardRecordReq> queryDTOPage = new Page<>(); | ||||||
| 		queryDTOPage.setCurrent(req.getPageNum()); | 		queryDTOPage.setCurrent(req.getPageNum()); | ||||||
| 		queryDTOPage.setSize(req.getPageSize()); | 		queryDTOPage.setSize(req.getPageSize()); | ||||||
| 		return PageUtils.buildDataInfo(baseMapper.userReplacementCardRecordListPage(queryDTOPage)); | 		return PageUtils.buildDataInfo(baseMapper.userReplacementCardRecordListPage(queryDTOPage)); | ||||||
|  | |||||||
| @ -54,4 +54,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||||
|             a.id = #{id} AND a.del_flag = 0 |             a.id = #{id} AND a.del_flag = 0 | ||||||
|     </select> |     </select> | ||||||
|  |  | ||||||
|  |     <select id="userRegisteredProject" resultType="com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes"> | ||||||
|  |         SELECT | ||||||
|  |             a.*, | ||||||
|  |             b.task_name, | ||||||
|  |             b.task_address, | ||||||
|  |             b.task_img, | ||||||
|  |             (SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = a.id) as numberOfRegistered | ||||||
|  |         FROM | ||||||
|  |             bgt_project_recruit as a | ||||||
|  |                 LEFT JOIN fbs_project_task as b ON (a.task_id = b.id AND b.del_flag = 0) | ||||||
|  |         WHERE | ||||||
|  |             a.id = #{id} AND a.del_flag = 0 | ||||||
|  |     </select> | ||||||
|  |  | ||||||
|  |     <select id="GetsTheMembersUnderTheCurrentProject" resultType="com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo"> | ||||||
|  |         SELECT | ||||||
|  |             a.user_id, | ||||||
|  |             b.username, | ||||||
|  |             b.avatar_name, | ||||||
|  |             b.score | ||||||
|  |         FROM | ||||||
|  |             bgt_project_recruit_apply as a | ||||||
|  |                 LEFT JOIN wgz_user as b ON (a.user_id = b.user_id AND b.del_flag = 0) | ||||||
|  |         WHERE | ||||||
|  |             a.id = #{recruitId} AND a.del_flag = 0 | ||||||
|  |     </select> | ||||||
|  |  | ||||||
| </mapper> | </mapper> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user