Compare commits
No commits in common. 'master' and '首页签出2023/07/24' have entirely different histories.
master
...
首页签出2023/0
@ -1,68 +0,0 @@
|
|||||||
package com.docus.server.collection.config;
|
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
|
||||||
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
|
|
||||||
import com.baomidou.mybatisplus.core.MybatisConfiguration;
|
|
||||||
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
|
|
||||||
import org.apache.ibatis.session.SqlSessionFactory;
|
|
||||||
import org.apache.ibatis.type.JdbcType;
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
|
||||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
|
||||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@MapperScan(basePackages = com.docus.server.collection.config.DbMysqlConfig.PACKAGE, sqlSessionFactoryRef = "dbmysqlSqlSessionFactory")
|
|
||||||
@EnableConfigurationProperties(MybatisPlusProperties.class)
|
|
||||||
public class DbMysqlConfig {
|
|
||||||
// 这里一定要指定精准 否则后果不堪设想
|
|
||||||
static final String PACKAGE = "com.docus.server.collection.infrastructure.dao.mapper";
|
|
||||||
static final String MAPPER_LOCATION = "classpath:mapper/*.xml";
|
|
||||||
|
|
||||||
@Bean(name = "dbmysqlDataSource")
|
|
||||||
@ConfigurationProperties(prefix = "spring.datasource.mysql-docus")
|
|
||||||
public DataSource secondDataSource(){
|
|
||||||
return new DruidDataSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*注入事务*/
|
|
||||||
@Bean(name = "dbmysqlTransactionManager")
|
|
||||||
public DataSourceTransactionManager secondTransactionManager() {
|
|
||||||
return new DataSourceTransactionManager(secondDataSource());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean(name = "dbmysqlSqlSessionFactory")
|
|
||||||
public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dbmysqlDataSource") DataSource dataSource)
|
|
||||||
throws Exception {
|
|
||||||
//配置mybatis-plus源
|
|
||||||
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
|
|
||||||
//添加XML目录
|
|
||||||
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
|
||||||
bean.setMapperLocations(resolver.getResources(MAPPER_LOCATION));
|
|
||||||
// 实体类别名
|
|
||||||
bean.setTypeAliasesPackage("com.docus.server.collection.infrastructure.dao.entity.*");
|
|
||||||
MybatisConfiguration configuration = new MybatisConfiguration();
|
|
||||||
//开启下划线转驼峰
|
|
||||||
configuration.setMapUnderscoreToCamelCase(true);
|
|
||||||
configuration.setJdbcTypeForNull(JdbcType.NULL);
|
|
||||||
bean.setDataSource(dataSource);
|
|
||||||
bean.setConfiguration(configuration);
|
|
||||||
return bean.getObject();
|
|
||||||
//
|
|
||||||
// final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
|
|
||||||
// sessionFactory.setDataSource(secondDataSource);
|
|
||||||
// sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
|
|
||||||
// .getResources(DbMysqlConfig.MAPPER_LOCATION));
|
|
||||||
// return sessionFactory.getObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
package com.docus.server.collection.config;
|
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
|
||||||
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
|
|
||||||
import org.apache.ibatis.session.SqlSessionFactory;
|
|
||||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
|
||||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@MapperScan(basePackages = com.docus.server.collection.config.DbSqlserverConfig.PACKAGE, sqlSessionFactoryRef = "dbsqlserverSqlSessionFactory")
|
|
||||||
@EnableConfigurationProperties(MybatisPlusProperties.class)
|
|
||||||
public class DbSqlserverConfig {
|
|
||||||
// 这里一定要指定精准 否则后果不堪设想
|
|
||||||
static final String PACKAGE = "com.docus.server.collection.infrastructure.dao.sqlserver";
|
|
||||||
static final String MAPPER_LOCATION = "classpath:sqlserver/*.xml";
|
|
||||||
|
|
||||||
@Bean(name = "dbsqlserverDataSource")
|
|
||||||
@ConfigurationProperties(prefix = "spring.datasource.sqlserver-docus")
|
|
||||||
public DataSource secondDataSource(){
|
|
||||||
return new DruidDataSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*注入事务*/
|
|
||||||
@Bean(name = "dbsqlserverTransactionManager")
|
|
||||||
public DataSourceTransactionManager secondTransactionManager() {
|
|
||||||
return new DataSourceTransactionManager(secondDataSource());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean(name = "dbsqlserverSqlSessionFactory")
|
|
||||||
public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dbsqlserverDataSource") DataSource secondDataSource)
|
|
||||||
throws Exception {
|
|
||||||
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
|
|
||||||
sessionFactory.setDataSource(secondDataSource);
|
|
||||||
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
|
|
||||||
.getResources(com.docus.server.collection.config.DbSqlserverConfig.MAPPER_LOCATION));
|
|
||||||
return sessionFactory.getObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
package com.docus.server.collection.entity;
|
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import com.alibaba.excel.metadata.BaseRowModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @BelongsProject: docus-mzzy-collector
|
|
||||||
* @BelongsPackage: com.docus.server.collection.entity
|
|
||||||
* @Author: chierhao
|
|
||||||
* @CreateTime: 2024-07-31 15:47
|
|
||||||
* @Description: TODO
|
|
||||||
* @Version: 1.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class VJsjWzh7addnjreport extends BaseRowModel {
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "姓名")
|
|
||||||
@ExcelProperty(value = {"姓名"}, index =0 )
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "住院号")
|
|
||||||
@ExcelProperty(value = {"住院号"}, index =1 )
|
|
||||||
private String inpatientNo;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "类型")
|
|
||||||
@ExcelProperty(value = {"类型"}, index =2 )
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "申请科室")
|
|
||||||
@ExcelProperty(value = {"申请科室"}, index =3 )
|
|
||||||
private String dept;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目")
|
|
||||||
@ExcelProperty(value = {"项目"}, index =4 )
|
|
||||||
private String item;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "登记时间")
|
|
||||||
@ExcelProperty(value = {"登记时间"}, index =5 )
|
|
||||||
private Date registDateTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "报告时间")
|
|
||||||
@ExcelProperty(value = {"报告时间"}, index =6 )
|
|
||||||
private Date reportDateTime;
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
package com.docus.server.collection.entity;
|
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import com.alibaba.excel.metadata.BaseRowModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @BelongsProject: docus-mzzy-collector
|
|
||||||
* @BelongsPackage: com.docus.server.collection.entity
|
|
||||||
* @Author: chierhao
|
|
||||||
* @CreateTime: 2024-07-31 15:47
|
|
||||||
* @Description: TODO
|
|
||||||
* @Version: 1.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class VJsjWzh7addnjreportVo extends BaseRowModel {
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "姓名")
|
|
||||||
@ExcelProperty(value = {"姓名"}, index =0 )
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "住院号")
|
|
||||||
@ExcelProperty(value = {"住院号"}, index =1 )
|
|
||||||
private String inpatientNo;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "类型")
|
|
||||||
@ExcelProperty(value = {"类型"}, index =2 )
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "申请科室")
|
|
||||||
@ExcelProperty(value = {"申请科室"}, index =3 )
|
|
||||||
private String dept;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目")
|
|
||||||
@ExcelProperty(value = {"项目"}, index =4 )
|
|
||||||
private String item;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "登记时间")
|
|
||||||
@ExcelProperty(value = {"登记时间"}, index =5 )
|
|
||||||
private String registDateTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "报告时间")
|
|
||||||
@ExcelProperty(value = {"报告时间"}, index =6 )
|
|
||||||
private String reportDateTime;
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package com.docus.server.collection.feign.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.api.CommonResult;
|
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author ceh
|
|
||||||
*/
|
|
||||||
@FeignClient(url = "${docus.url.sign-out-url}",name = "Medicalrecord")
|
|
||||||
public interface MedicalrecordService {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @description 签出或返修
|
|
||||||
* @author chierhao
|
|
||||||
* @date 2023-10-08 11:00
|
|
||||||
* @param patientId
|
|
||||||
* @return: com.docus.infrastructure.web.api.CommonResult
|
|
||||||
*/
|
|
||||||
@PostMapping("/basic/tbasic/signOutOrBackRepair")
|
|
||||||
CommonResult signOutOrBackRepair(@RequestParam(value = "patientId") String patientId);
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
package com.docus.server.collection.infrastructure.dao.sqlserver;
|
|
||||||
|
|
||||||
import com.docus.server.collection.dto.VJsjWzh7addnjreportDto;
|
|
||||||
import com.docus.server.collection.entity.VJsjWzh7addnjreport;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @BelongsProject: docus-mzzy-collector
|
|
||||||
* @BelongsPackage: com.docus.server.collection.infrastructure.dao.mapper.sqlserver
|
|
||||||
* @Author: chierhao
|
|
||||||
* @CreateTime: 2024-07-31 14:31
|
|
||||||
* @Description: TODO
|
|
||||||
* @Version: 1.0
|
|
||||||
*/
|
|
||||||
public interface VJsjWzh7addnjreportMapper {
|
|
||||||
List<String> getList();
|
|
||||||
|
|
||||||
List<VJsjWzh7addnjreport> getReport(@Param("dto") VJsjWzh7addnjreportDto dto);
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
package com.docus.server.collection.rpc.impl;
|
|
||||||
|
|
||||||
import cn.hutool.http.HttpUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.docus.server.collection.rpc.MzZyyRocCurrWebCommonRpc;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 梅州中医院 roc curr-web 公共 api 接口实现
|
|
||||||
*
|
|
||||||
* @author YongBin Wen
|
|
||||||
* @date 2025/2/8 10:04
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
public class MzZyyRocCurrWebCommonRpcImpl implements MzZyyRocCurrWebCommonRpc {
|
|
||||||
@Value("${mzzyy.url.roc.curr-web: http://199.168.91.110:7800/roc/curr-web}")
|
|
||||||
private String rocCurrWebUrl;
|
|
||||||
@Value("${mzzyy.roc-domain: WZHBA}")
|
|
||||||
private String rocDomain;
|
|
||||||
@Value("${mzzyy.roc-key: b91b0ac7-665f-4874-a282-2f5511a44263}")
|
|
||||||
private String rocKey;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JSONObject queryDept(String deptCode, String deptType) {
|
|
||||||
final String path = "/api/v1/common/dept/query";
|
|
||||||
final String url = rocCurrWebUrl + path;
|
|
||||||
Map<String, Object> paramMap = new HashMap<>(2);
|
|
||||||
paramMap.put("deptCode", deptCode);
|
|
||||||
paramMap.put("deptType", deptType);
|
|
||||||
try {
|
|
||||||
String result = HttpUtil.createGet(url)
|
|
||||||
.header("Content-Type", "application/json")
|
|
||||||
.header("domain", rocDomain)
|
|
||||||
.header("key", rocKey)
|
|
||||||
.form(paramMap)
|
|
||||||
.timeout(60 * 1000)
|
|
||||||
.execute().body();
|
|
||||||
return JSONObject.parseObject(result);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(url + " 请求出错了," + ex.getMessage(), ex);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.docus.server.collection.infrastructure.dao.sqlserver.VJsjWzh7addnjreportMapper">
|
|
||||||
<select id="getList" resultType="java.lang.String">
|
|
||||||
SELECT 姓名
|
|
||||||
FROM dbo.v_jsj_wzh7addnjreport;
|
|
||||||
</select>
|
|
||||||
<select id="getReport" resultType="com.docus.server.collection.entity.VJsjWzh7addnjreport">
|
|
||||||
SELECT 姓名 name, 住院号 inpatientNo, 类型 type, 申请科室 dept, 项目 item, RegistDateTime registDateTime, ReportDateTime reportDateTime
|
|
||||||
FROM dbo.v_jsj_wzh7addnjreport
|
|
||||||
where
|
|
||||||
1=1
|
|
||||||
<if test="dto.startReportDateTime!=null and dto.startReportDateTime!='' and dto.endReportDateTime!=null and dto.endReportDateTime!=''">
|
|
||||||
and convert(varchar(10),ReportDateTime,120)between
|
|
||||||
#{dto.startReportDateTime} and #{dto.endReportDateTime}
|
|
||||||
</if>
|
|
||||||
<if test="dto.name!=null and dto.name!=''">
|
|
||||||
and 姓名 like CONCAT('%',#{dto.name},'%')
|
|
||||||
</if>
|
|
||||||
<if test="dto.inpatientNo!=null and dto.inpatientNo!=''">
|
|
||||||
and 住院号 like CONCAT('%',#{dto.inpatientNo},'%')
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
Loading…
Reference in New Issue