This commit is contained in:
2025-03-04 16:15:02 +08:00
parent d1c4cddd91
commit f46223ae10
21 changed files with 56 additions and 23 deletions

View File

@ -28,6 +28,7 @@ import com.ruoyi.wgz.service.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.var;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
@ -517,10 +518,15 @@ public class WgzAppController {
@GetMapping("/wgzUserAttachmentAcquisition") @GetMapping("/wgzUserAttachmentAcquisition")
public AjaxResult<WgzAppAttachmentAcquisitionRes> userAttachmentAcquisition(@Validated WgzAppAttachmentAcquisitionReq req) { public AjaxResult<WgzAppAttachmentAcquisitionRes> userAttachmentAcquisition(@Validated WgzAppAttachmentAcquisitionReq req) {
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); Long recruitId;
Long recruitId = by.getRecruitId(); if (req.getType()==1){
if (!appUserId.equals(recruitId)){ BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
throw new RuntimeException("当前用户不是该招工的申请人"); recruitId = by.getRecruitId();
if (!appUserId.equals(recruitId)){
throw new RuntimeException("当前用户不是该招工的申请人");
}
} else {
recruitId = 0L;
} }
//返回对象 //返回对象
WgzAppAttachmentAcquisitionRes wgzAppAttachmentAcquisitionRes = new WgzAppAttachmentAcquisitionRes(); WgzAppAttachmentAcquisitionRes wgzAppAttachmentAcquisitionRes = new WgzAppAttachmentAcquisitionRes();
@ -528,20 +534,22 @@ public class WgzAppController {
//附件类型 //附件类型
String annexType = "wgz_attachment"; String annexType = "wgz_attachment";
//具体附件值 //具体附件值
String[] specifiedAttachment = req.getSpecifiedAttachment(); List<String> specifiedAttachment = req.getSpecifiedAttachment();
//String[] SpecifiedAttachment = {"0"}; //String[] SpecifiedAttachment = {"0"};
//1、获取指定实名认证的附件结构返回 //1、获取指定实名认证的附件结构返回
List<SysDictData> data = dictTypeService.selectDictDataByType(annexType); List<SysDictData> data = dictTypeService.selectDictDataByType(annexType);
data.forEach(item -> { for (SysDictData item : data) {
for (String val : specifiedAttachment) { for (int i = 0; i < specifiedAttachment.size(); i++) {
String dictValue = item.getDictValue(); String dictValue = item.getDictValue();
String val = specifiedAttachment.get(i);
if (dictValue.equals(val)) { if (dictValue.equals(val)) {
//2、每个结构下有那些附件附件可能有多个或一个查询附件表 //2、每个结构下有那些附件附件可能有多个或一个查询附件表
AnnexQueryBo annexQueryBo = new AnnexQueryBo(); AnnexQueryBo annexQueryBo = new AnnexQueryBo();
annexQueryBo.setUserId(appUserId); annexQueryBo.setUserId(appUserId);
annexQueryBo.setUserType(WGZ); annexQueryBo.setUserType(WGZ);
annexQueryBo.setRecruitId(recruitId); if (req.getType()==1){
annexQueryBo.setRecruitId(recruitId);
}
annexQueryBo.setAnnexType(val); annexQueryBo.setAnnexType(val);
List<Annex> annexes = iAnnexService.queryList(annexQueryBo); List<Annex> annexes = iAnnexService.queryList(annexQueryBo);
//3、具体附件结构 //3、具体附件结构
@ -552,7 +560,7 @@ public class WgzAppController {
resData.add(wgzAutonymAnnex); resData.add(wgzAutonymAnnex);
} }
} }
}); }
return AjaxResult.success(wgzAppAttachmentAcquisitionRes.setWgzAutonymAnnex(resData)); return AjaxResult.success(wgzAppAttachmentAcquisitionRes.setWgzAutonymAnnex(resData));
} }

View File

@ -403,8 +403,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
public Boolean userCancelRegistration(Long recruitApplyId) { public Boolean userCancelRegistration(Long recruitApplyId) {
BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply(); BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply();
bgtProjectRecruitApply.setId(recruitApplyId); bgtProjectRecruitApply.setId(recruitApplyId);
bgtProjectRecruitApply.setStatus("7"); // bgtProjectRecruitApply.setStatus("7");
if (baseMapper.updateById(bgtProjectRecruitApply) > 0) { if (baseMapper.deleteById(bgtProjectRecruitApply) > 0) {
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
// BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId); // BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId);
BgtProjectRecruitApply by = baseMapper.selectById(recruitApplyId); BgtProjectRecruitApply by = baseMapper.selectById(recruitApplyId);
@ -418,8 +418,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
setRecipientId(appUserId). setRecipientId(appUserId).
setHeadline(wgzMessage(mp, "103")). setHeadline(wgzMessage(mp, "103")).
setSubheading(wgzMessage(mp, "104")). setSubheading(wgzMessage(mp, "104")).
setTableId(bgtProjectRecruitApply.getId()). // setTableId(bgtProjectRecruitApply.getId()).
setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). // setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()).
setMessageLargeType(LARGE_OTHER). setMessageLargeType(LARGE_OTHER).
setMessageSmallType(SMALL_SYSTEM); setMessageSmallType(SMALL_SYSTEM);
if (!iWgzMessageService.sendAMessage(wgzMessage)) { if (!iWgzMessageService.sendAMessage(wgzMessage)) {

View File

@ -106,6 +106,7 @@ public class BusinessTask
List<BgtProjectRecruitApply> recruitApply = iBgtProjectRecruitApplyService.list( List<BgtProjectRecruitApply> recruitApply = iBgtProjectRecruitApplyService.list(
Wrappers.<BgtProjectRecruitApply>lambdaQuery() Wrappers.<BgtProjectRecruitApply>lambdaQuery()
.eq(BgtProjectRecruitApply::getRecruitId, recruit.getId()) .eq(BgtProjectRecruitApply::getRecruitId, recruit.getId())
.eq(BgtProjectRecruitApply::getStatus, "5")
); );
for (BgtProjectRecruitApply by : recruitApply) { for (BgtProjectRecruitApply by : recruitApply) {
int count = iWgzAttendanceService.count( int count = iWgzAttendanceService.count(
@ -179,6 +180,7 @@ public class BusinessTask
List<BgtProjectRecruitApply> recruitApply = iBgtProjectRecruitApplyService.list( List<BgtProjectRecruitApply> recruitApply = iBgtProjectRecruitApplyService.list(
Wrappers.<BgtProjectRecruitApply>lambdaQuery() Wrappers.<BgtProjectRecruitApply>lambdaQuery()
.eq(BgtProjectRecruitApply::getRecruitId, recruit.getId()) .eq(BgtProjectRecruitApply::getRecruitId, recruit.getId())
.eq(BgtProjectRecruitApply::getStatus, "5")
); );
for (BgtProjectRecruitApply by : recruitApply) { for (BgtProjectRecruitApply by : recruitApply) {
WgzAttendance one = iWgzAttendanceService.getOne( WgzAttendance one = iWgzAttendanceService.getOne(

View File

@ -12,6 +12,7 @@ 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;
import java.util.List;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@ -19,8 +20,10 @@ import java.time.Year;
@ApiModel("务工者APP-实名认证·附件结构请求对象") @ApiModel("务工者APP-实名认证·附件结构请求对象")
public class WgzAppAttachmentAcquisitionReq implements Serializable { public class WgzAppAttachmentAcquisitionReq implements Serializable {
@ApiModelProperty("0用户资料 1招工+用户资料")
private int type;
@ApiModelProperty("0资格证书 1劳动合同 2保单 3入场材料 4电子税票 5工作明细报告") @ApiModelProperty("0资格证书 1劳动合同 2保单 3入场材料 4电子税票 5工作明细报告")
@Pattern(regexp = "^[0-5]$", message = "status 只能是 0 到 5 之间的数字") private List<String> specifiedAttachment;
private String[] specifiedAttachment;
} }

View File

@ -43,7 +43,7 @@ public class WgzAppRealNameAuthenticationReq implements Serializable {
private String nation; private String nation;
@ApiModelProperty("出生日期") @ApiModelProperty("出生日期")
@NotBlank(message = "出生日期不能为空") @NotNull(message = "出生日期不能为空")
private LocalDate birthdate; private LocalDate birthdate;
@ApiModelProperty("身份证号码") @ApiModelProperty("身份证号码")

View File

@ -33,6 +33,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.ruoyi.common.constant.Constants.WGZ;
/** /**
* APP务工者Service业务层处理 * APP务工者Service业务层处理
@ -173,11 +175,20 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
WgzAppPersonalBasicInformationRes wgzAppPersonalBasicInformationRes = new WgzAppPersonalBasicInformationRes(); WgzAppPersonalBasicInformationRes wgzAppPersonalBasicInformationRes = new WgzAppPersonalBasicInformationRes();
BeanUtils.copyProperties(wgzUser,wgzAppPersonalBasicInformationRes); BeanUtils.copyProperties(wgzUser,wgzAppPersonalBasicInformationRes);
wgzAppPersonalBasicInformationRes.setAge(DataUtil.calculateAge(wgzAppPersonalBasicInformationRes.getBirthdate())); wgzAppPersonalBasicInformationRes.setAge(DataUtil.calculateAge(wgzAppPersonalBasicInformationRes.getBirthdate()));
//3、字典类型转换
List<SysDictData> typeOfWork = dictTypeService.selectDictDataByType("type_of_work"); List<SysDictData> typeOfWork = dictTypeService.selectDictDataByType("type_of_work");
List<String> split = Arrays.asList(wgzAppPersonalBasicInformationRes.getTypeOfWork().split(",")); System.out.println("?? "+typeOfWork.toString());
String typeOfWorkName = typeOfWork.stream().filter(dictData -> split.contains(dictData.getDictValue())).map(SysDictData::getDictLabel) String[] split = wgzAppPersonalBasicInformationRes.getTypeOfWork().split(",");
.collect(Collectors.joining(",")); StringBuilder typeOfWorkName = new StringBuilder();
wgzAppPersonalBasicInformationRes.setTypeOfWorkName(typeOfWorkName); for (SysDictData sysDictData : typeOfWork) {
for (String s : split) {
if (sysDictData.getDictValue().equals(s)){
typeOfWorkName.append(sysDictData.getDictLabel()).append(",");
}
}
}
typeOfWorkName.deleteCharAt(typeOfWorkName.length() - 1);
wgzAppPersonalBasicInformationRes.setTypeOfWorkName(typeOfWorkName.toString());
return wgzAppPersonalBasicInformationRes; return wgzAppPersonalBasicInformationRes;
} }
@ -192,10 +203,19 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
if (update == 0){ if (update == 0){
throw new RuntimeException("当前用户不存在!"); throw new RuntimeException("当前用户不存在!");
} }
//2、新增附件 //2、新增附件
List<Annex> annex = req.getAnnex(); List<Annex> annex = req.getAnnex();
List<AnnexDTO> annexDTOS = new ArrayList<>(); List<AnnexDTO> annexDTOS = new ArrayList<>();
BeanUtils.copyProperties(annex, annexDTOS); for (Annex data : annex) {
AnnexDTO dto = new AnnexDTO();
BeanUtils.copyProperties(data, dto);
dto.setUserId(req.getUserId()).setUserType(WGZ);
// setAnnexType(data.getAnnexType()).
// setAnnexName(data.getAnnexName()).
// setAnnexUrl(data.getAnnexUrl());
annexDTOS.add(dto);
}
iAnnexService.insertBatch(annexDTOS); iAnnexService.insertBatch(annexDTOS);
return true; return true;
} }

View File

@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bgt_project_recruit as b bgt_project_recruit as b
LEFT JOIN fbs_project_task as c ON (c.id = b.task_id) LEFT JOIN fbs_project_task as c ON (c.id = b.task_id)
WHERE WHERE
b.id not in (SELECT recruit_id FROM bgt_project_recruit_apply WHERE user_id = #{req.userId}) and b.id not in (SELECT recruit_id FROM bgt_project_recruit_apply WHERE user_id = #{req.userId})and
b.del_flag = 0 b.del_flag = 0
</select> </select>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB