diff --git a/src/main/java/com/glxp/mipsdl/client/axxyy/AxxyyClient.java b/src/main/java/com/glxp/mipsdl/client/axxyy/AxxyyClient.java
index d2f32c6..6a2c487 100644
--- a/src/main/java/com/glxp/mipsdl/client/axxyy/AxxyyClient.java
+++ b/src/main/java/com/glxp/mipsdl/client/axxyy/AxxyyClient.java
@@ -10,6 +10,7 @@ import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
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.QueryWrapper;
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.dataformat.xml.XmlMapper;
import com.glxp.mipsdl.client.CommonHttpClient;
+import com.glxp.mipsdl.client.ptxhyy.entity.HisProductEntity;
import com.glxp.mipsdl.config.ThirdSysConfig;
import com.glxp.mipsdl.constant.ConstantType;
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.thrsys.*;
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.basic.BasicBussinessTypeEntity;
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.inout.*;
import com.glxp.mipsdl.entity.njxyy.A005;
@@ -170,7 +174,7 @@ public class AxxyyClient extends CommonHttpClient {
return "" +
"\n" +
"" + "" + "
\n" +
- "红细胞\n" +
+ "\n" +
"" + "" + "\n" +
"" + "" + "\n" +
"" + "" + "\n" +
@@ -627,12 +631,7 @@ public class AxxyyClient extends CommonHttpClient {
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
public BaseResponse postProducts(PostThrProductsRequest postThrProductsRequest) {
@@ -997,18 +996,67 @@ public class AxxyyClient extends CommonHttpClient {
if (dataVo.getCode() != 0){
return ResultVOUtils.error(500,"获取项目字典错误");
}
+
List list = dataVo.getList(PriceDict.class);
- log.error("最终获取的收费项目: " + list);
-// log.error("获取智业收费项目:::::: " + response);
+ List basicSkProjectEntities = new ArrayList<>();
+ 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 PriceDictResponse = new PageSimpleResponse<>();
+ PriceDictResponse.setTotal((long) basicSkProjectEntities.size()); // 设置总数
+ PriceDictResponse.setList(basicSkProjectEntities); // 设置列表
+ log.error("职业返回收费项目信息:::::::::::" + PriceDictResponse);
+ return ResultVOUtils.success(PriceDictResponse);
}catch (Exception e){
- log.error("获取智业收费项目失败" );
- log.error("Response: " + e.getMessage());
+ log.error("异常信息:{}", e);
+ 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 list = dataVo.getList(DeptDict.class);
+
+ log.info("总数:" + list.size());
+ List udiwmsWarehouseDetails = new ArrayList<>();
+ for (DeptDict deptDict : list) {
+ UdiwmsWarehouseDetail udiwmsWarehouseDetail = new UdiwmsWarehouseDetail();
+ udiwmsWarehouseDetail.setCode(deptDict.getCode());
+ udiwmsWarehouseDetail.setName(deptDict.getName());
+ udiwmsWarehouseDetails.add(udiwmsWarehouseDetail);
+ }
+ PageSimpleResponse 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";
@@ -1078,8 +1126,10 @@ public class AxxyyClient extends CommonHttpClient {
public DataVo getDataVo(String xml){
try {
+ log.error("获取到的xml文件数据" + xml);
XmlMapper xmlMapper = new XmlMapper();
- JsonNode xmlNode = xmlMapper.readTree(xml.getBytes());
+ JsonNode xmlNode = xmlMapper.readTree(xml.getBytes("UTF-8"));
+
// 创建 JSON 映射器
ObjectMapper jsonMapper = new ObjectMapper();
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 list = dataVo.getList(DeptDict.class);
+//
+// log.info("总数:" + list.size());
+// List udiwmsWarehouseDetails = new ArrayList<>();
+// for (DeptDict deptDict : list) {
+// UdiwmsWarehouseDetail udiwmsWarehouseDetail = new UdiwmsWarehouseDetail();
+// udiwmsWarehouseDetail.setCode(deptDict.getCode());
+// udiwmsWarehouseDetail.setName(deptDict.getName());
+// udiwmsWarehouseDetails.add(udiwmsWarehouseDetail);
+// }
+// BaseResponse";
}
+
+ public static String buildDeptBody(String code, String name, String spell, String invalid) {
+ return "\n" +
+ "\n" +
+ " " + code + "
\n" +
+ " " + name + "\n" +
+ " " + spell + "\n" +
+ " " + invalid + "\n" +
+ " " + 1 + "\n" +
+ " " + "" + "\n" +
+ " " + "" + "\n" +
+ "";
+ }
+
}
diff --git a/src/main/java/com/glxp/mipsdl/entity/axxyy/DeptDict.java b/src/main/java/com/glxp/mipsdl/entity/axxyy/DeptDict.java
new file mode 100644
index 0000000..684f3dc
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/axxyy/DeptDict.java
@@ -0,0 +1,44 @@
+package com.glxp.mipsdl.entity.axxyy;
+
+import lombok.Data;
+
+/**
+ * @author : zhuzhu
+ * @date : 2025/3/13 15:03
+ * @modyified By :
+ */
+@Data
+public class DeptDict {
+
+ /**
+ * 编码
+ */
+ private String code;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 业务科室
+ */
+ private String unitflag;
+
+
+ /**
+ * 科室级别
+ */
+ private String deptlevel;
+
+
+ /**
+ * 上级科室
+ */
+ private String parent;
+
+ /**
+ * 病区代码
+ */
+ private String ward;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/axxyy/PriceDict.java b/src/main/java/com/glxp/mipsdl/entity/axxyy/PriceDict.java
index 2bd3814..45b0c69 100644
--- a/src/main/java/com/glxp/mipsdl/entity/axxyy/PriceDict.java
+++ b/src/main/java/com/glxp/mipsdl/entity/axxyy/PriceDict.java
@@ -15,13 +15,31 @@ import javax.xml.bind.annotation.XmlElement;
@Data
@XmlAccessorType(XmlAccessType.FIELD)
public class PriceDict {
+
+
+ /**
+ * 编码
+ */
private String code;
+ /**
+ * 名称
+ */
private String name;
+ /**
+ * 单位
+ */
private String unit;
+ /**
+ * 价格
+ */
private String price;
+
+ /**
+ * 规格
+ */
private String spell;
private String valid;
diff --git a/src/main/java/com/glxp/mipsdl/res/udiwms/BasicSkProjectResponse.java b/src/main/java/com/glxp/mipsdl/res/udiwms/BasicSkProjectResponse.java
index 0933387..82346a4 100644
--- a/src/main/java/com/glxp/mipsdl/res/udiwms/BasicSkProjectResponse.java
+++ b/src/main/java/com/glxp/mipsdl/res/udiwms/BasicSkProjectResponse.java
@@ -55,6 +55,10 @@ public class BasicSkProjectResponse {
*/
private Integer type;
+ private String unit;
+ private String price;
+ private Integer status;
+ private Integer contrastStatus;
private List basicSkProjectDetailResponses;
}