Browse Source

添加导入接口的数据权限

buzhanyi 1 year ago
parent
commit
cde19b432c

+ 48 - 2
purchase-admin/src/main/java/com/ozs/web/controller/base/BaseExpertController.java

@@ -1,7 +1,9 @@
 package com.ozs.web.controller.base;
 
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.write.metadata.WriteSheet;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ozs.base.domain.BaseExpert;
 import com.ozs.base.domain.BaseProfessional;
@@ -15,19 +17,23 @@ import com.ozs.common.core.controller.BaseController;
 import com.ozs.common.core.domain.AjaxResult;
 import com.ozs.common.core.domain.model.LoginUser;
 import com.ozs.common.enums.BusinessType;
+import com.ozs.common.exception.base.BaseException;
 import com.ozs.common.utils.PageUtils;
 import com.ozs.common.utils.StringUtils;
 import com.ozs.common.utils.bean.BeanUtils;
 import com.ozs.common.utils.poi.ExcelUtil;
+import com.ozs.plan.doman.vo.responseVo.PlanYearsResponseVo;
 import com.ozs.system.domain.vo.SysRegionVO;
 import com.ozs.system.service.ISysDictDataService;
 import com.ozs.system.service.SysRegionService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.joda.time.DateTime;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.ObjectUtils;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,7 +41,12 @@ import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import javax.validation.constraints.NotEmpty;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
@@ -47,6 +58,7 @@ import java.util.stream.Collectors;
  * @author sunhh
  */
 @Api(tags = "专家库管理")
+@Slf4j
 @RestController
 @RequestMapping("/base/expert")
 public class BaseExpertController extends BaseController {
@@ -61,7 +73,7 @@ public class BaseExpertController extends BaseController {
     private ISysDictDataService dictDataService;
 
 
-    @ApiOperation(value = "新增专家库" , notes = "必传 专家库名称")
+    @ApiOperation(value = "新增专家库", notes = "必传 专家库名称")
     @PostMapping("/insertExpert")
     @PreAuthorize("@ss.hasPermi('base:expert:insertExpert')")
     @Log(title = ModularConstans.expert, businessType = BusinessType.INSERT)
@@ -247,4 +259,38 @@ public class BaseExpertController extends BaseController {
         }
         return baseExpertService.selectExtractionExpert(baseExpertVo);
     }
+
+    @ApiOperation("模板下载")
+    @GetMapping("/downloaExcel")
+    public void downloadZip(HttpServletResponse response) {
+        List<BaseExpertVo> list = new ArrayList<BaseExpertVo>();
+        list.add(new BaseExpertVo("张先生", "法务专家", "男",
+                "2023-07-06", "15152223667", "安全工程03",
+                "科室一", "高级职称", "天津市/河东区", "050050101"
+        ));
+        list.add(new BaseExpertVo("李先生", "经济专家", "女",
+                "2023-07-06", "14448485656", "测试工程07",
+                "科室二", "中级职称", "山西省/阳泉市/平定县", "41133535035"
+        ));
+        InputStream resourceAsStream = this.getClass().getResourceAsStream("/template/base_expert.xlsx");
+        OutputStream outputStream = null;
+        try {
+            response.setContentType("application/vnd.ms-excel");
+            response.setCharacterEncoding("utf-8");
+            // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
+            String fileName = URLEncoder.encode("专家信息(模板)", "UTF-8").replaceAll("\\+", "%20");
+            response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
+            outputStream = response.getOutputStream();
+            ExcelWriter excelWriter = EasyExcel.write(outputStream)
+                    .withTemplate(resourceAsStream).autoCloseStream(true).build();
+            WriteSheet writeSheet = EasyExcel.writerSheet().build();
+            excelWriter.fill(list, writeSheet);
+            excelWriter.finish();
+            outputStream.flush();
+            outputStream.close();
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            throw new BaseException("下载异常");
+        }
+    }
 }

+ 0 - 300
purchase-admin/src/main/java/com/ozs/web/controller/statisticalAnalysis/StatisticalAnalysisController.java

@@ -1,300 +0,0 @@
-package com.ozs.web.controller.statisticalAnalysis;
-
-import com.ozs.common.annotation.Log;
-import com.ozs.common.constant.ModularConstans;
-import com.ozs.common.core.controller.BaseController;
-import com.ozs.common.core.domain.AjaxResult;
-import com.ozs.common.enums.BusinessType;
-import com.ozs.common.utils.StringUtils;
-import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
-import com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo;
-import com.ozs.pm.service.IPmDemandService;
-import com.ozs.system.domain.SysFileInfo;
-import io.swagger.annotations.ApiOperation;
-import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
-import org.apache.poi.util.Units;
-import org.apache.poi.xwpf.usermodel.XWPFDocument;
-import org.apache.poi.xwpf.usermodel.XWPFParagraph;
-import org.apache.poi.xwpf.usermodel.XWPFRun;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 统计分析页面控制层
- *
- * @author buzhanyi
- */
-@RestController
-@RequestMapping("/statistical")
-public class StatisticalAnalysisController extends BaseController {
-
-    //@Resource
-    //private IPmDemandService pmDemandService;
-    //
-    //@ApiOperation(value = "项目类型情况统计")
-    //@PostMapping("/countByProjectType")
-    ////@PreAuthorize("@ss.hasPermi('statistical:countByProjectType')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult countByProjectType(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //按照项目属性统计所有的项目
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    List<StatisticalChartsResVo> resVos = pmDemandService.countByProjectType(pmDemandReqVo);
-    //    return AjaxResult.success(resVos);
-    //}
-    //
-    //@ApiOperation(value = "采购方式分布")
-    //@PostMapping("/countByPurchaseMode")
-    ////@PreAuthorize("@ss.hasPermi('statistical:countByPurchaseMode')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult countByPurchaseMode(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //按照采购方式统计所有的项目
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    List<StatisticalChartsResVo> resVos = pmDemandService.countByPurchaseMode(pmDemandReqVo);
-    //    return AjaxResult.success(resVos);
-    //}
-    //
-    //@ApiOperation(value = "需采转化情况统计")
-    //@PostMapping("/countByPurchaseChange")
-    ////@PreAuthorize("@ss.hasPermi('statistical:countByPurchaseChange')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult countByPurchaseChange(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //按照采购方式统计所有的项目
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    List<StatisticalChartsResVo> resVos = pmDemandService.countByPurchaseChange(pmDemandReqVo);
-    //    return AjaxResult.success(resVos);
-    //}
-    //
-    //@ApiOperation(value = "项目金额分布")
-    //@PostMapping("/countByEvaluation")
-    ////@PreAuthorize("@ss.hasPermi('statistical:countByEvaluation')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult countByEvaluation(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //按照概算金额统计所有的项目
-    //    //概算金额包括:100万以下采购任务、100至500万元采购任务、500至1000万元采购任务、1000至5000万元采购任务、5000至1亿元采购任务、1亿元及以上采购任务
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    List<StatisticalChartsResVo> resVos = pmDemandService.countByEvaluation(pmDemandReqVo);
-    //    return AjaxResult.success(resVos);
-    //}
-    //
-    //@ApiOperation(value = "执行滞后分析")
-    //@PostMapping("/countProjectExceed")
-    ////@PreAuthorize("@ss.hasPermi('statistical:countProjectExceed')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult countProjectExceed(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //执行滞后采购项目:本年度所有的逾期项目数
-    //    //预算金额:本年度所有逾期项目累加的预算金额
-    //    //滞后项目数量占比:指本年度逾期项目数量/本年度所有项目数量
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    return pmDemandService.countProjectExceed(pmDemandReqVo);
-    //}
-    //
-    //@ApiOperation(value = "滞后项目数量分析")
-    //@PostMapping("/exceedAnalysis")
-    ////@PreAuthorize("@ss.hasPermi('statistical:exceedAnalysis')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult exceedAnalysis(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //统计不同时间维度的逾期项目
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    if (StringUtils.isNull(pmDemandReqVo.getTimeType())) {
-    //        return error("统计时间类型不能为空, 1:年度,2:季度,3:月份!");
-    //    }
-    //    return pmDemandService.exceedAnalysis(pmDemandReqVo);
-    //}
-    //
-    //@ApiOperation(value = "滞后项目时长分析")
-    //@PostMapping("/exceedMarketAnalysis")
-    ////@PreAuthorize("@ss.hasPermi('statistical:exceedMarketAnalysis')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult exceedMarketAnalysis(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //按照滞后时长统计项目数量
-    //    //滞后时长包括:滞后1个月以内的采购任务、滞后1至3个月采购任务、滞后3至6个月采购任务、滞后6个月至1年采购任务、滞后1年以上采购任务
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    return pmDemandService.exceedMarketAnalysis(pmDemandReqVo);
-    //}
-    //
-    //@ApiOperation(value = "采购项目信息统计")
-    //@PostMapping("/purchaseProjectStatistical")
-    ////@PreAuthorize("@ss.hasPermi('statistical:purchaseProjectStatistical')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult purchaseProjectStatistical(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    Map<String, Integer> map = pmDemandService.purchaseProjectStatistical(pmDemandReqVo);
-    //    return success(map);
-    //}
-    //
-    //@ApiOperation(value = "重大规划采购任务专项计划管理情况")
-    //@PostMapping("/countMajorProject")
-    ////@PreAuthorize("@ss.hasPermi('statistical:countMajorProject')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult countMajorProject(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    return pmDemandService.countMajorProject(pmDemandReqVo);
-    //}
-    //
-    //
-    //@ApiOperation(value = "任务数量趋势分析")
-    //@PostMapping("/taskQuantityAnalysis")
-    ////@PreAuthorize("@ss.hasPermi('statistical:taskQuantityAnalysis')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult taskQuantityAnalysis(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //任务数量趋势分析:按照月、季度、年统计“项目属性”字段中“重大规划”属性的项目
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    if (StringUtils.isNull(pmDemandReqVo.getTimeType())) {
-    //        return error("统计时间类型不能为空, 1:年度,2:季度,3:月份!");
-    //    }
-    //    return pmDemandService.taskQuantityAnalysis(pmDemandReqVo);
-    //}
-    //
-    //@ApiOperation(value = "各阶段采购任务数量分布")
-    //@PostMapping("/countEveryStatusNum")
-    ////@PreAuthorize("@ss.hasPermi('statistical:countEveryStatusNum')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult countEveryStatusNum(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    //指项目进行到各个阶段的数量
-    //    //阶段包括:待选取代理、待上传招标文件、待发布公告、待开标、待发布中标公告、中标公式中
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    return pmDemandService.countEveryStatusNum(pmDemandReqVo);
-    //}
-    //
-    //@ApiOperation(value = "项目执行进度统计")
-    //@PostMapping("/purchaseProjectExecute")
-    ////@PreAuthorize("@ss.hasPermi('statistical:purchaseProjectExecute')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult purchaseProjectExecute(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    List<StatisticalChartsResVo> resVos = pmDemandService.purchaseProjectExecute(pmDemandReqVo);
-    //    return success(resVos);
-    //}
-    //
-    //@ApiOperation(value = "已完成项目数量统计")
-    //@PostMapping("/purchaseProjectCompleteNumber")
-    ////@PreAuthorize("@ss.hasPermi('statistical:purchaseProjectCompleteNumber')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult purchaseProjectCompleteNumber(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    if (StringUtils.isNull(pmDemandReqVo.getTimeType())) {
-    //        return error("统计时间类型不能为空, 1:年度,2:季度,3:月份!");
-    //    }
-    //    List<Map<String, Integer>> map = pmDemandService.purchaseProjectCompleteNumber(pmDemandReqVo);
-    //    return success(map);
-    //}
-    //
-    //@ApiOperation(value = "已完成采购任务数量")
-    //@PostMapping("/purchaseTaskFinish")
-    ////@PreAuthorize("@ss.hasPermi('statistical:purchaseTaskFinish')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult purchaseTaskFinish(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    if (StringUtils.isNull(pmDemandReqVo.getTimeType())) {
-    //        return error("统计时间类型不能为空, 1:年度,2:季度,3:月份!");
-    //    }
-    //    List<Map<String, Integer>> map = pmDemandService.purchaseTaskFinish(pmDemandReqVo);
-    //    return success(map);
-    //}
-    //
-    //@ApiOperation(value = "各阶段项目数量分布")
-    //@PostMapping("/purchaseProjectDistribution")
-    ////@PreAuthorize("@ss.hasPermi('statistical:purchaseProjectDistribution')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult purchaseProjectDistribution(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    List<Map<String, String>> map = pmDemandService.purchaseProjectDistribution(pmDemandReqVo);
-    //    return success(map);
-    //}
-    //
-    //@ApiOperation(value = "采购项目--项目数量分析/预算金额(万元)")
-    //@PostMapping("/purchaseProjectNumberAnalysis")
-    ////@PreAuthorize("@ss.hasPermi('statistical:purchaseProjectNumberAnalysis')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult purchaseProjectNumberAnalysis(@RequestBody PmDemandReqVo pmDemandReqVo) {
-    //    // 需求单位可查看本单位及其下属单位的统计数据
-    //    if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
-    //        return error("登录账号的单位 不能为空!");
-    //    }
-    //    if (StringUtils.isNull(pmDemandReqVo.getTimeType())) {
-    //        return error("统计时间类型不能为空, 1:年度,2:季度,3:月份!");
-    //    }
-    //    List<Map<String, String>> map = pmDemandService.purchaseProjectNumberAnalysis(pmDemandReqVo);
-    //    return success(map);
-    //}
-    //
-    //@ApiOperation(value = "生成分析报告")
-    //@PostMapping("/generateAnalysisReport")
-    ////@PreAuthorize("@ss.hasPermi('statistical:generateAnalysisReport')")
-    //@Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
-    //public AjaxResult generateAnalysisReport(@RequestBody SysFileInfo file) {
-    //    //  创建一个document对象,相当于新建一个word文档(后缀名为.docx)。
-    //    XWPFDocument document = new XWPFDocument();
-    //    //        创建一个段落对象。
-    //    XWPFParagraph paragraph = document.createParagraph();
-    //    //        创建一个run。run具体是什么,我也不知道。但是run是这里面的最小单元了。
-    //    XWPFRun run = paragraph.createRun();
-    //    //        插入图片
-    //    //        创建一个输出流 即是该文档的保存位置
-    //    try {
-    //        //文件路径位置和文件名称
-    //        run.addPicture(new FileInputStream(file.getFileUrl()),
-    //                XWPFDocument.PICTURE_TYPE_PNG,
-    //                file.getFileName(),
-    //                Units.toEMU(400),
-    //                Units.toEMU(200));
-    //        //文件保存地址
-    //        OutputStream outputStream = new FileOutputStream(file.getFileMappingPath());
-    //        document.write(outputStream);
-    //        outputStream.close();
-    //        return AjaxResult.success("分析文档已生成");
-    //    } catch (IOException e) {
-    //        e.printStackTrace();
-    //    } catch (InvalidFormatException e) {
-    //        e.printStackTrace();
-    //    }
-    //    return AjaxResult.success("分析文档已生成");
-    //}
-
-
-}

BIN
purchase-admin/src/main/resources/template/base_expert.xlsx


+ 13 - 0
purchase-system/src/main/java/com/ozs/base/domain/vo/BaseExpertVo.java

@@ -142,6 +142,19 @@ public class BaseExpertVo {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
+    public BaseExpertVo(String expertName, String expertType, String expertGender, String expertDateBirth, String expertTel, String majorTypeName, String unitInformation, String professionalTitle, String localArea, String idNumber) {
+        this.expertName = expertName;
+        this.expertType = expertType;
+        this.expertGender = expertGender;
+        this.expertDateBirth = expertDateBirth;
+        this.expertTel = expertTel;
+        this.majorTypeName = majorTypeName;
+        this.unitInformation = unitInformation;
+        this.professionalTitle = professionalTitle;
+        this.localArea = localArea;
+        this.idNumber = idNumber;
+    }
+
     /**
      * 更新人
      */

+ 4 - 1
purchase-system/src/main/java/com/ozs/base/service/impl/BaseExpertServiceImpl.java

@@ -216,6 +216,9 @@ public class BaseExpertServiceImpl extends ServiceImpl<BaseExpertMapper, BaseExp
                     ++failureNum;
                     failureMsg.append(failureNum + "、专家类型“" + expert.getExpertType() + "”不存在");
                 }
+                if (expert.getIdNumber().length() > 18) {
+                    throw new ServiceException("身份证号长度过长");
+                }
                 //查询身份证号是否已使用
                 LambdaQueryWrapper<BaseExpert> baseExpertWrapper = new LambdaQueryWrapper<>();
                 baseExpertWrapper.eq(BaseExpert::getIdNumber, expert.getIdNumber());
@@ -223,7 +226,7 @@ public class BaseExpertServiceImpl extends ServiceImpl<BaseExpertMapper, BaseExp
                 //身份证号已存在的不可添加
                 if (!ObjectUtils.isEmpty(idNumberList)) {
                     ++failureNum;
-                    failureMsg.append(failureNum + "、身份证号“" + expert.getExpertType() + "”已被使用");
+                    failureMsg.append(failureNum + "、身份证号“" + expert.getIdNumber() + "”已被使用");
                 }
                 //专业类型
                 LambdaQueryWrapper<BaseProfessional> wrapper = new LambdaQueryWrapper<>();