From f3544d674c4223a17d3a899205b0b5c9746edaf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=88=90?= <2847920761@qq.com> Date: Tue, 4 Mar 2025 20:06:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BgtProjectRecruitApplyServiceImpl.java | 7 ++--- ...ppCancelRegistrationProjectDetailsRes.java | 3 ++ .../WgzAppPersonalBasicInformationRes.java | 3 +- .../wgz/bo/res/WgzAppProjectDetailsRes.java | 3 ++ .../WgzApplyForPayrollSettlementAddRes.java | 4 +++ .../java/com/ruoyi/wgz/domain/WgzUser.java | 3 +- .../wgz/service/impl/WgzUserServiceImpl.java | 29 +++++++++++-------- 7 files changed, 34 insertions(+), 18 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java index 7dbe052..bbfcb1b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java @@ -405,13 +405,12 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl 0) { Long appUserId = SecurityUtils.getAppUserId(); -// BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId); - BgtProjectRecruitApply by = baseMapper.selectById(recruitApplyId); BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); Map mp = new HashMap<>(); mp.put("projectName", appById.getRecruitName()); @@ -465,7 +464,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl //2、copy数据返回 WgzAppPersonalBasicInformationRes wgzAppPersonalBasicInformationRes = new WgzAppPersonalBasicInformationRes(); BeanUtils.copyProperties(wgzUser,wgzAppPersonalBasicInformationRes); - wgzAppPersonalBasicInformationRes.setAge(DataUtil.calculateAge(wgzAppPersonalBasicInformationRes.getBirthdate())); - //3、字典类型转换 - List typeOfWork = dictTypeService.selectDictDataByType("type_of_work"); - 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(","); + if (wgzAppPersonalBasicInformationRes.getBirthdate() != null){ + wgzAppPersonalBasicInformationRes.setAge(DataUtil.calculateAge(String.valueOf(wgzAppPersonalBasicInformationRes.getBirthdate()))); + } + if (wgzAppPersonalBasicInformationRes.getTypeOfWork() != null){ + //3、字典类型转换 + List typeOfWork = dictTypeService.selectDictDataByType("type_of_work"); + 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()); } - typeOfWorkName.deleteCharAt(typeOfWorkName.length() - 1); - wgzAppPersonalBasicInformationRes.setTypeOfWorkName(typeOfWorkName.toString()); return wgzAppPersonalBasicInformationRes; } @@ -199,6 +202,8 @@ public class WgzUserServiceImpl extends ServicePlusImpl //1、对指定用户进行实名认证 WgzUser user = new WgzUser(); BeanUtils.copyProperties(req, user); + System.out.println("1?????????? "+req.getTypeOfWork()); + System.out.println("2?????????? "+user.getTypeOfWork()); int update = baseMapper.update(user, new LambdaQueryWrapper().eq(WgzUser::getUserId, req.getUserId())); if (update == 0){ throw new RuntimeException("当前用户不存在!");