|
|
@ -10,6 +10,7 @@ import cn.hutool.http.HttpResponse;
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.TypeReference;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
@ -20,6 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
|
|
|
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
|
|
|
import com.glxp.mipsdl.client.CommonHttpClient;
|
|
|
|
import com.glxp.mipsdl.client.CommonHttpClient;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.client.ptxhyy.entity.HisProductEntity;
|
|
|
|
import com.glxp.mipsdl.config.ThirdSysConfig;
|
|
|
|
import com.glxp.mipsdl.config.ThirdSysConfig;
|
|
|
|
import com.glxp.mipsdl.constant.ConstantType;
|
|
|
|
import com.glxp.mipsdl.constant.ConstantType;
|
|
|
|
import com.glxp.mipsdl.constant.Constants;
|
|
|
|
import com.glxp.mipsdl.constant.Constants;
|
|
|
@ -33,9 +35,11 @@ import com.glxp.mipsdl.dao.inout.IoOrderDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoOrderDetailBizDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoOrderDetailBizDao;
|
|
|
|
import com.glxp.mipsdl.dao.thrsys.*;
|
|
|
|
import com.glxp.mipsdl.dao.thrsys.*;
|
|
|
|
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
|
|
|
|
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.entity.axxyy.DeptDict;
|
|
|
|
import com.glxp.mipsdl.entity.axxyy.PriceDict;
|
|
|
|
import com.glxp.mipsdl.entity.axxyy.PriceDict;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicSkProjectEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
|
|
|
|
import com.glxp.mipsdl.entity.inout.*;
|
|
|
|
import com.glxp.mipsdl.entity.inout.*;
|
|
|
|
import com.glxp.mipsdl.entity.njxyy.A005;
|
|
|
|
import com.glxp.mipsdl.entity.njxyy.A005;
|
|
|
@ -170,7 +174,7 @@ public class AxxyyClient extends CommonHttpClient {
|
|
|
|
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
|
|
|
|
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
|
|
|
|
"<root>\n" +
|
|
|
|
"<root>\n" +
|
|
|
|
"<code>" + "" + "</code>\n" +
|
|
|
|
"<code>" + "" + "</code>\n" +
|
|
|
|
"<name>红细胞</name>\n" +
|
|
|
|
"<name></name>\n" +
|
|
|
|
"<spell>" + "" + "</spell>\n" +
|
|
|
|
"<spell>" + "" + "</spell>\n" +
|
|
|
|
"<invalid>" + "" + "</invalid>\n" +
|
|
|
|
"<invalid>" + "" + "</invalid>\n" +
|
|
|
|
"<subject>" + "" + "</subject>\n" +
|
|
|
|
"<subject>" + "" + "</subject>\n" +
|
|
|
@ -627,12 +631,7 @@ public class AxxyyClient extends CommonHttpClient {
|
|
|
|
return baseResponse;
|
|
|
|
return baseResponse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public BaseResponse getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest) {
|
|
|
|
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_WAREHOUSE_QUERY_URL), udiwmsWarehouseRequest);
|
|
|
|
|
|
|
|
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
|
|
|
|
return baseResponse;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public BaseResponse postProducts(PostThrProductsRequest postThrProductsRequest) {
|
|
|
|
public BaseResponse postProducts(PostThrProductsRequest postThrProductsRequest) {
|
|
|
@ -997,18 +996,67 @@ public class AxxyyClient extends CommonHttpClient {
|
|
|
|
if (dataVo.getCode() != 0){
|
|
|
|
if (dataVo.getCode() != 0){
|
|
|
|
return ResultVOUtils.error(500,"获取项目字典错误");
|
|
|
|
return ResultVOUtils.error(500,"获取项目字典错误");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<PriceDict> list = dataVo.getList(PriceDict.class);
|
|
|
|
List<PriceDict> list = dataVo.getList(PriceDict.class);
|
|
|
|
log.error("最终获取的收费项目: " + list);
|
|
|
|
List<BasicSkProjectResponse> basicSkProjectEntities = new ArrayList<>();
|
|
|
|
// log.error("获取智业收费项目:::::: " + response);
|
|
|
|
log.info("总数:" + list.size());
|
|
|
|
|
|
|
|
for (PriceDict priceDict : list) {
|
|
|
|
|
|
|
|
BasicSkProjectResponse basicSkProjectResponse = new BasicSkProjectResponse();
|
|
|
|
|
|
|
|
basicSkProjectResponse.setCode(priceDict.getCode());
|
|
|
|
|
|
|
|
basicSkProjectResponse.setName(priceDict.getName());
|
|
|
|
|
|
|
|
basicSkProjectResponse.setPrice(priceDict.getPrice());
|
|
|
|
|
|
|
|
basicSkProjectResponse.setGgxh(priceDict.getSpell());
|
|
|
|
|
|
|
|
basicSkProjectResponse.setType(2);
|
|
|
|
|
|
|
|
basicSkProjectResponse.setCreateTime(new Date());
|
|
|
|
|
|
|
|
basicSkProjectResponse.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
basicSkProjectResponse.setRemark("自动下载");
|
|
|
|
|
|
|
|
basicSkProjectEntities.add(basicSkProjectResponse);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
PageSimpleResponse<BasicSkProjectResponse> PriceDictResponse = new PageSimpleResponse<>();
|
|
|
|
|
|
|
|
PriceDictResponse.setTotal((long) basicSkProjectEntities.size()); // 设置总数
|
|
|
|
|
|
|
|
PriceDictResponse.setList(basicSkProjectEntities); // 设置列表
|
|
|
|
|
|
|
|
log.error("职业返回收费项目信息:::::::::::" + PriceDictResponse);
|
|
|
|
|
|
|
|
return ResultVOUtils.success(PriceDictResponse);
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|
log.error("获取智业收费项目失败" );
|
|
|
|
log.error("异常信息:{}", e);
|
|
|
|
log.error("Response: " + e.getMessage());
|
|
|
|
return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public BaseResponse getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// 发送请求
|
|
|
|
|
|
|
|
String response = callInterface(getMsgHeader("getDeptDict"), XmlBuilder.buildDeptBody("","","",""));
|
|
|
|
|
|
|
|
String xml = getXml(response);
|
|
|
|
|
|
|
|
if (xml == null){
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500,"获取科室字典错误");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DataVo dataVo = getDataVo(xml);
|
|
|
|
|
|
|
|
if (dataVo.getCode() != 0){
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500,"获取科室字典错误");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DeptDict> list = dataVo.getList(DeptDict.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.info("总数:" + list.size());
|
|
|
|
|
|
|
|
List<UdiwmsWarehouseDetail> udiwmsWarehouseDetails = new ArrayList<>();
|
|
|
|
|
|
|
|
for (DeptDict deptDict : list) {
|
|
|
|
|
|
|
|
UdiwmsWarehouseDetail udiwmsWarehouseDetail = new UdiwmsWarehouseDetail();
|
|
|
|
|
|
|
|
udiwmsWarehouseDetail.setCode(deptDict.getCode());
|
|
|
|
|
|
|
|
udiwmsWarehouseDetail.setName(deptDict.getName());
|
|
|
|
|
|
|
|
udiwmsWarehouseDetails.add(udiwmsWarehouseDetail);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
PageSimpleResponse<UdiwmsWarehouseDetail> DeptDictResponse = new PageSimpleResponse<>();
|
|
|
|
|
|
|
|
DeptDictResponse.setTotal((long) udiwmsWarehouseDetails.size()); // 设置总数
|
|
|
|
|
|
|
|
DeptDictResponse.setList(udiwmsWarehouseDetails); // 设置列表
|
|
|
|
|
|
|
|
log.error("职业返回收费项目信息:::::::::::" + DeptDictResponse);
|
|
|
|
|
|
|
|
return ResultVOUtils.success(DeptDictResponse);
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
|
|
|
log.error("异常信息:{}", e);
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static final String WSDL_URL = "http://173.19.192.196:8882/OTHER/BtmsEntranceWs?wsdl";
|
|
|
|
private static final String WSDL_URL = "http://173.19.192.196:8882/OTHER/BtmsEntranceWs?wsdl";
|
|
|
|
|
|
|
|
|
|
|
@ -1078,8 +1126,10 @@ public class AxxyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
|
|
public DataVo getDataVo(String xml){
|
|
|
|
public DataVo getDataVo(String xml){
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
log.error("获取到的xml文件数据" + xml);
|
|
|
|
XmlMapper xmlMapper = new XmlMapper();
|
|
|
|
XmlMapper xmlMapper = new XmlMapper();
|
|
|
|
JsonNode xmlNode = xmlMapper.readTree(xml.getBytes());
|
|
|
|
JsonNode xmlNode = xmlMapper.readTree(xml.getBytes("UTF-8"));
|
|
|
|
|
|
|
|
|
|
|
|
// 创建 JSON 映射器
|
|
|
|
// 创建 JSON 映射器
|
|
|
|
ObjectMapper jsonMapper = new ObjectMapper();
|
|
|
|
ObjectMapper jsonMapper = new ObjectMapper();
|
|
|
|
String json = jsonMapper.writeValueAsString(xmlNode);
|
|
|
|
String json = jsonMapper.writeValueAsString(xmlNode);
|
|
|
@ -1090,5 +1140,56 @@ public class AxxyyClient extends CommonHttpClient {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// public static void main(String[] args) {
|
|
|
|
|
|
|
|
// try {
|
|
|
|
|
|
|
|
// XmlMapper xmlMapper = new XmlMapper();
|
|
|
|
|
|
|
|
// JsonNode xmlNode = xmlMapper.readTree(xml.getBytes());
|
|
|
|
|
|
|
|
// // 创建 JSON 映射器
|
|
|
|
|
|
|
|
// ObjectMapper jsonMapper = new ObjectMapper();
|
|
|
|
|
|
|
|
// String json = jsonMapper.writeValueAsString(xmlNode);
|
|
|
|
|
|
|
|
// DataVo dataVo = JSONUtil.toBean(json,DataVo.class);
|
|
|
|
|
|
|
|
//// System.out.println("hahahhah" + dataVo.getList(DeptDict.class));
|
|
|
|
|
|
|
|
// List<DeptDict> list = dataVo.getList(DeptDict.class);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// log.info("总数:" + list.size());
|
|
|
|
|
|
|
|
// List<UdiwmsWarehouseDetail> udiwmsWarehouseDetails = new ArrayList<>();
|
|
|
|
|
|
|
|
// for (DeptDict deptDict : list) {
|
|
|
|
|
|
|
|
// UdiwmsWarehouseDetail udiwmsWarehouseDetail = new UdiwmsWarehouseDetail();
|
|
|
|
|
|
|
|
// udiwmsWarehouseDetail.setCode(deptDict.getCode());
|
|
|
|
|
|
|
|
// udiwmsWarehouseDetail.setName(deptDict.getName());
|
|
|
|
|
|
|
|
// udiwmsWarehouseDetails.add(udiwmsWarehouseDetail);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// BaseResponse<Object> objectBaseResponse = new BaseResponse<>();
|
|
|
|
|
|
|
|
// objectBaseResponse.setCode(20000);
|
|
|
|
|
|
|
|
// objectBaseResponse.setData(udiwmsWarehouseDetails);
|
|
|
|
|
|
|
|
// System.out.println("dhhdhdhdhd" + objectBaseResponse);
|
|
|
|
|
|
|
|
// } catch (IOException e) {
|
|
|
|
|
|
|
|
// throw new RuntimeException(e);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final String xml = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n" +
|
|
|
|
|
|
|
|
"<root>\n" +
|
|
|
|
|
|
|
|
" <code>0</code>\n" +
|
|
|
|
|
|
|
|
" <data>\n" +
|
|
|
|
|
|
|
|
" <lists>\n" +
|
|
|
|
|
|
|
|
" <code>10611452</code>\n" +
|
|
|
|
|
|
|
|
" <name>急诊收费</name>\n" +
|
|
|
|
|
|
|
|
" <spell>JZSF</spell>\n" +
|
|
|
|
|
|
|
|
" <valid>Y</valid>\n" +
|
|
|
|
|
|
|
|
" <sequence></sequence>\n" +
|
|
|
|
|
|
|
|
" <unitflag>1</unitflag>\n" +
|
|
|
|
|
|
|
|
" <attr>行政科室</attr>\n" +
|
|
|
|
|
|
|
|
" <insurcode></insurcode>\n" +
|
|
|
|
|
|
|
|
" <insurname></insurname>\n" +
|
|
|
|
|
|
|
|
" <locus></locus>\n" +
|
|
|
|
|
|
|
|
" <hospart></hospart>\n" +
|
|
|
|
|
|
|
|
" <checkbed></checkbed>\n" +
|
|
|
|
|
|
|
|
" <deptlevel></deptlevel>\n" +
|
|
|
|
|
|
|
|
" <parent>2009</parent>\n" +
|
|
|
|
|
|
|
|
" <ward>2009</ward>\n" +
|
|
|
|
|
|
|
|
" </lists>\n" +
|
|
|
|
|
|
|
|
" </data>\n" +
|
|
|
|
|
|
|
|
"</root>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|