Browse Source

修改专家详情增加条线信息

tags/24080901
WendyYang 1 year ago
parent
commit
e1b007a553
12 changed files with 58 additions and 27 deletions
  1. +1
    -1
      ningda-generator/pom.xml
  2. +1
    -10
      pmapi/pom.xml
  3. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java
  4. +6
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java
  5. +10
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java
  6. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java
  7. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java
  8. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java
  9. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java
  10. +19
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java
  11. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java
  12. +1
    -7
      pom.xml

+ 1
- 1
ningda-generator/pom.xml View File

@@ -19,7 +19,7 @@
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.5.1</version>
<version>3.5.3.2</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>


+ 1
- 10
pmapi/pom.xml View File

@@ -128,11 +128,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.5.3.Final</version>
<scope>test</scope>
</dependency>
<!--引入jwt-->
<dependency>
@@ -141,11 +137,6 @@
<version>3.10.3</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.5.3.Final</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java View File

@@ -254,6 +254,7 @@ public class ExpertInfoCmdAssembler {
expertInfoModifyCmd.setExpertIntentionWorkRegionInfo(expertIntentionWorkRegionInfo);
expertInfoModifyCmd.setExpertAvoidCompanyList(expertAvoidCompanyList);
expertInfoModifyCmd.setExpertInfoSensitiveFieldCheckBO(expertInfoSensitiveFieldCheckBO);
expertInfoModifyCmd.setBusinessStrips(expertJobInfo.getBusinessStrips());
return expertInfoModifyCmd;
}



+ 6
- 5
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java View File

@@ -1,6 +1,7 @@
package com.ningdatech.pmapi.expert.assembler;


import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
@@ -9,13 +10,11 @@ import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum;
import com.ningdatech.pmapi.common.helper.RegionCacheHelper;
import com.ningdatech.pmapi.common.model.FileBasicInfo;
import com.ningdatech.pmapi.expert.constant.ExpertApplyTypeEnum;
import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany;
import com.ningdatech.pmapi.expert.entity.ExpertIntentionWorkRegion;
import com.ningdatech.pmapi.expert.entity.ExpertMetaApply;
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo;
import com.ningdatech.pmapi.expert.entity.*;
import com.ningdatech.pmapi.expert.model.*;
import com.ningdatech.pmapi.expert.model.dto.*;
import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO;
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO;
import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum;
import com.ningdatech.pmapi.meta.constant.ExpertTagEnum;
import com.ningdatech.pmapi.meta.helper.DictionaryCache;
@@ -256,7 +255,8 @@ public class ExpertUserInfoAssembler {
List<ExpertDictionary> expertDictionaryList,
List<ExpertIntentionWorkRegion> intentionWorkRegionList,
List<ExpertMetaApply> expertMetaApplyList,
List<ExpertAvoidCompany> expertAvoidCompanyList) {
List<ExpertAvoidCompany> expertAvoidCompanyList,
List<ExpertGovBusinessStrip> businessStrips) {
ExpertUserFullInfoDTO expertFullInfoDto = buildExpertUserFullInfoDTO(expertUserFullInfo);
List<ExpertDictionaryDTO> expertDicts = buildExpertDictionaryDTOList(expertDictionaryList);
List<ExpertTagDTO> expertTags = buildExpertTagDTOList(expertTagList);
@@ -273,6 +273,7 @@ public class ExpertUserInfoAssembler {
expertFullInfoAll.setExpertIntentionWorkRegionInfo(intentionWorkRegions);
expertFullInfoAll.setExpertApplyIntentionWorkRegionInfo(applyIntentionWorkRegions);
expertFullInfoAll.setExpertAvoidCompanyList(expertAvoidCompanyDTOList);
expertFullInfoAll.setBusinessStrips(BeanUtil.copyToList(businessStrips, GovBusinessStripVO.class));
return expertFullInfoAll;
}



+ 10
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java View File

@@ -1,10 +1,13 @@
package com.ningdatech.pmapi.expert.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* <p>
@@ -28,4 +31,11 @@ public class ExpertGovBusinessStrip implements Serializable {
private String businessStripName;

private Long expertUserId;

@TableField(fill = FieldFill.INSERT)
private LocalDateTime createOn;

@TableField(fill = FieldFill.INSERT)
private Long createBy;

}

+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.expert.model;

import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -88,4 +89,8 @@ public class ExpertJobInfo {
@NotBlank
@ApiModelProperty("工作经历")
private String experience;

@ApiModelProperty("专家条线")
private List<GovBusinessStripVO> businessStrips;

}

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java View File

@@ -3,6 +3,7 @@ package com.ningdatech.pmapi.expert.model.cmd;

import com.ningdatech.pmapi.expert.model.bo.ExpertInfoSensitiveFieldCheckBO;
import com.ningdatech.pmapi.expert.model.dto.*;
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO;
import lombok.Data;

import java.util.List;
@@ -35,4 +36,6 @@ public class ExpertInfoModifyCmd {
private ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO;

private ModifyApplyExtraInfoDTO modifyApplyExtraInfo;

private List<GovBusinessStripVO> businessStrips;
}

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.expert.model.dto;

import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO;
import lombok.Data;

import java.util.List;
@@ -35,5 +36,7 @@ public class ExpertFullInfoAllDTO {
*/
private List<ExpertAvoidCompanyDTO> expertAvoidCompanyList;

private List<GovBusinessStripVO> businessStrips;


}

+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java View File

@@ -2,8 +2,8 @@ package com.ningdatech.pmapi.expert.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip;

import java.util.Collection;
import java.util.List;
@@ -25,4 +25,10 @@ public interface IExpertGovBusinessStripService extends IService<ExpertGovBusine
return list(query);
}

default boolean removeByUserId(Long userId) {
LambdaQueryWrapper<ExpertGovBusinessStrip> query = Wrappers.lambdaQuery(ExpertGovBusinessStrip.class)
.eq(ExpertGovBusinessStrip::getExpertUserId, userId);
return remove(query);
}

}

+ 19
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.expert.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.PhoneUtil;
import com.alibaba.fastjson.JSONObject;
@@ -76,6 +77,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService;
private final IUserInfoService userInfoService;
private final YxtCallOrSmsHelper yxtCallOrSmsHelper;
private final IExpertGovBusinessStripService expertGovBusinessStripService;

@Value("${login.url:}")
private String loginUrl;
@@ -319,8 +321,10 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
List<ExpertAvoidCompany> expertAvoidCompanyList = iExpertAvoidCompanyService
.list(Wrappers.lambdaQuery(ExpertAvoidCompany.class).eq(ExpertAvoidCompany::getUserId, userId));

List<ExpertGovBusinessStrip> businessStrips = expertGovBusinessStripService.listByUserIds(Collections.singletonList(userId));

return ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(expertUserFullInfo, expertTagList, expertDictionaryList
, expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList);
, expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList, businessStrips);

}

@@ -454,6 +458,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
List<ExpertTag> expertTagList = iExpertTagService.list(Wrappers.lambdaQuery(ExpertTag.class)
.in(ExpertTag::getUserId, userIds));
Map<Long, List<ExpertTag>> expertTagListMap = CollUtils.group(expertTagList, ExpertTag::getUserId);
List<ExpertGovBusinessStrip> businessStrips = expertGovBusinessStripService.listByUserIds(userIds);
Map<Long, List<ExpertGovBusinessStrip>> stripMap = CollUtils.group(businessStrips, ExpertGovBusinessStrip::getExpertUserId);
// 所有专家字典字段
List<ExpertDictionary> expertDictionaryList = iExpertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class)
.in(ExpertDictionary::getUserId, userIds));
@@ -478,7 +484,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()),
intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()),
metaApplyMap.getOrDefault(w.getUserId(), Collections.emptyList()),
avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList())))
avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()),
stripMap.getOrDefault(w.getUserId(), Collections.emptyList())))
.collect(Collectors.toList());
}

@@ -551,6 +558,16 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
// 重新保存
iExpertAvoidCompanyService.saveBatch(saveExpertAvoidCompanyList);
}
// 保存专家条线
expertGovBusinessStripService.removeByUserId(userId);
if (CollUtil.isNotEmpty(cmd.getBusinessStrips())) {
List<ExpertGovBusinessStrip> strips = CollUtils.convert(cmd.getBusinessStrips(), w -> {
ExpertGovBusinessStrip strip = BeanUtil.copyProperties(w, ExpertGovBusinessStrip.class);
strip.setExpertUserId(userId);
return strip;
});
expertGovBusinessStripService.saveBatch(strips);
}
// 敏感字段申请
ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO = cmd.getExpertInfoSensitiveFieldCheckBO();
ModifyApplyExtraInfoDTO modifyApplyExtraInfo = cmd.getModifyApplyExtraInfo();


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java View File

@@ -9,7 +9,7 @@ import lombok.Data;
* @since 2023-03-08
*/
@Data
@ApiModel(value = "条线VO", description = "")
@ApiModel(value = "条线VO")
public class GovBusinessStripVO {

@ApiModelProperty("条线code")


+ 1
- 7
pom.xml View File

@@ -18,7 +18,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<jwt.version>3.7.0</jwt.version>
<com.alibaba.druid.version>1.2.8</com.alibaba.druid.version>
<mybatis.plus.version>3.5.1</mybatis.plus.version>
<mybatis.plus.version>3.5.3.2</mybatis.plus.version>
<io.springfox-swagger2.version>3.0.0</io.springfox-swagger2.version>
<swagger-knife.version>3.0.3</swagger-knife.version>
<fastjson.version>1.2.83</fastjson.version>
@@ -51,12 +51,6 @@
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- 解析客户端操作系统、浏览器信息 -->
<dependency>
<groupId>nl.basjes.parse.useragent</groupId>
<artifactId>yauaa</artifactId>
<version>${useragent.yauaa}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>


Loading…
Cancel
Save