Browse Source

bug修正

wangyu 6 years ago
parent
commit
ca13c9c12d

+ 3 - 3
icssman-service/src/main/java/com/diagbot/facade/ModuleInfoFacade.java

@@ -281,7 +281,7 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
             //将用户信息放入实体
             for (ModuleInfoListDTO moduleInfoListDTO : moduleInfoDTOIPage.getRecords()) {
                 moduleInfoListDTO.setUserName(respDTO.data.get(moduleInfoListDTO.getModifier()));
-                if(moduleInfoListDTO.getModuleType().intValue() != 3){
+                if(dictionaryInfoMap.get(moduleInfoListDTO.getType()) != null ){
                     moduleInfoListDTO.setAscriptionName(dictionaryInfoMap.get(moduleInfoListDTO.getType()).getName());
                 }
                 if(moduleInfoListDTO.getModuleType().intValue() == 1){//根据科室
@@ -464,10 +464,10 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
         List<DisDTO> disDTOS = new ArrayList<>();
         for (DisType disType: disTypes) {
             DisDTO disDTO = new DisDTO();
-            disDTO.setId(disType.getParentId());
+            disDTO.setId(disType.getDisId());
             disDTOS.add(disDTO);
         }
-        List<Long> questionIds = disTypes.stream().map(DisType::getParentId).collect(Collectors.toList());
+        List<Long> questionIds = disTypes.stream().map(DisType::getDisId).collect(Collectors.toList());
         QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
         questionInfoQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
                 .in("id",questionIds);

+ 27 - 4
icssman-service/src/main/resources/mapper/DisScaleMapper.xml

@@ -18,19 +18,42 @@
 
     <select id="getDisScaleInfo" resultType="com.diagbot.dto.GetDisScaleAllInfoDTO">
         SELECT
-        a.modifier,a.gmt_modified,a.id,a.dis_id,a.scale_id,b.`name` AS dis_name,c.`name` AS scale_name
+        t.id,
+        t.modifier,
+        t.gmt_modified,
+        t.dis_id,
+        t.scale_id,
+        t.dis_name,
+        GROUP_CONCAT(t.scale_name) scale_name
         FROM
-	      `icss_dis_scale` a
+        (
+        SELECT
+        a.modifier,
+        a.gmt_modified,
+        a.id,
+        a.dis_id,
+        a.scale_id,
+        b.`name` AS dis_name,
+        c.`name` AS scale_name
+        FROM
+        `icss_dis_scale` a
         LEFT JOIN icss_question_info b ON a.dis_id = b.id
         LEFT JOIN icss_question_info c ON a.scale_id = c.id
-        WHERE a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N'
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
         <if test="getDisScaleAllInfoVO.disName != null and getDisScaleAllInfoVO.disName != ''">
             and b.`name` LIKE CONCAT('%',#{getDisScaleAllInfoVO.disName},'%')
         </if>
         <if test="getDisScaleAllInfoVO.scaleName != null and getDisScaleAllInfoVO.scaleName != ''">
             and c.`name` LIKE CONCAT('%',#{getDisScaleAllInfoVO.scaleName},'%')
         </if>
-        ORDER BY a.gmt_modified DESC
+        ) t
+        GROUP BY
+        t.dis_name
+        ORDER BY
+        t.gmt_modified DESC
     </select>
 
 </mapper>