|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.client.UserServiceClient;
|
|
|
import com.diagbot.dto.GetModuleDetailInfoDTO;
|
|
|
import com.diagbot.dto.GetModuleInfoOneDTO;
|
|
|
+import com.diagbot.dto.GetModuleTypeDTO;
|
|
|
import com.diagbot.dto.GetQuestionInfoDTO;
|
|
|
import com.diagbot.dto.ModuleInfoDTO;
|
|
|
import com.diagbot.dto.ModuleInfoListDTO;
|
|
@@ -29,6 +30,7 @@ import com.diagbot.vo.AddModuleInfoVO;
|
|
|
import com.diagbot.vo.GetModuleDetailInfoVO;
|
|
|
import com.diagbot.vo.GetModuleInfoOneVO;
|
|
|
import com.diagbot.vo.GetModuleInfoVO;
|
|
|
+import com.diagbot.vo.GetModuleTypeVO;
|
|
|
import com.diagbot.vo.ModuleGetQuestionInfoVO;
|
|
|
import com.diagbot.vo.UpdateModuleInfoVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -376,5 +378,33 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
return getModuleInfoOneDTO;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 获取模板类型(从主诉到诊断)
|
|
|
+ *
|
|
|
+ * @param getModuleTypeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<GetModuleTypeDTO> getModuleType(GetModuleTypeVO getModuleTypeVO){
|
|
|
+ QueryWrapper<ModuleInfo> moduleInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ moduleInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("module_Type", getModuleTypeVO.getModuleType());
|
|
|
+ List<ModuleInfo> moduleInfos = this.list(moduleInfoQueryWrapper);
|
|
|
+ List<Integer> types = moduleInfos.stream().map(moduleInfo -> moduleInfo.getType()).collect(Collectors.toList());
|
|
|
+ //获取模板类型
|
|
|
+ QueryWrapper<DictionaryInfo> dictionaryInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ dictionaryInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("group_type", 4)
|
|
|
+ .eq("return_type", 1)
|
|
|
+ .notIn("val",types)
|
|
|
+ .orderByAsc("order_no");
|
|
|
+ List<DictionaryInfo> dictionaryInfoList = dictionaryFacade.list(dictionaryInfoQueryWrapper);
|
|
|
+ List<GetModuleTypeDTO> getModuleTypeDTOS = new ArrayList<>();
|
|
|
+ for (DictionaryInfo dictionaryInfo: dictionaryInfoList) {
|
|
|
+ GetModuleTypeDTO getModuleTypeDTO = new GetModuleTypeDTO();
|
|
|
+ getModuleTypeDTO.setName(dictionaryInfo.getName());
|
|
|
+ getModuleTypeDTO.setType(Integer.parseInt(dictionaryInfo.getVal()));
|
|
|
+ getModuleTypeDTOS.add(getModuleTypeDTO);
|
|
|
+ }
|
|
|
+ return getModuleTypeDTOS;
|
|
|
+ }
|
|
|
}
|