Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 yıl önce
ebeveyn
işleme
628aa8a5e7
4 değiştirilmiş dosya ile 26 ekleme ve 53 silme
  1. +0
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertController.java
  2. +11
    -10
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java
  3. +0
    -31
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertRecommendProofSubmitRequest.java
  4. +15
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertUserBasicInfoSubmitRequest.java

+ 0
- 8
pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertController.java Dosyayı Görüntüle

@@ -5,7 +5,6 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.expert.manage.ExpertAdminManage;
import com.ningdatech.pmapi.expert.manage.ExpertManage;
import com.ningdatech.pmapi.expert.model.ExpertAdminExpertManageQuery;
import com.ningdatech.pmapi.expert.model.req.ExpertRecommendProofSubmitRequest;
import com.ningdatech.pmapi.expert.model.req.ExpertUserBasicInfoSubmitRequest;
import com.ningdatech.pmapi.expert.model.vo.ExpertAdminExpertManageListVO;
import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO;
@@ -36,16 +35,9 @@ public class ExpertController {
@PostMapping("/basic-info-submit")
@ApiOperation("填写基本信息接口(专家报名使用))")
public void expertBasicInfoSubmit(@Valid @RequestBody ExpertUserBasicInfoSubmitRequest request) {
// ExpertUserInfoValidator.expertUserBasicInfoSubmitRequestValidate(request);
expertManage.expertBasicInfoSubmit(request);
}

@PostMapping("/recommend-proof-submit")
@ApiOperation("推荐证明提交接口(专家报名使用)")
public void expertRecommendProofSubmit(@Valid @RequestBody ExpertRecommendProofSubmitRequest request) {
expertManage.expertRecommendProofSubmit(request);
}

@GetMapping("/detail")
@ApiOperation("专家获取专家详细信息")
public ExpertFullInfoVO getExpertFullInfoDetail() {


+ 11
- 10
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java Dosyayı Görüntüle

@@ -15,7 +15,6 @@ import com.ningdatech.pmapi.expert.model.cmd.ExpertFullInfoSaveCmd;
import com.ningdatech.pmapi.expert.model.cmd.ExpertRecommendProofSaveCmd;
import com.ningdatech.pmapi.expert.model.dto.ExpertDictionaryDTO;
import com.ningdatech.pmapi.expert.model.dto.ExpertFullInfoAllDTO;
import com.ningdatech.pmapi.expert.model.req.ExpertRecommendProofSubmitRequest;
import com.ningdatech.pmapi.expert.model.req.ExpertUserBasicInfoSubmitRequest;
import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO;
import com.ningdatech.pmapi.expert.service.ExpertInfoService;
@@ -84,10 +83,16 @@ public class ExpertManage {
.buildExpertFullInfoSaveCmd(userId, basicInfo, eduInfo, jobInfo, professionalInfo);
expertInfoService.saveExpertInfo(expertFullInfoSaveCmd);
}

// 推荐证明材料
List<DictionaryFieldInfo> recommendedWay = request.getRecommendedWay();
// 推荐方式
List<FileBasicInfo> recommendProofFile = request.getRecommendProofFile();
expertRecommendProofSubmit(recommendedWay, recommendProofFile);
}


public void expertRecommendProofSubmit(ExpertRecommendProofSubmitRequest request) {
public void expertRecommendProofSubmit(List<DictionaryFieldInfo> recommendedWay, List<FileBasicInfo> recommendProofFile) {
// 用户id
Long expertUserId = LoginUserUtil.getUserId();
ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(expertUserId);
@@ -97,20 +102,15 @@ public class ExpertManage {
|| ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey().equals(expertUserFullInfo.getUserInfoStep())) {
throw new BizException("当前状态无法提交证明材料");
}
// 根据用户id 获取用户信息,获取手机号校验 验证码是否正确
String phoneNo = expertUserFullInfo.getPhoneNo();
String verificationCode = request.getVerificationCode();

// 证明材料提交
List<FileBasicInfo> recommendProofFile = request.getRecommendProofFile();
List<DictionaryFieldInfo> recommendedWayList = request.getRecommendedWay();
ExpertRecommendProofSaveCmd expertRecommendProofSaveCmd = new ExpertRecommendProofSaveCmd();
if (CollectionUtils.isNotEmpty(recommendProofFile)) {
expertRecommendProofSaveCmd.setRecommendationProofFileIdList(recommendProofFile.stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
}
List<ExpertDictionaryDTO> recommendedWayDictionaryDTOList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(recommendedWayList)) {
recommendedWayDictionaryDTOList = recommendedWayList.stream().map(r -> {
if (CollectionUtils.isNotEmpty(recommendedWay)) {
recommendedWayDictionaryDTOList = recommendedWay.stream().map(r -> {
ExpertDictionaryDTO expertDictionaryDTO = new ExpertDictionaryDTO();
expertDictionaryDTO.setDictionaryCode(r.getDictionaryCode());
expertDictionaryDTO.setExpertInfoField(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey());
@@ -133,5 +133,6 @@ public class ExpertManage {
}
List<Long> fileIdList = expertInfoCommonHelper.getExpertFileIdList(expertUserFullInfoAll);
List<AttachFileVo> attachFiles = fileService.getByIds(fileIdList);
return expertUserInfoAssembler.buildExpertFullInfoVO(attachFiles, expertUserFullInfoAll); }
return expertUserInfoAssembler.buildExpertFullInfoVO(attachFiles, expertUserFullInfoAll);
}
}

+ 0
- 31
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertRecommendProofSubmitRequest.java Dosyayı Görüntüle

@@ -1,31 +0,0 @@
package com.ningdatech.pmapi.expert.model.req;

import com.ningdatech.pmapi.expert.model.DictionaryFieldInfo;
import com.ningdatech.pmapi.expert.model.FileBasicInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
* @author liuxinxin
* @date 2022/7/22 下午5:49
*/
@Data
@ApiModel("专家证明材料提交Request")
public class ExpertRecommendProofSubmitRequest {

@NotEmpty
@ApiModelProperty("推荐方式")
private List<DictionaryFieldInfo> recommendedWay;

@ApiModelProperty("推荐证明材料")
private List<FileBasicInfo> recommendProofFile;

@NotBlank
@ApiModelProperty("短信验证码")
private String verificationCode;
}

+ 15
- 4
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertUserBasicInfoSubmitRequest.java Dosyayı Görüntüle

@@ -1,14 +1,13 @@
package com.ningdatech.pmapi.expert.model.req;

import com.ningdatech.pmapi.expert.model.ExpertBasicInfo;
import com.ningdatech.pmapi.expert.model.ExpertEduInfo;
import com.ningdatech.pmapi.expert.model.ExpertJobInfo;
import com.ningdatech.pmapi.expert.model.ExpertProfessionalInfo;
import com.ningdatech.pmapi.expert.model.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
* @author liuxinxin
@@ -33,4 +32,16 @@ public class ExpertUserBasicInfoSubmitRequest {
@NotNull
@ApiModelProperty("专业信息")
private ExpertProfessionalInfo professionalInfo;


/**
* 补充推荐方式
*/
@NotEmpty
@ApiModelProperty("推荐方式")
private List<DictionaryFieldInfo> recommendedWay;

@ApiModelProperty("推荐证明材料")
private List<FileBasicInfo> recommendProofFile;

}

Yükleniyor…
İptal
Kaydet