report 测试流程

segment2.0
linrf 2 years ago
parent 17746be30a
commit bbbe66a8e0

@ -5,11 +5,12 @@ import com.docus.log.EnableTrackGroup;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.retry.annotation.EnableRetry;
@Slf4j
//@EnableFeignClients(basePackages = ("com.feign"))
@EnableFeignClients(basePackages = ("com.docus.core.excel.feign"))
//@EnableHystrix
//@MapperScan("com.docus.server.**.mapper")
@SpringBootApplication(scanBasePackages = {"com.docus"})

@ -12,21 +12,21 @@ spring:
datasource:
master:
url: jdbc:log4jdbc:mysql://db.docus.cn:3306/docus_archivefile?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
username: docus
password: docus702
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
his:
url: jdbc:log4jdbc:mysql://db.docus.cn:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
username: docus
password: docus702
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
redis:
host: redis.docus.cn
# password: JSdocus@702
password: JSdocus@702
cloud:
nacos:
discovery:
@ -39,12 +39,12 @@ spring:
shared-configs:
- comm.${spring.cloud.nacos.config.file-extension}
docus:
dbtype: mysql
user:
# 用户默认密码
defpwd: fd29cd53ec12616e5f36b77d4afffbff
mybatis-plus:
configuration:
map-underscore-to-camel-case: true

@ -1,12 +1,19 @@
package com.docus.server.tool;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.SingletonBeanRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
@ -65,6 +72,39 @@ public class SpringUtils implements ApplicationContextAware {
return applicationContext.getBeansOfType(type);
}
public static <T> T getBean(String beanName, Class<T> beanClass) {
return applicationContext.getBean(beanName, beanClass);
}
public static <T> T createBean(Class<T> beanClass) {
return applicationContext.getAutowireCapableBeanFactory().createBean(beanClass);
}
public static <T> List<T> getBeans(Class<T> beanClass) {
return new ArrayList<>(applicationContext.getBeansOfType(beanClass).values());
}
@SuppressWarnings("unchecked")
public static <T> T initializeBean(T bean) {
AutowireCapableBeanFactory beanFactory = applicationContext.getAutowireCapableBeanFactory();
beanFactory.autowireBean(bean);
return (T) beanFactory.initializeBean(bean, bean.getClass().getName());
}
public static void registerSingletonBean(String beanName, Class beanClass) {
GenericBeanDefinition definition = new GenericBeanDefinition();
definition.setBeanClass(beanClass);
definition.setScope(BeanDefinition.SCOPE_SINGLETON);
BeanDefinitionRegistry registry = (BeanDefinitionRegistry) applicationContext.getAutowireCapableBeanFactory();
registry.registerBeanDefinition(beanName, definition);
}
public static void registerSingletonBean(String beanName, Object bean) {
SingletonBeanRegistry registry = (SingletonBeanRegistry) applicationContext.getAutowireCapableBeanFactory();
registry.registerSingleton(beanName, bean);
}
public static Object invokeMethod(Class<?> requiredType, String methodName, Object[] params) {
Object service = getBean(requiredType);
Class<? extends Object>[] paramClass = null;

@ -13,12 +13,12 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* @BelongsProject: docus-webservice-sdry
* @BelongsPackage: com.docus.server.collection.webservice
* @Author: chierhao
* @CreateTime: 2023-02-25 14:52
* @Description: TODO
* @Version: 1.0
* @author wen yongbin
* @date 202322521:56:33
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*/
@Service
@Slf4j
@ -37,13 +37,6 @@ public class BasicServiceImpl implements IBasicService {
return null;
}
/**
* @param message
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*/
@Override
@TrackGroup(
group = "WEBSERVICE_XML_BASIC",

@ -15,6 +15,10 @@ import javax.annotation.Resource;
/**
* @author wen yongbin
* @date 202322521:56:33
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*/
@Service
@Slf4j
@ -22,13 +26,6 @@ public class DeptServerImpl implements IDeptServer {
@Resource
private CollectService collectService;
/**
* @param message
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*/
@Override
@TrackGroup(
group = "WEBSERVICE_XML_DEPT",

@ -15,6 +15,10 @@ import javax.annotation.Resource;
/**
* @author wyb
* @date 20233313:42:36
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*/
@Service
@Slf4j

@ -15,6 +15,10 @@ import javax.annotation.Resource;
/**
* @author wen yongbin
* @date 202322521:56:33
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*/
@Service
@Slf4j
@ -23,11 +27,10 @@ public class UserServerImpl implements IUserServer {
private CollectService collectService;
/**
* @param message
* @see com.docus.server.collect.infrastructure.dao.CollectTypeEnum
* @see com.docus.server.ws.convert.IConverter
* @see com.docus.server.ws.IWsResult
* @see VisitorProcessor
*
*
* @param message
* @return
*/
@Override
@TrackGroup(

@ -0,0 +1,25 @@
<!-- 报告接收 webservice 需要的数据对应下载服务,标签内有 xpath 路径,则取 接收xml中的数据否则取 标签 value值 -->
<REPORT>
<!--住院号-->
<INPATIENT_NO>/Request/Msg/INHOSP_INDEX_NO</INPATIENT_NO>
<!--住院流水号-->
<JZH>/Request/Msg/INHOSP_NO</JZH>
<!--住院次数-->
<ADMISS_TIMES>/Request/Msg/INHOSP_NUM</ADMISS_TIMES>
<!--采集流水号/报告唯一单号-->
<SERIALNUM>/Request/Msg/UNIQUE_FILE</SERIALNUM>
<!--文件标题-->
<FILE_TITLE>/Request/Msg/FILE_NAME</FILE_TITLE>
<!--下载地址-->
<DOWNURL>/Request/Msg/PDF_PATH</DOWNURL>
<!--表单类型 -->
<TABLE_TYPE>/Request/Msg/TABLE_TYPE</TABLE_TYPE>
<!--文件分类 无则取 TABLE_TYPE 在js-table-type中 取文件分类-->
<ASSORT_ID value="123456"> </ASSORT_ID>
<!--采集系统 文件表的source-->
<SYSTEM_FLAG>/Request/Msg/TABLE_TYPE</SYSTEM_FLAG>
<!--采集类型(文件来源 1:采集器2扫描生产软件)-->
<FILESOURCE value="1"> </FILESOURCE>
<!--文件保存位置类型 1:服务器本地2ftp服务器3共享文件夹-->
<FILE_STORAGE_TYPE value="1"> </FILE_STORAGE_TYPE>
</REPORT>

@ -0,0 +1,6 @@
{
"icu": "重症文件分段id",
"sa": "手麻文件分段id",
"examination": "检验报告文件分段id",
"other": "其他文件分段id"
}

@ -0,0 +1,25 @@
<!--嘉时软件webservice接收模板-->
<Request>
<Msg>
<!-- 消息ID号-->
<ID>123456</ID>
<!--住院号-->
<INHOSP_INDEX_NO>012345</INHOSP_INDEX_NO>
<!--住院流水号-->
<INHOSP_NO>012345</INHOSP_NO>
<!--住院次数-->
<INHOSP_NUM>2</INHOSP_NUM>
<!--表单类型-->
<TABLE_TYPE>icu</TABLE_TYPE>
<!--提交时间-->
<SUBMIT_TIME>20220303111800</SUBMIT_TIME>
<!--审核时间-->
<PROOF_TIME>20220303111801</PROOF_TIME>
<!-- 文件路径-->
<PDF_PATH>http://192.168.1.108:9012/file/0123_01.pdf</PDF_PATH>
<!--文件名-->
<FILE_NAME>0123_01</FILE_NAME>
<!--文件唯一值-->
<UNIQUE_FILE>AESHASHMD5DEFIND</UNIQUE_FILE>
</Msg>
</Request>

@ -0,0 +1,11 @@
<!--嘉时软件webservice响应模板-->
<Response>
<Result>
<!--响应状态码 0代表成功 500 代表失败-->
<Code>0</Code>
<!--消息id 请求的 /Request/Msg/ID-->
<MsgId>123456</MsgId>
<!--成功消息 / 失败异常消息-->
<Msg>成功!</Msg>
</Result>
</Response>
Loading…
Cancel
Save