|
|
|
@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.dao.auth.AuthCompanyMapper;
|
|
|
|
|
import com.glxp.api.dao.basic.BasicCorpDao;
|
|
|
|
|
import com.glxp.api.entity.alihealth.AliYljgBillDetail;
|
|
|
|
|
import com.glxp.api.entity.alihealth.AliYljgSearchbill;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthCompany;
|
|
|
|
|
import com.glxp.api.entity.auth.CustomerInfoEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicCorpEntity;
|
|
|
|
|
import com.glxp.api.entity.collect.RelCodeBatch;
|
|
|
|
|
import com.glxp.api.req.alihealth.*;
|
|
|
|
|
import com.glxp.api.req.alihealth.local.*;
|
|
|
|
@ -38,6 +41,8 @@ public class AlihealthYljgUtils {
|
|
|
|
|
private String alihealthUrl;
|
|
|
|
|
@Resource
|
|
|
|
|
private AuthCompanyMapper authCompanyMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private BasicCorpDao basicCorpDao;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 出入库单据上传
|
|
|
|
@ -145,17 +150,22 @@ public class AlihealthYljgUtils {
|
|
|
|
|
* @param reqeust
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public BaseResponse<List<AliYljgSearchbill>> listupout(AlihealthYljgListupoutReqeust reqeust,String erpName) {
|
|
|
|
|
public BaseResponse<List<AliYljgSearchbill>> listupout(AlihealthYljgListupoutReqeust reqeust,String erpId) {
|
|
|
|
|
AuthCompany authCompany = authCompanyMapper.selectOne(
|
|
|
|
|
new QueryWrapper<AuthCompany>().last("limit 1")
|
|
|
|
|
);
|
|
|
|
|
if(StringUtils.isNotEmpty(erpName)){
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(erpId)){
|
|
|
|
|
BasicCorpEntity basicCorpEntity = basicCorpDao.selectOne(
|
|
|
|
|
new QueryWrapper<BasicCorpEntity>().eq("erpId",erpId)
|
|
|
|
|
);
|
|
|
|
|
if(basicCorpEntity!=null){
|
|
|
|
|
AlihealthKytGetentinfoResponse alihealthKytGetentinfoResponse =null;
|
|
|
|
|
try {
|
|
|
|
|
AlihealthKytGetentinfoReqeust alihealthKytGetentinfoReqeust = new AlihealthKytGetentinfoReqeust();
|
|
|
|
|
alihealthKytGetentinfoReqeust.setMethod("alibaba.alihealth.drugtrace.top.yljg.query.getentinfo");
|
|
|
|
|
alihealthKytGetentinfoReqeust.setApp_key(authCompany.getAppId());
|
|
|
|
|
alihealthKytGetentinfoReqeust.setEnt_name(erpName);
|
|
|
|
|
alihealthKytGetentinfoReqeust.setEnt_name(basicCorpEntity.getName());
|
|
|
|
|
Map map = alihealthUtils.disposeSign(alihealthKytGetentinfoReqeust,authCompany.getAppSecret());
|
|
|
|
|
String json = HttpUtil.get(alihealthUrl,map);
|
|
|
|
|
alihealthKytGetentinfoResponse =new AlihealthKytGetentinfoResponse(json);
|
|
|
|
@ -175,6 +185,8 @@ public class AlihealthYljgUtils {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|