|
|
@ -14,6 +14,7 @@ import com.glxp.api.entity.auth.CustomerInfoEntity;
|
|
|
|
import com.glxp.api.entity.basic.BasicCorpEntity;
|
|
|
|
import com.glxp.api.entity.basic.BasicCorpEntity;
|
|
|
|
import com.glxp.api.entity.collect.RelCodeBatch;
|
|
|
|
import com.glxp.api.entity.collect.RelCodeBatch;
|
|
|
|
import com.glxp.api.entity.inout.IoCodeLostEntity;
|
|
|
|
import com.glxp.api.entity.inout.IoCodeLostEntity;
|
|
|
|
|
|
|
|
import com.glxp.api.httpClient.serviceClient.AlihealthClient;
|
|
|
|
import com.glxp.api.req.alihealth.*;
|
|
|
|
import com.glxp.api.req.alihealth.*;
|
|
|
|
import com.glxp.api.req.alihealth.local.*;
|
|
|
|
import com.glxp.api.req.alihealth.local.*;
|
|
|
|
import com.glxp.api.res.alihealth.*;
|
|
|
|
import com.glxp.api.res.alihealth.*;
|
|
|
@ -47,6 +48,8 @@ public class AlihealthYljgUtils {
|
|
|
|
private AuthCompanyMapper authCompanyMapper;
|
|
|
|
private AuthCompanyMapper authCompanyMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private BasicCorpDao basicCorpDao;
|
|
|
|
private BasicCorpDao basicCorpDao;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private AlihealthClient alihealthClient;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 出入库单据上传
|
|
|
|
* 出入库单据上传
|
|
|
@ -77,8 +80,7 @@ public class AlihealthYljgUtils {
|
|
|
|
alihealthKytGetentinfoReqeust.setMethod("alibaba.alihealth.drugtrace.top.yljg.query.getentinfo");
|
|
|
|
alihealthKytGetentinfoReqeust.setMethod("alibaba.alihealth.drugtrace.top.yljg.query.getentinfo");
|
|
|
|
alihealthKytGetentinfoReqeust.setApp_key(authCompany.getAppId());
|
|
|
|
alihealthKytGetentinfoReqeust.setApp_key(authCompany.getAppId());
|
|
|
|
alihealthKytGetentinfoReqeust.setEnt_name(basicCorpEntity.getName());
|
|
|
|
alihealthKytGetentinfoReqeust.setEnt_name(basicCorpEntity.getName());
|
|
|
|
Map map = alihealthUtils.disposeSign(alihealthKytGetentinfoReqeust,authCompany.getAppSecret());
|
|
|
|
String json = alihealthClient.accessAliInterface(alihealthKytGetentinfoReqeust, authCompany.getAppSecret());
|
|
|
|
String json = HttpUtil.get(alihealthUrl,map);
|
|
|
|
|
|
|
|
alihealthKytGetentinfoResponse =new AlihealthKytGetentinfoResponse(json);
|
|
|
|
alihealthKytGetentinfoResponse =new AlihealthKytGetentinfoResponse(json);
|
|
|
|
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
@ -144,10 +146,7 @@ public class AlihealthYljgUtils {
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
String json = alihealthClient.accessAliInterface(reqeust, authCompany.getAppSecret());
|
|
|
|
Map map = alihealthUtils.disposeSign(reqeust, authCompany.getAppSecret());
|
|
|
|
|
|
|
|
log.error("阿里啦关联关系入参==="+map);
|
|
|
|
|
|
|
|
String json = HttpUtil.get(alihealthUrl, map);
|
|
|
|
|
|
|
|
log.error("阿里啦关联关系结果==="+json);
|
|
|
|
log.error("阿里啦关联关系结果==="+json);
|
|
|
|
alihealthYljgSinglerelationResponse = new AlihealthYljgSinglerelationResponse(json);
|
|
|
|
alihealthYljgSinglerelationResponse = new AlihealthYljgSinglerelationResponse(json);
|
|
|
|
|
|
|
|
|
|
|
@ -184,9 +183,7 @@ public class AlihealthYljgUtils {
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
String json = alihealthClient.accessAliInterface(reqeust, authCompany.getAppSecret());
|
|
|
|
Map map = alihealthUtils.disposeSign(reqeust, authCompany.getAppSecret());
|
|
|
|
|
|
|
|
String json = HttpUtil.get(alihealthUrl, map);
|
|
|
|
|
|
|
|
alihealthYljgCodedetailResponse = new AlihealthYljgCodedetailResponse(json);
|
|
|
|
alihealthYljgCodedetailResponse = new AlihealthYljgCodedetailResponse(json);
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
@ -225,8 +222,7 @@ public class AlihealthYljgUtils {
|
|
|
|
alihealthKytGetentinfoReqeust.setMethod("alibaba.alihealth.drugtrace.top.yljg.query.getentinfo");
|
|
|
|
alihealthKytGetentinfoReqeust.setMethod("alibaba.alihealth.drugtrace.top.yljg.query.getentinfo");
|
|
|
|
alihealthKytGetentinfoReqeust.setApp_key(authCompany.getAppId());
|
|
|
|
alihealthKytGetentinfoReqeust.setApp_key(authCompany.getAppId());
|
|
|
|
alihealthKytGetentinfoReqeust.setEnt_name(basicCorpEntity.getName());
|
|
|
|
alihealthKytGetentinfoReqeust.setEnt_name(basicCorpEntity.getName());
|
|
|
|
Map map = alihealthUtils.disposeSign(alihealthKytGetentinfoReqeust,authCompany.getAppSecret());
|
|
|
|
String json = alihealthClient.accessAliInterface(reqeust, authCompany.getAppSecret());
|
|
|
|
String json = HttpUtil.get(alihealthUrl,map);
|
|
|
|
|
|
|
|
alihealthKytGetentinfoResponse =new AlihealthKytGetentinfoResponse(json);
|
|
|
|
alihealthKytGetentinfoResponse =new AlihealthKytGetentinfoResponse(json);
|
|
|
|
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
@ -245,15 +241,9 @@ public class AlihealthYljgUtils {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reqeust.setApp_key(authCompany.getAppId());
|
|
|
|
reqeust.setApp_key(authCompany.getAppId());
|
|
|
|
reqeust.setRef_ent_id(authCompany.getRefEntId());
|
|
|
|
reqeust.setRef_ent_id(authCompany.getRefEntId());
|
|
|
|
|
|
|
|
|
|
|
|
AlihealthYljgListupoutResponse alihealthYljgListupoutResponse = null;
|
|
|
|
AlihealthYljgListupoutResponse alihealthYljgListupoutResponse = null;
|
|
|
|
|
|
|
|
|
|
|
|
if (reqeust != null
|
|
|
|
if (reqeust != null
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(reqeust.getApp_key())
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(reqeust.getApp_key())
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
@ -299,9 +289,7 @@ public class AlihealthYljgUtils {
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret())
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
String json = alihealthClient.accessAliInterface(reqeust, authCompany.getAppSecret());
|
|
|
|
Map map = alihealthUtils.disposeSign(reqeust, authCompany.getAppSecret());
|
|
|
|
|
|
|
|
String json = HttpUtil.get(alihealthUrl, map);
|
|
|
|
|
|
|
|
alihealthYljgListupoutDetailResponse = new AlihealthYljgListupoutDetailResponse(json);
|
|
|
|
alihealthYljgListupoutDetailResponse = new AlihealthYljgListupoutDetailResponse(json);
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|