修改用户通用附件获取
This commit is contained in:
@ -44,6 +44,8 @@ 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APP务工者Controller
|
* APP务工者Controller
|
||||||
*
|
*
|
||||||
@ -319,7 +321,7 @@ public class WgzAppController {
|
|||||||
/**
|
/**
|
||||||
* 【首页】【项目详情】 项目详情
|
* 【首页】【项目详情】 项目详情
|
||||||
*/
|
*/
|
||||||
@ApiOperation("【首页】【项目详情】 项目详情)")
|
@ApiOperation("【首页】【招工列表】【项目详情】 项目详情)")
|
||||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectDetails')")
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectDetails')")
|
||||||
@GetMapping("/WgzAppUserProjectDetails/{id}")
|
@GetMapping("/WgzAppUserProjectDetails/{id}")
|
||||||
public AjaxResult<WgzAppProjectDetailsRes> userProjectDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
|
public AjaxResult<WgzAppProjectDetailsRes> userProjectDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
|
||||||
@ -336,16 +338,6 @@ public class WgzAppController {
|
|||||||
return AjaxResult.success(iBgtProjectRecruitApplyService.userApplyForRegistration(id));
|
return AjaxResult.success(iBgtProjectRecruitApplyService.userApplyForRegistration(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 【首页】【项目详情】 项目详情·确认|拒绝报名
|
|
||||||
*/
|
|
||||||
@ApiOperation("【首页】【项目详情】 项目详情·确认|拒绝报名)")
|
|
||||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userConfirmRegistration')")
|
|
||||||
@GetMapping("/WgzAppUserConfirmRegistration/{id}")
|
|
||||||
public AjaxResult<Boolean> userConfirmRegistration(@Validated WgzAppConfirmRegistrationReq req) {
|
|
||||||
return AjaxResult.success(iBgtProjectRecruitApplyService.userConfirmRegistration(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【首页】【已报名项目】 已报名项目
|
* 【首页】【已报名项目】 已报名项目
|
||||||
*/
|
*/
|
||||||
@ -361,9 +353,9 @@ public class WgzAppController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("【首页】【已报名项目】 已报名项目·取消报名)")
|
@ApiOperation("【首页】【已报名项目】 已报名项目·取消报名)")
|
||||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistration')")
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistration')")
|
||||||
@DeleteMapping("/WgzAppUserCancelRegistration/{recruitId}")
|
@DeleteMapping("/WgzAppUserCancelRegistration/{recruitApplyId}")
|
||||||
public AjaxResult<Boolean> userCancelRegistration(@NotEmpty(message = "招工主键不能为空") @PathVariable Long recruitId) {
|
public AjaxResult<Boolean> userCancelRegistration(@NotEmpty(message = "招工主键不能为空") @PathVariable Long recruitApplyId) {
|
||||||
return AjaxResult.success(iBgtProjectRecruitApplyService.userCancelRegistration(recruitId));
|
return AjaxResult.success(iBgtProjectRecruitApplyService.userCancelRegistration(recruitApplyId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -478,6 +470,26 @@ public class WgzAppController {
|
|||||||
return iWgzMessageService.userGetMessageList(req);
|
return iWgzMessageService.userGetMessageList(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【消息】【报名消息】 报名消息
|
||||||
|
*/
|
||||||
|
@ApiOperation("【消息】【报名消息】 报名消息")
|
||||||
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userRegistrationInformation')")
|
||||||
|
@GetMapping("/WgzAppUserRegistrationInformation/{messageId}")
|
||||||
|
public AjaxResult<WgzAppRegistrationInformationRes> userRegistrationInformation(@NotNull(message = "消息主键ID不能为空") @PathVariable("messageId") Long messageId) {
|
||||||
|
return AjaxResult.success(iWgzMessageService.userRegistrationInformation(messageId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【消息】【报名消息】 报名消息·确认|拒绝报名
|
||||||
|
*/
|
||||||
|
@ApiOperation("【消息】【报名消息】 报名消息·确认|拒绝报名")
|
||||||
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userConfirmRegistration')")
|
||||||
|
@GetMapping("/WgzAppUserConfirmRegistration")
|
||||||
|
public AjaxResult<Boolean> userConfirmRegistration(@Validated WgzAppConfirmRegistrationReq req) {
|
||||||
|
return AjaxResult.success(iBgtProjectRecruitApplyService.userConfirmRegistration(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -500,30 +512,37 @@ public class WgzAppController {
|
|||||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userAttachmentAcquisition')")
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userAttachmentAcquisition')")
|
||||||
@GetMapping("/wgzUserAttachmentAcquisition")
|
@GetMapping("/wgzUserAttachmentAcquisition")
|
||||||
public AjaxResult<WgzAppAttachmentAcquisitionRes> userAttachmentAcquisition(@Validated WgzAppAttachmentAcquisitionReq req) {
|
public AjaxResult<WgzAppAttachmentAcquisitionRes> userAttachmentAcquisition(@Validated WgzAppAttachmentAcquisitionReq req) {
|
||||||
|
Long appUserId = SecurityUtils.getAppUserId();
|
||||||
|
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||||
|
Long recruitId = by.getRecruitId();
|
||||||
|
if (!appUserId.equals(recruitId)){
|
||||||
|
throw new RuntimeException("当前用户不是该招工的申请人");
|
||||||
|
}
|
||||||
//返回对象
|
//返回对象
|
||||||
WgzAppAttachmentAcquisitionRes wgzAppAttachmentAcquisitionRes = new WgzAppAttachmentAcquisitionRes();
|
WgzAppAttachmentAcquisitionRes wgzAppAttachmentAcquisitionRes = new WgzAppAttachmentAcquisitionRes();
|
||||||
List<WgzAutonymAnnex> resData = new ArrayList<>();
|
List<WgzAutonymAnnex> resData = new ArrayList<>();
|
||||||
//附件类型
|
//附件类型
|
||||||
String userType = "wgz_attachment";
|
String annexType = "wgz_attachment";
|
||||||
//具体附件值
|
//具体附件值
|
||||||
String[] specifiedAttachment = req.getSpecifiedAttachment();
|
String[] specifiedAttachment = req.getSpecifiedAttachment();
|
||||||
//String[] SpecifiedAttachment = {"0"};
|
//String[] SpecifiedAttachment = {"0"};
|
||||||
|
|
||||||
//1、获取指定实名认证的附件结构返回
|
//1、获取指定实名认证的附件结构返回
|
||||||
List<SysDictData> data = dictTypeService.selectDictDataByType(userType);
|
List<SysDictData> data = dictTypeService.selectDictDataByType(annexType);
|
||||||
data.forEach(item -> {
|
data.forEach(item -> {
|
||||||
for (String val : specifiedAttachment) {
|
for (String val : specifiedAttachment) {
|
||||||
String dictValue = item.getDictValue();
|
String dictValue = item.getDictValue();
|
||||||
if (dictValue.equals(val)) {
|
if (dictValue.equals(val)) {
|
||||||
//2、每个结构下有那些附件(附件可能有多个或一个);查询附件表
|
//2、每个结构下有那些附件(附件可能有多个或一个);查询附件表
|
||||||
AnnexQueryBo annexQueryBo = new AnnexQueryBo();
|
AnnexQueryBo annexQueryBo = new AnnexQueryBo();
|
||||||
annexQueryBo.setUserId(req.getUserId());
|
annexQueryBo.setUserId(appUserId);
|
||||||
annexQueryBo.setUserType(userType);
|
annexQueryBo.setUserType(WGZ);
|
||||||
|
annexQueryBo.setRecruitId(recruitId);
|
||||||
annexQueryBo.setAnnexType(val);
|
annexQueryBo.setAnnexType(val);
|
||||||
List<Annex> annexes = iAnnexService.queryList(annexQueryBo);
|
List<Annex> annexes = iAnnexService.queryList(annexQueryBo);
|
||||||
//3、具体附件结构
|
//3、具体附件结构
|
||||||
WgzAutonymAnnex wgzAutonymAnnex = new WgzAutonymAnnex().
|
WgzAutonymAnnex wgzAutonymAnnex = new WgzAutonymAnnex().
|
||||||
setUserType(userType).
|
setUserType(WGZ).
|
||||||
setDictLabel(item.getDictLabel()).
|
setDictLabel(item.getDictLabel()).
|
||||||
setDictValue(dictValue).setAnnex(annexes);
|
setDictValue(dictValue).setAnnex(annexes);
|
||||||
resData.add(wgzAutonymAnnex);
|
resData.add(wgzAutonymAnnex);
|
||||||
|
@ -6,12 +6,10 @@ 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.WgzAppGetMessageListReq;
|
||||||
import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq;
|
import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq;
|
||||||
import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq;
|
import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes;
|
import com.ruoyi.wgz.bo.res.*;
|
||||||
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.rests.WgzAppCancelRegistrationProjectDetailsTwo;
|
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;
|
||||||
@ -37,4 +35,6 @@ public interface BgtProjectRecruitMapper extends BaseMapperPlus<BgtProjectRecrui
|
|||||||
|
|
||||||
// 获取指定项目下的所有成员
|
// 获取指定项目下的所有成员
|
||||||
List<WgzAppCancelRegistrationProjectDetailsTwo> GetsTheMembersUnderTheCurrentProject (@Param("recruitId") Long recruitId);
|
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
|
@Override
|
||||||
public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) {
|
public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) {
|
||||||
|
String[] strings = {"3","5"};
|
||||||
LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(BgtProjectRecruitApply::getUserId, id).
|
lqw.eq(BgtProjectRecruitApply::getUserId, id).
|
||||||
eq(BgtProjectRecruitApply::getStatus, "3"); //包工头同意、务工者同意才算进场ok
|
in(BgtProjectRecruitApply::getStatus, strings); //包工头+务工者同意 or 进场 才算进场ok
|
||||||
// isNotNull(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("异常,查询到用户同时在多个工地务工!");
|
||||||
@ -280,8 +279,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean userCancelRegistration(Long recruitId) {
|
public Boolean userCancelRegistration(Long recruitApplyId) {
|
||||||
return baseMapper.deleteById(new LambdaQueryWrapper<BgtProjectRecruitApply>().eq(BgtProjectRecruitApply::getRecruitId, recruitId)) >0;
|
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
|
@Override
|
||||||
public Boolean userConfirmRegistration(WgzAppConfirmRegistrationReq req) {
|
public Boolean userConfirmRegistration(WgzAppConfirmRegistrationReq req) {
|
||||||
//1、获取当前用户
|
BgtProjectRecruitApply apply = new BgtProjectRecruitApply().setId(req.getRecruitApplyId()).setStatus(req.getStatus());
|
||||||
Long appUserId = SecurityUtils.getAppUserId();
|
return this.updateById(apply);
|
||||||
//2、当前用户+项目ID确认
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,9 @@ public class AnnexQueryBo extends BaseEntity {
|
|||||||
/** 用户类型 */
|
/** 用户类型 */
|
||||||
@ApiModelProperty("用户类型")
|
@ApiModelProperty("用户类型")
|
||||||
private String userType;
|
private String userType;
|
||||||
|
/** 招工ID */
|
||||||
|
@ApiModelProperty("招工ID")
|
||||||
|
private Long recruitId;
|
||||||
/** 附件类型 */
|
/** 附件类型 */
|
||||||
@ApiModelProperty("附件类型")
|
@ApiModelProperty("附件类型")
|
||||||
private String annexType;
|
private String annexType;
|
||||||
|
@ -74,4 +74,9 @@ public interface IAnnexService extends IServicePlus<Annex> {
|
|||||||
* 根据表自增ID来删除指定附件数据,并删除对应的资源
|
* 根据表自增ID来删除指定附件数据,并删除对应的资源
|
||||||
*/
|
*/
|
||||||
Boolean deleteByIds(Long 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.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.constant.Constants.WGZ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件Service业务层处理
|
* 附件Service业务层处理
|
||||||
*
|
*
|
||||||
@ -56,6 +58,8 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
|
|||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
LambdaQueryWrapper<Annex> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<Annex> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(bo.getUserId() != null, Annex::getUserId, bo.getUserId());
|
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.eq(StrUtil.isNotBlank(bo.getAnnexType()), Annex::getAnnexType, bo.getAnnexType());
|
||||||
lqw.like(StrUtil.isNotBlank(bo.getAnnexName()), Annex::getAnnexName, bo.getAnnexName());
|
lqw.like(StrUtil.isNotBlank(bo.getAnnexName()), Annex::getAnnexName, bo.getAnnexName());
|
||||||
lqw.eq(StrUtil.isNotBlank(bo.getAnnexUrl()), Annex::getAnnexUrl, bo.getAnnexUrl());
|
lqw.eq(StrUtil.isNotBlank(bo.getAnnexUrl()), Annex::getAnnexUrl, bo.getAnnexUrl());
|
||||||
@ -128,4 +132,14 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
|
|||||||
}
|
}
|
||||||
return true;
|
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.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.Year;
|
import java.time.Year;
|
||||||
@ -17,13 +18,9 @@ import java.time.Year;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel("务工者APP-实名认证·附件结构请求对象")
|
@ApiModel("务工者APP-实名认证·附件结构请求对象")
|
||||||
public class WgzAppAttachmentAcquisitionReq implements Serializable {
|
public class WgzAppAttachmentAcquisitionReq implements Serializable {
|
||||||
@ApiModelProperty("唯一标识")
|
|
||||||
@NotNull(message = "唯一标识不能为空")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
@ApiModelProperty("0资格证书 1劳动合同 2保单")
|
@ApiModelProperty("0资格证书 1劳动合同 2保单 3入场材料 4电子税票 5工作明细报告")
|
||||||
@NotNull(message = "唯一标识不能为空")
|
@Pattern(regexp = "^[0-5]$", message = "status 只能是 0 到 5 之间的数字")
|
||||||
@Size(min = 1, message = "唯一标识数组必须至少包含一个元素")
|
|
||||||
private String[] specifiedAttachment;
|
private String[] specifiedAttachment;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -14,8 +15,9 @@ import java.io.Serializable;
|
|||||||
@ApiModel("确认|拒绝报名请求对象")
|
@ApiModel("确认|拒绝报名请求对象")
|
||||||
public class WgzAppConfirmRegistrationReq implements Serializable {
|
public class WgzAppConfirmRegistrationReq implements Serializable {
|
||||||
@ApiModelProperty("招工ID")
|
@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;
|
private String status;
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,14 @@ import java.time.LocalTime;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel("已报名项目返回对象")
|
@ApiModel("已报名项目返回对象")
|
||||||
public class WgzAppRegisteredProjectRes implements Serializable {
|
public class WgzAppRegisteredProjectRes implements Serializable {
|
||||||
@ApiModelProperty("主键ID")
|
@ApiModelProperty("招工ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ApiModelProperty("项目ID")
|
// @ApiModelProperty("招工ID")
|
||||||
private Long projectId;
|
// private Long projectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工申请ID")
|
||||||
|
private Long recruitApplyId;
|
||||||
|
|
||||||
@ApiModelProperty("招工名称")
|
@ApiModelProperty("招工名称")
|
||||||
private String recruitName;
|
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.bgt.domain.vo.BgtDailyClockListVO;
|
||||||
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
|
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
|
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
|
||||||
|
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
|
||||||
import com.ruoyi.wgz.domain.WgzMessage;
|
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;
|
||||||
@ -25,4 +26,7 @@ import java.util.Map;
|
|||||||
public interface WgzMessageMapper extends BaseMapperPlus<WgzMessage> {
|
public interface WgzMessageMapper extends BaseMapperPlus<WgzMessage> {
|
||||||
|
|
||||||
Page<WgzAppGetMessageListRes> userGetMessageList(@Param("page") Page<WgzAppGetMessageListReq> page);
|
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.req.WgzAppGetMessageListReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
|
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
|
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
|
||||||
|
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
|
||||||
import com.ruoyi.wgz.domain.WgzMessage;
|
import com.ruoyi.wgz.domain.WgzMessage;
|
||||||
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
@ -78,4 +79,9 @@ public interface IWgzMessageService extends IServicePlus<WgzMessage> {
|
|||||||
* 消息列表
|
* 消息列表
|
||||||
*/
|
*/
|
||||||
TableDataInfo<WgzAppGetMessageListRes> userGetMessageList(@Validated WgzAppGetMessageListReq req);
|
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.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
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.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.utils.PageUtils;
|
||||||
import com.ruoyi.common.core.page.PagePlus;
|
import com.ruoyi.common.core.page.PagePlus;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
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.req.WgzAppLeaveHistoryListPageReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
|
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
|
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
|
||||||
|
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
|
||||||
import com.ruoyi.wgz.bo.rests.WgzAppMessageTypeStatisticsTwo;
|
import com.ruoyi.wgz.bo.rests.WgzAppMessageTypeStatisticsTwo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
@ -42,6 +47,9 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictTypeService dictTypeService;
|
private ISysDictTypeService dictTypeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAnnexService annexService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WgzMessage queryById(Long id){
|
public WgzMessage queryById(Long id){
|
||||||
return getById(id);
|
return getById(id);
|
||||||
@ -149,4 +157,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
queryDTOPage.setSize(req.getPageSize());
|
queryDTOPage.setSize(req.getPageSize());
|
||||||
return PageUtils.buildDataInfo(baseMapper.userGetMessageList(queryDTOPage));
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="userRegisteredProject" resultType="com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes">
|
<select id="userRegisteredProject" resultType="com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes">
|
||||||
SELECT
|
SELECT
|
||||||
|
a.id as recruitApplyId,
|
||||||
b.*,
|
b.*,
|
||||||
c.task_name,
|
c.task_name,
|
||||||
c.task_address,
|
c.task_address,
|
||||||
@ -67,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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)
|
||||||
WHERE
|
WHERE
|
||||||
a.user_id = #{id} AND
|
a.user_id = #{userId} AND
|
||||||
(a.status = '0' or a.status = '1') AND
|
(a.status = '0' or a.status = '1') AND
|
||||||
a.del_flag = 0
|
a.del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
@ -84,4 +84,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="findByRecruitIdData" resultType="com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes">
|
||||||
|
SELECT
|
||||||
|
a.id as recruitApplyId,
|
||||||
|
a.entry_time as entryTime,
|
||||||
|
b.id as recruitId,
|
||||||
|
b.create_time as createTime,
|
||||||
|
b.recruit_name as recruitName,
|
||||||
|
b.recruit_amount as recruitAmount,
|
||||||
|
b.recruit_staff_num as recruitStaffNum,
|
||||||
|
b.sub_describe as subDescribe,
|
||||||
|
b.recruit_work_begin_time as recruitWorkBeginTime,
|
||||||
|
b.recruit_contact_person as recruitContactPerson,
|
||||||
|
b.recruit_contact_phone as recruitContactPhone,
|
||||||
|
b.remark,
|
||||||
|
c.task_name as taskName,
|
||||||
|
c.task_address as taskAddress,
|
||||||
|
c.task_img as taskImg
|
||||||
|
FROM
|
||||||
|
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 fbs_project_task as c ON (b.task_id = c.id AND c.del_flag = 0)
|
||||||
|
WHERE
|
||||||
|
a.id = #{recruitId} AND
|
||||||
|
a.del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Reference in New Issue
Block a user