瀏覽代碼

模板维护修改bug修复

wangyu 5 年之前
父節點
當前提交
e09a3decd4

+ 6 - 2
precman-service/src/main/java/com/diagbot/facade/ModuleInfoFacade.java

@@ -208,7 +208,9 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
             //将用户信息放入实体
             for (ModuleInfoListDTO moduleInfoListDTO : moduleInfoDTOIPage.getRecords()) {
                 moduleInfoListDTO.setUserName(respDTO.data.get(moduleInfoListDTO.getModifier()));
-                moduleInfoListDTO.setAscriptionName(dictionaryInfoMap.get(moduleInfoListDTO.getType()).getName());
+                if(null != dictionaryInfoMap.get(moduleInfoListDTO.getType())){
+                    moduleInfoListDTO.setAscriptionName(dictionaryInfoMap.get(moduleInfoListDTO.getType()).getName());
+                }
                 if(moduleInfoListDTO.getModuleType().intValue() == 1){//根据科室
                     if(moduleInfoListDTO.getRelationId().intValue() != -1){//判断是不是科室通用子模板
                         if(null != deptInfoMap.get(moduleInfoListDTO.getRelationId())){
@@ -259,7 +261,9 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
                     .orderByDesc("order_no");
             List<DictionaryInfo> dictionaryInfoList = dictionaryFacade.list(dictionaryInfoQueryWrapper);
             Map<String, DictionaryInfo> dictionaryInfoMap = dictionaryInfoList.stream().collect(Collectors.toMap(DictionaryInfo::getVal,dictionaryInfo -> dictionaryInfo));
-            getModuleInfoOneDTO.setAscriptionName(dictionaryInfoMap.get(getModuleInfoOneDTO.getType()).getName());
+            if (null != dictionaryInfoMap.get(getModuleInfoOneDTO.getType())) {
+                getModuleInfoOneDTO.setAscriptionName(dictionaryInfoMap.get(getModuleInfoOneDTO.getType()).getName());
+            }
             getModuleInfoOneDTO.setModuleTypeName(ModuleInfoTypeEnum.getName(getModuleInfoOneDTO.getModuleType().intValue()));
             if(getModuleInfoOneDTO.getModuleType().intValue() == 1){
                 if(null != deptInfoMap.get(getModuleInfoOneDTO.getRelationId())){

+ 1 - 1
precman-service/src/main/java/com/diagbot/vo/UpdateModuleInfoVO.java

@@ -19,7 +19,7 @@ public class UpdateModuleInfoVO {
     @NotNull(message="模板名称不能为空")
     private String name;
     @NotNull(message="模板属于不能为空")
-    private int type;
+    private String type;
     @NotNull(message="标签id不能为空")
     private List<AddModuleDetailVO> moduleDetail;
     @NotNull(message="模板类型不能为空")