Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev/KLBstand' into dev/KLBstand

Zhaops před 6 roky
rodič
revize
89fbdea24f

+ 25 - 26
knowledgeman-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -1,5 +1,27 @@
 package com.diagbot.facade;
 
+import java.io.InputStream;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.client.UserServiceClient;
@@ -30,6 +52,7 @@ import com.diagbot.util.EntityUtil;
 import com.diagbot.util.IntegerUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.ParamConvertUtil;
+import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.AddConceptInfoDetailVO;
@@ -43,27 +66,6 @@ import com.diagbot.vo.GetAllLisConceptVO;
 import com.diagbot.vo.GetConceptInfoDetailVO;
 import com.diagbot.vo.IndexVO;
 import com.diagbot.vo.RemoveConceptInfoVO;
-import org.apache.commons.lang.time.DateFormatUtils;
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Component;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.InputStream;
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
 
 /**
  * @Description: 术语查询业务层
@@ -162,14 +164,11 @@ public class ConceptFacade extends ConceptServiceImpl {
      * @return
      */
     public IPage<GetAllInformationDTO> getAllInformation(GetAllInformationVO getAllInformationVO) {
-        IPage<GetAllInformationDTO> ipage = libraryinfoFacade.getAllInformation(getAllInformationVO);
+    	IPage<GetAllInformationDTO> ipage = libraryinfoFacade.getAllInformation(getAllInformationVO);
         if (ipage.getRecords().size() > 0) {
             List<String> ids = ipage.getRecords().stream().map(i -> i.getOperName()).distinct().collect(Collectors.toList());
             RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
-            if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
-                throw new CommonException(CommonErrorCode.RPC_ERROR,
-                        "获取用户信息失败");
-            }
+            RespDTOUtil.respNGDealCover(respDTO, "获取用户信息失败");
             ipage.getRecords().forEach(i -> {
                 i.setOperName(respDTO.data.get(i.getOperName()));
             });

+ 3 - 2
knowledgeman-service/src/main/resources/mapper/LibraryInfoMapper.xml

@@ -25,13 +25,14 @@
 		FROM
 		(SELECT
 		a.id as conceptId,
-		GROUP_CONCAT(CASE WHEN a.lib_id=b.id THEN b.`name` ELSE NULL END) AS libName,
-		b.type AS libType,
+		a.lib_name AS libName,
+		c.`name` AS libType,
 		GROUP_CONCAT(b.`name` ORDER BY b.id ASC SEPARATOR '、') as otherNames,
 		a.modifier as operName,
 		a.gmt_modified as operTime,
 		a.is_deleted as isDeleted
 		FROM kl_concept a JOIN kl_library_info b ON a.id=b.concept_id
+		LEFT JOIN kl_lexicon c ON a.lib_type=c.id 
 		GROUP BY a.id) t
 		where 1=1
 		<if test="name!=null and name!=''">