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.
		
		
		
		
			
				
					56 lines
				
				1.7 KiB
			
		
		
			
		
	
	
					56 lines
				
				1.7 KiB
			| 
											2 years ago
										 | package com.ynxbd.common.action;
 | ||
|  | 
 | ||
|  | import com.ynxbd.common.action.base.BaseAction;
 | ||
|  | import com.ynxbd.common.bean.Patient;
 | ||
|  | import com.ynxbd.common.dao.PatientDao;
 | ||
|  | import com.ynxbd.common.helper.common.Base64Helper;
 | ||
|  | import com.ynxbd.common.result.Result;
 | ||
|  | 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 javax.servlet.http.HttpSession;
 | ||
|  | import java.util.List;
 | ||
|  | 
 | ||
|  | /**
 | ||
|  |  * 第三方接口
 | ||
|  |  *
 | ||
|  |  * @Author wsq
 | ||
|  |  * @Date 2023/5/10 10:05
 | ||
|  |  * @Copyright @ 2020 云南新八达科技有限公司 All rights reserved.
 | ||
|  |  */
 | ||
|  | @Slf4j
 | ||
|  | @Namespace("/ext")
 | ||
|  | public class ExtAction extends BaseAction {
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * [石林县人民医院-体检报告]查询
 | ||
|  |      */
 | ||
|  |     @Action("getSLTJReport")
 | ||
|  |     public Result getSLTJReport() {
 | ||
|  |         HttpSession session = getSession();
 | ||
|  |         Object openid = session.getAttribute("openid");
 | ||
|  |         if (ObjectUtils.isEmpty(openid)) {
 | ||
|  |             return Result.error();
 | ||
|  |         }
 | ||
|  | 
 | ||
|  |         List<Patient> patients = new PatientDao().selectListByOpenid(openid.toString());
 | ||
|  | 
 | ||
|  |         StringBuilder params = new StringBuilder();
 | ||
|  | 
 | ||
|  |         String idCardNo;
 | ||
|  |         for (int i = 0; i < patients.size(); i++) {
 | ||
|  |             idCardNo = patients.get(i).getIdCardNo();
 | ||
|  |             if (ObjectUtils.isEmpty(idCardNo)) continue;
 | ||
|  | 
 | ||
|  |             idCardNo = Base64Helper.encode(idCardNo);
 | ||
|  |             params.append(idCardNo);
 | ||
|  |             if ((i + 1) != patients.size()) {
 | ||
|  |                 params.append(",");
 | ||
|  |             }
 | ||
|  |         }
 | ||
|  |         return Result.redirect("http://www.slxrmyy.cn:9899/?id=" + params);
 | ||
|  |     }
 | ||
|  | }
 |