Forráskód Böngészése

1、术语关联-分页

zhaops 4 éve
szülő
commit
7199ed820f

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -142,6 +142,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 //.antMatchers("/tran/tcmsyndromeConfig/importExcel").permitAll()
                 //.antMatchers("/tran/tcmsyndromeConfig/exportExcel").permitAll()
                 .antMatchers("/tran/tcmsyndromeConfig/exportExcelModule").permitAll()
+                .antMatchers("/tran/mappingConfig/getPage").permitAll()
                 //.antMatchers("/tran/hospitalInfo/saveRecord").permitAll()
                 .antMatchers("/tran/hospitalInfo/getHospitalInfo").permitAll()
                 .antMatchers("/tran/hospitalInfo/getAllHospitalInfo").permitAll()

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -185,6 +185,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 // || matchers("/tran/tcmsyndromeConfig/importExcel", request)
                 // || matchers("/tran/tcmsyndromeConfig/exportExcel", request)
                 || matchers("/tran/tcmsyndromeConfig/exportExcelModule", request)
+                || matchers("/tran/mappingConfig/getPage", request)
                 //|| matchers("/tran/hospitalInfo/saveRecord", request)
                 || matchers("/tran/hospitalInfo/getHospitalInfo", request)
                 || matchers("/tran/hospitalInfo/getAllHospitalInfo", request)

+ 36 - 0
src/main/java/com/diagbot/entity/AnesthesiaConfig.java

@@ -0,0 +1,36 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/6/10 19:16
+ */
+@Getter
+@Setter
+public class AnesthesiaConfig {
+    /**
+     * 医院id
+     */
+    private Long hospitalId;
+
+    /**
+     * 医院科室名称
+     */
+    @Excel(name = "医院麻醉名称", width = 40, orderNum = "1", isImportField = "true")
+    @NotBlank(message = "请输入医院麻醉名称")
+    private String hisName;
+
+    /**
+     * 标准科室名称
+     */
+    @Excel(name = "标准麻醉名称", width = 40, orderNum = "2", isImportField = "true")
+    @NotBlank(message = "请输入标准麻醉名称")
+    private String uniqueName;
+
+}

+ 12 - 0
src/main/java/com/diagbot/entity/wrapper/MappingConfigWrapper.java

@@ -0,0 +1,12 @@
+package com.diagbot.entity.wrapper;
+
+import com.diagbot.entity.MappingConfig;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/6/10 19:27
+ */
+public class MappingConfigWrapper extends MappingConfig {
+    private String uniqueName;
+}

+ 223 - 1
src/main/java/com/diagbot/facade/MappingConfigFacade.java

@@ -1,7 +1,35 @@
 package com.diagbot.facade;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.AnesthesiaConfig;
+import com.diagbot.entity.DeptConfig;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.entity.MappingConfig;
+import com.diagbot.entity.NurseConfig;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.entity.ScaleConfig;
+import com.diagbot.entity.TcmdiseaseConfig;
+import com.diagbot.entity.TcmsyndromeConfig;
+import com.diagbot.entity.TransfusionConfig;
+import com.diagbot.entity.wrapper.MappingConfigWrapper;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.MappingConfigServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.MappingConfigPageVO;
+import com.google.common.collect.Lists;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @Description:
@@ -11,4 +39,198 @@ import org.springframework.stereotype.Component;
 @Component
 public class MappingConfigFacade extends MappingConfigServiceImpl {
 
-}
+    /**
+     * 分页查询
+     *
+     * @param mappingConfigPageVO
+     * @return
+     */
+    @Override
+    public IPage<MappingConfig> getPage(@Param("mappingConfigPageVO") MappingConfigPageVO mappingConfigPageVO) {
+        if (mappingConfigPageVO.getHospitalId() == null) {
+            mappingConfigPageVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+        }
+
+        //todo 标准词转conceptId
+
+        //todo 药品剂型转 conceptId
+
+        //todo 多条匹配
+        if (mappingConfigPageVO.getIsMatch() != null && mappingConfigPageVO.getIsMatch().equals(2)) {
+            mappingConfigPageVO.setIsMatch(null);
+            mappingConfigPageVO.setIsMultiple(1);
+        }
+
+        IPage<MappingConfig> page = super.getPage(mappingConfigPageVO);
+
+        //todo conceptId转标准词
+
+        return page;
+    }
+
+    /**
+     * 导入模板下载
+     *
+     * @param response
+     */
+    public void exportExcelModule(HttpServletResponse response, Integer type) {
+        if (type == null) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "请输入数据类型:1-化验、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉");
+        }
+        exportExcel(response, new ArrayList<>(), type, "导入模板");
+    }
+
+    /**
+     * 导出文件
+     *
+     * @param response
+     * @param type
+     * @param extFileName
+     */
+    public void exportExcel(HttpServletResponse response, List<?> list, Integer type, String extFileName) {
+        String fileName = extFileName + ".xls";
+        switch (type) {
+            case 1:
+                fileName = "检验" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", LisConfig.class, fileName, response, 12.8f);
+                break;
+            case 3:
+                fileName = "检查" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", PacsConfig.class, fileName, response, 12.8f);
+                break;
+            case 4:
+                fileName = "诊断" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", DiseaseConfig.class, fileName, response, 12.8f);
+                break;
+            case 5:
+                fileName = "药品" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", DrugConfig.class, fileName, response, 12.8f);
+                break;
+            case 6:
+                fileName = "手术和操作" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", OperationConfig.class, fileName, response, 12.8f);
+                break;
+            case 7:
+                fileName = "科室" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", DeptConfig.class, fileName, response, 12.8f);
+                break;
+            case 8:
+                fileName = "输血" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", TransfusionConfig.class, fileName, response, 12.8f);
+                break;
+            case 10:
+                fileName = "量表" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", ScaleConfig.class, fileName, response, 12.8f);
+                break;
+            case 11:
+                fileName = "护理" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", NurseConfig.class, fileName, response, 12.8f);
+                break;
+            case 12:
+                fileName = "中医疾病" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", TcmdiseaseConfig.class, fileName, response, 12.8f);
+                break;
+            case 13:
+                fileName = "中医证候" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", TcmsyndromeConfig.class, fileName, response, 12.8f);
+                break;
+            case 14:
+                fileName = "麻醉" + fileName;
+                ExcelUtils.exportExcel(list, null, "sheet1", AnesthesiaConfig.class, fileName, response, 12.8f);
+                break;
+            default:
+                break;
+        }
+    }
+
+
+    /**
+     * 导入数据预匹配
+     *
+     * @param file
+     * @param type
+     * @param response
+     */
+    public void precDataMatch(MultipartFile file, Integer type, HttpServletResponse response) {
+        List<MappingConfigWrapper> originList = readImportData(file, type);
+        List<MappingConfigWrapper> retList = dataProcess(originList);
+        exportExcel(response, retList, type, "关联数据(预匹配)");
+    }
+
+    /**
+     * 读取导入数据
+     *
+     * @param file
+     * @param type
+     * @return
+     */
+    public List<MappingConfigWrapper> readImportData(MultipartFile file, Integer type) {
+        List<MappingConfigWrapper> originList = Lists.newLinkedList();
+        switch (type) {
+            case 1:
+                List<LisConfig> lisConfigList = ExcelUtils.importExcel(file, 0, 1, LisConfig.class);
+                originList = BeanUtil.listCopyTo(lisConfigList, MappingConfigWrapper.class);
+                break;
+            case 3:
+                List<PacsConfig> pacsConfigList = ExcelUtils.importExcel(file, 0, 1, PacsConfig.class);
+                originList = BeanUtil.listCopyTo(pacsConfigList, MappingConfigWrapper.class);
+                break;
+            case 4:
+                List<DiseaseConfig> diseaseConfigList = ExcelUtils.importExcel(file, 0, 1, DiseaseConfig.class);
+                originList = BeanUtil.listCopyTo(diseaseConfigList, MappingConfigWrapper.class);
+                break;
+            case 5:
+                List<DrugConfig> drugConfigList = ExcelUtils.importExcel(file, 0, 1, DrugConfig.class);
+                originList = BeanUtil.listCopyTo(drugConfigList, MappingConfigWrapper.class);
+                break;
+            case 6:
+                List<OperationConfig> operationConfigList = ExcelUtils.importExcel(file, 0, 1, OperationConfig.class);
+                originList = BeanUtil.listCopyTo(operationConfigList, MappingConfigWrapper.class);
+                break;
+            case 7:
+                List<DeptConfig> deptConfigList = ExcelUtils.importExcel(file, 0, 1, DeptConfig.class);
+                originList = BeanUtil.listCopyTo(deptConfigList, MappingConfigWrapper.class);
+                break;
+            case 8:
+                List<TransfusionConfig> transfusionConfigList = ExcelUtils.importExcel(file, 0, 1, TransfusionConfig.class);
+                originList = BeanUtil.listCopyTo(transfusionConfigList, MappingConfigWrapper.class);
+                break;
+            case 10:
+                List<ScaleConfig> scaleConfigList = ExcelUtils.importExcel(file, 0, 1, ScaleConfig.class);
+                originList = BeanUtil.listCopyTo(scaleConfigList, MappingConfigWrapper.class);
+                break;
+            case 11:
+                List<NurseConfig> nurseConfigList = ExcelUtils.importExcel(file, 0, 1, NurseConfig.class);
+                originList = BeanUtil.listCopyTo(nurseConfigList, MappingConfigWrapper.class);
+                break;
+            case 12:
+                List<TcmdiseaseConfig> tcmdiseaseConfigList = ExcelUtils.importExcel(file, 0, 1, TcmdiseaseConfig.class);
+                originList = BeanUtil.listCopyTo(tcmdiseaseConfigList, MappingConfigWrapper.class);
+                break;
+            case 13:
+                List<TcmsyndromeConfig> tcmsyndromeConfigList = ExcelUtils.importExcel(file, 0, 1, TcmsyndromeConfig.class);
+                originList = BeanUtil.listCopyTo(tcmsyndromeConfigList, MappingConfigWrapper.class);
+                break;
+            case 14:
+                List<AnesthesiaConfig> anesthesiaConfigList = ExcelUtils.importExcel(file, 0, 1, AnesthesiaConfig.class);
+                originList = BeanUtil.listCopyTo(anesthesiaConfigList, MappingConfigWrapper.class);
+                break;
+            default:
+                break;
+        }
+        return originList;
+    }
+
+    /**
+     * 数据处理
+     *
+     * @param originList
+     * @return
+     */
+    public List<MappingConfigWrapper> dataProcess(List<MappingConfigWrapper> originList) {
+        List<MappingConfigWrapper> retList = Lists.newLinkedList();
+
+        return retList;
+    }
+
+}

+ 12 - 3
src/main/java/com/diagbot/mapper/MappingConfigMapper.java

@@ -1,7 +1,10 @@
 package com.diagbot.mapper;
 
-import com.diagbot.entity.MappingConfig;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.MappingConfig;
+import com.diagbot.vo.MappingConfigPageVO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -12,5 +15,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @since 2021-06-09
  */
 public interface MappingConfigMapper extends BaseMapper<MappingConfig> {
-
-}
+    /**
+     * 分页查询
+     *
+     * @param mappingConfigPageVO
+     * @return
+     */
+    IPage<MappingConfig> getPage(@Param("mappingConfigPageVO") MappingConfigPageVO mappingConfigPageVO);
+}

+ 11 - 2
src/main/java/com/diagbot/service/MappingConfigService.java

@@ -1,7 +1,10 @@
 package com.diagbot.service;
 
-import com.diagbot.entity.MappingConfig;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.MappingConfig;
+import com.diagbot.vo.MappingConfigPageVO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -12,5 +15,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2021-06-09
  */
 public interface MappingConfigService extends IService<MappingConfig> {
-
+    /**
+     * 分页查询
+     *
+     * @param mappingConfigPageVO
+     * @return
+     */
+    IPage<MappingConfig> getPage(@Param("mappingConfigPageVO") MappingConfigPageVO mappingConfigPageVO);
 }

+ 14 - 2
src/main/java/com/diagbot/service/impl/MappingConfigServiceImpl.java

@@ -1,9 +1,12 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.entity.MappingConfig;
 import com.diagbot.mapper.MappingConfigMapper;
 import com.diagbot.service.MappingConfigService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.MappingConfigPageVO;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
 
 /**
@@ -16,5 +19,14 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class MappingConfigServiceImpl extends ServiceImpl<MappingConfigMapper, MappingConfig> implements MappingConfigService {
-
+    /**
+     * 分页查询
+     *
+     * @param mappingConfigPageVO
+     * @return
+     */
+    @Override
+    public IPage<MappingConfig> getPage(@Param("mappingConfigPageVO") MappingConfigPageVO mappingConfigPageVO) {
+        return baseMapper.getPage(mappingConfigPageVO);
+    }
 }

+ 74 - 0
src/main/java/com/diagbot/vo/MappingConfigPageVO.java

@@ -0,0 +1,74 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/6/10 15:35
+ */
+@Getter
+@Setter
+public class MappingConfigPageVO extends Page {
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+    /**
+     * 医学术语类型( 1-检验套餐、2-检验细项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、10-量表、11-护理、12-中医疾病、13-中医证候、14-麻醉)
+     */
+    @NotNull(message = "请输入术语类型:1-化验、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、10-量表、11-护理、12-中医诊断、13-中医证候、14-麻醉")
+    private Integer type;
+
+    /**
+     * 医院术语名称
+     */
+    private String hisName;
+
+    /**
+     * 医院术语编码
+     */
+    private String hisCode;
+
+    /**
+     * 医院术语细项名称(检验细项)
+     */
+    private String hisDetailName;
+
+    /**
+     * 医学标准术语名称
+     */
+    private String uniqueName;
+    @ApiModelProperty(hidden = true)
+    private List<Long> conceptIds;
+
+    /**
+     * 药品剂型
+     */
+    private String form;
+    @ApiModelProperty(hidden = true)
+    private List<Long> formConceptIds;
+
+    /**
+     * 是否匹配(0-未匹配、1-已匹配、2-多条匹配)
+     */
+    private Integer isMatch;
+
+    /**
+     * 数据来源(1-标准词、2-同义词、3-编码、4-历史数据、5-相似词、99-数据迁移)
+     */
+    private Integer source;
+
+    /**
+     * 一对多关系查询
+     */
+    @ApiModelProperty(hidden = true)
+    private Integer isMultiple;
+}

+ 45 - 0
src/main/java/com/diagbot/web/MappingConfigController.java

@@ -0,0 +1,45 @@
+package com.diagbot.web;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.MappingConfig;
+import com.diagbot.facade.MappingConfigFacade;
+import com.diagbot.vo.MappingConfigPageVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/6/10 16:34
+ */
+@RestController
+@RequestMapping("/tran/mappingConfig")
+@Api(value = "术语关联相关API", tags = { "术语关联相关API" })
+@SuppressWarnings("unchecked")
+public class MappingConfigController {
+    @Autowired
+    private MappingConfigFacade mappingConfigFacade;
+
+    /**
+     * 分页查询
+     *
+     * @param mappingConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<MappingConfig> getPage(@RequestBody @Valid MappingConfigPageVO mappingConfigPageVO) {
+        IPage<MappingConfig> data = mappingConfigFacade.getPage(mappingConfigPageVO);
+        return RespDTO.onSuc(data);
+    }
+}

+ 92 - 0
src/main/resources/mapper/MappingConfigMapper.xml

@@ -22,4 +22,96 @@
         <result column="remark" property="remark" />
     </resultMap>
 
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.MappingConfig">
+        select t1.*
+        from
+        (select a.*
+        from tran_mapping_config a
+        where a.is_deleted='N'
+        <if test="mappingConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{mappingConfigPageVO.hospitalId}
+        </if>
+        <if test="mappingConfigPageVO.type!=null">
+            and a.type=#{mappingConfigPageVO.type}
+        </if>
+        <if test="mappingConfigPageVO.hisName!=null and mappingConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{mappingConfigPageVO.hisName},"%")
+        </if>
+        <if test="mappingConfigPageVO.hisCode!=null and mappingConfigPageVO.hisCode!=''">
+            and a.his_code like concat("%",#{mappingConfigPageVO.hisCode},"%")
+        </if>
+        <if test="mappingConfigPageVO.hisDetailName!=null and mappingConfigPageVO.hisDetailName!=''">
+            and a.his_detail_name like concat("%",#{mappingConfigPageVO.hisDetailName},"%")
+        </if>
+        <if test="mappingConfigPageVO.conceptIds!=null and mappingConfigPageVO.conceptIds.size()>0">
+            and a.concept_id in
+            <foreach item="conceptId" collection="mappingConfigPageVO.conceptIds" open="(" separator="," close=")">
+                #{conceptId}
+            </foreach>
+        </if>
+        <if test="mappingConfigPageVO.formConceptIds!=null and mappingConfigPageVO.formConceptIds.size()>0">
+            and a.form_concept_id in
+            <foreach item="formConceptId" collection="mappingConfigPageVO.formConceptIds" open="(" separator=","
+                     close=")">
+                #{formConceptId}
+            </foreach>
+        </if>
+        <if test="mappingConfigPageVO.isMatch!=null">
+            and a.is_match=#{mappingConfigPageVO.isMatch}
+        </if>
+        )t1
+        <if test="mappingConfigPageVO.isMultiple!=null and mappingConfigPageVO.isMultiple=1">
+            ,(select a.his_name,a.his_detail_name,count(*)
+            from tran_mapping_config a
+            where a.is_deleted='N'
+            <if test="mappingConfigPageVO.hospitalId!=null">
+                and a.hospital_id=#{mappingConfigPageVO.hospitalId}
+            </if>
+            <if test="mappingConfigPageVO.type!=null">
+                and a.type=#{mappingConfigPageVO.type}
+            </if>
+            <if test="mappingConfigPageVO.hisName!=null and mappingConfigPageVO.hisName!=''">
+                and a.his_name like concat("%",#{mappingConfigPageVO.hisName},"%")
+            </if>
+            <if test="mappingConfigPageVO.hisCode!=null and mappingConfigPageVO.hisCode!=''">
+                and a.his_code like concat("%",#{mappingConfigPageVO.hisCode},"%")
+            </if>
+            <if test="mappingConfigPageVO.hisDetailName!=null and mappingConfigPageVO.hisDetailName!=''">
+                and a.his_detail_name like concat("%",#{mappingConfigPageVO.hisDetailName},"%")
+            </if>
+            <if test="mappingConfigPageVO.conceptIds!=null and mappingConfigPageVO.conceptIds.size()>0">
+                and a.concept_id in
+                <foreach item="conceptId" collection="mappingConfigPageVO.conceptIds" open="(" separator="," close=")">
+                    #{conceptId}
+                </foreach>
+            </if>
+            <if test="mappingConfigPageVO.formConceptIds!=null and mappingConfigPageVO.formConceptIds.size()>0">
+                and a.form_concept_id in
+                <foreach item="formConceptId" collection="mappingConfigPageVO.formConceptIds" open="(" separator=","
+                         close=")">
+                    #{formConceptId}
+                </foreach>
+            </if>
+            group by a.his_name
+            <if test="mappingConfigPageVO.type!=null and mappingConfigPageVO.type=1">
+                ,a.his_detail_name
+            </if>
+            having count(*)>1
+            ) t2
+            where t1.his_name=t2.his_name
+            <if test="mappingConfigPageVO.type!=null and mappingConfigPageVO.type=1">
+                and t1.his_detail_name=t2.his_detail_name
+            </if>
+        </if>
+        order by
+        <if test="mappingConfigPageVO.isMultiple!=null and mappingConfigPageVO.isMultiple=1">
+            t1.his_name asc,
+            <if test="mappingConfigPageVO.type!=null and mappingConfigPageVO.type=1">
+                t1.his_detail_name asc,
+            </if>
+        </if>
+        t1.is_match asc,t1.gmt_modified desc
+    </select>
+
 </mapper>