From f037d9e7667b26d59231f9e56115c66dc8e7a222 Mon Sep 17 00:00:00 2001
From: wyb <1977763549@qq.com>
Date: Thu, 19 Sep 2024 15:20:09 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B9=BF=E4=B8=9C=E7=9C=81=E4=B8=AD?=
=?UTF-8?q?=E5=8C=BB=E7=94=A8=E6=88=B7=E7=A7=91=E5=AE=A4=E6=8E=A8=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/java/com/docus/server/CxfConfig.java | 44 +-
.../collection/service/IPowerDeptService.java | 2 +-
.../service/impl/PowerDeptServiceImpl.java | 51 +-
.../service/impl/PowerUserServiceImpl.java | 18 +-
.../docus/server/collection/util/Result.java | 161 +--
.../collection/webservice/IDeptServer.java | 9 +-
.../collection/webservice/IUserServer.java | 11 +-
.../collection/webservice/ReceiveServer.java | 118 +-
.../webservice/impl/BasicServiceImpl.java | 1072 -----------------
.../webservice/impl/DeptServerImpl.java | 151 +--
.../webservice/impl/ReceiveServerImpl.java | 208 +---
.../webservice/impl/UserServerImpl.java | 172 +--
.../server/report/scheduler/JobScheduler.java | 5 +-
.../webservice/impl/DeptServerImplTest.java | 129 --
.../webservice/impl/UserServerImplTest.java | 137 ---
15 files changed, 90 insertions(+), 2198 deletions(-)
delete mode 100644 src/main/java/com/docus/server/collection/webservice/impl/BasicServiceImpl.java
delete mode 100644 src/test/java/com/docus/server/collection/webservice/impl/DeptServerImplTest.java
delete mode 100644 src/test/java/com/docus/server/collection/webservice/impl/UserServerImplTest.java
diff --git a/src/main/java/com/docus/server/CxfConfig.java b/src/main/java/com/docus/server/CxfConfig.java
index 973d144..29f20e7 100644
--- a/src/main/java/com/docus/server/CxfConfig.java
+++ b/src/main/java/com/docus/server/CxfConfig.java
@@ -1,29 +1,21 @@
package com.docus.server;
-import com.docus.server.collection.webservice.IDeptServer;
-import com.docus.server.collection.webservice.IUserServer;
import com.docus.server.collection.webservice.ReceiveServer;
-import com.docus.server.collection.webservice.BasicService;
-import org.apache.cxf.jaxws.EndpointImpl;
import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
+import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
import javax.xml.ws.Endpoint;
@Configuration
@RequiredArgsConstructor
public class CxfConfig {
- private final IUserServer userServer;
-
- private final IDeptServer deptServer;
- private final BasicService tBasicService;
private final ReceiveServer receiveServer;
/**
* 注入Servlet,注意beanName不能为dispatcherServlet
@@ -40,33 +32,11 @@ public class CxfConfig {
return new SpringBus();
}
- @Bean
- public Endpoint endpoint() {
- EndpointImpl endpoint = new EndpointImpl(springBus(), receiveServer);
- endpoint.publish("/api");
- return endpoint;
- }
-
- @Bean
- @Qualifier("userEndPoint")
- public Endpoint userEndPoint() {
- EndpointImpl endpoint = new EndpointImpl(springBus(), userServer);
- endpoint.publish("/api/user");
- return endpoint;
- }
-
- @Bean
- @Qualifier("deptEndPoint")
- public Endpoint deptEndPoint() {
- EndpointImpl endpoint = new EndpointImpl(springBus(), deptServer);
- endpoint.publish("/api/dept");
- return endpoint;
- }
-
@Bean
public Endpoint endpoint2() {
- EndpointImpl endpoint = new EndpointImpl(springBus(), tBasicService);
- endpoint.publish("/api/basic");
+ Endpoint endpoint = new EndpointImpl(this.springBus(), this.receiveServer);
+ endpoint.publish("/api/receive");
return endpoint;
}
+
}
diff --git a/src/main/java/com/docus/server/collection/service/IPowerDeptService.java b/src/main/java/com/docus/server/collection/service/IPowerDeptService.java
index a0539ce..6b00989 100644
--- a/src/main/java/com/docus/server/collection/service/IPowerDeptService.java
+++ b/src/main/java/com/docus/server/collection/service/IPowerDeptService.java
@@ -20,5 +20,5 @@ public interface IPowerDeptService {
* @param deptCode 科室编码
* @return 删除结果
*/
- void delDeptByDeptCode(String deptCode);
+ boolean delDeptByDeptCode(String deptCode);
}
diff --git a/src/main/java/com/docus/server/collection/service/impl/PowerDeptServiceImpl.java b/src/main/java/com/docus/server/collection/service/impl/PowerDeptServiceImpl.java
index 83e4aa2..c46c451 100644
--- a/src/main/java/com/docus/server/collection/service/impl/PowerDeptServiceImpl.java
+++ b/src/main/java/com/docus/server/collection/service/impl/PowerDeptServiceImpl.java
@@ -2,7 +2,6 @@ package com.docus.server.collection.service.impl;
import com.docus.core.util.Func;
import com.docus.infrastructure.redis.service.IdService;
-import com.docus.server.collection.consts.PowerDeptConst;
import com.docus.server.collection.dto.DeptDto;
import com.docus.server.collection.dto.DeptModifyParam;
import com.docus.server.collection.entity.PowerDept;
@@ -11,7 +10,6 @@ import com.docus.server.collection.service.IPowerDeptService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
-import java.util.Objects;
/**
* 科室服务实现
@@ -27,51 +25,28 @@ public class PowerDeptServiceImpl implements IPowerDeptService {
@Override
public boolean register(DeptDto deptDto) {
- String deptCode = deptDto.getDeptCode();
- PowerDept powerDept = null;
+ PowerDept powerDept = this.powerDeptMapper.getDeptByDeptCode(deptDto.getDeptCode());
DeptModifyParam deptModifyParam = deptDto.transDeptAddParam();
- if (deptCode.startsWith(PowerDeptConst.WARD_DEPT_PREFIX)) {
- powerDept = powerDeptMapper.getWardDeptByDeptCode(deptCode);
- } else if (deptCode.startsWith(PowerDeptConst.MZ_DEPT_PREFIX)) {
- powerDept = powerDeptMapper.getMzDeptByDeptCode(deptCode);
- } else {
- powerDept = powerDeptMapper.getDeptByDeptCode(deptCode);
- }
- if (Objects.isNull(powerDept)) {
- long deptId = idService.getDateSeq();
+ if (Func.isEmpty(powerDept)) {
+ long deptId = this.idService.getDateSeq();
deptModifyParam.setDeptId(deptId);
- if (deptCode.startsWith(PowerDeptConst.WARD_DEPT_PREFIX)) {
- powerDeptMapper.addWardDept(deptModifyParam);
- } else if (deptCode.startsWith(PowerDeptConst.MZ_DEPT_PREFIX)) {
- powerDeptMapper.addMzDept(deptModifyParam);
- } else {
- powerDeptMapper.addDept(deptModifyParam);
- }
+ this.powerDeptMapper.addDept(deptModifyParam);
return true;
- }
-
- deptModifyParam.setDeptId(powerDept.getDeptId());
-
- if (deptCode.startsWith(PowerDeptConst.WARD_DEPT_PREFIX)) {
- powerDeptMapper.updateWardDept(deptModifyParam);
- } else if (deptCode.startsWith(PowerDeptConst.MZ_DEPT_PREFIX)) {
- powerDeptMapper.updateMzDept(deptModifyParam);
} else {
- powerDeptMapper.updateDept(deptModifyParam);
+ deptModifyParam.setDeptId(powerDept.getDeptId());
+ this.powerDeptMapper.updateDept(deptModifyParam);
+ return true;
}
-
-
- return true;
}
@Override
- public void delDeptByDeptCode(String deptCode) {
- if (deptCode.startsWith(PowerDeptConst.WARD_DEPT_PREFIX)) {
- powerDeptMapper.delWardDeptByDeptCode(deptCode);
- } else if (deptCode.startsWith(PowerDeptConst.MZ_DEPT_PREFIX)) {
- powerDeptMapper.delMzDeptByDeptCode(deptCode);
+ public boolean delDeptByDeptCode(String deptCode) {
+ PowerDept powerDept = this.powerDeptMapper.getDeptByDeptCode(deptCode);
+ if (Func.isEmpty(powerDept)) {
+ return true;
} else {
- powerDeptMapper.delDeptByDeptCode(deptCode);
+ this.powerDeptMapper.delDeptByDeptCode(deptCode);
+ return true;
}
}
}
diff --git a/src/main/java/com/docus/server/collection/service/impl/PowerUserServiceImpl.java b/src/main/java/com/docus/server/collection/service/impl/PowerUserServiceImpl.java
index ec17385..9b4fbbd 100644
--- a/src/main/java/com/docus/server/collection/service/impl/PowerUserServiceImpl.java
+++ b/src/main/java/com/docus/server/collection/service/impl/PowerUserServiceImpl.java
@@ -30,21 +30,19 @@ public class PowerUserServiceImpl implements IPowerUserService {
@Override
public boolean register(UserDto userDto) {
- PowerUser powerUser = powerUserMapper.getUserByUserName(userDto.getUserName());
+ PowerUser powerUser = this.powerUserMapper.getUserByUserName(userDto.getUserName());
UserModifyParam userModifyParam = userDto.transUserAddParam();
-
if (Func.isEmpty(powerUser)) {
- long userId = idService.getDateSeq();
+ long userId = this.idService.getDateSeq();
userModifyParam.setUserId(userId);
- userModifyParam.setUserPwd(syncConfig.getPassword());
- powerUserMapper.addUser(userModifyParam);
+ userModifyParam.setUserPwd(this.syncConfig.getPassword());
+ this.powerUserMapper.addUser(userModifyParam);
+ return true;
+ } else {
+ userModifyParam.setUserId(powerUser.getUserId());
+ this.powerUserMapper.updateUser(userModifyParam);
return true;
}
- String powerDept = getUpdatePowerDept(powerUser, userDto);
- userModifyParam.setPowerDept(powerDept);
- userModifyParam.setUserId(powerUser.getUserId());
- powerUserMapper.updateUser(userModifyParam);
- return true;
}
diff --git a/src/main/java/com/docus/server/collection/util/Result.java b/src/main/java/com/docus/server/collection/util/Result.java
index 37e5d4a..4bce0ad 100644
--- a/src/main/java/com/docus/server/collection/util/Result.java
+++ b/src/main/java/com/docus/server/collection/util/Result.java
@@ -1,11 +1,7 @@
package com.docus.server.collection.util;
-import com.docus.core.util.DateUtil;
-import com.docus.core.util.Func;
import lombok.Data;
-import java.util.Date;
-
/**
* @BelongsProject: docus-webservice-sdry
* @BelongsPackage: com.docus.server.collection.util
@@ -17,160 +13,11 @@ import java.util.Date;
@Data
public class Result {
-
-
- public static String success(String serialId,String receive,String send){
-
- String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
-
- String message="成功";
-
- return " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " - \n" +
- "
\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
-// " - \n" +
- "
- \n" +
- "
\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- "\n";
- }
- public static String failed(String serialId,String message,String receive,String send){
-
- String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
-
-
- return " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " - \n" +
- "
\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
-// " - \n" +
- "
- \n" +
- "
\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- "\n";
+ public static String success() {
+ return "\n \n 0\n \n 操作成功\n";
}
-
- public static String successMessage(String serialId,String receive,String send){
-
- String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
-
- String message="成功";
-
- return "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
- }
- public static String failedMessage(String serialId,String message,String receive,String send){
-
- String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
-
-
- return "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
+ public static String failed() {
+ return "";
}
}
diff --git a/src/main/java/com/docus/server/collection/webservice/IDeptServer.java b/src/main/java/com/docus/server/collection/webservice/IDeptServer.java
index e58c088..ec5558c 100644
--- a/src/main/java/com/docus/server/collection/webservice/IDeptServer.java
+++ b/src/main/java/com/docus/server/collection/webservice/IDeptServer.java
@@ -1,6 +1,7 @@
package com.docus.server.collection.webservice;
import javax.jws.WebService;
+import java.util.Map;
/**
* @author Fang Ruichuan
@@ -8,10 +9,6 @@ import javax.jws.WebService;
*/
@WebService
public interface IDeptServer {
- /**
- * 科室信息接收,进行操作
- * @param receiveUser 接收到的科室数据
- * @return 返回结果
- */
- String deptModify(String receiveUser);
+
+ String deptModify(Map msgInfo);
}
diff --git a/src/main/java/com/docus/server/collection/webservice/IUserServer.java b/src/main/java/com/docus/server/collection/webservice/IUserServer.java
index 21f8c49..a21295f 100644
--- a/src/main/java/com/docus/server/collection/webservice/IUserServer.java
+++ b/src/main/java/com/docus/server/collection/webservice/IUserServer.java
@@ -1,8 +1,7 @@
package com.docus.server.collection.webservice;
-import com.docus.server.collection.dto.UserDto;
-
import javax.jws.WebService;
+import java.util.Map;
/**
* @author Fang Ruichuan
@@ -10,10 +9,6 @@ import javax.jws.WebService;
*/
@WebService
public interface IUserServer {
- /**
- * 用户信息接收,进行操作
- * @param receiveUser 接收到的用户参数
- * @return 返回结果
- */
- String userModify(String receiveUser);
+
+ String userModify(Map msgInfo);
}
diff --git a/src/main/java/com/docus/server/collection/webservice/ReceiveServer.java b/src/main/java/com/docus/server/collection/webservice/ReceiveServer.java
index 2242ff7..ae4ac58 100644
--- a/src/main/java/com/docus/server/collection/webservice/ReceiveServer.java
+++ b/src/main/java/com/docus/server/collection/webservice/ReceiveServer.java
@@ -9,121 +9,5 @@ import javax.jws.WebService;
@WebService
public interface ReceiveServer {
- /**
- * 科室信息接收,进行操作
- *
- * @param receiveUser 接收到的科室数据
- * @return 返回结果
- */
- String deptModify(String receiveUser);
-
- String setTBasic(String str);
-
- String updateTBasic(String str);
-
- /**
- * @description新增入院基础数据
- */
- public String setAdmissTBasic(String message);
-
- /**
- * @description住院就诊更新基础数据
- */
- public String updateAdmissTBasic(String message);
-
- /**
- * @description设置管床医生数据
- */
- public String setBedDoctor(String message);
-
-
- /**
- * 用户信息接收,进行操作
- *
- * @param receiveUser 接收到的用户参数
- * @return 返回结果
- */
- String userModify(String receiveUser);
-
-
- /**
- * 接收重症报告信息
- *
- * @param icuReportMessage 重症报告信息
- * @return 返回信息
- */
- String pushICUReport(String icuReportMessage);
-
- /**
- * 接收检验报告信息
- *
- * @param examinationReportMessage 检验报告信息
- * @return 返回信息
- */
- public String pushExaminationReport(String examinationReportMessage);
-
- /**
- * HIP1166-pdf件上传服务 顺德人医 ,和检查报告配合
- *
- * @param uploadMessage pdf上传信息
- * @return 成功或者异常信息
- */
- String pdfUpload(String uploadMessage);
-
- /**
- * 接收检查报告的信息 - 新增
- *
- * @param inspectionReportMessage 检查报告信息 - 新增
- * @return 成功或者异常信息
- */
- String pushAddInspectionReport(String inspectionReportMessage);
-
- /**
- * 接收检查报告的信息 - 更新
- *
- * @param inspectionReportMessage 检查报告信息 -更新
- * @return 成功或者异常信息
- */
- String pushUpdateInspectionReport(String inspectionReportMessage);
-
- /**
- * 接收检验报告的信息 新增
- *
- * @param laboratoryMessage 检验报告信息
- * @return 成功或者异常信息
- */
- String pushAddLaboratoryReport(String laboratoryMessage);
-
-
- /**
- * 接收检验报告的信息 更新
- *
- * @param laboratoryMessage 检验报告信息
- * @return 成功或者异常信息
- */
- String pushUpdateLaboratoryReport(String laboratoryMessage);
-
-
- /**
- * 接收检查报告的信息 - 更新
- *
- * @param xml 检查报告信息 -更新
- * @return 成功或者异常信息
- */
- String querySdJxIndexTest(String xml);
-
- String querySdJxIndexNoResultTest(String xml);
-
- /**
- * 母婴关系推送
- * @param maternalInfantRelationshipMessage 母婴关系消息
- * @return 成功或者异常信息
- */
- String pushMaternalInfantRelationship(String maternalInfantRelationshipMessage);
-
- /**
- * @description取消住院
- */
- String cancelHospital(String message);
-
+ String receiveMsg(String Msg);
}
diff --git a/src/main/java/com/docus/server/collection/webservice/impl/BasicServiceImpl.java b/src/main/java/com/docus/server/collection/webservice/impl/BasicServiceImpl.java
deleted file mode 100644
index fc54d8a..0000000
--- a/src/main/java/com/docus/server/collection/webservice/impl/BasicServiceImpl.java
+++ /dev/null
@@ -1,1072 +0,0 @@
-package com.docus.server.collection.webservice.impl;
-
-import cn.hutool.core.util.NumberUtil;
-import com.docus.core.util.Func;
-import com.docus.core.util.ObjectUtil;
-import com.docus.server.collection.dto.BedDoctorDto;
-import com.docus.server.collection.dto.TBasicDto;
-import com.docus.server.collection.service.ITBasicService;
-import com.docus.server.collection.util.Result;
-import com.docus.server.collection.util.XmlUtil;
-import com.docus.server.collection.webservice.BasicService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.w3c.dom.Node;
-
-import javax.annotation.Resource;
-import javax.jws.WebService;
-
-/**
- * @BelongsProject: docus-webservice-sdry
- * @BelongsPackage: com.docus.server.collection.webservice
- * @Author: chierhao
- * @CreateTime: 2023-02-25 14:52
- * @Description: TODO
- * @Version: 1.0
- */
-@Service
-@Slf4j
-public class BasicServiceImpl implements BasicService {
-
- @Resource
- private ITBasicService tBasicService;
-
- @Override
- public String setTBasic(String body) {
- log.info("新增入院基础数据:{}", body);
-
- if (Func.isEmpty(body)) {
- return Result.failed(null,"参数为空",null,null);
- }
- //解析xml
- TBasicDto tBasicDto = null;
- try {
- tBasicDto=getNewTBasicDto(body);
- //持久化
- tBasicService.setTBasic(tBasicDto);
- }catch (Exception e){
- e.printStackTrace();
- log.error("住院号:"+tBasicDto.getJzh()+" 异常信息:\n"+e.getMessage(), e);
- return Result.failed(tBasicDto.getSerialId(),e.getMessage(),tBasicDto.getReceive(),tBasicDto.getSend());
- }
- return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
- }
-
- @Override
- public String updateTBasic(String body) {
- log.info("修改出院基础数据:{}", body);
- if (Func.isEmpty(body)) {
- return Result.failed(null,"参数为空",null,null);
- }
- //解析xml
- TBasicDto tBasicDto = null;
- try {
- tBasicDto=getUpdateTBasicDto(body);
- //持久化
- tBasicService.updateTBasic(tBasicDto);
- }catch (Exception e){
- e.printStackTrace();
- log.error(e.getMessage(), e);
- return Result.failed(tBasicDto.getSerialId(),e.getMessage(),tBasicDto.getReceive(),tBasicDto.getSend());
- }
- return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
-
- }
-
- @Override
- public String cancelHospital(String body) {
- log.info("取消住院基础数据:{}", body);
- if (Func.isEmpty(body)) {
- return Result.failed(null,"参数为空",null,null);
- }
- //解析xml
- TBasicDto tBasicDto = null;
- try {
- tBasicDto=getCancelHospitalDto(body);
- //持久化
- tBasicService.cancelHospital(tBasicDto);
- }catch (Exception e){
- e.printStackTrace();
- log.error(e.getMessage(), e);
- return Result.failed(tBasicDto.getSerialId(),e.getMessage(),tBasicDto.getReceive(),tBasicDto.getSend());
- }
- return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
-
- }
-
-
- @Override
- public String setAdmissTBasic(String message) {
- log.info("新增入院基础数据:{}", message);
-
- if (Func.isEmpty(message)) {
- return Result.failed(null,"参数为空",null,null);
- }
- //解析xml
- TBasicDto tBasicDto = null;
- try {
- tBasicDto=getAdmissTBasicDto(message);
- //持久化
- tBasicService.setTBasic(tBasicDto);
- }catch (Exception e){
- e.printStackTrace();
- log.error("住院号:"+tBasicDto.getJzh()+" 异常信息:\n"+e.getMessage(), e);
- return Result.failed(tBasicDto.getSerialId(),e.getMessage(),tBasicDto.getReceive(),tBasicDto.getSend());
- }
- return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
-
- }
-
- @Override
- public String updateAdmissTBasic(String message) {
- log.info("修改入院基础数据:{}", message);
- if (Func.isEmpty(message)) {
- return Result.failed(null,"参数为空",null,null);
- }
- //解析xml
- TBasicDto tBasicDto = null;
- try {
- tBasicDto=getUpdateAdmissTBasicDto(message);
- //持久化
- tBasicService.updateAdmissTBasic(tBasicDto);
- }catch (Exception e){
- e.printStackTrace();
- log.error(e.getMessage(), e);
- return Result.failed(tBasicDto.getSerialId(),e.getMessage(),tBasicDto.getReceive(),tBasicDto.getSend());
- }
- return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
- }
-
- @Override
- public String setBedDoctor(String message) {
- log.info("设置管床医生数据:{}", message);
- if (Func.isEmpty(message)) {
- return Result.failed(null,"参数为空",null,null);
- }
- //解析xml
- BedDoctorDto bedDoctorDto = null;
- try {
- bedDoctorDto=getBedDoctorDto(message);
- //持久化
- tBasicService.setBedDoctor(bedDoctorDto);
- }catch (Exception e){
- e.printStackTrace();
- log.error(e.getMessage(), e);
- return Result.failed(bedDoctorDto.getSerialId(),e.getMessage(),bedDoctorDto.getReceive(),bedDoctorDto.getSend());
- }
- return Result.success(bedDoctorDto.getSerialId(),bedDoctorDto.getReceive(),bedDoctorDto.getSend());
- }
-
- public TBasicDto getNewTBasicDto(String str) {
- XmlUtil xml=XmlUtil.of(str);
- //id-消息流水号
- String serialId=null;
- Node serialIdNode = xml.getNode("/PRPA_HIP0032/id/@extension");
- if(Func.isNotEmpty(serialIdNode)){
- serialId=serialIdNode.getNodeValue();
- }
- //接受方
- String receive=null;
- Node receiveNode = xml.getNode("/PRPA_HIP0032/receiver/device/id/item/@extension");
- if(Func.isNotEmpty(receiveNode)){
- receive=receiveNode.getNodeValue();
- }
- //发送方
- String send=null;
- Node sendNode = xml.getNode("/PRPA_HIP0032/sender/device/id/item/@extension");
- if(Func.isNotEmpty(sendNode)){
- send=sendNode.getNodeValue();
- }
- //住院流水号
- String jzh=null;
- Node jzhNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/item/@extension");
- if(Func.isNotEmpty(jzhNode)){
- jzh=jzhNode.getNodeValue();
- }
- //住院号标识
- String inpatientNo=null;
- Node inpatientNoNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/id/item/@extension");
- if(Func.isNotEmpty(inpatientNoNode)){
- inpatientNo=inpatientNoNode.getNodeValue();
- }
- //住院次数[]
- String admissTimes=null;
- Node admissTimesNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value");
- if(Func.isNotEmpty(admissTimesNode)){
- admissTimes=admissTimesNode.getNodeValue();
- }
- //姓名
- String name=null;
- Node nameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/name/item/part/@value");
- if(Func.isNotEmpty(nameNode)){
- name=nameNode.getNodeValue();
- }
- //入院日期时间
- String admissDate=null;
- Node admissDateNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/low/@value");
- if(Func.isNotEmpty(admissDateNode)){
- admissDate=admissDateNode.getNodeValue();
- }
- //出院日期时间
- String disDate=null;
- Node disDateNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/high/@value");
- if(Func.isNotEmpty(disDateNode)){
- disDate=disDateNode.getNodeValue();
- }
- //入院诊断科室名称[]
- String admissDeptName=null;
- Node admissDeptNameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/component[@displayName='入院诊断']/section/entry[@displayName='入院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name");
- if(Func.isNotEmpty(admissDeptNameNode)){
- admissDeptNameNode.getTextContent();
- }
- //出院诊断科室名称[]
- String disDeptName=null;
- Node disDeptNameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/name");
- if(Func.isNotEmpty(disDeptNameNode)){
- disDeptName=disDeptNameNode.getTextContent();
- }
- //主治医师[]
- String attending=null;
- Node attendingNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/authenticator[@displayName='住院医师']/assignedEntity/id/@extension");
- if(Func.isNotEmpty(attendingNode)){
- attending=attendingNode.getTextContent();
- }
- //主治医师[]
- String attendingName=null;
- Node attendingNameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/authenticator[@displayName='住院医师']/assignedEntity/assignedPerson/name");
- if(Func.isNotEmpty(attendingNameNode)){
- attendingName=attendingNameNode.getTextContent();
- }
- //年龄
- String age=null;
- Node ageNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/age[@unit='岁']/@value");
- if(Func.isNotEmpty(ageNode)){
- age=ageNode.getNodeValue();
- }
- //性别
- String sex=null;
- Node sexNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@code");
- if(Func.isNotEmpty(sexNode)){
- sex=sexNode.getNodeValue();
- }
- //身份证号
- String idCard=null;
- Node idCardNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/id/item/@extension");
- if(Func.isNotEmpty(idCardNode)){
- idCard=idCardNode.getNodeValue();
- }
- //出院科室
- String disDept=null;
- Node disDeptCardNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(disDeptCardNode)){
- disDept=disDeptCardNode.getNodeValue();
- }
- //性别名称
- String sexName=null;
- Node sexNameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@displayName");
- if(Func.isNotEmpty(sexNameNode)){
- sexName=sexNameNode.getNodeValue();
- }
- //床位号
- String bedNum=null;
- Node bedNumNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(bedNumNode)){
- bedNum=bedNumNode.getNodeValue();
- }
- //住院天数数[]
- String admissDays=null;
- Node admissDaysNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='天']/@value");
- if(Func.isNotEmpty(admissDaysNode)){
- admissDays=admissDaysNode.getNodeValue();
- }
- //是否死亡[]
- String isDead=null;
- Node isDeadNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院情况']/observation/value");
- if(Func.isNotEmpty(isDeadNode)){
- isDead=isDeadNode.getTextContent();
- }
- //病区编号
- String wardCode=null;
- Node wardCodeNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(wardCodeNode)){
- wardCode=wardCodeNode.getNodeValue();
- }
- //病区名称
- String wardName=null;
- Node wardNameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/name");
- if(Func.isNotEmpty(wardNameNode)){
- wardName=wardNameNode.getTextContent();
- }
- //顺德人医第三方索引
- String sdryIndex=null;
- Node sdryIndexNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/id/item/@extension");
- if(Func.isNotEmpty(sdryIndexNode)){
- sdryIndex=sdryIndexNode.getNodeValue();
- }
- //顺德人医第三方索引
- String leaveMethod=null;
- Node leaveMethodNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/lhWay/@code");
- if(Func.isNotEmpty(leaveMethodNode)){
- leaveMethod=leaveMethodNode.getNodeValue();
- }
-
- //设置dto
- TBasicDto dto=new TBasicDto();
- dto.setSerialId(serialId);
- dto.setSend(send);
- dto.setReceive(receive);
- dto.setInpatientNo(inpatientNo);
- dto.setName(name);
- dto.setJzh(jzh);
- dto.setAdmissDeptName(admissDeptName);
- dto.setDisDeptName(disDeptName);
- dto.setAdmissDate(admissDate);
- dto.setDisDate(disDate);
- dto.setAdmissTimes(admissTimes);
- dto.setAttending(attending);
- dto.setAttendingName(attendingName);
- dto.setAge(age);
- dto.setSex(sex);
- dto.setIdCard(idCard);
- dto.setDisDept(disDept);
- dto.setSexName(sexName);
- dto.setBedNum(bedNum);
- dto.setIsDead(isDead);
- dto.setAdmissDays(admissDays);
- dto.setWardCode(wardCode);
- dto.setWardName(wardName);
- dto.setSdryIndex(sdryIndex);
- dto.setIsOther(0);
- dto.setLeaveMethod(leaveMethod);
- return dto;
- }
-
- public TBasicDto getUpdateTBasicDto(String str) {
- XmlUtil xml=XmlUtil.of(str);
- //id-消息流水号
- String serialId=null;
- Node serialIdNode = xml.getNode("/PRPA_HIP0033/id/@extension");
- if(Func.isNotEmpty(serialIdNode)){
- serialId=serialIdNode.getNodeValue();
- }
- //接受方
- String receive=null;
- Node receiveNode = xml.getNode("/PRPA_HIP0033/receiver/device/id/item/@extension");
- if(Func.isNotEmpty(receiveNode)){
- receive=receiveNode.getNodeValue();
- }
- //发送方
- String send=null;
- Node sendNode = xml.getNode("/PRPA_HIP0033/sender/device/id/item/@extension");
- if(Func.isNotEmpty(sendNode)){
- send=sendNode.getNodeValue();
- }
- //住院流水号
- String jzh=null;
- Node jzhNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/item/@extension");
- if(Func.isNotEmpty(jzhNode)){
- jzh=jzhNode.getNodeValue();
- }
- //住院号标识
- String inpatientNo=null;
- Node inpatientNoNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/id/item/@extension");
- if(Func.isNotEmpty(inpatientNoNode)){
- inpatientNo=inpatientNoNode.getNodeValue();
- }
- //住院次数[]
- String admissTimes=null;
- Node admissTimesNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value");
- if(Func.isNotEmpty(admissTimesNode)){
- admissTimes=admissTimesNode.getNodeValue();
- }
- //姓名
- String name=null;
- Node nameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/name/item/part/@value");
- if(Func.isNotEmpty(nameNode)){
- name=nameNode.getNodeValue();
- }
- //入院日期时间
- String admissDate=null;
- Node admissDateNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/effectiveTime/low/@value");
- if(Func.isNotEmpty(admissDateNode)){
- admissDate=admissDateNode.getNodeValue();
- }
- //出院日期时间
- String disDate=null;
- Node disDateNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/effectiveTime/high/@value");
- if(Func.isNotEmpty(disDateNode)){
- disDate=disDateNode.getNodeValue();
- }
- //入院诊断科室名称[]
- String admissDeptName=null;
- Node admissDeptNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/component[@displayName='入院诊断']/section/entry[@displayName='入院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name");
- if(Func.isNotEmpty(admissDeptNameNode)){
- admissDeptNameNode.getTextContent();
- }
- //出院诊断科室名称[]
- String disDeptName=null;
- Node disDeptNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name");
- if(Func.isNotEmpty(disDeptNameNode)){
- disDeptName=disDeptNameNode.getTextContent();
- }
- //主治医师[]
- String attending=null;
- Node attendingNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/authenticator[@displayName='住院医师']/assignedEntity/id/@extension");
- if(Func.isNotEmpty(attendingNode)){
- attending=attendingNode.getTextContent();
- }
- //主治医师[]
- String attendingName=null;
- Node attendingNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/authenticator[@displayName='住院医师']/assignedEntity/assignedPerson/name");
- if(Func.isNotEmpty(attendingNameNode)){
- attendingName=attendingNameNode.getTextContent();
- }
- //年龄
- String age=null;
- Node ageNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/age[@unit='岁']/@value");
- if(Func.isNotEmpty(ageNode)){
- age=ageNode.getNodeValue();
- }
- //性别
- String sex=null;
- Node sexNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@code");
- if(Func.isNotEmpty(sexNode)){
- sex=sexNode.getNodeValue();
- }
- //身份证号
- String idCard=null;
- Node idCardNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/id/item/@extension");
- if(Func.isNotEmpty(idCardNode)){
- idCard=idCardNode.getNodeValue();
- }
- //出院科室
- String disDept=null;
- Node disDeptCardNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(disDeptCardNode)){
- disDept=disDeptCardNode.getNodeValue();
- }
- //性别名称
- String sexName=null;
- Node sexNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@displayName");
- if(Func.isNotEmpty(sexNameNode)){
- sexName=sexNameNode.getNodeValue();
- }
- //床位号
- String bedNum=null;
- Node bedNumNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(bedNumNode)){
- bedNum=bedNumNode.getNodeValue();
- }
- //住院天数数[]
- String admissDays=null;
- Node admissDaysNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='天']/@value");
- if(Func.isNotEmpty(admissDaysNode)){
- admissDays=admissDaysNode.getNodeValue();
- }
- //是否死亡[]
- String isDead=null;
- Node isDeadNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院情况']/observation/value");
- if(Func.isNotEmpty(isDeadNode)){
- isDead=isDeadNode.getTextContent();
- }
- //病区编号
- String wardCode=null;
- Node wardCodeNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(wardCodeNode)){
- wardCode=wardCodeNode.getNodeValue();
- }
- //病区名称
- String wardName=null;
- Node wardNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/name");
- if(Func.isNotEmpty(wardNameNode)){
- wardName=wardNameNode.getTextContent();
- }
- //顺德人医第三方索引
- String sdryIndex=null;
- Node sdryIndexNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/id/item/@extension");
- if(Func.isNotEmpty(sdryIndexNode)){
- sdryIndex=sdryIndexNode.getNodeValue();
- }
-
- //出院状态
- String statusCode=null;
- Node statusCodeNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/statusCode/@code");
- if(Func.isNotEmpty(statusCodeNode)){
- statusCode=statusCodeNode.getNodeValue();
- }
-
- //设置dto
- TBasicDto dto=new TBasicDto();
- dto.setSerialId(serialId);
- dto.setSend(send);
- dto.setReceive(receive);
- dto.setInpatientNo(inpatientNo);
- dto.setName(name);
- dto.setJzh(jzh);
- dto.setAdmissDeptName(admissDeptName);
- dto.setDisDeptName(disDeptName);
- dto.setAdmissDate(admissDate);
- dto.setDisDate(disDate);
- dto.setAdmissTimes(admissTimes);
- dto.setAttending(attending);
- dto.setAttendingName(attendingName);
- dto.setAge(age);
- dto.setSex(sex);
- dto.setIdCard(idCard);
- dto.setDisDept(disDept);
- dto.setSexName(sexName);
- dto.setBedNum(bedNum);
- dto.setIsDead(isDead);
- dto.setAdmissDays(admissDays);
- dto.setWardCode(wardCode);
- dto.setWardName(wardName);
- dto.setSdryIndex(sdryIndex);
- dto.setIsOther(0);
- dto.setStatu(statusCode);
- return dto;
- }
-
- public TBasicDto getCancelHospitalDto(String str) {
- XmlUtil xml=XmlUtil.of(str);
- //id-消息流水号
- String serialId=null;
- Node serialIdNode = xml.getNode("/PRPA_HIP1235/id/@extension");
- if(Func.isNotEmpty(serialIdNode)){
- serialId=serialIdNode.getNodeValue();
- }
- //接受方
- String receive=null;
- Node receiveNode = xml.getNode("/PRPA_HIP1235/receiver/device/id/item/@extension");
- if(Func.isNotEmpty(receiveNode)){
- receive=receiveNode.getNodeValue();
- }
- //发送方
- String send=null;
- Node sendNode = xml.getNode("/PRPA_HIP1235/sender/device/id/item/@extension");
- if(Func.isNotEmpty(sendNode)){
- send=sendNode.getNodeValue();
- }
- //住院流水号
- String jzh=null;
- Node jzhNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/item/@extension");
- if(Func.isNotEmpty(jzhNode)){
- jzh=jzhNode.getNodeValue();
- }
- //住院号标识
- String inpatientNo=null;
- Node inpatientNoNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/id/item/@extension");
- if(Func.isNotEmpty(inpatientNoNode)){
- inpatientNo=inpatientNoNode.getNodeValue();
- }
- //住院次数[]
- String admissTimes=null;
- Node admissTimesNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value");
- if(Func.isNotEmpty(admissTimesNode)){
- admissTimes=admissTimesNode.getNodeValue();
- }
- //姓名
- String name=null;
- Node nameNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/name/item/part/@value");
- if(Func.isNotEmpty(nameNode)){
- name=nameNode.getNodeValue();
- }
- //入院日期时间
- String admissDate=null;
- Node admissDateNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/effectiveTime/low/@value");
- if(Func.isNotEmpty(admissDateNode)){
- admissDate=admissDateNode.getNodeValue();
- }
- //出院日期时间
- String disDate=null;
- Node disDateNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/effectiveTime/high/@value");
- if(Func.isNotEmpty(disDateNode)){
- disDate=disDateNode.getNodeValue();
- }
- //入院诊断科室名称[]
- String admissDeptName=null;
- Node admissDeptNameNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/component[@displayName='入院诊断']/section/entry[@displayName='入院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name");
- if(Func.isNotEmpty(admissDeptNameNode)){
- admissDeptNameNode.getTextContent();
- }
- //出院诊断科室名称[]
- String disDeptName=null;
- Node disDeptNameNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name");
- if(Func.isNotEmpty(disDeptNameNode)){
- disDeptName=disDeptNameNode.getTextContent();
- }
- //主治医师[]
- String attending=null;
- Node attendingNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/authenticator[@displayName='住院医师']/assignedEntity/id/@extension");
- if(Func.isNotEmpty(attendingNode)){
- attending=attendingNode.getTextContent();
- }
- //主治医师[]
- String attendingName=null;
- Node attendingNameNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/authenticator[@displayName='住院医师']/assignedEntity/assignedPerson/name");
- if(Func.isNotEmpty(attendingNameNode)){
- attendingName=attendingNameNode.getTextContent();
- }
- //年龄
- String age=null;
- Node ageNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/age[@unit='岁']/@value");
- if(Func.isNotEmpty(ageNode)){
- age=ageNode.getNodeValue();
- }
- //性别
- String sex=null;
- Node sexNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@code");
- if(Func.isNotEmpty(sexNode)){
- sex=sexNode.getNodeValue();
- }
- //身份证号
- String idCard=null;
- Node idCardNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/id/item/@extension");
- if(Func.isNotEmpty(idCardNode)){
- idCard=idCardNode.getNodeValue();
- }
- //出院科室
- String disDept=null;
- Node disDeptCardNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(disDeptCardNode)){
- disDept=disDeptCardNode.getNodeValue();
- }
- //性别名称
- String sexName=null;
- Node sexNameNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@displayName");
- if(Func.isNotEmpty(sexNameNode)){
- sexName=sexNameNode.getNodeValue();
- }
- //床位号
- String bedNum=null;
- Node bedNumNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(bedNumNode)){
- bedNum=bedNumNode.getNodeValue();
- }
- //住院天数数[]
- String admissDays=null;
- Node admissDaysNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='天']/@value");
- if(Func.isNotEmpty(admissDaysNode)){
- admissDays=admissDaysNode.getNodeValue();
- }
- //是否死亡[]
- String isDead=null;
- Node isDeadNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院情况']/observation/value");
- if(Func.isNotEmpty(isDeadNode)){
- isDead=isDeadNode.getTextContent();
- }
- //病区编号
- String wardCode=null;
- Node wardCodeNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
- if(Func.isNotEmpty(wardCodeNode)){
- wardCode=wardCodeNode.getNodeValue();
- }
- //病区名称
- String wardName=null;
- Node wardNameNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/name");
- if(Func.isNotEmpty(wardNameNode)){
- wardName=wardNameNode.getTextContent();
- }
- //顺德人医第三方索引
- String sdryIndex=null;
- Node sdryIndexNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/subject/patient/id/item/@extension");
- if(Func.isNotEmpty(sdryIndexNode)){
- sdryIndex=sdryIndexNode.getNodeValue();
- }
-
- //出院状态
- String statusCode=null;
- Node statusCodeNode = xml.getNode("/PRPA_HIP1235/controlActProcess/subject/encounterEvent/statusCode/@code");
- if(Func.isNotEmpty(statusCodeNode)){
- statusCode=statusCodeNode.getNodeValue();
- }
-
- //设置dto
- TBasicDto dto=new TBasicDto();
- dto.setSerialId(serialId);
- dto.setSend(send);
- dto.setReceive(receive);
- dto.setInpatientNo(inpatientNo);
- dto.setName(name);
- dto.setJzh(jzh);
- dto.setAdmissDeptName(admissDeptName);
- dto.setDisDeptName(disDeptName);
- dto.setAdmissDate(admissDate);
- dto.setDisDate(disDate);
- dto.setAdmissTimes(admissTimes);
- dto.setAttending(attending);
- dto.setAttendingName(attendingName);
- dto.setAge(age);
- dto.setSex(sex);
- dto.setIdCard(idCard);
- dto.setDisDept(disDept);
- dto.setSexName(sexName);
- dto.setBedNum(bedNum);
- dto.setIsDead(isDead);
- dto.setAdmissDays(admissDays);
- dto.setWardCode(wardCode);
- dto.setWardName(wardName);
- dto.setSdryIndex(sdryIndex);
- dto.setIsOther(0);
- dto.setStatu(statusCode);
- return dto;
- }
-
-
- public TBasicDto getAdmissTBasicDto(String message) {
- XmlUtil xml=XmlUtil.of(message);
- //id-消息流水号
- String serialId=null;
- Node serialIdNode = xml.getNode("/PRPA_HIP1070/id/@extension");
- if(Func.isNotEmpty(serialIdNode)){
- serialId=serialIdNode.getNodeValue();
- }
- //接受方
- String receive=null;
- Node receiveNode = xml.getNode("/PRPA_HIP1070/receiver/device/id/item/@extension");
- if(Func.isNotEmpty(receiveNode)){
- receive=receiveNode.getNodeValue();
- }
- //发送方
- String send=null;
- Node sendNode = xml.getNode("/PRPA_HIP1070/sender/device/id/item/@extension");
- if(Func.isNotEmpty(sendNode)){
- send=sendNode.getNodeValue();
- }
- //住院流水号*
- String jzh=null;
- Node jzhNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/item/@extension");
- if(Func.isNotEmpty(jzhNode)){
- jzh=jzhNode.getNodeValue();
- }
- //住院号标识
- String inpatientNo=null;
- Node inpatientNoNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/id/item/@extension");
- if(Func.isNotEmpty(inpatientNoNode)){
- inpatientNo=inpatientNoNode.getNodeValue();
- }
- //住院次数[]
- String admissTimes=null;
- Node admissTimesNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/lengthOfStayQuantity/@value");
- if(Func.isNotEmpty(admissTimesNode)){
- admissTimes=admissTimesNode.getNodeValue();
- }
- //姓名
- String name=null;
- Node nameNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/subject/patient/patientPerson/name/item/part/@value");
- if(Func.isNotEmpty(nameNode)){
- name=nameNode.getNodeValue();
- }
- //入院日期时间
- String admissDate=null;
- Node admissDateNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/effectiveTime/low/@value");
- if(Func.isNotEmpty(admissDateNode)){
- admissDate=admissDateNode.getNodeValue();
- }
- //入院诊断科室名称[]
- String admissDeptName=null;
- Node admissDeptNameNode = xml.getNode("/PRPA_HIP1070/controlActProcess/subject/component/location1/serviceDeliveryLocation/location/name/item/part/@value");
- if(Func.isNotEmpty(admissDeptNameNode)){
- admissDeptName=admissDeptNameNode.getNodeValue();
- }
- //主治医师[]
- String attending=null;
- Node attendingNode = xml.getNode("/PRPA_HIP1070/controlActProcess/subject/component/admitter/assignedPerson/id/item/@extension");
- if(Func.isNotEmpty(attendingNode)){
- attending=attendingNode.getTextContent();
- }
- //主治医师名称[]
- String attendingName=null;
- Node attendingNameNode = xml.getNode("/PRPA_HIP1070/controlActProcess/subject/component/admitter/assignedPerson/assignedPerson/name/item/part/@value");
- if(Func.isNotEmpty(attendingNameNode)){
- attendingName=attendingNameNode.getTextContent();
- }
-
- //身份证号
- String idCard=null;
- Node idCardNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/subject/patient/patientPerson/id/item/@extension");
- if(Func.isNotEmpty(idCardNode)){
- idCard=idCardNode.getNodeValue();
- }
- //入院科室
- String admissDept=null;
- Node admissDeptCardNode = xml.getNode("/PRPA_HIP1070/controlActProcess/subject/component/location1/serviceDeliveryLocation/location/id/item/@extension");
- if(Func.isNotEmpty(admissDeptCardNode)){
- admissDept=admissDeptCardNode.getNodeValue();
- }
- //床位号
- String bedNum=null;
- Node bedNumNode = xml.getNode("/PRPA_HIP1070/controlActProcess/subject/component/location1/serviceDeliveryLocation/location/locatedEntityHasParts/locatedPlace/locatedEntityHasParts/locatedPlace/locatedEntityHasParts/locatedPlace/id/item/@extension");
- if(Func.isNotEmpty(bedNumNode)){
- bedNum=bedNumNode.getNodeValue();
- }
- //病区编号
- String wardCode=null;
- Node wardCodeNode = xml.getNode("/PRPA_HIP1070/controlActProcess/subject/component/location1/serviceDeliveryLocation/location/locatedEntityHasParts/locatedPlace/id/item/@extension");
- if(Func.isNotEmpty(wardCodeNode)){
- wardCode=wardCodeNode.getNodeValue();
- }
- //病区名称
- String wardName=null;
- Node wardNameNode = xml.getNode("/PRPA_HIP1070/controlActProcess/subject/component/location1/serviceDeliveryLocation/location/locatedEntityHasParts/locatedPlace/name/item/part/@value");
- if(Func.isNotEmpty(wardNameNode)){
- wardName=wardNameNode.getTextContent();
- }
- //顺德人医第三方索引
- String sdryIndex=null;
- Node sdryIndexNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/subject/patient/id/item/@extension");
- if(Func.isNotEmpty(sdryIndexNode)){
- sdryIndex=sdryIndexNode.getNodeValue();
- }
- //医疗保险类别
- String admissType=null;
- Node admissTypeNode = xml.getNode("/PRPA_HIP1070/controlActProcess/encounterEvent/admissionReferralSourceCode/displayName/@value");
- if(Func.isNotEmpty(admissTypeNode)){
- admissType=admissTypeNode.getNodeValue();
- }
-
- //设置dto
- TBasicDto dto=new TBasicDto();
- dto.setSerialId(serialId);
- dto.setSend(send);
- dto.setReceive(receive);
- dto.setInpatientNo(inpatientNo);
- dto.setName(name);
- dto.setJzh(jzh);
- dto.setAdmissDept(admissDept);
- dto.setAdmissDeptName(admissDeptName);
- dto.setAdmissDate(admissDate);
- dto.setAdmissTimes(admissTimes);
- dto.setAttending(attending);
- dto.setAttendingName(attendingName);
- dto.setIdCard(idCard);
- dto.setBedNum(bedNum);
- dto.setWardCode(wardCode);
- dto.setWardName(wardName);
- dto.setSdryIndex(sdryIndex);
- if("家庭病床".equals(admissType)){
- dto.setIsOther(2);
- }else{
- dto.setIsOther(0);
- }
- return dto;
- }
-
- public TBasicDto getUpdateAdmissTBasicDto(String str) {
- XmlUtil xml=XmlUtil.of(str);
- //id-消息流水号
- String serialId=null;
- Node serialIdNode = xml.getNode("/PRPA_HIP0027/id/@extension");
- if(Func.isNotEmpty(serialIdNode)){
- serialId=serialIdNode.getNodeValue();
- }
- //接受方
- String receive=null;
- Node receiveNode = xml.getNode("/PRPA_HIP0027/receiver/device/id/item/@extension");
- if(Func.isNotEmpty(receiveNode)){
- receive=receiveNode.getNodeValue();
- }
- //发送方
- String send=null;
- Node sendNode = xml.getNode("/PRPA_HIP0027/sender/device/id/item/@extension");
- if(Func.isNotEmpty(sendNode)){
- send=sendNode.getNodeValue();
- }
- //住院流水号
- String jzh=null;
- Node jzhNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/id/item[2]/@extension");
- if(Func.isNotEmpty(jzhNode)){
- jzh=jzhNode.getNodeValue();
- }
- //住院号标识
- String inpatientNo=null;
- Node inpatientNoNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/id/item[1]/@extension");
- if(Func.isNotEmpty(inpatientNoNode)){
- inpatientNo=inpatientNoNode.getNodeValue();
- }
- //住院次数[]
- String admissTimes=null;
- Node admissTimesNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value");
- if(Func.isNotEmpty(admissTimesNode)){
- admissTimes=admissTimesNode.getNodeValue();
- }
- //姓名
- String name=null;
- Node nameNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/name/item/part/@value");
- if(Func.isNotEmpty(nameNode)){
- name=nameNode.getNodeValue();
- }
- //入院日期时间
- String admissDate=null;
- Node admissDateNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/effectiveTime/low/@value");
- if(Func.isNotEmpty(admissDateNode)){
- admissDate=admissDateNode.getNodeValue();
- }
- //入院诊断科室名称[]
- String admissDeptName=null;
- Node admissDeptNameNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/location/serviceDeliveryLocation/location/name/item/part/@value");
- if(Func.isNotEmpty(admissDeptNameNode)){
- admissDeptName=admissDeptNameNode.getNodeValue();
- }
- //入院诊断科室
- String admissDept=null;
- Node admissDeptNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/location/serviceDeliveryLocation/location/id/item/@extension");
- if(Func.isNotEmpty(admissDeptNameNode)){
- admissDept=admissDeptNode.getNodeValue();
- }
- //主治医师[]
- String attending=null;
- Node attendingNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/authenticator/assignedEntity/code[@displayName='住院医师']/parent::assignedEntity/id/item/@extension");
- if(Func.isNotEmpty(attendingNode)){
- attending=attendingNode.getNodeValue();
- }
- //主治医师[]
- String attendingName=null;
- Node attendingNameNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/authenticator/assignedEntity/code[@displayName='住院医师']/parent::assignedEntity/assignedPerson/name");
- if(Func.isNotEmpty(attendingNameNode)){
- attendingName=attendingNameNode.getTextContent();
- }
- //年龄
- String age=null;
- Node ageNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/age/@value");
- if(Func.isNotEmpty(ageNode)){
- age=ageNode.getNodeValue();
- }
- //性别
- String sex=null;
- Node sexNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/genderCode/@value");
- if(Func.isNotEmpty(sexNode)){
- sex=sexNode.getNodeValue();
- }
- //身份证号
- String idCard=null;
- Node idCardNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/id/item/@extension");
- if(Func.isNotEmpty(idCardNode)){
- idCard=idCardNode.getNodeValue();
- }
- //性别名称
- String sexName=null;
- Node sexNameNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/genderName/@value");
- if(Func.isNotEmpty(sexNameNode)){
- sexName=sexNameNode.getNodeValue();
- }
- //病区编号
- String wardCode=null;
- Node wardCodeNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/location/serviceDeliveryLocation/location/locatedEntityHasParts/locatedPlace/id/item/@extension");
- if(Func.isNotEmpty(wardCodeNode)){
- wardCode=wardCodeNode.getNodeValue();
- }
- //病区名称
- String wardName=null;
- Node wardNameNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/location/serviceDeliveryLocation/location/locatedEntityHasParts/locatedPlace/name/item/part/@value");
- if(Func.isNotEmpty(wardNameNode)){
- wardName=wardNameNode.getNodeValue();
- }
- //顺德人医第三方索引
- String sdryIndex=null;
- Node sdryIndexNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/subject/patient/id/item/@extension");
- if(Func.isNotEmpty(sdryIndexNode)){
- sdryIndex=sdryIndexNode.getNodeValue();
- }
-
- //入院日期时间
- String statu=null;
- Node statuNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/statusCode/@code");
- if(Func.isNotEmpty(statuNode)){
- statu=statuNode.getNodeValue();
- }
- //医疗保险类别
- String admissType=null;
- Node admissTypeNode = xml.getNode("/PRPA_HIP0027/controlActProcess/subject/encounterEvent/admissionReferralSourceCode/displayName/@value");
- if(Func.isNotEmpty(admissTypeNode)){
- admissType=admissTypeNode.getNodeValue();
- }
- //设置dto
- TBasicDto dto=new TBasicDto();
- dto.setSerialId(serialId);
- dto.setSend(send);
- dto.setReceive(receive);
- dto.setInpatientNo(inpatientNo);
- dto.setName(name);
- dto.setJzh(jzh);
- dto.setAdmissDept(admissDept);
- dto.setAdmissDeptName(admissDeptName);
- dto.setAdmissDate(admissDate);
- dto.setAdmissTimes(admissTimes);
- dto.setAttending(attending);
- dto.setAttendingName(attendingName);
- dto.setAge(age);
- dto.setSex(sex);
- dto.setIdCard(idCard);
- dto.setSexName(sexName);
- dto.setWardCode(wardCode);
- dto.setWardName(wardName);
- dto.setSdryIndex(sdryIndex);
- dto.setStatu(statu);
- if("家庭病床".equals(admissType)){
- dto.setIsOther(2);
- }else{
- dto.setIsOther(0);
- }
- return dto;
- }
- public BedDoctorDto getBedDoctorDto(String str) {
- XmlUtil xml=XmlUtil.of(str);
- //id-消息流水号
- String serialId=null;
- Node serialIdNode = xml.getNode("/PRPA_HIP1233/id/@extension");
- if(Func.isNotEmpty(serialIdNode)){
- serialId=serialIdNode.getNodeValue();
- }
- //接受方
- String receive=null;
- Node receiveNode = xml.getNode("/PRPA_HIP1233/receiver/device/id/item/@extension");
- if(Func.isNotEmpty(receiveNode)){
- receive=receiveNode.getNodeValue();
- }
- //发送方
- String send=null;
- Node sendNode = xml.getNode("/PRPA_HIP1233/sender/device/id/item/@extension");
- if(Func.isNotEmpty(sendNode)){
- send=sendNode.getNodeValue();
- }
- //病案号
- String inpatientNo=null;
- Node inpatientNoNode = xml.getNode("/PRPA_HIP1233/controlActProcess/ihNum/@value");
- if(Func.isNotEmpty(inpatientNoNode)){
- inpatientNo=inpatientNoNode.getNodeValue();
- }
- //住院次数
- Integer admissTimes=null;
- Node admissTimesNode = xml.getNode("/PRPA_HIP1233/controlActProcess/ihTimes/@value");
- if(Func.isNotEmpty(admissTimesNode)){
- String nodeValue = admissTimesNode.getNodeValue();
- if(ObjectUtil.isNotEmpty(nodeValue)&&NumberUtil.isInteger(nodeValue)){
- admissTimes=Integer.parseInt(nodeValue);
- }
- }
- //管床医生工号
- String bedDoctor=null;
- Node bedDoctorNode = xml.getNode("/PRPA_HIP1233/controlActProcess/referPhysician/@code");
- if(Func.isNotEmpty(bedDoctorNode)){
- bedDoctor=bedDoctorNode.getNodeValue();
- }
- //管床医生姓名
- String bedDoctorName=null;
- Node bedDoctorNameNode = xml.getNode("/PRPA_HIP1233/controlActProcess/referPhysician/@value");
- if(Func.isNotEmpty(bedDoctorNameNode)){
- bedDoctorName=bedDoctorNameNode.getNodeValue();
- }
- //设置dto
- BedDoctorDto dto=new BedDoctorDto();
- dto.setSerialId(serialId);
- dto.setSend(send);
- dto.setReceive(receive);
- dto.setInpatientNo(inpatientNo);
- dto.setAdmissTimes(admissTimes);
- dto.setBedDoctor(bedDoctor);
- dto.setBedDoctorName(bedDoctorName);
- return dto;
- }
-
-}
-
diff --git a/src/main/java/com/docus/server/collection/webservice/impl/DeptServerImpl.java b/src/main/java/com/docus/server/collection/webservice/impl/DeptServerImpl.java
index cb0180d..b054ab6 100644
--- a/src/main/java/com/docus/server/collection/webservice/impl/DeptServerImpl.java
+++ b/src/main/java/com/docus/server/collection/webservice/impl/DeptServerImpl.java
@@ -1,20 +1,14 @@
package com.docus.server.collection.webservice.impl;
-import com.docus.core.util.DateUtil;
-import com.docus.core.util.Func;
-import com.docus.infrastructure.core.exception.BaseException;
import com.docus.server.collection.dto.DeptDto;
import com.docus.server.collection.service.IPowerDeptService;
-import com.docus.server.collection.util.IdUtil;
-import com.docus.server.collection.util.XmlUtil;
+import com.docus.server.collection.util.Result;
import com.docus.server.collection.webservice.IDeptServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
-import org.w3c.dom.Node;
import javax.annotation.Resource;
-import javax.jws.WebService;
-import java.util.Date;
+import java.util.Map;
/**
* @author wen yongbin
@@ -28,145 +22,18 @@ public class DeptServerImpl implements IDeptServer {
IPowerDeptService powerDeptService;
@Override
- public String deptModify(String receiveUser) {
- log.info("新增/修改科室数据:{}", receiveUser);
- DeptDto deptDto;
- String msgId = "";
- String receiver = "";
- try {
- deptDto = strToDeptDto(receiveUser);
- msgId = deptDto.getMessageId();
- receiver = deptDto.getReceiver();
- String operateType = deptDto.getOperateType();
- String delType = "D";
- // 判断操作类型
- if (Func.isNotEmpty(operateType) && operateType.contains(delType)) {
- powerDeptService.delDeptByDeptCode(deptDto.getDeptCode());
- } else {
- powerDeptService.register(deptDto);
- }
- return successMessage("操作成功!", msgId, receiver);
- } catch (BaseException e) {
- log.error(e.getMessage(), e);
- return failedMessage(e.getMessage(), msgId, receiver);
- } catch (Exception e) {
- log.error(e.getMessage(), e);
- return failedMessage("系统出错啦!", msgId, receiver);
- }
+ public String deptModify(Map msgInfo) {
+ DeptDto deptDto = this.strToDeptDto(msgInfo);
+ this.powerDeptService.register(deptDto);
+ return Result.success();
}
-
- /**
- * 接收科室参数解析 DeptDto 参数
- *
- * @param receiveUser 接收到的科室参数
- * @return UserDto
- */
- public DeptDto strToDeptDto(String receiveUser) {
-
- XmlUtil xmlParseUtil = XmlUtil.of(receiveUser);
- Node msgIdNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/id/@extension");
- Node receiverNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/receiver/device/id/item/@extension");
- Node operateTypeNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/@operateType");
- Node deptCodeNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/DEPT_CODE/@value");
- Node deptNameNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/DEPT_NAME/@value");
- Node authorIdNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/id/item/@extension");
- Node authorNameNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/assignedPerson/name/item/part/@value");
-
+ public DeptDto strToDeptDto(Map msgInfo) {
DeptDto deptDto = new DeptDto();
- deptDto.setMessageId(msgIdNode.getNodeValue());
- deptDto.setReceiver(receiverNode.getNodeValue());
- deptDto.setOperateType(operateTypeNode.getNodeValue());
- deptDto.setDeptCode(deptCodeNode.getNodeValue());
- deptDto.setDeptName(deptNameNode.getNodeValue());
- deptDto.setAuthorId(authorIdNode.getNodeValue());
- deptDto.setAuthorName(authorNameNode.getNodeValue());
+ deptDto.setDeptCode(msgInfo.get("DEPT_CLASS_CODE"));
+ deptDto.setDeptName(msgInfo.get("DEPT_CLASS_NAME"));
return deptDto;
}
- /**
- * @param message 成功消息提示
- * @param msgId 消息id
- * @param receiver 接收方
- * @return 成功消息
- */
- private String successMessage(String message, String msgId, String receiver) {
- String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
- return "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t \n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "";
- }
-
- /**
- * @param message 失败消息提示
- * @param msgId 消息id
- * @param receiver 接收方
- * @return 失败消息
- */
- private String failedMessage(String message, String msgId, String receiver) {
- String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
- return "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t \n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
- }
-
}
diff --git a/src/main/java/com/docus/server/collection/webservice/impl/ReceiveServerImpl.java b/src/main/java/com/docus/server/collection/webservice/impl/ReceiveServerImpl.java
index 2dde41f..4d39b6b 100644
--- a/src/main/java/com/docus/server/collection/webservice/impl/ReceiveServerImpl.java
+++ b/src/main/java/com/docus/server/collection/webservice/impl/ReceiveServerImpl.java
@@ -1,14 +1,15 @@
package com.docus.server.collection.webservice.impl;
-import com.docus.server.collection.webservice.BasicService;
+import cn.hutool.core.util.XmlUtil;
+import com.docus.server.collection.util.Result;
import com.docus.server.collection.webservice.IDeptServer;
import com.docus.server.collection.webservice.IUserServer;
import com.docus.server.collection.webservice.ReceiveServer;
-import com.docus.server.report.webservice.IReportServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
+import java.util.Map;
/**
* @BelongsProject: docus-webservice-sdry
@@ -22,199 +23,22 @@ import javax.annotation.Resource;
@Slf4j
public class ReceiveServerImpl implements ReceiveServer {
@Resource
- private IUserServer userServer;
+ private IDeptServer deptServer;
@Resource
- private IDeptServer deptServer;
- @Resource
- private BasicService basicService;
- @Resource
- private IReportServer reportServer;
-
-
- @Override
- public String deptModify(String receiveDept) {
- return deptServer.deptModify(receiveDept);
- }
-
- @Override
- public String setTBasic(String str) {
- return basicService.setTBasic(str);
- }
-
- @Override
- public String updateTBasic(String str) {
- return basicService.updateTBasic(str);
- }
-
- @Override
- public String setAdmissTBasic(String message) {
- return basicService.setAdmissTBasic(message);
- }
-
- @Override
- public String updateAdmissTBasic(String message) {
- return basicService.updateAdmissTBasic(message) ;
- }
-
- @Override
- public String setBedDoctor(String message) {
- return basicService.setBedDoctor(message);
- }
+ private IUserServer userServer;
@Override
- public String userModify(String receiveUser) {
- return userServer.userModify(receiveUser);
+ public String receiveMsg(String Msg) {
+ Map msgMap = XmlUtil.xmlToMap(Msg);
+ Map msgInfo = (Map) msgMap.get("Msg");
+ String dictCode = msgInfo.get("DICT_CODE");
+ if ("STAFF_DICT".equals(dictCode)) {
+ return this.userServer.userModify(msgInfo);
+ }
+ if ("DEPT_DICT".equals(dictCode)) {
+ return this.deptServer.deptModify(msgInfo);
+ }
+ return Result.success();
}
-
-
-
- @Override
- public String pushICUReport(String icuReportMessage) {
- return reportServer.pushICUReport(icuReportMessage);
- }
-
- @Override
- public String pushExaminationReport(String examinationReportMessage) {
- return reportServer.pushExaminationReport(examinationReportMessage);
- }
- @Override
- public String pdfUpload(String uploadMessage) {
- return reportServer.pdfUpload(uploadMessage);
- }
-
- @Override
- public String pushAddInspectionReport(String inspectionReportMessage) {
- return reportServer.pushAddInspectionReport(inspectionReportMessage);
- }
-
- @Override
- public String pushUpdateInspectionReport(String inspectionReportMessage) {
- return reportServer.pushUpdateInspectionReport(inspectionReportMessage);
- }
-
- @Override
- public String pushAddLaboratoryReport(String laboratoryMessage) {
- return reportServer.pushAddLaboratoryReport(laboratoryMessage);
- }
-
- @Override
- public String pushUpdateLaboratoryReport(String laboratoryMessage) {
- return reportServer.pushUpdateLaboratoryReport(laboratoryMessage);
- }
-
- @Override
- public String pushMaternalInfantRelationship(String maternalInfantRelationshipMessage) {
- return reportServer.pushMaternalInfantRelationship(maternalInfantRelationshipMessage);
- }
-
- @Override
- public String cancelHospital(String message) {
- return basicService.cancelHospital(message);
- }
-
- @Override
- public String querySdJxIndexTest(String xml) {
- System.out.println("收到那个人想查报告的动机,参数为:"+xml);
- return "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\tceshi1\n" +
- "\t\t\t\t\tceshi2\n" +
- "\t\t\t\t\tceshi3\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
- }
-
- @Override
- public String querySdJxIndexNoResultTest(String xml) {
- System.out.println("收到那个人想查报告的动机,参数为:"+xml);
- return "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
- }
}
diff --git a/src/main/java/com/docus/server/collection/webservice/impl/UserServerImpl.java b/src/main/java/com/docus/server/collection/webservice/impl/UserServerImpl.java
index a2739c5..f7fc574 100644
--- a/src/main/java/com/docus/server/collection/webservice/impl/UserServerImpl.java
+++ b/src/main/java/com/docus/server/collection/webservice/impl/UserServerImpl.java
@@ -1,19 +1,14 @@
package com.docus.server.collection.webservice.impl;
-import com.docus.core.util.DateUtil;
-import com.docus.core.util.Func;
-import com.docus.infrastructure.core.exception.BaseException;
import com.docus.server.collection.dto.UserDto;
import com.docus.server.collection.service.IPowerUserService;
-import com.docus.server.collection.util.IdUtil;
-import com.docus.server.collection.util.XmlUtil;
+import com.docus.server.collection.util.Result;
import com.docus.server.collection.webservice.IUserServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
-import org.w3c.dom.Node;
import javax.annotation.Resource;
-import java.util.Date;
+import java.util.Map;
/**
* @author wen yongbin
@@ -22,161 +17,40 @@ import java.util.Date;
@Service
@Slf4j
public class UserServerImpl implements IUserServer {
-
@Resource
IPowerUserService iPowerUserService;
@Override
- public String userModify(String receiveUser) {
- log.info("新增/修改用户数据:{}", receiveUser);
- UserDto userDto;
- String msgId = "";
- String receiver = "";
- try {
- userDto = strToUserDto(receiveUser);
- msgId = userDto.getMessageId();
- receiver = userDto.getReceiver();
- String operateType = userDto.getOperateType();
- String delType = "D";
- // 判断操作类型 是否是删除,或者 删除标记的
- boolean isDel = (Func.isNotEmpty(operateType) && operateType.contains(delType)) || userDto.isDelFlag();
- if (isDel) {
- iPowerUserService.delUserByUserName(userDto.getUserName());
- } else {
- iPowerUserService.register(userDto);
- }
- return successMessage("操作成功!", msgId, receiver);
- } catch (BaseException e) {
- log.error(e.getMessage(), e);
- return failedMessage(e.getMessage(), msgId, receiver);
- } catch (Exception e) {
- log.error(e.getMessage(), e);
- return failedMessage("系统出错啦!", msgId, receiver);
- }
+ public String userModify(Map msgInfo) {
+ log.info("新增/修改用户数据:{}", msgInfo);
+ UserDto userDto = this.strToUserDto(msgInfo);
+ this.iPowerUserService.register(userDto);
+ return Result.success();
}
-
- /**
- * 接收用户参数解析 UserDto参数
- *
- * @param receiveUser 接收到的用户参数
- * @return UserDto
- */
- public UserDto strToUserDto(String receiveUser) {
- final String notDelFlag = "1";
- XmlUtil xmlParseUtil = XmlUtil.of(receiveUser);
- Node msgIdNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/id/@extension");
- Node receiverNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/receiver/device/id/item/@extension");
- Node operateTypeNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/@operateType");
- Node employeeCodeNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/EMPL_CODE/@value");
- Node employeeNameNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/EMPL_NAME/@value");
- Node deptCodeNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/DEPT_CODE/@value");
- Node positionNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/POSI_NAME/@value");
- Node authorIdNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/id/item/@extension");
- Node authorNameNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/assignedPerson/name/item/part/@value");
- Node telephoneNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/EMPL_TEL/@value");
- Node delFlagNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/STATUS_CODE/@value");
- boolean isDel = !notDelFlag.equals(delFlagNode.getNodeValue());
+ public UserDto strToUserDto(Map msgInfo) {
UserDto userDto = new UserDto();
- userDto.setDeptId(deptCodeNode.getNodeValue());
- userDto.setReceiver(receiverNode.getNodeValue());
- userDto.setOperateType(operateTypeNode.getNodeValue());
- userDto.setUserName(employeeCodeNode.getNodeValue());
- userDto.setName(employeeNameNode.getNodeValue());
- userDto.setPosition(positionNode.getNodeValue());
- userDto.setAuthorId(authorIdNode.getNodeValue());
- userDto.setMessageId(msgIdNode.getNodeValue());
- userDto.setAuthorName(authorNameNode.getNodeValue());
+ String deptCode = removeLeadingAndTrailingComma(msgInfo.get("DEPT_CODE"));
+ userDto.setDeptId(deptCode);
+ userDto.setUserName(msgInfo.get("STAFF_CODE"));
+ userDto.setName(msgInfo.get("STAFF_NAME"));
+ userDto.setPosition(msgInfo.get("TITLE_LEVEL_NAME"));
userDto.setRoleId(0L);
- userDto.setTelephone(telephoneNode != null ? telephoneNode.getNodeValue() : "");
- userDto.setDelFlag(isDel);
return userDto;
}
- /**
- * @param message 成功消息提示
- * @param msgId 消息id
- * @param receiver 接收方
- * @return 成功消息
- */
- private String successMessage(String message, String msgId, String receiver) {
- String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
- return "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t \n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "";
+ public static String removeLeadingAndTrailingComma(String input) {
+ if (input == null || input.isEmpty()) {
+ return input;
+ }
+ input=input.trim();
+ // 使用正则表达式来删除前后的逗号
+ input = input.replaceAll("^,+|,+$", "");
+ return input;
}
- /**
- * @param message 失败消息提示
- * @param msgId 消息id
- * @param receiver 接收方
- * @return 失败消息
- */
- private String failedMessage(String message, String msgId, String receiver) {
- String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
- return "\n" +
- "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t \n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
+ public static void main(String[] args) {
+ System.out.println(removeLeadingAndTrailingComma(",hhh,jfa,fads,"));
}
-
}
diff --git a/src/main/java/com/docus/server/report/scheduler/JobScheduler.java b/src/main/java/com/docus/server/report/scheduler/JobScheduler.java
index 62e8bef..ca0018c 100644
--- a/src/main/java/com/docus/server/report/scheduler/JobScheduler.java
+++ b/src/main/java/com/docus/server/report/scheduler/JobScheduler.java
@@ -1,6 +1,5 @@
package com.docus.server.report.scheduler;
-import com.docus.server.report.thread.VerifyNisReportHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -14,13 +13,13 @@ public class JobScheduler {
private static final Logger logger = LoggerFactory.getLogger(JobScheduler.class);
public void init() throws Exception {
- VerifyNisReportHelper.getInstance().start();
+// VerifyNisReportHelper.getInstance().start();
logger.info(">>>>>>>>> init job admin success.");
}
public void destroy() throws Exception {
- VerifyNisReportHelper.getInstance().toStop();
+// VerifyNisReportHelper.getInstance().toStop();
}
}
diff --git a/src/test/java/com/docus/server/collection/webservice/impl/DeptServerImplTest.java b/src/test/java/com/docus/server/collection/webservice/impl/DeptServerImplTest.java
deleted file mode 100644
index 3416e14..0000000
--- a/src/test/java/com/docus/server/collection/webservice/impl/DeptServerImplTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package com.docus.server.collection.webservice.impl;
-
-import com.docus.server.collection.dto.DeptDto;
-import com.docus.server.collection.dto.DeptModifyParam;
-import com.docus.server.collection.dto.UserDto;
-import com.docus.server.collection.dto.UserModifyParam;
-import org.apache.cxf.endpoint.Client;
-import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
-import org.junit.Test;
-
-public class DeptServerImplTest {
- String xml = "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t
\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t- \n" +
- "\t\t\t\t\t\t
\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\t- \n" +
- "\t\t\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\t
\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
- @Test
- public void parseDeptDtoTest() {
- DeptServerImpl deptServer = new DeptServerImpl();
- DeptDto deptDto = deptServer.strToDeptDto(xml);
- DeptModifyParam addParam = deptDto.transDeptAddParam();
-
- System.out.println(deptDto);
- System.out.println(addParam);
- assert deptDto.getDeptName().equals(addParam.getDeptName());
- assert deptDto.getAuthorId().equals(addParam.getAuthorId());
- assert deptDto.getAuthorName().equals(addParam.getAuthorName());
- assert deptDto.getDeptCode().equals(addParam.getDeptCode());
- }
-
- @Test
- public void modifyWebserviceTest() throws Exception{
-// JaxWsDynamicClientFactory jaxWsDynamicClientFactory = JaxWsDynamicClientFactory.newInstance();
-// Client client = jaxWsDynamicClientFactory.createClient("http://localhost:9111/webservice/api/dept?wsdl");
-// Object[] invoke = client.invoke("deptModify", xml);
-// System.out.println(invoke[0].toString());
- }
-}
diff --git a/src/test/java/com/docus/server/collection/webservice/impl/UserServerImplTest.java b/src/test/java/com/docus/server/collection/webservice/impl/UserServerImplTest.java
deleted file mode 100644
index c38cad0..0000000
--- a/src/test/java/com/docus/server/collection/webservice/impl/UserServerImplTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package com.docus.server.collection.webservice.impl;
-
-import com.docus.server.collection.dto.UserDto;
-import com.docus.server.collection.dto.UserModifyParam;
-import org.junit.Test;
-
-public class UserServerImplTest {
- String xml = "\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t- \n" +
- "\t\t\t
\n" +
- "\t\t\n" +
- "\t\n" +
- "\t\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t
\n" +
- "\t\t\n" +
- "\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t- \n" +
- "\t\t\t\t\t\t
\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\t- \n" +
- "\t\t\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\t\t
\n" +
- "\t\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\t\n" +
- "\t\t\t\t\t\n" +
- "\t\t\t\t\n" +
- "\t\t\t\n" +
- "\t\t\n" +
- "\t\n" +
- "\n";
- @Test
- public void parseUserDtoTest() {
- UserServerImpl userServer = new UserServerImpl();
- UserDto userDto = userServer.strToUserDto(xml);
- UserModifyParam addParam = userDto.transUserAddParam();
- System.out.println(userServer);
- System.out.println(addParam);
- assert userDto.getUserName().equals(addParam.getUserName());
- assert userDto.getName().equals(addParam.getName());
- assert userDto.getAuthorId().equals(addParam.getAuthorId());
- assert userDto.getAuthorName().equals(addParam.getAuthorName());
- assert userDto.getDeptId().equals(addParam.getDeptId());
- assert userDto.getPosition().equals(addParam.getPosition());
- assert userDto.getRoleId().equals(addParam.getRoleId());
- }
-
- @Test
- public void modifyWebserviceTest() throws Exception{
-// JaxWsDynamicClientFactory jaxWsDynamicClientFactory = JaxWsDynamicClientFactory.newInstance();
-// Client client = jaxWsDynamicClientFactory.createClient("http://localhost:9111/webservice/api/user?wsdl");
-// Object[] invoke = client.invoke("userModify", xml);
-// System.out.println(invoke[0].toString());
- }
-}