优化
This commit is contained in:
		| @ -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; | ||||
| 	} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user