|
|
|
|
@ -5,12 +5,14 @@ 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 com.ynxbd.common.result.ResultEnum; |
|
|
|
|
import com.ynxbd.wx.config.WeChatConfig; |
|
|
|
|
import com.ynxbd.wx.wxfactory.WxAuthHelper; |
|
|
|
|
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; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -29,14 +31,12 @@ 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(); |
|
|
|
|
String openId = WxAuthHelper.getSessionOpenid(request); |
|
|
|
|
if (ObjectUtils.isEmpty(openId)) { |
|
|
|
|
return Result.error(ResultEnum.AUTH_FAILED); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<Patient> patients = new PatientDao().selectListByOpenid(openid.toString()); |
|
|
|
|
|
|
|
|
|
List<Patient> patients = new PatientDao().selectListByOpenid(openId); |
|
|
|
|
StringBuilder params = new StringBuilder(); |
|
|
|
|
|
|
|
|
|
String idCardNo; |
|
|
|
|
@ -50,6 +50,6 @@ public class ExtAction extends BaseAction { |
|
|
|
|
params.append(","); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return Result.redirect("http://www.slxrmyy.cn:9899/?id=" + params); |
|
|
|
|
return Result.redirect(WeChatConfig.getDomain(false) + ":9899/?id=" + params); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|