@ -39,89 +39,101 @@ import java.util.TimerTask;
public class HealthCodeAction extends BaseAction {
public class HealthCodeAction extends BaseAction {
/ * *
/ * *
* 查询患者集合
* [ 患者 ] 查询信息
* /
@Action ( "getPatientByIdCardNo" )
public Result getPatientByIdCardNo ( @AesDecode String openid , @AesDecode String idCardNo ) {
log . info ( "[电子健康卡]根据身份证和openId查询患者信息 openid={}, idCardNo={}" , openid , idCardNo ) ;
if ( openid = = null | | idCardNo = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
}
Patient patient = new PatientDao ( ) . selectByIdCardNo ( openid , idCardNo ) ;
return Result . success ( patient ) ;
}
/ * *
* [ 电子健康卡 ] 查询患者集
* /
* /
@Action ( "getHealthCardList" )
@Action ( "getHealthCardList" )
public Result getHealthCardList ( String openid ) {
public Result getHealthCardList ( @AesDecode String openid ) {
log . info ( "[电子健康卡]获取用户数据 openid={}" , openid ) ;
log . info ( "[电子健康卡]查询患者集 openid={}" , openid ) ;
if ( openid = = null ) {
if ( openid = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
}
}
List < Patient > patients = new PatientDao ( ) . selectHealthCardListByOpenid ( openid ) ;
List < Patient > patients = new PatientDao ( ) . selectHealthCardListByOpenid ( openid ) ;
return Result . success ( patients ) ;
return Result . success ( patients ) ;
}
}
// @Action("appBindHealthCard")
// public Result appBindHealthCard(String openid, String healthCode) {
// log.info("[新版电子健康卡]H5嵌入链接绑卡-通过healthCode获取健康卡数据 healthCode={}, openid={}", healthCode, openid);
// if (healthCode == null || openid == null) return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数为空
//
// Patient patient = HCodeService.appBindHealthCard(healthCode); // 通过健康卡授权码获取健康卡的用户信息
// if (patient == null) {
// log.info("[新版电子健康卡]H5嵌入链接绑卡 获取用户信息失败");
// return Result.error("[新版电子健康卡]H5嵌入链接绑卡 获取用户信息失败");
// }
// return Result.success(patient);
// }
/ * *
/ * *
* 根据身份证和openid取二维码
* 获取HIS地区编码信息
* /
* /
@Action ( "getPatientByIdCardNo" )
@Action ( "getArea" )
public Result getPatientByIdCardNo ( String openid , String idCardNo ) {
public Result getArea ( Integer level , String areaCode ) {
log . info ( "[电子健康卡]根据身份证和openid取二维码 openid={}, idCardNo={}" , openid , idCardNo ) ;
try {
if ( openid = = null | | idCardNo = = null ) {
return Result . success ( new HisPatientDao ( ) . getArea ( level , areaCode ) ) ;
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
} catch ( Exception e ) {
return Result . error ( e ) ;
}
}
Patient patient = new PatientDao ( ) . selectByIdCardNo ( openid , idCardNo ) ;
return Result . success ( patient ) ;
}
}
/ * *
/ * *
* 获取token , 用于绑卡
* 获取token , 用于绑卡
* /
* /
@Action ( "getAppToken" )
@Action ( "getAppToken" )
public Result getAppToken ( ) {
public Result getAppToken ( Boolean isMiniApp ) {
String appToken = new HCodeService ( ) . getAppToken ( ) ;
String appToken = HCodeService . getAppToken ( isMiniApp , true ) ;
return appToken = = null ? Result . error ( ) : Result . success ( ) ;
return appToken = = null ? Result . error ( ) : Result . success ( ) ;
}
}
@Action ( "appBindHealthCard" )
public Result appBindHealthCard ( String openid , String healthCode ) {
log . info ( "[新版电子健康卡]H5嵌入链接绑卡-通过healthCode获取健康卡数据 healthCode={}, openid={}" , healthCode , openid ) ;
if ( healthCode = = null | | openid = = null ) return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数为空
Patient patient = new HCodeService ( ) . appBindHealthCard ( healthCode ) ; // 通过健康卡授权码获取健康卡的用户信息
if ( patient = = null ) {
log . info ( "[新版电子健康卡]H5嵌入链接绑卡 获取用户信息失败" ) ;
return Result . error ( "[新版电子健康卡]H5嵌入链接绑卡 获取用户信息失败" ) ;
}
return Result . success ( patient ) ;
}
/ * *
/ * *
* [ 电子健康卡 ] 通过二维码获取健康卡数据
* [ 电子健康卡 ] 通过二维码获取健康卡数据
*
*
* @param qrCode 二维码
* @param qrCode 二维码
* /
* /
@Action ( "getHealthCardByQrCode" )
@Action ( "getHealthCardByQrCode" )
public Result getHealthCardByQrCode ( String qrCode ) {
public Result getHealthCardByQrCode ( Boolean isMiniApp , String qrCode ) {
log . info ( "[电子健康卡]通过二维码获取健康卡数据 qrCode={}" , qrCode ) ;
log . info ( "[电子健康卡]通过二维码获取健康卡数据 isMiniApp={}, qrCode={}" , isMiniApp , qrCode ) ;
if ( qrCode = = null ) {
if ( qrCode = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数为空
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
}
}
Patient patient = new HCodeService ( ) . getHealthCardByQrCode ( qrCode ) ;
Patient patient = HCodeService . getHealthCardByQrCode ( isMiniApp , qrCode ) ;
return patient = = null ? Result . error ( ) : Result . success ( patient ) ;
return patient = = null ? Result . error ( ) : Result . success ( patient ) ;
}
}
/ * *
/ * *
* 获取健康卡二维码
* 获取健康卡二维码
* * @param appToken appToken
*
* * @param healthCardId 健康卡ID
* @param isMiniApp isMiniApp
* * @param idCardNo 证件号码
* @param idCardNo 证件号码
* * @param codeType 传0或者1 , 0返回动态码 , 1返回静态码
* @param healthCardId 健康卡ID
* @return result
* /
* /
@Action ( "getDynamicQRCode" )
@Action ( "getDynamicQRCode" )
public Result getDynamicQRCode ( String idCardNo , String healthCardId ) {
public Result getDynamicQRCode ( Boolean isMiniApp , String idCardNo , String healthCardId ) {
log . info ( "[电子健康卡]获取二维码 healthCardId={}, idCardNo={}" , healthCardId , idCardNo ) ;
log . info ( "[电子健康卡]获取二维码 healthCardId={}, idCardNo={}" , healthCardId , idCardNo ) ;
if ( healthCardId = = null | | idCardNo = = null ) {
if ( healthCardId = = null | | idCardNo = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数缺失
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数缺失
}
}
JSONObject result = new HCodeService ( ) . getDynamicQRCode ( healthCardId , idCardNo , "0" ) ;
JSONObject result = HCodeService . getDynamicQRCode ( isMiniApp , healthCardId , idCardNo , "0" ) ;
return result = = null ? Result . error ( ) : Result . success ( result ) ;
return result = = null ? Result . error ( ) : Result . success ( result ) ;
}
}
@ -129,36 +141,21 @@ public class HealthCodeAction extends BaseAction {
* 获取卡包订单ID
* 获取卡包订单ID
* /
* /
@Action ( "getCardOrderId" )
@Action ( "getCardOrderId" )
public Result getCardOrderId ( String idCardNo , String healthCardId ) {
public Result getCardOrderId ( Boolean isMiniApp , String idCardNo , String healthCardId ) {
log . info ( "[电子健康卡]获取卡包订单ID healthCardId={}, idCardNo={}" , healthCardId , idCardNo ) ;
log . info ( "[电子健康卡]获取卡包订单ID healthCardId={}, idCardNo={}" , healthCardId , idCardNo ) ;
if ( healthCardId = = null | | idCardNo = = null ) {
if ( healthCardId = = null | | idCardNo = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数缺失
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数缺失
}
}
HCodeService hCodeService = new HCodeService ( ) ;
String qrCodeText = HCodeService . getQRCodeText ( isMiniApp , healthCardId , idCardNo ) ;
String qrCodeText = hCodeService . getQRCodeText ( healthCardId , idCardNo ) ;
if ( qrCodeText = = null ) {
if ( qrCodeText = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // qrCodeText参数缺失
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // qrCodeText参数缺失
}
}
JSONObject result = HCodeService . getCardOrderId ( isMiniApp , qrCodeText ) ;
JSONObject result = hCodeService . getCardOrderId ( qrCodeText ) ;
return result = = null ? Result . error ( ) : Result . success ( result ) ;
return result = = null ? Result . error ( ) : Result . success ( result ) ;
}
}
/ * *
* 获取卡包订单ID
* /
@Action ( "getArea" )
public Result getArea ( Integer level , String areaCode ) {
try {
return Result . success ( new HisPatientDao ( ) . getArea ( level , areaCode ) ) ;
} catch ( Exception e ) {
return Result . error ( e ) ;
}
}
/ * *
/ * *
* 健康卡 [ 上报数据 ]
* 健康卡 [ 上报数据 ]
*
*
@ -173,13 +170,12 @@ public class HealthCodeAction extends BaseAction {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
}
}
HCodeService hCodeService = new HCodeService ( ) ;
String qrCodeText = HCodeService . getQRCodeText ( false , healthCardId , idCardNo ) ;
String qrCodeText = hCodeService . getQRCodeText ( healthCardId , idCardNo ) ;
if ( qrCodeText = = null ) {
if ( qrCodeText = = null ) {
return Result . error ( ResultEnum . INTERFACE_OUTER_INVOKE_ERROR ) ;
return Result . error ( ResultEnum . INTERFACE_OUTER_INVOKE_ERROR ) ;
}
}
JSONObject jsonObject = h CodeService. reportHISData ( qrCodeText , null , scene , HealthCardEnum . CARD_TYPE_HEALTH_CARD . STATUS , null ) ;
JSONObject jsonObject = H CodeService. reportHISData ( qrCodeText , null , scene , HealthCardEnum . CARD_TYPE_HEALTH_CARD . STATUS , null ) ;
if ( jsonObject = = null ) {
if ( jsonObject = = null ) {
return Result . error ( ) ;
return Result . error ( ) ;
}
}
@ -191,7 +187,7 @@ public class HealthCodeAction extends BaseAction {
* [ 电子健康卡 ] 患者绑定 ( 成人 )
* [ 电子健康卡 ] 患者绑定 ( 成人 )
* /
* /
@Action ( "bind" )
@Action ( "bind" )
public Result bind ( boolean isAreaCode , boolean isFace , String orderId , String registerOrderId , String address , String areaCode , String areaAddress , String openid , String tel , String sex , String name , String nation , String birthday , String idCardNo , String cardType , Boolean isHealthCard , String healthCardId , String wechatCode , String enOpenId , String enUnionId , String enGmcOpenId , String enHospAppId ) {
public Result bind ( Boolean isMiniApp , boolean isAreaCode , boolean isFace , String orderId , String registerOrderId , String address , String areaCode , String areaAddress , String openid , String tel , String sex , String name , String nation , String birthday , String idCardNo , String cardType , Boolean isHealthCard , String healthCardId , String wechatCode , String enOpenId , String enUnionId , String enGmcOpenId , String enHospAppId ) {
log . info ( "[电子健康卡]身份绑定 name={}, address={}, areaCode={}, areaAddress={}, nation={}, sex={}, birthday={}, tel={}, healthCardId={}, cardType={}, enUnionId={}, openId={}, enOpenId={}, enGmcOpenId={}, enChildAppId={}" ,
log . info ( "[电子健康卡]身份绑定 name={}, address={}, areaCode={}, areaAddress={}, nation={}, sex={}, birthday={}, tel={}, healthCardId={}, cardType={}, enUnionId={}, openId={}, enOpenId={}, enGmcOpenId={}, enChildAppId={}" ,
name , address , areaCode , areaAddress , nation , sex , birthday , tel , healthCardId , cardType , enUnionId , openid , enOpenId , enGmcOpenId , enHospAppId ) ;
name , address , areaCode , areaAddress , nation , sex , birthday , tel , healthCardId , cardType , enUnionId , openid , enOpenId , enGmcOpenId , enHospAppId ) ;
if ( isHealthCard = = null | | openid = = null | | tel = = null | | sex = = null | | birthday = = null | | name = = null ) {
if ( isHealthCard = = null | | openid = = null | | tel = = null | | sex = = null | | birthday = = null | | name = = null ) {
@ -203,9 +199,8 @@ public class HealthCodeAction extends BaseAction {
return Result . error ( ResultEnum . PARAM_IS_INVALID ) ;
return Result . error ( ResultEnum . PARAM_IS_INVALID ) ;
}
}
HCodeService hCodeService = new HCodeService ( ) ;
if ( isHealthCard & & isFace ) { // 实名认证
if ( isFace ) { // 实名认证
if ( ! HCodeService . checkUniformVerifyResult ( isMiniApp , orderId , registerOrderId ) ) {
if ( ! hCodeService . checkUniformVerifyResult ( orderId , registerOrderId ) ) {
return Result . error ( ResultEnum . FACE_VERIFY_ERROR ) ;
return Result . error ( ResultEnum . FACE_VERIFY_ERROR ) ;
}
}
}
}
@ -251,7 +246,7 @@ public class HealthCodeAction extends BaseAction {
}
}
// 先注册,后修改-->先获取健康卡ID
// 先注册,后修改-->先获取健康卡ID
JSONObject respObj = h CodeService. registerHealthCard ( null , wechatCode , birthday , cardTypeEnum , address , areaAddress , sex , nation , name , idCardNo , tel ) ;
JSONObject respObj = H CodeService. registerHealthCard ( isMiniApp , null , wechatCode , birthday , cardTypeEnum , address , areaAddress , sex , nation , name , idCardNo , tel ) ;
if ( respObj = = null ) {
if ( respObj = = null ) {
log . info ( "[电子健康卡]注册健康卡失败,响应内容为空" ) ;
log . info ( "[电子健康卡]注册健康卡失败,响应内容为空" ) ;
@ -263,9 +258,8 @@ public class HealthCodeAction extends BaseAction {
// 响应处理
// 响应处理
String errMsg = respObj . getString ( "errMsg" ) ;
String errMsg = respObj . getString ( "errMsg" ) ;
String resultCode = respObj . getString ( "resultCode" ) ;
String resultCode = respObj . getString ( "resultCode" ) ;
HealthCardRespCodeEnum healthCardRespCodeEnum = hCodeService . resultCodeHandl e( resultCode ) ;
HealthCardRespCodeEnum healthCardRespCodeEnum = HealthCardRespCodeEnum . findEnumByResultCod e( resultCode ) ;
log . info ( "[电子健康卡] 绑定失败原因 resultCode={}, errMsg={}, statusMsg={}" , resultCode , errMsg , healthCardRespCodeEnum . MESSAGE ) ;
log . info ( "[电子健康卡] 绑定失败原因 resultCode={}, errMsg={}, statusMsg={}" , resultCode , errMsg , healthCardRespCodeEnum . MESSAGE ) ;
//
if ( ! healthCardRespCodeEnum . IS_CONTINUE ) { // 不继续执行
if ( ! healthCardRespCodeEnum . IS_CONTINUE ) { // 不继续执行
if ( ! healthCardRespCodeEnum . equals ( HealthCardRespCodeEnum . _10060 ) ) { // 姓名和身份证不一致
if ( ! healthCardRespCodeEnum . equals ( HealthCardRespCodeEnum . _10060 ) ) { // 姓名和身份证不一致
return Result . error ( healthCardRespCodeEnum . MESSAGE ) ;
return Result . error ( healthCardRespCodeEnum . MESSAGE ) ;
@ -301,26 +295,25 @@ public class HealthCodeAction extends BaseAction {
bindInfo . setEnUnionId ( enUnionId ) ;
bindInfo . setEnUnionId ( enUnionId ) ;
bindInfo . setEnHospAppId ( enHospAppId ) ;
bindInfo . setEnHospAppId ( enHospAppId ) ;
bindInfo . setEnGmcOpenId ( enGmcOpenId ) ;
bindInfo . setEnGmcOpenId ( enGmcOpenId ) ;
return new PatientService ( ) . bindCard ( request , false , isAreaCode , bindInfo ) ;
return new PatientService ( ) . bindCard ( request , false , isAreaCode , bindInfo ) ;
}
}
/ * *
/ * *
* [ 一键绑定 ] - - > 获取健康卡用户信息
* 获取健康卡用户信息
*
*
* @param openid openid
* @param openid openid
* @param healthCode 健康卡授权码 - - > 用来获取健康卡用户信息
* @param healthCode 健康卡授权码 - - > 用来获取健康卡用户信息
* /
* /
@Action ( "getHealthCardInfo" )
@Action ( "getHealthCardInfo" )
public Result getHealthCardInfo ( String openid , String healthCode ) {
public Result getHealthCardInfo ( Boolean isMiniApp , String openid , String healthCode ) {
log . info ( "[电子健康卡]一键绑定 获取健康卡用户信息 healthCode={}, openid={}" , healthCode , openid ) ;
log . info ( "[电子健康卡]获取健康卡用户信息 healthCode={}, openid={}" , healthCode , openid ) ;
if ( healthCode = = null | | openid = = null ) return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数为空
if ( healthCode = = null | | openid = = null ) return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
Patient patient = new HCodeService ( ) . getInfoByHealthCode ( healthCode ) ; // 通过健康卡授权码获取健康卡的用户信息
Patient patient = HCodeService . getHealthCardByHealthCode ( isMiniApp , healthCode ) ;
if ( patient = = null ) {
if ( patient = = null ) {
log . info ( "[电子健康卡]一键绑定 获取用户信息失败" ) ;
log . info ( "[电子健康卡]获取健康卡 用户信息- 失败" ) ;
return Result . error ( "[电子健康卡]一键绑定 获取用户信息失败" ) ;
return Result . error ( "[电子健康卡]获取健康卡 用户信息- 失败" ) ;
}
}
return Result . success ( patient ) ;
return Result . success ( patient ) ;
}
}
@ -338,7 +331,6 @@ public class HealthCodeAction extends BaseAction {
* @param nation nation
* @param nation nation
* @param patientId patientId
* @param patientId patientId
* @param address address
* @param address address
* @return Result
* /
* /
@Action ( "upBind" )
@Action ( "upBind" )
public Result upBind ( String wechatCode , String idCardNo , String cardType , String openid , String tel , String name , String nation , String patientId , String address ) {
public Result upBind ( String wechatCode , String idCardNo , String cardType , String openid , String tel , String name , String nation , String patientId , String address ) {
@ -364,9 +356,8 @@ public class HealthCodeAction extends BaseAction {
return Result . error ( ResultEnum . PARAM_TYPE_ERROR ) ;
return Result . error ( ResultEnum . PARAM_TYPE_ERROR ) ;
}
}
HCodeService hCodeService = new HCodeService ( ) ;
// 先注册,后修改-->先获取健康卡ID
// 先注册,后修改-->先获取健康卡ID
JSONObject rspObj = h CodeService. registerHealthCard ( patientId , wechatCode , birthday , cardTypeEnum , address , null , sex , nation , name , idCardNo , tel ) ;
JSONObject rspObj = H CodeService. registerHealthCard ( false , patientId , wechatCode , birthday , cardTypeEnum , address , null , sex , nation , name , idCardNo , tel ) ;
if ( rspObj = = null ) {
if ( rspObj = = null ) {
log . info ( "[电子健康卡]升级绑定失败, 响应内容为空" ) ;
log . info ( "[电子健康卡]升级绑定失败, 响应内容为空" ) ;
return Result . error ( "[电子健康卡]升级绑定失败, 响应内容为空" ) ;
return Result . error ( "[电子健康卡]升级绑定失败, 响应内容为空" ) ;
@ -377,7 +368,7 @@ public class HealthCodeAction extends BaseAction {
// 响应处理
// 响应处理
String errMsg = rspObj . getString ( "errMsg" ) ;
String errMsg = rspObj . getString ( "errMsg" ) ;
String resultCode = rspObj . getString ( "resultCode" ) ;
String resultCode = rspObj . getString ( "resultCode" ) ;
HealthCardRespCodeEnum healthCardRespCodeEnum = hCodeService . resultCodeHandl e( resultCode ) ;
HealthCardRespCodeEnum healthCardRespCodeEnum = HealthCardRespCodeEnum . findEnumByResultCod e( resultCode ) ;
log . info ( "[电子健康卡]升级绑定失败原因 resultCode={}, errMsg={}, statusMsg={}" , resultCode , errMsg , healthCardRespCodeEnum . MESSAGE ) ;
log . info ( "[电子健康卡]升级绑定失败原因 resultCode={}, errMsg={}, statusMsg={}" , resultCode , errMsg , healthCardRespCodeEnum . MESSAGE ) ;
return Result . error ( healthCardRespCodeEnum . MESSAGE ) ;
return Result . error ( healthCardRespCodeEnum . MESSAGE ) ;
@ -407,12 +398,12 @@ public class HealthCodeAction extends BaseAction {
* 身份证识别
* 身份证识别
* /
* /
@Action ( "orcInfo" )
@Action ( "orcInfo" )
public Result orcInfo ( String image ) {
public Result orcInfo ( Boolean isMiniApp , String image ) {
log . info ( "身份证识别" ) ;
log . info ( "身份证识别" ) ;
if ( image = = null ) {
if ( image = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ;
}
}
Patient patient = new HCodeService ( ) . orcInfo ( image ) ;
Patient patient = HCodeService . orcInfo ( isMiniApp , image ) ;
return Result . success ( patient ) ;
return Result . success ( patient ) ;
}
}
@ -423,7 +414,6 @@ public class HealthCodeAction extends BaseAction {
* @param idCardNo idCardNo
* @param idCardNo idCardNo
* @param name name
* @param name name
* @param wechatCode wechatCode
* @param wechatCode wechatCode
* @return result
* /
* /
@Action ( "registerUniformVerifyOrder" )
@Action ( "registerUniformVerifyOrder" )
public Result registerUniformVerifyOrder ( String idCardNo , String name , String wechatCode ) {
public Result registerUniformVerifyOrder ( String idCardNo , String name , String wechatCode ) {
@ -431,21 +421,23 @@ public class HealthCodeAction extends BaseAction {
if ( idCardNo = = null | | name = = null | | wechatCode = = null ) {
if ( idCardNo = = null | | name = = null | | wechatCode = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数为空
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数为空
}
}
String orderId = new HCodeService ( ) . register UniformVerifyOrder( idCardNo , name , wechatCode ) ;
String orderId = HCodeService . bind UniformVerifyOrder( idCardNo , name , wechatCode ) ;
return ObjectUtils . isEmpty ( orderId ) ? Result . error ( ) : Result . success ( orderId ) ;
return ObjectUtils . isEmpty ( orderId ) ? Result . error ( ) : Result . success ( orderId ) ;
}
}
/ * *
/ * *
* 实人认证结果查询接口
* 实人认证结果查询接口
* * @param qrCodeText 二维码编码
*
* @param orderId orderId
* @param registerOrderId registerOrderId
* /
* /
@Action ( "checkUniformVerifyResult" )
@Action ( "checkUniformVerifyResult" )
public Result checkUniformVerifyResult ( String orderId , String registerOrderId ) {
public Result checkUniformVerifyResult ( Boolean isMiniApp , String orderId , String registerOrderId ) {
log . info ( "[电子健康卡]实人认证结果查询 orderId={}, registerOrderId={}" , orderId , registerOrderId ) ;
log . info ( "[电子健康卡]实人认证结果查询 orderId={}, registerOrderId={}" , orderId , registerOrderId ) ;
if ( orderId = = null | | registerOrderId = = null ) {
if ( orderId = = null | | registerOrderId = = null ) {
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数为空
return Result . error ( ResultEnum . PARAM_IS_DEFECT ) ; // 参数为空
}
}
return Result . isOK ( new HCodeService ( ) . checkUniformVerifyResult ( orderId , registerOrderId ) ) ;
return Result . isOK ( HCodeService . checkUniformVerifyResult ( isMiniApp , orderId , registerOrderId ) ) ;
}
}
@ -458,7 +450,7 @@ public class HealthCodeAction extends BaseAction {
List < Patient > lstPatient = new PatientDao ( ) . selectPatient4BatchUpdateHealthCard ( ) ;
List < Patient > lstPatient = new PatientDao ( ) . selectPatient4BatchUpdateHealthCard ( ) ;
JSONArray jsonArray = null ;
JSONArray jsonArray = null ;
try {
try {
jsonArray = new HCodeService ( ) . batchUpdate ( lstPatient ) ;
jsonArray = HCodeService . batchUpdate ( lstPatient ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
log . error ( e . getMessage ( ) ) ;
log . error ( e . getMessage ( ) ) ;
}
}
@ -475,4 +467,15 @@ public class HealthCodeAction extends BaseAction {
} , 2 * 1000 , 30 * 1000 ) ;
} , 2 * 1000 , 30 * 1000 ) ;
}
}
/ * *
* [ 电子健康卡 ] 绑卡验证授权
* /
@Action ( "registerHealthCardPreAuth" )
public Result registerHealthCardPreAuth ( Boolean isMiniApp , String wechatCode , String healthCode , String openId ) {
log . info ( "[电子健康卡]绑卡验证授权 isMiniApp={}, wechatCode={}, healthCode={}, openId={}" , isMiniApp , wechatCode , healthCode , openId ) ;
JSONObject result = HCodeService . registerHealthCardPreAuth ( isMiniApp , WeChatConfig . getDomain ( true ) , wechatCode , healthCode , openId ) ;
return Result . success ( result ) ;
}
}
}