You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					
					
						
							93 lines
						
					
					
						
							2.8 KiB
						
					
					
				
			
		
		
	
	
							93 lines
						
					
					
						
							2.8 KiB
						
					
					
				| package com.ynxbd.common.action;
 | |
| 
 | |
| import com.ynxbd.common.action.base.BaseAction;
 | |
| import com.ynxbd.common.result.Result;
 | |
| import com.ynxbd.common.result.ResultEnum;
 | |
| import com.ynxbd.common.service.AIGuidanceService;
 | |
| import com.ynxbd.wx.config.AIGuidanceConfig;
 | |
| import lombok.extern.slf4j.Slf4j;
 | |
| import org.apache.commons.lang3.ObjectUtils;
 | |
| import org.apache.struts2.convention.annotation.Action;
 | |
| import org.apache.struts2.convention.annotation.Namespace;
 | |
| 
 | |
| import java.util.ArrayList;
 | |
| import java.util.HashMap;
 | |
| import java.util.List;
 | |
| import java.util.Map;
 | |
| 
 | |
| /**
 | |
|  * 智能导诊
 | |
|  *
 | |
|  * @Author wsq
 | |
|  * @Date 2021/2/26 12:50
 | |
|  * @Copyright @ 2020 云南新八达科技有限公司 All rights reserved.
 | |
|  */
 | |
| 
 | |
| @Slf4j
 | |
| @Namespace("/aiGuidance")
 | |
| public class AIGuidanceAction extends BaseAction {
 | |
| 
 | |
|     /**
 | |
|      * 查询平台所有医院列表信息
 | |
|      */
 | |
|     @Action("getAllHospInfo")
 | |
|     public Result getAllHospInfo() {
 | |
|         if (!AIGuidanceConfig.isVerifySign(request)) {
 | |
|             return Result.error(ResultEnum.SIGN_ERROR); // 签名异常
 | |
|         }
 | |
| 
 | |
|         List<Map<String, String>> resultList = new ArrayList<>();
 | |
|         Map<String, String> resultMap = new HashMap<>();
 | |
|         resultMap.put("hosId", AIGuidanceConfig.HOS_ID);
 | |
|         resultMap.put("hosName", AIGuidanceConfig.HOS_NAME);
 | |
|         resultList.add(resultMap);
 | |
| 
 | |
|         return Result.success(ResultEnum.AI_SUCCESS, resultList);
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 查询医院详细信息
 | |
|      */
 | |
|     @Action("getHospDetail")
 | |
|     public Result getHospDetail(String hosId) {
 | |
|         if (!AIGuidanceConfig.isVerifySign(request)) {
 | |
|             return Result.error(ResultEnum.SIGN_ERROR); // 签名异常
 | |
|         }
 | |
|         return new AIGuidanceService().getHospDetail(hosId);
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 查询科室信息
 | |
|      */
 | |
|     @Action("getDeptList")
 | |
|     public Result getDeptList(String hosId, String branchId) {
 | |
|         if (!AIGuidanceConfig.isVerifySign(request)) {
 | |
|             return Result.error(ResultEnum.SIGN_ERROR); // 签名异常
 | |
|         }
 | |
|         return new AIGuidanceService().getDeptList(hosId, branchId);
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 查询医生信息
 | |
|      */
 | |
|     @Action("getDoctorList")
 | |
|     public Result getDoctorList(String hosId, String branchId, String deptId) {
 | |
|         if (!AIGuidanceConfig.isVerifySign(request)) {
 | |
|             return Result.error(ResultEnum.SIGN_ERROR); // 签名异常
 | |
|         }
 | |
|         return new AIGuidanceService().getDoctorList(hosId, branchId, deptId);
 | |
|     }
 | |
| 
 | |
| 
 | |
|     /**
 | |
|      * 跳转重定向
 | |
|      */
 | |
|     @Action("getSchedule")
 | |
|     public Result getSchedule(String id) {
 | |
|         if (ObjectUtils.isEmpty(id)) {
 | |
|             return Result.redirect("test02/test02");
 | |
|         }
 | |
|         return Result.redirect("https://www.baidu.com");
 | |
|     }
 | |
| 
 | |
| }
 | |
| 
 |