浏览代码

界面添加字段信息

zhoutg 6 年之前
父节点
当前提交
2806de59cd
共有 1 个文件被更改,包括 0 次插入107 次删除
  1. 0 107
      icssman-service/src/main/java/com/diagbot/facade/QuestionFacade.java

+ 0 - 107
icssman-service/src/main/java/com/diagbot/facade/QuestionFacade.java

@@ -13,14 +13,10 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.CommonParam;
 import com.diagbot.entity.DeptInfo;
 import com.diagbot.entity.DeptVital;
-import com.diagbot.entity.DisScale;
 import com.diagbot.entity.DisType;
-import com.diagbot.entity.ModuleDetail;
-import com.diagbot.entity.ModuleInfo;
 import com.diagbot.entity.QuestionDetail;
 import com.diagbot.entity.QuestionInfo;
 import com.diagbot.entity.QuestionMapping;
-import com.diagbot.entity.RetrievalMapping;
 import com.diagbot.entity.wrapper.QuestionInfoWrapper;
 import com.diagbot.entity.wrapper.QuestionMappingWrapper;
 import com.diagbot.entity.wrapper.QuestionWrapper;
@@ -137,11 +133,6 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
             default:
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请选择标签显示类型");
         }
-
-        //保存诊断类型
-        if (questionSaveVO.getDisTypeVO() != null) {
-            saveDisType(param, questionSaveVO.getDisTypeVO().getType());
-        }
     }
 
 
@@ -160,33 +151,6 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
     }
 
 
-    /**
-     * 保存诊断类型
-     *
-     * @param param
-     * @param disType
-     */
-    public void saveDisType(CommonParam param, Integer disType) {
-        if (param.getQuestionInfo().getType() == QuestionTypeEnum.Disease.getKey()) {
-            DisType bean = disTypeFacade.getOne(new QueryWrapper<DisType>()
-                    .eq("is_deleted", IsDeleteEnum.N.getKey())
-                    .eq("dis_id", param.getQuestionInfo().getId()));
-            if (bean == null) {
-                bean = new DisType();
-            }
-            if (InsertOrUpdateEnum.Insert.getKey() == param.getInsertOrUpdate()) {
-                bean.setGmtCreate(param.getNow());
-                bean.setCreator(param.getPerson());
-            }
-            bean.setType(disType);
-            bean.setDisId(param.getQuestionInfo().getId());
-            bean.setModifier(param.getPerson());
-            bean.setGmtModified(param.getNow());
-            disTypeFacade.saveOrUpdate(bean);
-        }
-    }
-
-
     /**
      * 保存映射关系
      *
@@ -476,34 +440,6 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
         Date now = DateUtil.now();
         String person = UserUtils.getCurrentPrincipleID();
         for (String id : idList) {
-            // 查询映射关系中是否存在父级
-           /* List<QuestionInfo> info = this.getParentQuestion(Long.parseLong(id));
-            for (QuestionInfo bean : info) {
-                if (bean.getTagType() != null && bean.getTagType() == TagTypeEnum.T10.getKey()) {
-                    List<QuestionInfo> info2 = this.getParentQuestion(bean.getId());
-                    List<String> msg = info2.stream().map(row -> "【" + row.getTagName() + "】").collect(Collectors.toList());
-                    errMsg.append(String.join("", msg));
-                } else {
-                    errMsg.append("【").append(bean.getTagName()).append("】");
-                }
-            }
-            if (StringUtil.isNotEmpty(errMsg.toString())) {
-                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请先删除标签的关联:" + errMsg);
-            }*/
-
-            // 查询模板中是否存在
-            /*List<ModuleDetail> moduleDetails = moduleDetailFacade.list(new QueryWrapper<ModuleDetail>()
-                    .eq("is_deleted", IsDeleteEnum.N.getKey())
-                    .eq("question_id", id));
-            if (ListUtil.isNotEmpty(moduleDetails)) {
-                List<Long> moduleIds = moduleDetails.stream().map(row -> row.getModuleId()).collect(Collectors.toList());
-                List<String> moduleName = moduleInfoFacade.list(new QueryWrapper<ModuleInfo>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .in("id", moduleIds))
-                        .stream().map(row -> "{" + row.getName() + "}").collect(Collectors.toList());
-                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请先删除模板的关联:" + String.join("、", moduleName));
-            }*/
-
             Map paramMap = new HashMap<>();
             paramMap.put("delete", IsDeleteEnum.Y.getKey());
             paramMap.put("ids", Arrays.asList(ids.split(",")));
@@ -522,49 +458,6 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
                     .set("gmt_modified", now)
                     .set("modifier", person)
                     .set("is_deleted", IsDeleteEnum.Y.getKey()));
-            //删除检索映射
-            retrievalMappingFacade.update(new RetrievalMapping(), new UpdateWrapper<RetrievalMapping>()
-                    .eq("question_id", id)
-                    .eq("is_deleted", IsDeleteEnum.N.getKey())
-                    .set("gmt_modified", now)
-                    .set("modifier", person)
-                    .set("is_deleted", IsDeleteEnum.Y.getKey()));
-            //如果是诊断
-            if (deleteQuestionVO.getType() == QuestionTypeEnum.Disease.getKey()) {
-                // 删除诊断类型映射关系
-                disTypeFacade.update(new DisType(), new UpdateWrapper<DisType>()
-                        .eq("dis_id", id)
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .set("gmt_modified", now)
-                        .set("modifier", person)
-                        .set("is_deleted", IsDeleteEnum.Y.getKey()));
-                //删除诊断和量表的映射关系
-                disScaleFacade.update(new DisScale(), new UpdateWrapper<DisScale>()
-                        .eq("dis_id", id)
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .set("gmt_modified", now)
-                        .set("modifier", person)
-                        .set("is_deleted", IsDeleteEnum.Y.getKey()));
-                //删除慢病模板
-                QueryWrapper<ModuleInfo> moduleInfoQueryWrapper = new QueryWrapper<>();
-                moduleInfoQueryWrapper.eq("relation_id", id)
-                        .eq("is_deleted", IsDeleteEnum.N.getKey());
-                List<ModuleInfo> moduleInfoList = moduleInfoFacade.list(moduleInfoQueryWrapper);
-                List<Long> moduleIds = moduleInfoList.stream().map(ModuleInfo::getId).collect(Collectors.toList());
-                moduleInfoFacade.update(new ModuleInfo(), new UpdateWrapper<ModuleInfo>()
-                        .in("id", moduleIds)
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .set("gmt_modified", now)
-                        .set("modifier", person)
-                        .set("is_deleted", IsDeleteEnum.Y.getKey()));
-                //删除模板明细
-                moduleDetailFacade.update(new ModuleDetail(), new UpdateWrapper<ModuleDetail>()
-                        .in("module_id", moduleIds)
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .set("gmt_modified", now)
-                        .set("modifier", person)
-                        .set("is_deleted", IsDeleteEnum.Y.getKey()));
-            }
 
             //TODO 删除映射关系或检查抛异常