Merge remote-tracking branch 'origin/master'
This commit is contained in:
		@ -6,12 +6,10 @@ 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.wgz.bo.req.WgzAppGetMessageListReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.*;
 | 
			
		||||
import com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo;
 | 
			
		||||
import org.apache.ibatis.annotations.CacheNamespace;
 | 
			
		||||
import org.apache.ibatis.annotations.Param;
 | 
			
		||||
@ -37,4 +35,6 @@ public interface BgtProjectRecruitMapper extends BaseMapperPlus<BgtProjectRecrui
 | 
			
		||||
 | 
			
		||||
	// 获取指定项目下的所有成员
 | 
			
		||||
	List<WgzAppCancelRegistrationProjectDetailsTwo> GetsTheMembersUnderTheCurrentProject (@Param("recruitId") Long recruitId);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -115,7 +115,7 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
 | 
			
		||||
	/**
 | 
			
		||||
	 * 务工者取消报名
 | 
			
		||||
	 */
 | 
			
		||||
	Boolean userCancelRegistration(Long recruitId);
 | 
			
		||||
	Boolean userCancelRegistration(Long recruitApplyId);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 项目进行中
 | 
			
		||||
 | 
			
		||||
@ -171,11 +171,10 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
	 */
 | 
			
		||||
	@Override
 | 
			
		||||
	public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) {
 | 
			
		||||
		String[] strings = {"3","5"};
 | 
			
		||||
		LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
		lqw.eq(BgtProjectRecruitApply::getUserId, id).
 | 
			
		||||
			eq(BgtProjectRecruitApply::getStatus, "3"); //包工头同意、务工者同意才算进场ok
 | 
			
		||||
//			isNotNull(BgtProjectRecruitApply::getEntryTime).
 | 
			
		||||
//			ne(BgtProjectRecruitApply::getEntryTime, "");
 | 
			
		||||
			in(BgtProjectRecruitApply::getStatus, strings); //包工头+务工者同意 or 进场 才算进场ok
 | 
			
		||||
		List<BgtProjectRecruitApply> bgtProjectRecruitApplies = baseMapper.selectList(lqw);
 | 
			
		||||
		if (bgtProjectRecruitApplies.size()>1){
 | 
			
		||||
			throw new RuntimeException("异常,查询到用户同时在多个工地务工!");
 | 
			
		||||
@ -280,8 +279,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
	}
 | 
			
		||||
	@Override
 | 
			
		||||
	@Transactional
 | 
			
		||||
	public Boolean userCancelRegistration(Long recruitId) {
 | 
			
		||||
		return baseMapper.deleteById(new LambdaQueryWrapper<BgtProjectRecruitApply>().eq(BgtProjectRecruitApply::getRecruitId, recruitId)) >0;
 | 
			
		||||
	public Boolean userCancelRegistration(Long recruitApplyId) {
 | 
			
		||||
		BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply();
 | 
			
		||||
		bgtProjectRecruitApply.setId(recruitApplyId);
 | 
			
		||||
		bgtProjectRecruitApply.setStatus("7");
 | 
			
		||||
		return baseMapper.updateById(bgtProjectRecruitApply) >0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -296,10 +298,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public Boolean userConfirmRegistration(WgzAppConfirmRegistrationReq req) {
 | 
			
		||||
		//1、获取当前用户
 | 
			
		||||
		Long appUserId = SecurityUtils.getAppUserId();
 | 
			
		||||
		//2、当前用户+项目ID确认
 | 
			
		||||
		return null;
 | 
			
		||||
		BgtProjectRecruitApply apply = new BgtProjectRecruitApply().setId(req.getRecruitApplyId()).setStatus(req.getStatus());
 | 
			
		||||
		return this.updateById(apply);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -45,6 +45,9 @@ public class AnnexQueryBo extends BaseEntity {
 | 
			
		||||
	/** 用户类型 */
 | 
			
		||||
	@ApiModelProperty("用户类型")
 | 
			
		||||
	private String userType;
 | 
			
		||||
	/** 招工ID */
 | 
			
		||||
	@ApiModelProperty("招工ID")
 | 
			
		||||
	private Long recruitId;
 | 
			
		||||
	/** 附件类型 */
 | 
			
		||||
	@ApiModelProperty("附件类型")
 | 
			
		||||
	private String annexType;
 | 
			
		||||
 | 
			
		||||
@ -74,4 +74,9 @@ public interface IAnnexService extends IServicePlus<Annex> {
 | 
			
		||||
	 * 根据表自增ID来删除指定附件数据,并删除对应的资源
 | 
			
		||||
	 */
 | 
			
		||||
	Boolean deleteByIds(Long id);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 根据务工者唯一标识+招工标识 得到附件信息
 | 
			
		||||
	 */
 | 
			
		||||
	List<Annex> findByUserIdAndRecruitId(Long userId,Long recruitId,String[] types);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,8 @@ import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
import static com.ruoyi.common.constant.Constants.WGZ;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 附件Service业务层处理
 | 
			
		||||
 *
 | 
			
		||||
@ -56,6 +58,8 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
 | 
			
		||||
        Map<String, Object> params = bo.getParams();
 | 
			
		||||
        LambdaQueryWrapper<Annex> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.eq(bo.getUserId() != null, Annex::getUserId, bo.getUserId());
 | 
			
		||||
		lqw.eq(StrUtil.isNotBlank(bo.getUserType()), Annex::getUserType, bo.getUserType());
 | 
			
		||||
		lqw.eq(bo.getRecruitId() != null, Annex::getRecruitId, bo.getRecruitId());
 | 
			
		||||
        lqw.eq(StrUtil.isNotBlank(bo.getAnnexType()), Annex::getAnnexType, bo.getAnnexType());
 | 
			
		||||
        lqw.like(StrUtil.isNotBlank(bo.getAnnexName()), Annex::getAnnexName, bo.getAnnexName());
 | 
			
		||||
        lqw.eq(StrUtil.isNotBlank(bo.getAnnexUrl()), Annex::getAnnexUrl, bo.getAnnexUrl());
 | 
			
		||||
@ -128,4 +132,14 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
 | 
			
		||||
		}
 | 
			
		||||
		return true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public List<Annex> findByUserIdAndRecruitId(Long userId, Long recruitId, String[] types) {
 | 
			
		||||
		LambdaQueryWrapper<Annex> wra = new LambdaQueryWrapper<Annex>().
 | 
			
		||||
			eq(Annex::getUserType,WGZ).
 | 
			
		||||
			eq(Annex::getUserId,userId).
 | 
			
		||||
			eq(Annex::getRecruitId,recruitId).
 | 
			
		||||
			in(Annex::getAnnexType,types);
 | 
			
		||||
		return baseMapper.selectList(wra);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -8,6 +8,7 @@ import lombok.experimental.Accessors;
 | 
			
		||||
 | 
			
		||||
import javax.validation.constraints.NotBlank;
 | 
			
		||||
import javax.validation.constraints.NotNull;
 | 
			
		||||
import javax.validation.constraints.Pattern;
 | 
			
		||||
import javax.validation.constraints.Size;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.time.Year;
 | 
			
		||||
@ -17,13 +18,9 @@ import java.time.Year;
 | 
			
		||||
@Accessors(chain = true)
 | 
			
		||||
@ApiModel("务工者APP-实名认证·附件结构请求对象")
 | 
			
		||||
public class WgzAppAttachmentAcquisitionReq implements Serializable {
 | 
			
		||||
	@ApiModelProperty("唯一标识")
 | 
			
		||||
	@NotNull(message = "唯一标识不能为空")
 | 
			
		||||
	private Long userId;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("0资格证书 1劳动合同 2保单")
 | 
			
		||||
	@NotNull(message = "唯一标识不能为空")
 | 
			
		||||
	@Size(min = 1, message = "唯一标识数组必须至少包含一个元素")
 | 
			
		||||
	@ApiModelProperty("0资格证书 1劳动合同 2保单 3入场材料 4电子税票 5工作明细报告")
 | 
			
		||||
	@Pattern(regexp = "^[0-5]$", message = "status 只能是 0 到 5 之间的数字")
 | 
			
		||||
	private String[] specifiedAttachment;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@ import lombok.Data;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
import lombok.experimental.Accessors;
 | 
			
		||||
 | 
			
		||||
import javax.validation.constraints.Pattern;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@ -14,8 +15,9 @@ import java.io.Serializable;
 | 
			
		||||
@ApiModel("确认|拒绝报名请求对象")
 | 
			
		||||
public class WgzAppConfirmRegistrationReq implements Serializable {
 | 
			
		||||
	@ApiModelProperty("招工ID")
 | 
			
		||||
	private Long recruitId;
 | 
			
		||||
	private Long recruitApplyId;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("0拒绝 1确认")
 | 
			
		||||
	@ApiModelProperty("3务工者同意  4务工者拒绝 ")
 | 
			
		||||
	@Pattern(regexp = "^(3|4)$", message = "status 只能是 3 或 4")
 | 
			
		||||
	private String status;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -20,11 +20,14 @@ 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 projectId;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工申请ID")
 | 
			
		||||
	private Long recruitApplyId;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工名称")
 | 
			
		||||
	private String recruitName;
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,72 @@
 | 
			
		||||
package com.ruoyi.wgz.bo.res;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.domain.Annex;
 | 
			
		||||
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.LocalDate;
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
import java.time.LocalTime;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@Accessors(chain = true)
 | 
			
		||||
@ApiModel("消息报名信息返回对象")
 | 
			
		||||
public class WgzAppRegistrationInformationRes implements Serializable {
 | 
			
		||||
	@ApiModelProperty("招工ID")
 | 
			
		||||
	private Long recruitId;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工申请ID")
 | 
			
		||||
	private Long recruitApplyId;
 | 
			
		||||
 | 
			
		||||
	//==============
 | 
			
		||||
	@ApiModelProperty("封面图(多个逗号分隔)")
 | 
			
		||||
	private String coverPlan;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("创建时间")
 | 
			
		||||
	private LocalDateTime createTime;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工名称")
 | 
			
		||||
	private String recruitName;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工金额")
 | 
			
		||||
	private BigDecimal recruitAmount;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工数量")
 | 
			
		||||
	private Integer recruitStaffNum;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("任务名称")
 | 
			
		||||
	private String taskName;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("任务地址")
 | 
			
		||||
	private String taskAddress;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工描述")
 | 
			
		||||
	private String subDescribe;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("开工日期")
 | 
			
		||||
	private LocalDate recruitWorkBeginTime;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("进场日期")
 | 
			
		||||
	private LocalDate entryTime;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("联系人")
 | 
			
		||||
	private String recruitContactPerson;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("联系电话")
 | 
			
		||||
	private String recruitContactPhone;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("备注")
 | 
			
		||||
	private String remark;
 | 
			
		||||
 | 
			
		||||
//	@ApiModelProperty("附件实体数据")
 | 
			
		||||
//	private List<Annex> annex;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -5,6 +5,7 @@ import com.ruoyi.bgt.domain.dto.BgtDailyClockListDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtDailyClockListVO;
 | 
			
		||||
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzMessage;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
 | 
			
		||||
@ -25,4 +26,7 @@ import java.util.Map;
 | 
			
		||||
public interface WgzMessageMapper extends BaseMapperPlus<WgzMessage> {
 | 
			
		||||
 | 
			
		||||
	Page<WgzAppGetMessageListRes> userGetMessageList(@Param("page") Page<WgzAppGetMessageListReq> page);
 | 
			
		||||
 | 
			
		||||
	//	//根据招工id获取到招工的信息+附件
 | 
			
		||||
	WgzAppRegistrationInformationRes findByRecruitIdData(@Param("recruitId") Long recruitId);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,7 @@ package com.ruoyi.wgz.service;
 | 
			
		||||
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzMessage;
 | 
			
		||||
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
 | 
			
		||||
@ -78,4 +79,9 @@ public interface IWgzMessageService extends IServicePlus<WgzMessage> {
 | 
			
		||||
	 * 消息列表
 | 
			
		||||
	 */
 | 
			
		||||
	TableDataInfo<WgzAppGetMessageListRes> userGetMessageList(@Validated WgzAppGetMessageListReq req);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 根据消息招工申请信息的主键ID去获取招工信息
 | 
			
		||||
	 */
 | 
			
		||||
	WgzAppRegistrationInformationRes userRegistrationInformation(Long messageId);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,11 @@ package com.ruoyi.wgz.service.impl;
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.util.StrUtil;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.bgt.mapper.BgtProjectRecruitMapper;
 | 
			
		||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
 | 
			
		||||
import com.ruoyi.common.core.domain.entity.SysDictData;
 | 
			
		||||
import com.ruoyi.common.domain.Annex;
 | 
			
		||||
import com.ruoyi.common.service.IAnnexService;
 | 
			
		||||
import com.ruoyi.common.utils.PageUtils;
 | 
			
		||||
import com.ruoyi.common.core.page.PagePlus;
 | 
			
		||||
import com.ruoyi.common.core.page.TableDataInfo;
 | 
			
		||||
@ -13,6 +17,7 @@ import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.rests.WgzAppMessageTypeStatisticsTwo;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.scheduling.annotation.Async;
 | 
			
		||||
@ -42,6 +47,9 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ISysDictTypeService dictTypeService;
 | 
			
		||||
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IAnnexService annexService;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public WgzMessage queryById(Long id){
 | 
			
		||||
        return getById(id);
 | 
			
		||||
@ -149,4 +157,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
 | 
			
		||||
		queryDTOPage.setSize(req.getPageSize());
 | 
			
		||||
		return PageUtils.buildDataInfo(baseMapper.userGetMessageList(queryDTOPage));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public WgzAppRegistrationInformationRes userRegistrationInformation(Long messageId) {
 | 
			
		||||
		Long appUserId = SecurityUtils.getAppUserId();
 | 
			
		||||
		//1、获取当前消息的招工ID
 | 
			
		||||
		WgzMessage byId = this.getById(messageId);
 | 
			
		||||
		//2、根据招工ID得到招工信息及附件
 | 
			
		||||
		WgzAppRegistrationInformationRes byRecruitIdData = baseMapper.findByRecruitIdData(byId.getId());
 | 
			
		||||
//		List<Annex> byUserIdAndRecruitId = annexService.findByUserIdAndRecruitId(appUserId, byId.getId(), new String[]{"1"});
 | 
			
		||||
//		byRecruitIdData.setAnnex(null);
 | 
			
		||||
		return byRecruitIdData;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user