优化
@ -28,6 +28,7 @@ import com.ruoyi.wgz.service.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.var;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -517,10 +518,15 @@ public class WgzAppController {
|
||||
@GetMapping("/wgzUserAttachmentAcquisition")
|
||||
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("当前用户不是该招工的申请人");
|
||||
Long recruitId;
|
||||
if (req.getType()==1){
|
||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
recruitId = by.getRecruitId();
|
||||
if (!appUserId.equals(recruitId)){
|
||||
throw new RuntimeException("当前用户不是该招工的申请人");
|
||||
}
|
||||
} else {
|
||||
recruitId = 0L;
|
||||
}
|
||||
//返回对象
|
||||
WgzAppAttachmentAcquisitionRes wgzAppAttachmentAcquisitionRes = new WgzAppAttachmentAcquisitionRes();
|
||||
@ -528,20 +534,22 @@ public class WgzAppController {
|
||||
//附件类型
|
||||
String annexType = "wgz_attachment";
|
||||
//具体附件值
|
||||
String[] specifiedAttachment = req.getSpecifiedAttachment();
|
||||
List<String> specifiedAttachment = req.getSpecifiedAttachment();
|
||||
//String[] SpecifiedAttachment = {"0"};
|
||||
|
||||
//1、获取指定实名认证的附件结构返回
|
||||
List<SysDictData> data = dictTypeService.selectDictDataByType(annexType);
|
||||
data.forEach(item -> {
|
||||
for (String val : specifiedAttachment) {
|
||||
for (SysDictData item : data) {
|
||||
for (int i = 0; i < specifiedAttachment.size(); i++) {
|
||||
String dictValue = item.getDictValue();
|
||||
String val = specifiedAttachment.get(i);
|
||||
if (dictValue.equals(val)) {
|
||||
//2、每个结构下有那些附件(附件可能有多个或一个);查询附件表
|
||||
AnnexQueryBo annexQueryBo = new AnnexQueryBo();
|
||||
annexQueryBo.setUserId(appUserId);
|
||||
annexQueryBo.setUserType(WGZ);
|
||||
annexQueryBo.setRecruitId(recruitId);
|
||||
if (req.getType()==1){
|
||||
annexQueryBo.setRecruitId(recruitId);
|
||||
}
|
||||
annexQueryBo.setAnnexType(val);
|
||||
List<Annex> annexes = iAnnexService.queryList(annexQueryBo);
|
||||
//3、具体附件结构
|
||||
@ -552,7 +560,7 @@ public class WgzAppController {
|
||||
resData.add(wgzAutonymAnnex);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return AjaxResult.success(wgzAppAttachmentAcquisitionRes.setWgzAutonymAnnex(resData));
|
||||
}
|
||||
|
||||
|
@ -403,8 +403,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
public Boolean userCancelRegistration(Long recruitApplyId) {
|
||||
BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply();
|
||||
bgtProjectRecruitApply.setId(recruitApplyId);
|
||||
bgtProjectRecruitApply.setStatus("7");
|
||||
if (baseMapper.updateById(bgtProjectRecruitApply) > 0) {
|
||||
// bgtProjectRecruitApply.setStatus("7");
|
||||
if (baseMapper.deleteById(bgtProjectRecruitApply) > 0) {
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
// BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
BgtProjectRecruitApply by = baseMapper.selectById(recruitApplyId);
|
||||
@ -418,8 +418,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
setRecipientId(appUserId).
|
||||
setHeadline(wgzMessage(mp, "103")).
|
||||
setSubheading(wgzMessage(mp, "104")).
|
||||
setTableId(bgtProjectRecruitApply.getId()).
|
||||
setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()).
|
||||
// setTableId(bgtProjectRecruitApply.getId()).
|
||||
// setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()).
|
||||
setMessageLargeType(LARGE_OTHER).
|
||||
setMessageSmallType(SMALL_SYSTEM);
|
||||
if (!iWgzMessageService.sendAMessage(wgzMessage)) {
|
||||
|
@ -106,6 +106,7 @@ public class BusinessTask
|
||||
List<BgtProjectRecruitApply> recruitApply = iBgtProjectRecruitApplyService.list(
|
||||
Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||
.eq(BgtProjectRecruitApply::getRecruitId, recruit.getId())
|
||||
.eq(BgtProjectRecruitApply::getStatus, "5")
|
||||
);
|
||||
for (BgtProjectRecruitApply by : recruitApply) {
|
||||
int count = iWgzAttendanceService.count(
|
||||
@ -179,6 +180,7 @@ public class BusinessTask
|
||||
List<BgtProjectRecruitApply> recruitApply = iBgtProjectRecruitApplyService.list(
|
||||
Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||
.eq(BgtProjectRecruitApply::getRecruitId, recruit.getId())
|
||||
.eq(BgtProjectRecruitApply::getStatus, "5")
|
||||
);
|
||||
for (BgtProjectRecruitApply by : recruitApply) {
|
||||
WgzAttendance one = iWgzAttendanceService.getOne(
|
||||
|
@ -12,6 +12,7 @@ import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.time.Year;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ -19,8 +20,10 @@ import java.time.Year;
|
||||
@ApiModel("务工者APP-实名认证·附件结构请求对象")
|
||||
public class WgzAppAttachmentAcquisitionReq implements Serializable {
|
||||
|
||||
@ApiModelProperty("0用户资料 1招工+用户资料")
|
||||
private int type;
|
||||
|
||||
@ApiModelProperty("0资格证书 1劳动合同 2保单 3入场材料 4电子税票 5工作明细报告")
|
||||
@Pattern(regexp = "^[0-5]$", message = "status 只能是 0 到 5 之间的数字")
|
||||
private String[] specifiedAttachment;
|
||||
private List<String> specifiedAttachment;
|
||||
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class WgzAppRealNameAuthenticationReq implements Serializable {
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("出生日期")
|
||||
@NotBlank(message = "出生日期不能为空")
|
||||
@NotNull(message = "出生日期不能为空")
|
||||
private LocalDate birthdate;
|
||||
|
||||
@ApiModelProperty("身份证号码")
|
||||
|
@ -33,6 +33,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.constant.Constants.WGZ;
|
||||
|
||||
|
||||
/**
|
||||
* APP务工者Service业务层处理
|
||||
@ -173,11 +175,20 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
|
||||
WgzAppPersonalBasicInformationRes wgzAppPersonalBasicInformationRes = new WgzAppPersonalBasicInformationRes();
|
||||
BeanUtils.copyProperties(wgzUser,wgzAppPersonalBasicInformationRes);
|
||||
wgzAppPersonalBasicInformationRes.setAge(DataUtil.calculateAge(wgzAppPersonalBasicInformationRes.getBirthdate()));
|
||||
//3、字典类型转换
|
||||
List<SysDictData> typeOfWork = dictTypeService.selectDictDataByType("type_of_work");
|
||||
List<String> split = Arrays.asList(wgzAppPersonalBasicInformationRes.getTypeOfWork().split(","));
|
||||
String typeOfWorkName = typeOfWork.stream().filter(dictData -> split.contains(dictData.getDictValue())).map(SysDictData::getDictLabel)
|
||||
.collect(Collectors.joining(","));
|
||||
wgzAppPersonalBasicInformationRes.setTypeOfWorkName(typeOfWorkName);
|
||||
System.out.println("?? "+typeOfWork.toString());
|
||||
String[] split = wgzAppPersonalBasicInformationRes.getTypeOfWork().split(",");
|
||||
StringBuilder typeOfWorkName = new StringBuilder();
|
||||
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;
|
||||
}
|
||||
|
||||
@ -192,10 +203,19 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
|
||||
if (update == 0){
|
||||
throw new RuntimeException("当前用户不存在!");
|
||||
}
|
||||
|
||||
//2、新增附件
|
||||
List<Annex> annex = req.getAnnex();
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bgt_project_recruit as b
|
||||
LEFT JOIN fbs_project_task as c ON (c.id = b.task_id)
|
||||
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
|
||||
</select>
|
||||
|
||||
|
After Width: | Height: | Size: 3.4 MiB |
After Width: | Height: | Size: 3.3 MiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 187 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |