首次提交
This commit is contained in:
commit
3b1f1e2b0e
162
liscommon/pom.xml
Normal file
162
liscommon/pom.xml
Normal file
@ -0,0 +1,162 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>lisinterface8.0</artifactId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>liscommon</artifactId>
|
||||
<version>1.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>liscommon</name>
|
||||
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>8.2.2.jre8</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
||||
<!-- <artifactId>mssql-jdbc</artifactId>-->
|
||||
<!-- <version>12.8.1.jre11</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.7.22</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15to18</artifactId>
|
||||
<version>1.69</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<!-- <version>21.1.0.0</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.easyproject</groupId>
|
||||
<artifactId>orai18n</artifactId>
|
||||
<version>12.1.0.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 多数据源配置 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 中文转拼音 -->
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.1</version>
|
||||
</dependency>
|
||||
|
||||
<!--xml格式输出-->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--swagger2文档管理-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- WebService -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web-services</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- CXF webservice-->
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
|
||||
<version>3.5.4</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>3.5.4</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.woodstox</groupId>
|
||||
<artifactId>woodstox-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--HL7框架-->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi</groupId>
|
||||
<artifactId>hapi-base</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi</groupId>
|
||||
<artifactId>hapi-structures-v24</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi</groupId>
|
||||
<artifactId>hapi-structures-v251</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -0,0 +1,26 @@
|
||||
package com.czlisinterface.system.common;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.czlisinterface.system.pojo.Result;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
/**
|
||||
* 全局异常处理
|
||||
*/
|
||||
@Slf4j
|
||||
@RestControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
|
||||
@ExceptionHandler(value = Exception.class)
|
||||
public Result handle(Exception e){
|
||||
log.error("运行时异常",e);
|
||||
return new Result("-1", DateUtil.now()+"~r~n"+"接口异常:"+e.getMessage());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.czlisinterface.system.common;
|
||||
|
||||
import ch.qos.logback.classic.Level;
|
||||
import ch.qos.logback.classic.Logger;
|
||||
import ch.qos.logback.classic.spi.ILoggingEvent;
|
||||
import ch.qos.logback.classic.turbo.TurboFilter;
|
||||
import ch.qos.logback.core.filter.Filter;
|
||||
import ch.qos.logback.core.spi.FilterReply;
|
||||
import org.slf4j.Marker;
|
||||
|
||||
public class MapperTurboFilter extends Filter<ILoggingEvent> {
|
||||
private static final String MAPPER_PACKAGE_PREFIX = "com.czlisinterface";
|
||||
private static final String MAPPER_SUFFIX = "mapper.";
|
||||
|
||||
@Override
|
||||
public FilterReply decide(ILoggingEvent event) {
|
||||
String loggerName = event.getLoggerName();
|
||||
// 仅允许 Mapper 接口的日志进入 mysql_log
|
||||
if (loggerName.startsWith(MAPPER_PACKAGE_PREFIX) && loggerName.contains(MAPPER_SUFFIX)) {
|
||||
return FilterReply.ACCEPT; // 允许进入 mysql_log
|
||||
}
|
||||
return FilterReply.DENY; // 拒绝非 Mapper 日志进入 mysql_log
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.czlisinterface.system.common;
|
||||
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
|
||||
@Configuration // 标明是配置类
|
||||
@EnableSwagger2 //开启swagger功能
|
||||
public class SwaggerConfig {
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2) // DocumentationType.SWAGGER_2 固定的,代表swagger2
|
||||
// .groupName("分布式任务系统") // 如果配置多个文档的时候,那么需要配置groupName来分组标识
|
||||
.apiInfo(apiInfo()) // 用于生成API信息
|
||||
.select() // select()函数返回一个ApiSelectorBuilder实例,用来控制接口被swagger做成文档
|
||||
.apis(RequestHandlerSelectors.basePackage("com.czlisinterface")) // 用于指定扫描哪个包下的接口
|
||||
.paths(PathSelectors.any())// 选择所有的API,如果你想只为部分API生成文档,可以配置这里
|
||||
.build();
|
||||
|
||||
// //如果有额外的全局参数,比如说请求头参数,可以这样添加
|
||||
// ParameterBuilder parameterBuilder = new ParameterBuilder();
|
||||
// List<Parameter> parameters = new ArrayList<Parameter>();
|
||||
// parameterBuilder.name("authorization").description("令牌")
|
||||
// .modelRef(new ModelRef("string")).parameterType("header").required(false).build();
|
||||
// parameters.add(parameterBuilder.build());
|
||||
// return new Docket(DocumentationType.SWAGGER_2) // DocumentationType.SWAGGER_2 固定的,代表swagger2
|
||||
// .apiInfo(apiInfo()) // 用于生成API信息
|
||||
// .select() // select()函数返回一个ApiSelectorBuilder实例,用来控制接口被swagger做成文档
|
||||
// .apis(RequestHandlerSelectors.basePackage("com.example.controller")) // 用于指定扫描哪个包下的接口
|
||||
// .paths(PathSelectors.any())// 选择所有的API,如果你想只为部分API生成文档,可以配置这里
|
||||
// .build().globalOperationParameters(parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于定义API主界面的信息,比如可以声明所有的API的总标题、描述、版本
|
||||
* @return
|
||||
*/
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("lisinterface项目API") // 可以用来自定义API的主标题
|
||||
.description("lisinterface项目SwaggerAPI管理") // 可以用来描述整体的API
|
||||
.termsOfServiceUrl("") // 用于定义服务的域名
|
||||
.version("1.0") // 可以用来定义版本。
|
||||
.build(); //
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package com.czlisinterface.system.controller;
|
||||
|
||||
|
||||
|
||||
import com.czlisinterface.system.mapper.CommonMapper;
|
||||
import com.czlisinterface.system.pojo.ComUsr;
|
||||
import com.czlisinterface.system.pojo.Result;
|
||||
import com.czlisinterface.system.service.HISInterfaceService;
|
||||
import com.czlisinterface.system.utils.CommonUtil;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
public class LisInterfaceController {
|
||||
|
||||
@Resource
|
||||
HISInterfaceService hisInterfaceService;
|
||||
@Resource
|
||||
CommonMapper commonMapper;
|
||||
|
||||
|
||||
@PostMapping("/setreqstatus")
|
||||
public Result setReqStatus(@RequestBody String param){
|
||||
Result result = hisInterfaceService.setReqStatus(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("/setreport")
|
||||
public Result setReport(@RequestBody String param){
|
||||
Result result = hisInterfaceService.setReport(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("/setdict")
|
||||
public Result setDict(@RequestBody String param){
|
||||
Result result = hisInterfaceService.setDict(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("/getreqinterface")
|
||||
public Result getReqInterface(@RequestBody String param){
|
||||
Result result = hisInterfaceService.getReqInterface(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("/daymessage")
|
||||
public Result dayMessage(@RequestBody String param){
|
||||
Result result = hisInterfaceService.dayMessage(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("/invokehttp")
|
||||
public Result invokeHttp(@RequestBody String param){
|
||||
Result result = hisInterfaceService.invokeHttp(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * xml格式入参和出参
|
||||
// * @param param
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/invokehttpxml",consumes = MediaType.APPLICATION_XML_VALUE, produces = MediaType.APPLICATION_XML_VALUE)
|
||||
// public Response invokeHttpxml(@RequestBody String param){
|
||||
// Response response = hisInterfaceService.invokeHttpxml(param);
|
||||
// return response;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 对外调用,自定义格式
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/invokestr")
|
||||
public String invokeStr(@RequestBody String param){
|
||||
String s = hisInterfaceService.invokeStr(param);
|
||||
return s;
|
||||
}
|
||||
|
||||
@GetMapping("/test1")
|
||||
public String test1(String param){
|
||||
ComUsr userHISId = commonMapper.getUserHISId("00453");
|
||||
return "给的入参是:"+userHISId.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.ComDict;
|
||||
|
||||
|
||||
public interface ComDictMapper extends BaseMapper<ComDict> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.ComOpt;
|
||||
|
||||
|
||||
public interface ComOptMapper extends BaseMapper<ComOpt> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.ComUsrAudit;
|
||||
|
||||
|
||||
public interface ComUsrAuditMapper extends BaseMapper<ComUsrAudit> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.ComUsr;
|
||||
|
||||
|
||||
public interface ComUsrMapper extends BaseMapper<ComUsr> {
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
|
||||
import com.czlisinterface.system.pojo.*;
|
||||
import org.apache.ibatis.annotations.Options;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.mapping.StatementType;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CommonMapper {
|
||||
|
||||
@Select("{call sp_getnextseq_new(#{seqId,mode=IN,jdbcType=VARCHAR},#{retCode,mode=OUT,jdbcType=VARCHAR})}")
|
||||
@Options(statementType = StatementType.CALLABLE)
|
||||
void getNextSeq_pro(Map<String,String> params);
|
||||
|
||||
/**
|
||||
* 获取lis参数
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
String getOption(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据用户代码获取对应的HIS代码
|
||||
* @param yhdh
|
||||
* @return
|
||||
*/
|
||||
ComUsr getUserHISId(String yhdh);
|
||||
|
||||
Integer getUserCount(String yhdh);
|
||||
|
||||
/**
|
||||
* 获取套餐数据
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getFeeClassList(String sfxmdh);
|
||||
|
||||
/**
|
||||
* 获取数据库服务器时间
|
||||
* @return
|
||||
*/
|
||||
Date getCurrentTime();
|
||||
|
||||
|
||||
LabInstr getLabInstr(String yq);
|
||||
|
||||
|
||||
XmMed getXmMed(String ywdh);
|
||||
|
||||
List<Map<String,Object>> getDisLabReqdetail(String sqh);
|
||||
|
||||
String getLabReqdetail_bz2(Map<String,Object> map);
|
||||
|
||||
List<Hisinter_exec_log> getTopTask(Map<String,Object> map);
|
||||
|
||||
int getMaxComDict_BT();
|
||||
|
||||
String getBgddh(String sqxmdh);
|
||||
|
||||
List<Map<String,Object>> getxm_reqitem_vs_reportitem(String yq,String sqh);
|
||||
|
||||
/**
|
||||
* 取消审核日志
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Lis_patlog getLis_patlogOne(Map<String,Object> map);
|
||||
|
||||
List<LabPat> getLabPatList(String sqh,String yljg);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.ComPat;
|
||||
|
||||
|
||||
public interface CompatMapper extends BaseMapper<ComPat> {
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.Hisinter_exec_log;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Hisinter_exec_log_Mapper extends BaseMapper<Hisinter_exec_log> {
|
||||
List<Hisinter_exec_log> getTopData();
|
||||
List<Hisinter_exec_log> getTopDataTxt2();
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabFeeitemClass;
|
||||
|
||||
|
||||
public interface LabFeeitemClassMapper extends BaseMapper<LabFeeitemClass> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabFeeitemVsClass;
|
||||
|
||||
|
||||
public interface LabFeeitemVsClassMapper extends BaseMapper<LabFeeitemVsClass> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabPat;
|
||||
|
||||
|
||||
public interface LabPatMapper extends BaseMapper<LabPat> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabPatWarning;
|
||||
|
||||
|
||||
public interface LabPatWarningMapper extends BaseMapper<LabPatWarning> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabPatlog;
|
||||
|
||||
|
||||
public interface LabPatlogMapper extends BaseMapper<LabPatlog> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabReqdetailAudit;
|
||||
|
||||
|
||||
public interface LabReqdetailAuditMapper extends BaseMapper<LabReqdetailAudit> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabReqdetail;
|
||||
|
||||
|
||||
public interface LabReqdetailMapper extends BaseMapper<LabReqdetail> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabReqdetailNew;
|
||||
|
||||
|
||||
public interface LabReqdetailNewMapper extends BaseMapper<LabReqdetailNew> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabReqmainAudit;
|
||||
|
||||
|
||||
public interface LabReqmainAuditMapper extends BaseMapper<LabReqmainAudit> {
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabReqmain;
|
||||
|
||||
|
||||
public interface LabReqmainMapper extends BaseMapper<LabReqmain> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabReqreportPdffile;
|
||||
|
||||
|
||||
public interface LabReqreportPdffileMapper extends BaseMapper<LabReqreportPdffile> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabResultAudit;
|
||||
|
||||
|
||||
public interface LabResultAuditMapper extends BaseMapper<LabResultAudit> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabResult;
|
||||
|
||||
|
||||
public interface LabResultMapper extends BaseMapper<LabResult> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabResultWarning;
|
||||
|
||||
|
||||
public interface LabResultWarningMapper extends BaseMapper<LabResultWarning> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabResultmed;
|
||||
|
||||
|
||||
public interface LabResultmedMapper extends BaseMapper<LabResultmed> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.Lab_patinfo;
|
||||
|
||||
|
||||
public interface Lab_patinfoMapper extends BaseMapper<Lab_patinfo> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LabPatAudit;
|
||||
|
||||
|
||||
public interface LabpatAuditMapper extends BaseMapper<LabPatAudit> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.LisLog;
|
||||
|
||||
|
||||
public interface LisLogMapper extends BaseMapper<LisLog> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.Lis_patlog;
|
||||
|
||||
|
||||
public interface Lis_patlogMapper extends BaseMapper<Lis_patlog> {
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.Qc_frmsmpl;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface Qc_frmsmplMapper extends BaseMapper<Qc_frmsmpl> {
|
||||
String getMaxQc_frmsmpl(Map<String,Object> map);
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.XmFee;
|
||||
|
||||
|
||||
public interface XmFeeMapper extends BaseMapper<XmFee> {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.system.pojo.XmInfo;
|
||||
|
||||
|
||||
public interface XmInfoMapper extends BaseMapper<XmInfo> {
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("com_dict")
|
||||
public class ComDict {
|
||||
private String zdlb;
|
||||
private String zddh;
|
||||
private String zdmc;
|
||||
private String zjf;
|
||||
private String zdbz;
|
||||
private String yljg;
|
||||
private String bz;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("com_opt")
|
||||
public class ComOpt {
|
||||
private String yq;
|
||||
private String xxdh;
|
||||
private String xxlb;
|
||||
private String xxqz;
|
||||
private String bz;
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("com_pat")
|
||||
public class ComPat {
|
||||
private String brdh;
|
||||
private String brxm;
|
||||
private String xb;
|
||||
private Date sr;
|
||||
private String sfzh;
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("com_usr")
|
||||
public class ComUsr {
|
||||
private String yhdh;
|
||||
private String yhxm;
|
||||
private String vshisuser;
|
||||
private String vshisuser1;
|
||||
private String yljg;
|
||||
private String yhjs;
|
||||
private String vshisuser2;
|
||||
private String mm;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ComUsrAudit {
|
||||
private String yhdh;
|
||||
private String yhxm;
|
||||
private String mm;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@TableName("hisinter_exec_log")
|
||||
public class Hisinter_exec_log {
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private String level;
|
||||
private String recordid;
|
||||
private Date execdate;
|
||||
private String execuser;
|
||||
private String status;
|
||||
private String textlog;
|
||||
private String txt1;
|
||||
private String txt2;
|
||||
private String txt3;
|
||||
private String txt4;
|
||||
private String txt5;
|
||||
private String txt6;
|
||||
private String txt7;
|
||||
private String txt8;
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("LAB_FEEITEMCLASS")
|
||||
public class LabFeeitemClass {
|
||||
private String sflbdh;
|
||||
private String sflbmc;
|
||||
private String sflbjc;
|
||||
private Integer bkcolor;
|
||||
private String yblx;
|
||||
private String printcnt;
|
||||
private String sampletips;
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_feeitem_vs_class")
|
||||
public class LabFeeitemVsClass {
|
||||
private String sflbdh;
|
||||
private Integer xh;
|
||||
private String sfxmdh;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_instr")
|
||||
public class LabInstr {
|
||||
@TableId("yq")
|
||||
private String yq;
|
||||
private String yqmc;
|
||||
private String yqdl;
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_pat")
|
||||
public class LabPat {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String yblx;
|
||||
private String fb;
|
||||
private String ksdh;
|
||||
private String sjys;
|
||||
private String hdys;
|
||||
private String yhdh;
|
||||
private String brdh;
|
||||
private String brxm;
|
||||
private String brxb;
|
||||
private String brly;
|
||||
private String ch;
|
||||
private Integer nl;
|
||||
private String nldw;
|
||||
private String sqh;
|
||||
private Date sqsj;
|
||||
private Date dysj;
|
||||
private String dybz;
|
||||
private String jgbz;
|
||||
private String bbbz;
|
||||
private String zd;
|
||||
private String bz;
|
||||
private String bz1;
|
||||
private String zjf;
|
||||
private Date cyrq;
|
||||
private String bq;
|
||||
private String czybh;
|
||||
private String cjbw;
|
||||
private String jymd;
|
||||
private String lastuser;
|
||||
private Date lastdt;
|
||||
private String confirmer;
|
||||
private Date confirmdt;
|
||||
private String mzdy;
|
||||
private String fslx;
|
||||
private String ybzt;
|
||||
private String instrid;
|
||||
private String jzbz;
|
||||
private String sbbr;
|
||||
// private String qrr;
|
||||
// private Date qrsj;
|
||||
private String alarmflag;
|
||||
private String alarmconfirm;
|
||||
private Date alarmconfirmdt;
|
||||
private String mzh;
|
||||
private String yljg;
|
||||
private String finish;
|
||||
private String send_flag;
|
||||
private String sfzh;
|
||||
private String phone;
|
||||
private String phone1;
|
||||
private String addr;
|
||||
private String zjlx;
|
||||
private String upload;
|
||||
private String wyh;
|
||||
private String sn_tss;
|
||||
private String sn_result;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_pat_audit")
|
||||
public class LabPatAudit {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String yblx;
|
||||
private String fb;
|
||||
private String ksdh;
|
||||
private String sjys;
|
||||
private String hdys;
|
||||
private String yhdh;
|
||||
private String brdh;
|
||||
private String brxm;
|
||||
private String brxb;
|
||||
private String brly;
|
||||
private String ch;
|
||||
private Integer nl;
|
||||
private String nldw;
|
||||
private String sqh;
|
||||
private Date sqsj;
|
||||
private Date dysj;
|
||||
private String dybz;
|
||||
private String jgbz;
|
||||
private String bbbz;
|
||||
private String zd;
|
||||
private String bz;
|
||||
private String bz1;
|
||||
private String zjf;
|
||||
private Date cyrq;
|
||||
private String bq;
|
||||
private String czybh;
|
||||
private String cjbw;
|
||||
private String jymd;
|
||||
private String lastuser;
|
||||
private Date lastdt;
|
||||
private String confirmer;
|
||||
private Date confirmdt;
|
||||
private String mzdy;
|
||||
private String fslx;
|
||||
private String ybzt;
|
||||
private String instrid;
|
||||
private String jzbz;
|
||||
private String sbbr;
|
||||
// private String qrr;
|
||||
// private Date qrsj;
|
||||
private String alarmflag;
|
||||
private String alarmconfirm;
|
||||
private Date alarmconfirmdt;
|
||||
private String mzh;
|
||||
private String yljg;
|
||||
private String finish;
|
||||
private String send_flag;
|
||||
private String sfzh;
|
||||
private String phone;
|
||||
private String phone1;
|
||||
private String addr;
|
||||
private String zjlx;
|
||||
private String upload;
|
||||
private String wyh;
|
||||
private String encryptStr;
|
||||
private String sn_tss;
|
||||
private String sn_result;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("lab_patwarning")
|
||||
public class LabPatWarning {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String bgr;
|
||||
private String btzr;
|
||||
private String tzfs;
|
||||
private Date tzsj;
|
||||
private String bz;
|
||||
private String qrr;
|
||||
private Date qrsj;
|
||||
private String zt;
|
||||
private String qrr1;
|
||||
private Date qrsj1;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LabPatlog {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private Date xgrq;
|
||||
private String jgbz;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@TableName("lab_reqdetail")
|
||||
public class LabReqdetail {
|
||||
private String sqh;
|
||||
private Integer xh;
|
||||
private String sqxmdh;
|
||||
private String sqxmmc;
|
||||
private Integer sl;
|
||||
private BigDecimal dj;
|
||||
private String zt;
|
||||
private String jjzt;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
private BigDecimal costs;
|
||||
private Integer numbk1;
|
||||
private Integer numbk2;
|
||||
private Date dtbk1;
|
||||
private Date dtbk2;
|
||||
private String bz3;
|
||||
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_reqdetail_audit")
|
||||
public class LabReqdetailAudit {
|
||||
private String sqh;
|
||||
private Integer xh;
|
||||
private String sqxmdh;
|
||||
private String sqxmmc;
|
||||
private Integer sl;
|
||||
private BigDecimal dj;
|
||||
private String zt;
|
||||
private String jjzt;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
private BigDecimal costs;
|
||||
private Integer numbk1;
|
||||
private Integer numbk2;
|
||||
private Date dtbk1;
|
||||
private Date dtbk2;
|
||||
private String bz3;
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@TableName("lab_reqdetail_new")
|
||||
public class LabReqdetailNew {
|
||||
private String sqh;
|
||||
private Integer xh;
|
||||
private String sqxmdh;
|
||||
private String sqxmmc;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
private String bz3;
|
||||
private String bz4;
|
||||
private String bz5;
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@TableName("lab_reqmain")
|
||||
public class LabReqmain {
|
||||
private String sqh;
|
||||
private String ksdh;
|
||||
private String sqys;
|
||||
private Date sqsj;
|
||||
private String jsys;
|
||||
private Date jssj;
|
||||
private String zt;
|
||||
private String jjzt;
|
||||
private String brly;
|
||||
private String brdh;
|
||||
private String brxm;
|
||||
private String brxb;
|
||||
private Date brsr;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
private String bz3;
|
||||
private String jzbz;
|
||||
private String txm;
|
||||
private String ch;
|
||||
private String yblx;
|
||||
private String zxys;
|
||||
private Date zxsj;
|
||||
private String bgddh;
|
||||
private BigDecimal costs;
|
||||
private Integer nl;
|
||||
private String nldw;
|
||||
private String zd;
|
||||
private Date cysj;
|
||||
private Date cksj;
|
||||
private String yljg;
|
||||
private String kh;
|
||||
private String klx;
|
||||
private Date jzsj;
|
||||
private String jymd;
|
||||
private String sfzh;
|
||||
private String phone;
|
||||
private String phone1;
|
||||
private Date confirmtime;
|
||||
private String confirmer;
|
||||
private String cyr;
|
||||
private String addr;
|
||||
private String fb;
|
||||
private String bbsjr;
|
||||
private Date bbsjsj;
|
||||
//@TableField(exist = false)
|
||||
private String czid;
|
||||
// @TableField(exist = false)
|
||||
private String czmc;
|
||||
// @TableField(exist = false)
|
||||
private String jzjlid;
|
||||
// @TableField(exist = false)
|
||||
private String hzdh;
|
||||
// @TableField(exist = false)
|
||||
private String zxks;
|
||||
// @TableField(exist = false)
|
||||
private String hosid;
|
||||
private String lstd;
|
||||
private String jcptbz;
|
||||
private String slzq;
|
||||
private Date sjsj;
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@TableName("lab_reqmain_audit")
|
||||
public class LabReqmainAudit {
|
||||
private String sqh;
|
||||
private String ksdh;
|
||||
private String sqys;
|
||||
private Date sqsj;
|
||||
private String jsys;
|
||||
private Date jssj;
|
||||
private String zt;
|
||||
private String jjzt;
|
||||
private String brly;
|
||||
private String brdh;
|
||||
private String brxm;
|
||||
private String brxb;
|
||||
private Date brsr;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
private String bz3;
|
||||
private String jzbz;
|
||||
private String txm;
|
||||
private String ch;
|
||||
private String yblx;
|
||||
private String zxys;
|
||||
private Date zxsj;
|
||||
private String bgddh;
|
||||
private BigDecimal costs;
|
||||
private Integer nl;
|
||||
private String nldw;
|
||||
private String zd;
|
||||
private Date cysj;
|
||||
private Date cksj;
|
||||
private String yljg;
|
||||
private String kh;
|
||||
private String klx;
|
||||
private Date jzsj;
|
||||
private String jymd;
|
||||
private String sfzh;
|
||||
private String phone;
|
||||
private String phone1;
|
||||
private Date confirmtime;
|
||||
private String confirmer;
|
||||
private String cyr;
|
||||
private String addr;
|
||||
private String fb;
|
||||
private String bbsjr;
|
||||
private Date bbsjsj;
|
||||
//@TableField(exist = false)
|
||||
private String czid;
|
||||
// @TableField(exist = false)
|
||||
private String czmc;
|
||||
// @TableField(exist = false)
|
||||
private String jzjlid;
|
||||
// @TableField(exist = false)
|
||||
private String hzdh;
|
||||
// @TableField(exist = false)
|
||||
private String zxks;
|
||||
// @TableField(exist = false)
|
||||
private String hosid;
|
||||
private String lstd;
|
||||
private String jcptbz;
|
||||
private String slzq;
|
||||
private Date sjsj;
|
||||
private String encryptStr;
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@TableName("lab_reqreport_pdffile")
|
||||
public class LabReqreportPdffile {
|
||||
private String sqh;
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private Date filedt;
|
||||
private String BASE64PDF;
|
||||
private String filecontent;
|
||||
private String filetype;
|
||||
private String bz;
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_result")
|
||||
public class LabResult {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String xmdh;
|
||||
private String csjg;
|
||||
private String od;
|
||||
private String cutoff;
|
||||
private String jgbz;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
private String yhdh;
|
||||
private String textresult;
|
||||
private String instrid;
|
||||
private Date operdt;
|
||||
private String operna;
|
||||
private String refs;
|
||||
private String flag;
|
||||
private String dw;
|
||||
private String result_flag;
|
||||
private String alarm_flag;
|
||||
private String redo_flag;
|
||||
private String sqxmdh;
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_result_audit")
|
||||
public class LabResultAudit {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String xmdh;
|
||||
private String csjg;
|
||||
private String od;
|
||||
private String cutoff;
|
||||
private String jgbz;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
private String yhdh;
|
||||
private String textresult;
|
||||
private String instrid;
|
||||
private Date operdt;
|
||||
private String operna;
|
||||
private String refs;
|
||||
private String flag;
|
||||
private String dw;
|
||||
private String result_flag;
|
||||
private String alarm_flag;
|
||||
private String redo_flag;
|
||||
private String sqxmdh;
|
||||
private String encryptStr;
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_resultwarning")
|
||||
public class LabResultWarning {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String xmdh;
|
||||
private String csjg;
|
||||
private String jgbz;
|
||||
private String bz;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@TableName("lab_resultmed")
|
||||
public class LabResultmed {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String xmdh;
|
||||
private Integer xh;
|
||||
private String ywdh;
|
||||
private String mic;
|
||||
private String rad;
|
||||
private String csjg;
|
||||
private String jgbz;
|
||||
private String bz;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("lab_patinfo")
|
||||
public class Lab_patinfo {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String xxlb;
|
||||
private String val1;
|
||||
private String val2;
|
||||
private String val3;
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("t_lislog")
|
||||
public class LisLog {
|
||||
private String level;
|
||||
private Date logtime;
|
||||
private String yhdh;
|
||||
private String computer;
|
||||
private String ip;
|
||||
private String txt;
|
||||
private String ext1;
|
||||
private String ext2;
|
||||
private String ext3;
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lis_patlog")
|
||||
public class Lis_patlog {
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private Date xgrq;
|
||||
private String bz1;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("qc_frmsmpl")
|
||||
public class Qc_frmsmpl {
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private String zkph;
|
||||
private Integer cs;
|
||||
private String batchno;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 出参格式
|
||||
* {"resultCode":"","message":""}
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class Result {
|
||||
private String resultCode;
|
||||
private String message;
|
||||
private Object data;
|
||||
|
||||
public Result(String resultCode, String message) {
|
||||
super();
|
||||
this.resultCode = resultCode;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Result(String resultCode, String message, Object data) {
|
||||
this.resultCode = resultCode;
|
||||
this.message = message;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("xm_fee")
|
||||
public class XmFee {
|
||||
private String sfxmdh;
|
||||
private String sfxmmc;
|
||||
private String xmlb;
|
||||
private BigDecimal dj;
|
||||
private String zjf;
|
||||
private String yljg;
|
||||
private String bz;
|
||||
private String spec;
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class XmInfo {
|
||||
private String yq;
|
||||
private String xmdh;
|
||||
private String xmmc;
|
||||
private String zhbdh;
|
||||
private String bgdh;
|
||||
private String dyckz;
|
||||
private String dylx;
|
||||
private String xmlb;
|
||||
private String dw;
|
||||
private BigDecimal llimit;
|
||||
private BigDecimal hlimit;
|
||||
private Integer dyxh;
|
||||
private BigDecimal cksx;
|
||||
private BigDecimal ckxx;
|
||||
private String jsxm;
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.czlisinterface.system.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@TableName("xm_med")
|
||||
public class XmMed {
|
||||
@TableId("ywdh")
|
||||
private String ywdh;
|
||||
private String ywmc;
|
||||
private String yf;
|
||||
private Integer seq;
|
||||
private String medno;
|
||||
|
||||
}
|
||||
@ -0,0 +1,205 @@
|
||||
package com.czlisinterface.system.service;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.czlisinterface.system.pojo.LabPatWarning;
|
||||
import com.czlisinterface.system.pojo.LabReqmain;
|
||||
import com.czlisinterface.system.pojo.Result;
|
||||
import com.czlisinterface.system.utils.CommonUtil;
|
||||
import com.czlisinterface.system.utils.LisWarningUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通用外部接口
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class CommonExt {
|
||||
|
||||
|
||||
@Resource
|
||||
LisWarningUtil lisWarningUtil;
|
||||
@Resource
|
||||
CommonUtil commonUtil;
|
||||
|
||||
/**
|
||||
* 修改危急值表数据
|
||||
* {
|
||||
* "method": "sampleaction",
|
||||
* "rmmsg": {
|
||||
* "actionflag": "1",
|
||||
* "resultalertid": "20130201|XS500I|29",
|
||||
* "userno": "9999",
|
||||
* "actiontime": "2023-03-01 09:00:00",
|
||||
* "actioninfo": ""
|
||||
* }
|
||||
* }
|
||||
* @return
|
||||
*/
|
||||
public Result sampleaction(String json){
|
||||
JSONObject jsonObject = JSONUtil.parseObj(json);
|
||||
JSONObject rmmsg = (JSONObject) jsonObject.get("rmmsg");
|
||||
String actionflag = String.valueOf(rmmsg.get("actionflag")); //处理标志 1: 已确认;2: 已处理
|
||||
String resultalertid = String.valueOf(rmmsg.get("resultalertid")); //报告单号 LIS报告单主键
|
||||
String userno = String.valueOf(rmmsg.get("userno")); //处理人
|
||||
String actiontime = String.valueOf(rmmsg.get("actiontime")); //处理时间 yyyy-mm-dd HH:MM:SS
|
||||
String type = "";
|
||||
try{
|
||||
type = String.valueOf(rmmsg.get("type")); //处理时间 yyyy-mm-dd HH:MM:SS
|
||||
}catch (Exception e){
|
||||
type = "";
|
||||
}
|
||||
|
||||
Date confirmDate = null;
|
||||
String actionMsg = null;
|
||||
try{
|
||||
confirmDate = DateUtil.parse(actiontime, "yyyy-MM-dd HH:mm:ss");
|
||||
}catch (Exception e){
|
||||
return new Result("-1","日期格式不合法");
|
||||
}
|
||||
String actioninfo = String.valueOf(rmmsg.get("actioninfo")); //处理意见
|
||||
List<String> stringList = StrUtil.split(resultalertid, "|");
|
||||
if(stringList.size() != 3){
|
||||
return new Result("-1","resultalertid传值不正确!");
|
||||
}
|
||||
String jyrq = stringList.get(0);
|
||||
String yq = stringList.get(1);
|
||||
String ybh = stringList.get(2);
|
||||
|
||||
if(actioninfo == null || actioninfo.equals("")){
|
||||
if(actionflag.equals("1")){
|
||||
actionMsg = "已确认";
|
||||
}else{
|
||||
actionMsg = "已处理";
|
||||
}
|
||||
}else{
|
||||
actionMsg = actioninfo;
|
||||
}
|
||||
|
||||
if(type.equals("") || type.equals("1")){
|
||||
LabPatWarning labPatWarning = new LabPatWarning();
|
||||
labPatWarning.setQrr(userno);
|
||||
labPatWarning.setQrsj(confirmDate);
|
||||
labPatWarning.setBz(actionMsg);
|
||||
int update = lisWarningUtil.updatePatWarning(labPatWarning, DateUtil.parse(jyrq, "yyyyMMdd"), yq, ybh);
|
||||
if(update >= 0){
|
||||
return new Result("0","修改数据成功!");
|
||||
}else{
|
||||
return new Result("-1","修改危急值表数据失败!");
|
||||
}
|
||||
}
|
||||
if(type.equals("2")){
|
||||
LabPatWarning labPatWarning1 = new LabPatWarning();
|
||||
labPatWarning1.setQrr1(userno);
|
||||
labPatWarning1.setQrsj1(confirmDate);
|
||||
labPatWarning1.setBz(actionMsg);
|
||||
int update = lisWarningUtil.updatePatWarning(labPatWarning1, DateUtil.parse(jyrq, "yyyyMMdd"), yq, ybh);
|
||||
if(update >= 0){
|
||||
return new Result("0","修改数据成功!");
|
||||
}else{
|
||||
return new Result("-1","修改危急值表数据失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return new Result("-1","入参参数不对!");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 采样登记
|
||||
* {
|
||||
* "method": "getSamplingTime",
|
||||
* "data": {
|
||||
* "MuterID": "",
|
||||
* "OperatorID": "",
|
||||
* "OperatorName":"",
|
||||
* "OperateTime": "",
|
||||
* "bz":""
|
||||
* }
|
||||
* }
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
public Result getSamplingTime(String json){
|
||||
JSONObject jsonObject = JSONUtil.parseObj(json);
|
||||
JSONObject jsonObjectData = (JSONObject)jsonObject.get("data");
|
||||
String muterID = jsonObjectData.getStr("MuterID");
|
||||
String operatorID = jsonObjectData.getStr("OperatorID");
|
||||
String operateTime = jsonObjectData.getStr("OperateTime");
|
||||
LabReqmain labReqmain = new LabReqmain();
|
||||
labReqmain.setCyr(operatorID);
|
||||
labReqmain.setCysj(DateUtil.parse(operateTime,"yyyy-MM-dd HH:mm:ss"));
|
||||
try{
|
||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(muterID);
|
||||
String zt = labReqmainOne.getZt();
|
||||
if(!zt.equals("1") && !zt.equals("11") && !zt.equals("8") && !zt.equals("12")){
|
||||
log.error("服务标识:getSamplingTime"+"\r\n入参:"+json+"\r\n出参:"+ new Result("-1","修改申请单状态失败,该标本:"+muterID+"已送检或者已上机或者已报告,不允许修改采样时间!") );
|
||||
return new Result("-1","修改申请单状态失败,该标本:"+muterID+"已送检或者已上机或者已报告,不允许修改采样时间!");
|
||||
}
|
||||
|
||||
//如果申请单状态是新开或者已打印 状态,则把状态变成已采样
|
||||
if(zt.equals("1") || zt.equals("11")){
|
||||
labReqmain.setZt("12");
|
||||
}
|
||||
commonUtil.updateLabReqmain(labReqmain,muterID);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("服务标识:getSamplingTime"+"\r\n入参:"+json+"\r\n出参:"+ new Result("-1","修改LIS申请单状态失败:"+e));
|
||||
return new Result("-1","修改LIS申请单状态失败:"+e.getMessage());
|
||||
}
|
||||
return new Result("0","修改状态成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 标本送检
|
||||
* {
|
||||
* "method": "getInspectTime",
|
||||
* "data": {
|
||||
* "MuterID": "",
|
||||
* "OperatorID": "",
|
||||
* "OperatorName":"",
|
||||
* "OperateTime": "",
|
||||
* "bz":""
|
||||
* }
|
||||
* }
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
public Result getInspectTime(String json){
|
||||
JSONObject jsonObject = JSONUtil.parseObj(json);
|
||||
JSONObject jsonObjectData = (JSONObject)jsonObject.get("data");
|
||||
String muterID = jsonObjectData.getStr("MuterID");
|
||||
String operatorID = jsonObjectData.getStr("OperatorID");
|
||||
String operateTime = jsonObjectData.getStr("OperateTime");
|
||||
LabReqmain labReqmain = new LabReqmain();
|
||||
labReqmain.setBbsjr(operatorID);
|
||||
labReqmain.setBbsjsj(DateUtil.parse(operateTime,"yyyy-MM-dd HH:mm:ss"));
|
||||
try{
|
||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(muterID);
|
||||
String zt = labReqmainOne.getZt();
|
||||
if(!zt.equals("1") && !zt.equals("12") && !zt.equals("8") && !zt.equals("13")){
|
||||
log.error("服务标识:getInspectTime"+"\r\n入参:"+json+"\r\n出参:"+ new Result("-1","修改申请单状态失败,该标本:"+muterID+"已送检或者已上机或者已报告,不允许修改送检时间!") );
|
||||
return new Result("-1","修改申请单状态失败,该标本:"+muterID+"已送检或者已上机或者已报告,不允许修改送检时间!");
|
||||
}
|
||||
|
||||
//如果申请单状态是新开或者已打印 状态,则把状态变成已送检
|
||||
if(zt.equals("1") || zt.equals("12")){
|
||||
labReqmain.setZt("13");
|
||||
}
|
||||
commonUtil.updateLabReqmain(labReqmain,muterID);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("服务标识:getInspectTime"+"\r\n入参:"+json+"\r\n出参:"+ new Result("-1","修改LIS申请单状态失败:"+e));
|
||||
return new Result("-1","修改LIS申请单状态失败:"+e.getMessage());
|
||||
}
|
||||
return new Result("0","修改状态成功!");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.czlisinterface.system.service;
|
||||
|
||||
|
||||
import com.czlisinterface.system.pojo.Result;
|
||||
|
||||
public interface HISInterfaceService {
|
||||
/**
|
||||
* 执行条码状态接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Result setReqStatus(String param);
|
||||
|
||||
/**
|
||||
* 发送报告接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Result setReport(String param);
|
||||
|
||||
/**
|
||||
* 字典接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Result setDict(String param);
|
||||
|
||||
/**
|
||||
* 获取病人信息接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Result getReqInterface(String param);
|
||||
|
||||
/**
|
||||
* 自定义接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Result dayMessage(String param);
|
||||
|
||||
/**
|
||||
* 提供给外部调用的接口
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Result invokeHttp(String param);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 自定义格式外部调用
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
String invokeStr(String param);
|
||||
|
||||
}
|
||||
@ -0,0 +1,291 @@
|
||||
package com.czlisinterface.system.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.czlisinterface.system.pojo.*;
|
||||
import com.czlisinterface.system.service.CommonExt;
|
||||
import com.czlisinterface.system.service.HISInterfaceService;
|
||||
import com.czlisinterface.system.utils.CommonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class CommonImpl implements HISInterfaceService {
|
||||
|
||||
|
||||
@Resource
|
||||
public CommonExt commonExt;
|
||||
|
||||
|
||||
|
||||
//{"ip":"","userid":"","sqh":"","status":""}
|
||||
@Override
|
||||
public Result setReqStatus(String param) {
|
||||
log.info("调用了setReqStatus:"+param);
|
||||
return new Result("-1","修改状态接口未实现!");
|
||||
}
|
||||
|
||||
//{"ip":"","userid":"","yq":"","jyrq":"","ybh":"","status":""}
|
||||
@Override
|
||||
public Result setReport(String param) {
|
||||
log.info("调用了setReport:"+param);
|
||||
return new Result("-1","发送报告接口未实现!");
|
||||
}
|
||||
|
||||
//{"ip":"","userid":"","zdlb":"","yljg":""}
|
||||
@Override
|
||||
public Result setDict(String param) {
|
||||
Result result = null;
|
||||
JSONObject jsonObject = JSONUtil.parseObj(param);
|
||||
String ip = (String) jsonObject.get("ip");
|
||||
String userid = (String) jsonObject.get("userid");
|
||||
String zdlb = (String) jsonObject.get("zdlb");
|
||||
String yljg = (String) jsonObject.get("yljg");
|
||||
|
||||
switch (zdlb){
|
||||
case "DP": //科室
|
||||
result = getDictDP(yljg);
|
||||
break;
|
||||
case "SRD": //人员
|
||||
result = getDictSRD(yljg);
|
||||
break;
|
||||
case "FEE": //套餐字典
|
||||
result = getDictFEE(yljg);
|
||||
break;
|
||||
case "WR": //病区
|
||||
result = getDictWR(yljg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(result != null){
|
||||
return result;
|
||||
}else{
|
||||
return new Result("-1","获取字典信息接口未实现!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//{"yljg":"","brdh":"","brly":"","dept":"","sqh":"","userid":"","stime":"","etime":"","bz1":""}
|
||||
@Override
|
||||
public Result getReqInterface(String param) {
|
||||
Result result = null;
|
||||
log.info("调用了getReqInterface,入参:"+param);
|
||||
JSONObject jsonObject = JSONUtil.parseObj(param);
|
||||
String yljg = (String) jsonObject.get("yljg");
|
||||
String brdh = (String) jsonObject.get("brdh");
|
||||
String brly = (String)jsonObject.get("brly");
|
||||
String dept = (String) jsonObject.get("dept");
|
||||
String userid = (String)jsonObject.get("userid");
|
||||
String sqh = (String) jsonObject.get("sqh");
|
||||
String bz1 = "";
|
||||
try {
|
||||
bz1 = String.valueOf(jsonObject.get("bz1"));
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
if(bz1.equals("null")) bz1 = "";
|
||||
log.info("调用了getReqInterface:"+"yljg:"+yljg+";brdh:"+brdh+";brly:"+brly+";dept:"+dept+";userid:"+userid+";bz1:"+bz1);
|
||||
String stime = null;
|
||||
String etime = null;
|
||||
Date d_stime = null;
|
||||
Date d_etime = null;
|
||||
try{
|
||||
stime = (String) jsonObject.get("stime");
|
||||
d_stime = DateUtil.parse(stime);
|
||||
etime = (String) jsonObject.get("etime");
|
||||
d_etime = DateUtil.parse(etime);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
return new Result("-1","日期时间格式不正确!");
|
||||
}
|
||||
|
||||
String ksdh = (String) jsonObject.get("dept");
|
||||
if(dept != null && !dept.equals("")){
|
||||
result = getReqInfo_ksdh(dept, d_stime, d_etime, userid, yljg);
|
||||
}
|
||||
if(brdh != null && !brdh.equals("")){
|
||||
result = getReqInfo_brdh(brdh, brly, d_stime, d_etime, userid, yljg);
|
||||
}
|
||||
if(sqh != null && !sqh.equals("")){
|
||||
result = getReqInfo_sqh(sqh, userid);
|
||||
}
|
||||
if(result != null ) {
|
||||
return result;
|
||||
}else{
|
||||
return new Result("-1","获取申请单接口未实现!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//{"ip":"","userid":"","msgid":"","msg":"","yljg":""}
|
||||
@Override
|
||||
public Result dayMessage(String param) {
|
||||
log.info("调用了dayMessage接口,入参:{}",param);
|
||||
return new Result("-1","dayMessage接口未实现!");
|
||||
}
|
||||
|
||||
//{"method":"","data":""}
|
||||
//外部接口,格式会变化
|
||||
@Override
|
||||
public Result invokeHttp(String param) {
|
||||
//始终保持有method这个字段
|
||||
log.info("PB传入的json:"+param);
|
||||
JSONObject jsonObject = null;
|
||||
try{
|
||||
jsonObject = JSONUtil.parseObj(param);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
return new Result("-1","json格式不合法");
|
||||
}
|
||||
String method = String.valueOf(jsonObject.get("method"));
|
||||
if(method == null || method.equals("") || method.equals("null")){
|
||||
return new Result("-1","json格式不正确,必须包含method节点");
|
||||
}
|
||||
try {
|
||||
// 1. 优先查找当前实例自身及父类(直到CommonImpl)中的方法
|
||||
Method targetMethod = findMethodInHierarchy(this.getClass(), method);
|
||||
if (targetMethod != null) {
|
||||
// 执行当前类或父类中的方法(this为当前实例,可能是子类对象)
|
||||
Object result = targetMethod.invoke(this, param);
|
||||
return (Result) result;
|
||||
}
|
||||
|
||||
// 2. 若未找到,再查找commonExt中的方法
|
||||
Method extMethod = commonExt.getClass().getMethod(method, String.class);
|
||||
Object extResult = extMethod.invoke(commonExt, param);
|
||||
return (Result) extResult;
|
||||
}catch (NoSuchMethodException e) {
|
||||
// 方法不存在的情况
|
||||
return new Result("1", "该接口还未实现!", method);
|
||||
} catch (IllegalAccessException e) {
|
||||
// 方法访问权限不足(如private方法)
|
||||
log.error("方法访问权限不足:",e);
|
||||
return new Result("-1", "方法访问失败:" + e.getMessage());
|
||||
} catch (InvocationTargetException e) {
|
||||
// 方法执行过程中抛出异常
|
||||
Throwable targetException = e.getTargetException();
|
||||
log.error("方法执行异常:",e);
|
||||
return new Result("-1", "方法执行异常:" + targetException.getMessage());
|
||||
} catch (ClassCastException e) {
|
||||
// 方法返回值不是Result类型
|
||||
return new Result("-1", "方法返回值类型错误");
|
||||
}
|
||||
|
||||
// switch (method){
|
||||
// case "sampleaction":
|
||||
// //危急值接口
|
||||
// return commonExt.sampleaction(param);
|
||||
// case "getSamplingTime": //采样登记
|
||||
// return commonExt.getSamplingTime(param);
|
||||
// case "getInspectTime": //标本送检
|
||||
// return commonExt.getInspectTime(param);
|
||||
// default:
|
||||
// return new Result("-1","该接口还未实现!",method);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String invokeStr(String param) {
|
||||
return "接口未定义!!!";
|
||||
}
|
||||
|
||||
|
||||
public Result getReqInfo_brdh(String brdh, String brly, Date stime,Date etime,String userId,String yljg){
|
||||
// log.info("ceshi");
|
||||
return new Result("-1","根据病人代码获取病人申请单未定义接口");
|
||||
}
|
||||
|
||||
public Result getReqInfo_ksdh(String ksdh,Date stime,Date etime,String userId,String yljg){
|
||||
return new Result("-1","根据科室获取申请单未定义接口");
|
||||
}
|
||||
|
||||
public Result getReqInfo_sqh(String sqh,String userId){
|
||||
return new Result("-1","根据条码获取申请单未定义接口");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取科室
|
||||
* @param yljg
|
||||
* @return
|
||||
*/
|
||||
public Result getDictDP(String yljg){
|
||||
return new Result("-1","获取科室字典接口未定义");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取套餐字典
|
||||
* @param yljg
|
||||
* @return
|
||||
*/
|
||||
public Result getDictFEE(String yljg){
|
||||
return new Result("-1","获取套餐字典接口未定义");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员字典
|
||||
* @param yljg
|
||||
* @return
|
||||
*/
|
||||
public Result getDictSRD(String yljg){
|
||||
return new Result("-1","获取人员字典接口未定义");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病区字典
|
||||
* @param yljg
|
||||
* @return
|
||||
*/
|
||||
public Result getDictWR(String yljg){
|
||||
return new Result("-1","获取病区字典接口未定义");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 在当前类及其父类(直到CommonImpl)中查找指定名称和参数的方法
|
||||
* @param clazz 当前类的Class对象
|
||||
* @param methodName 方法名
|
||||
* @return 找到的方法,未找到则返回null
|
||||
*/
|
||||
private Method findMethodInHierarchy(Class<?> clazz, String methodName) {
|
||||
// 遍历类的继承链,直到CommonImpl为止(不包括Object)
|
||||
while (clazz != null && !clazz.equals(Object.class)) {
|
||||
try {
|
||||
// 查找当前类中参数为String的public/protected/default/private方法
|
||||
Method method = clazz.getDeclaredMethod(methodName, String.class);
|
||||
// 允许访问私有/保护方法
|
||||
method.setAccessible(true);
|
||||
return method;
|
||||
} catch (NoSuchMethodException e) {
|
||||
// 当前类未找到,继续查找父类
|
||||
clazz = clazz.getSuperclass();
|
||||
// 若父类不是CommonImpl或其子类,停止遍历(避免无意义查找)
|
||||
if (clazz != null && !CommonImpl.class.isAssignableFrom(clazz)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,957 @@
|
||||
package com.czlisinterface.system.utils;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.czlisinterface.system.mapper.*;
|
||||
import com.czlisinterface.system.pojo.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class CommonUtil {
|
||||
|
||||
|
||||
@Resource
|
||||
private LabPatMapper labPatMapper;
|
||||
@Resource
|
||||
private LabReqmainMapper labReqmainMapper;
|
||||
@Resource
|
||||
private LabReqdetailMapper labReqdetailMapper;
|
||||
@Resource
|
||||
private CommonMapper commonMapper;
|
||||
@Resource
|
||||
private ComDictMapper comDictMapper;
|
||||
@Resource
|
||||
private XmFeeMapper xmFeeMapper;
|
||||
@Resource
|
||||
private XmInfoMapper xmInfoMapper;
|
||||
@Resource
|
||||
private LabResultMapper labResultMapper;
|
||||
@Resource
|
||||
private LabResultmedMapper labResultmedMapper;
|
||||
@Resource
|
||||
public Hisinter_exec_log_Mapper hisinterExecLogMapper;
|
||||
@Resource
|
||||
private LabReqdetailNewMapper labReqdetailNewMapper;
|
||||
@Resource
|
||||
private LabReqreportPdffileMapper labReqreportPdffileMapper;
|
||||
@Resource
|
||||
private ComUsrMapper comUsrMapper;
|
||||
@Resource
|
||||
private ComOptMapper comOptMapper;
|
||||
@Resource
|
||||
private LabFeeitemClassMapper labFeeitemClassMapper;
|
||||
@Resource
|
||||
private LabFeeitemVsClassMapper labFeeitemVsClassMapper;
|
||||
|
||||
|
||||
public long existXmFee(String sfxmdh){
|
||||
QueryWrapper<XmFee> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sfxmdh",sfxmdh);
|
||||
return xmFeeMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
public long existComDict(String zdlb,String zddh){
|
||||
QueryWrapper<ComDict> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("zdlb",zdlb);
|
||||
queryWrapper.eq("zddh",zddh);
|
||||
return comDictMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
public long existComDict(String zdlb,String zddh,String yljg){
|
||||
QueryWrapper<ComDict> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("zdlb",zdlb);
|
||||
queryWrapper.eq("zddh",zddh);
|
||||
queryWrapper.eq("yljg",yljg);
|
||||
return comDictMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存收费项目信息
|
||||
* @param xmFee
|
||||
* @return
|
||||
*/
|
||||
@DSTransactional
|
||||
public int insertXmFee(XmFee xmFee){
|
||||
return xmFeeMapper.insert(xmFee);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存字典基本信息
|
||||
* @param comDict
|
||||
* @return
|
||||
*/
|
||||
@DSTransactional
|
||||
public int insertComDict(ComDict comDict){
|
||||
return comDictMapper.insert(comDict);
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void updateComDict(ComDict comDict,String zdlb,String zddh){
|
||||
UpdateWrapper<ComDict> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("zdlb",zdlb);
|
||||
updateWrapper.eq("zddh",zddh);
|
||||
comDictMapper.update(comDict,updateWrapper);
|
||||
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void updateLabReqmain(LabReqmain labReqmain, String sqh){
|
||||
UpdateWrapper<LabReqmain> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("sqh",sqh);
|
||||
labReqmainMapper.update(labReqmain,updateWrapper);
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void updateLabReqdetail(LabReqdetail labReqdetail,String sqh,String bz2){
|
||||
UpdateWrapper<LabReqdetail> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("sqh",sqh);
|
||||
updateWrapper.eq("bz2",bz2);
|
||||
labReqdetailMapper.update(labReqdetail,updateWrapper);
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void updateLabreqdetail(LabReqdetail labReqdetail,String sqh){
|
||||
UpdateWrapper<LabReqdetail> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("sqh",sqh);
|
||||
labReqdetailMapper.update(labReqdetail,updateWrapper);
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public Result updateSqd(String sqh, String bz2){
|
||||
UpdateWrapper<LabReqdetail> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("sqh",sqh);
|
||||
updateWrapper.eq("bz2",bz2);
|
||||
LabReqdetail labReqdetail = new LabReqdetail();
|
||||
labReqdetail.setJjzt("1");
|
||||
int update = labReqdetailMapper.update(labReqdetail, updateWrapper);
|
||||
if(update < 0){
|
||||
return new Result("-1","修改申请单明细表状态失败!");
|
||||
}
|
||||
|
||||
|
||||
QueryWrapper<LabReqmain> labReqmainQueryWrapper = new QueryWrapper<>();
|
||||
labReqmainQueryWrapper.eq("sqh",sqh);
|
||||
LabReqmain labReqmain = new LabReqmain();
|
||||
labReqmain.setJjzt("1");
|
||||
//labReqmain.setZt("2");
|
||||
int update1 = labReqmainMapper.update(labReqmain, labReqmainQueryWrapper);
|
||||
if(update1 < 0){
|
||||
return new Result("-1","修改申请单主表状态失败!");
|
||||
}
|
||||
|
||||
return new Result("0","修改成功");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存申请单信息
|
||||
* @param labReqmainList
|
||||
* @param labReqdetailList
|
||||
* @return
|
||||
*/
|
||||
@DSTransactional
|
||||
public Result saveSqd(List<LabReqmain> labReqmainList, List<LabReqdetail> labReqdetailList){
|
||||
for (int i = 0; i < labReqmainList.size(); i++) {
|
||||
LabReqmain labReqmain = labReqmainList.get(i);
|
||||
int insert = labReqmainMapper.insert(labReqmain);
|
||||
// if(insert <= 0){
|
||||
// return new Result("-1","保存申请单主表失败!");
|
||||
// }
|
||||
}
|
||||
|
||||
for (int i = 0; i < labReqdetailList.size(); i++) {
|
||||
LabReqdetail labReqdetail = labReqdetailList.get(i);
|
||||
int insert = labReqdetailMapper.insert(labReqdetail);
|
||||
// if(insert <= 0){
|
||||
// return new Result("-1","保存申请单明细表失败!");
|
||||
// }
|
||||
}
|
||||
|
||||
return new Result("0","保存申请单成功!");
|
||||
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public Result cancelSqd(String sqh){
|
||||
UpdateWrapper<LabReqmain> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("sqh",sqh);
|
||||
LabReqmain labReqmain = new LabReqmain();
|
||||
labReqmain.setJjzt("0");
|
||||
labReqmain.setZt("9");
|
||||
int update = labReqmainMapper.update(labReqmain, updateWrapper);
|
||||
if(update < 0){
|
||||
return new Result("-1","修改申请单主表状态失败!");
|
||||
}
|
||||
|
||||
|
||||
UpdateWrapper<LabReqdetail> updateWrapper1 = new UpdateWrapper<>();
|
||||
updateWrapper1.eq("sqh",sqh);
|
||||
LabReqdetail labReqdetail = new LabReqdetail();
|
||||
labReqdetail.setJjzt("0");
|
||||
labReqdetail.setZt("9");
|
||||
int update1 = labReqdetailMapper.update(labReqdetail, updateWrapper1);
|
||||
if(update1 < 0){
|
||||
return new Result("-1","修改申请单明细表状态失败!");
|
||||
}
|
||||
return new Result("0","修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存申请单明细备用表
|
||||
* @param labReqdetailNewList
|
||||
* @return
|
||||
*/
|
||||
@DSTransactional
|
||||
public Result saveLabreqdetailNew(List<LabReqdetailNew> labReqdetailNewList){
|
||||
for (int i = 0; i < labReqdetailNewList.size(); i++) {
|
||||
LabReqdetailNew labReqdetailNew = labReqdetailNewList.get(i);
|
||||
int insert = labReqdetailNewMapper.insert(labReqdetailNew);
|
||||
}
|
||||
return new Result("0","保存备用表成功!");
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void updateLabPat(LabPat labPat,Date jyrq,String yq,String ybh){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
labPatMapper.update(labPat,queryWrapper);
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void updateLabPat(LabPat labPat,Date jyrq,String yq,String ybh,String yljg){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
queryWrapper.eq("yljg",yljg);
|
||||
labPatMapper.update(labPat,queryWrapper);
|
||||
}
|
||||
|
||||
public LabReqreportPdffile getLabReqreportPdffile(Date jyrq,String yq,String ybh){
|
||||
QueryWrapper<LabReqreportPdffile> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
return labReqreportPdffileMapper.selectOne(queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
public List<LabReqreportPdffile> getLabReqreportPdffileList(Date jyrq,String yq,String ybh){
|
||||
QueryWrapper<LabReqreportPdffile> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
return labReqreportPdffileMapper.selectList(queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
public LabReqdetailNew getLabreqdetailNew(String sqh,int xh,String sqxmdh){
|
||||
QueryWrapper<LabReqdetailNew> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
queryWrapper.eq("xh",xh);
|
||||
queryWrapper.eq("sqxmdh",sqxmdh);
|
||||
return labReqdetailNewMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断申请单是否重复
|
||||
* @param bz2
|
||||
* @param sqxmdh
|
||||
* @return
|
||||
*/
|
||||
public boolean getDupSqd(String bz2,String sqxmdh){
|
||||
//判断此申请单是否已经获取过
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("bz2",bz2);
|
||||
queryWrapper.eq("sqxmdh",sqxmdh);
|
||||
Long count = labReqdetailMapper.selectCount(queryWrapper);
|
||||
if (count > 0){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean getDupSqd(String bz2,String bz1,String sqxmdh){
|
||||
//判断此申请单是否已经获取过
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
if(!bz2.equals("")) queryWrapper.eq("bz2",bz2);
|
||||
if(!bz1.equals("")) queryWrapper.eq("bz1",bz1);
|
||||
queryWrapper.eq("sqxmdh",sqxmdh);
|
||||
Long count = labReqdetailMapper.selectCount(queryWrapper);
|
||||
if (count > 0){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间 yyyy-MM-dd HH:mm:ss
|
||||
* @return
|
||||
*/
|
||||
public DateTime currentDateTime(){
|
||||
Date currentTime = commonMapper.getCurrentTime();
|
||||
return DateUtil.date(currentTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间 yyyy-MM-dd HH:mm:ss
|
||||
* @return
|
||||
*/
|
||||
public String currentStringTime(){
|
||||
Date currentTime = commonMapper.getCurrentTime();
|
||||
return DateUtil.format(currentTime, "yyyy-MM-dd HH:mm:ss"); //DatePattern.NORM_DATETIME_PATTERN
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取lab_pat某一行的数据
|
||||
* @param jyrq
|
||||
* @param yq
|
||||
* @param ybh
|
||||
* @return
|
||||
*/
|
||||
public LabPat getLabPatOne(Date jyrq,String yq,String ybh){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
return labPatMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
public LabPat getLabPatOne(Date jyrq,String yq,String ybh,String jgbz){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
queryWrapper.eq("jgbz",jgbz);
|
||||
return labPatMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
public LabPat getLabPatOne(Date jyrq,String yq,String ybh,String jgbz,String yljg){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
queryWrapper.eq("jgbz",jgbz);
|
||||
queryWrapper.eq("yljg",yljg);
|
||||
return labPatMapper.selectOne(queryWrapper);
|
||||
}
|
||||
/**
|
||||
* 获取lab_pat某一行的数据
|
||||
*
|
||||
* @param sqh
|
||||
* @return
|
||||
*/
|
||||
public List<LabPat> getLabPatListBySqh(String sqh){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
return labPatMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<LabPat> getLabPatList(String brdh){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("brdh",brdh);
|
||||
queryWrapper.eq("jgbz","2");
|
||||
return labPatMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
public List<LabPat> getLabPatList(String brdh,String sqh){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
if(brdh != null && !brdh.equals("")){
|
||||
queryWrapper.eq("brdh",brdh);
|
||||
}
|
||||
if(sqh != null && !sqh.equals("")){
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
}
|
||||
queryWrapper.eq("jgbz","2");
|
||||
List<LabPat> labPats = labPatMapper.selectList(queryWrapper);
|
||||
return labPats;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取lab_reqmain一条数据
|
||||
* @param sqh
|
||||
* @return
|
||||
*/
|
||||
public LabReqmain getLabReqmainOne(String sqh){
|
||||
QueryWrapper<LabReqmain> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
LabReqmain labReqmain = labReqmainMapper.selectOne(queryWrapper);
|
||||
return labReqmain;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取lab_reqmain多条数据
|
||||
* @param brdh
|
||||
* @return
|
||||
*/
|
||||
public List<LabReqmain> getLabReqmainList(String brdh){
|
||||
QueryWrapper<LabReqmain> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("brdh",brdh);
|
||||
List<LabReqmain> labReqmainList = labReqmainMapper.selectList(queryWrapper);
|
||||
return labReqmainList;
|
||||
}
|
||||
|
||||
|
||||
public List<LabReqmain> getLabReqmainList(String brdh,String sConfirmdt,String eConfirmdt){
|
||||
QueryWrapper<LabReqmain> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("brdh",brdh);
|
||||
if(!sConfirmdt.equals("")) queryWrapper.ge("confirmtime",sConfirmdt);
|
||||
if(!eConfirmdt.equals("")) queryWrapper.le("confirmtime",eConfirmdt);
|
||||
return labReqmainMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取lab_reqdetail多条数据
|
||||
* @param sqh
|
||||
* @return
|
||||
*/
|
||||
public List<LabReqdetail> getLabReqdetailList(String sqh){
|
||||
QueryWrapper<LabReqdetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
List<LabReqdetail> labReqdetailList = labReqdetailMapper.selectList(queryWrapper);
|
||||
return labReqdetailList;
|
||||
}
|
||||
|
||||
|
||||
public LabReqdetail getLabReqdetailOne(String sqh,String sqxmdh){
|
||||
QueryWrapper<LabReqdetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
queryWrapper.eq("sqxmdh",sqxmdh);
|
||||
LabReqdetail labReqdetail = labReqdetailMapper.selectOne(queryWrapper);
|
||||
return labReqdetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取lab_reqmain表的总数
|
||||
* @param sqh
|
||||
* @return
|
||||
*/
|
||||
public long getLabReqmainCount(String sqh){
|
||||
QueryWrapper<LabReqmain> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
Long count = labReqmainMapper.selectCount(queryWrapper);
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取lab_reqdetail表的总数
|
||||
* @param sqh
|
||||
* @return
|
||||
*/
|
||||
public long getLabReqdetailCount(String sqh){
|
||||
QueryWrapper<LabReqdetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
Long count = labReqdetailMapper.selectCount(queryWrapper);
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
public long getLabPatCount(String sqh){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
Long count = labPatMapper.selectCount(queryWrapper);
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
public long getLabPatCount(Date jyrq,String yq,String ybh){
|
||||
QueryWrapper<LabPat> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
Long count = labPatMapper.selectCount(queryWrapper);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
public String getUserHISId(String yhdh){
|
||||
|
||||
String userHISId = "";
|
||||
ComUsr comUsr = commonMapper.getUserHISId(yhdh);
|
||||
if(comUsr == null || comUsr.equals("")){
|
||||
return "";
|
||||
}
|
||||
String vshisuser = comUsr.getVshisuser();
|
||||
if(vshisuser == null || vshisuser.equals("")){
|
||||
return userHISId;
|
||||
}else{
|
||||
return vshisuser;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String getOption(Map<String,Object> map){
|
||||
String option = commonMapper.getOption(map);
|
||||
if(option == null){
|
||||
option = "";
|
||||
}
|
||||
return option;
|
||||
}
|
||||
|
||||
public XmInfo getXmInfoOne(String yq,String xmdh){
|
||||
QueryWrapper<XmInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("xmdh",xmdh);
|
||||
XmInfo xmInfo = xmInfoMapper.selectOne(queryWrapper);
|
||||
return xmInfo;
|
||||
}
|
||||
|
||||
|
||||
public List<LabResult> getLabResultList(Date jyrq,String yq,String ybh){
|
||||
QueryWrapper<LabResult> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
List<LabResult> labResults = labResultMapper.selectList(queryWrapper);
|
||||
return labResults;
|
||||
}
|
||||
|
||||
public LabResult getLabResultOne(Date jyrq,String yq,String ybh,String xmdh){
|
||||
QueryWrapper<LabResult> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
queryWrapper.eq("xmdh",xmdh);
|
||||
LabResult labResult = labResultMapper.selectOne(queryWrapper);
|
||||
return labResult;
|
||||
}
|
||||
|
||||
public String getComDictValues(String zdlb,String zddh){
|
||||
QueryWrapper<ComDict> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("zdlb",zdlb);
|
||||
queryWrapper.eq("zddh",zddh);
|
||||
ComDict comDict = comDictMapper.selectOne(queryWrapper);
|
||||
if(!String.valueOf(comDict).equals("null")){
|
||||
String zdmc = String.valueOf(comDict.getZdmc());
|
||||
if(zdmc.equals("null")){
|
||||
zdmc = zddh;
|
||||
}
|
||||
return zdmc;
|
||||
}else{
|
||||
return zddh;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String getComDictValuesByZdmc(String zdlb,String zdmc){
|
||||
QueryWrapper<ComDict> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("zdlb",zdlb);
|
||||
queryWrapper.eq("zdmc",zdmc);
|
||||
List<ComDict> comDicts = comDictMapper.selectList(queryWrapper);
|
||||
if(comDicts.size() > 0){
|
||||
String zddh = comDicts.get(0).getZddh();
|
||||
return zddh;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public List<ComDict> getComDictList(String zdlb){
|
||||
QueryWrapper<ComDict> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("zdlb",zdlb);
|
||||
return comDictMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
public String getComUsrName(String yhdh){
|
||||
ComUsr comUsr = commonMapper.getUserHISId(yhdh);
|
||||
if(comUsr == null){
|
||||
return yhdh;
|
||||
}else{
|
||||
String yhxm = comUsr.getYhxm();
|
||||
if(yhxm == null || yhxm.equals("")){
|
||||
return yhdh;
|
||||
}else{
|
||||
return yhxm;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public String getComUsrNameToNull(String yhdh){
|
||||
ComUsr comUsr = commonMapper.getUserHISId(yhdh);
|
||||
if(comUsr == null){
|
||||
return "";
|
||||
}else{
|
||||
String yhxm = comUsr.getYhxm();
|
||||
if(yhxm == null || yhxm.equals("")){
|
||||
return "";
|
||||
}else{
|
||||
return yhxm;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public ComUsr getComUsrOne(String yhdh){
|
||||
QueryWrapper<ComUsr> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("yhdh",yhdh);
|
||||
return comUsrMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
public String getLabInstrName(String yq){
|
||||
LabInstr labInstr = commonMapper.getLabInstr(yq);
|
||||
if(labInstr != null){
|
||||
return labInstr.getYqmc();
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<LabResultmed> getLabResultmedList(Date jyrq,String yq,String ybh){
|
||||
QueryWrapper<LabResultmed> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
List<LabResultmed> labResultmedList = labResultmedMapper.selectList(queryWrapper);
|
||||
return labResultmedList;
|
||||
}
|
||||
|
||||
public List<LabResultmed> getLabResultmedList(Date jyrq,String yq,String ybh,String xmdh){
|
||||
QueryWrapper<LabResultmed> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
queryWrapper.eq("xmdh",xmdh);
|
||||
List<LabResultmed> labResultmedList = labResultmedMapper.selectList(queryWrapper);
|
||||
return labResultmedList;
|
||||
}
|
||||
|
||||
public XmMed getXmMed(String ywdh){
|
||||
XmMed xmMed = commonMapper.getXmMed(ywdh);
|
||||
if(String.valueOf(xmMed).equals("null")){
|
||||
return null;
|
||||
}
|
||||
return xmMed;
|
||||
}
|
||||
|
||||
public LabInstr getLabInstrOne(String yq){
|
||||
LabInstr labInstr = commonMapper.getLabInstr(yq);
|
||||
return labInstr;
|
||||
}
|
||||
|
||||
public List<Map<String,Object>> getDisLabReqdetail(String sqh){
|
||||
List<Map<String, Object>> disLabReqdetail = commonMapper.getDisLabReqdetail(sqh);
|
||||
return disLabReqdetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断该仪器是否是细菌仪
|
||||
* @param yq
|
||||
* @return
|
||||
*/
|
||||
public boolean isxjy(String yq){
|
||||
LabInstr labInstrOne = getLabInstrOne(yq);
|
||||
String yqdl = "";
|
||||
boolean isxjy = false;
|
||||
if(labInstrOne != null){
|
||||
yqdl = labInstrOne.getYqdl();
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
isxjy = yqdl.contains("细菌");
|
||||
return isxjy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存hisinterExecLog数据
|
||||
* @param hisinterExecLog
|
||||
*/
|
||||
@DSTransactional
|
||||
public void saveHisinterExecLog(Hisinter_exec_log hisinterExecLog){
|
||||
hisinterExecLogMapper.insert(hisinterExecLog);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取定时任务信息
|
||||
* @param level
|
||||
* @return
|
||||
*/
|
||||
public List<Hisinter_exec_log> getTopTask(String level){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("level",level);
|
||||
List<Hisinter_exec_log> topTask = commonMapper.getTopTask(map);
|
||||
return topTask;
|
||||
}
|
||||
|
||||
public List<XmFee> getXmFeeList(){
|
||||
QueryWrapper<XmFee> queryWrapper = new QueryWrapper<>();
|
||||
return xmFeeMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
public ComDict getComDictOne(String zdlb,String zddh){
|
||||
QueryWrapper<ComDict> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("zdlb",zdlb);
|
||||
queryWrapper.eq("zddh",zddh);
|
||||
return comDictMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
public String getHIS_yblx(String his_ybmc){
|
||||
String bt_zddh = getComDictValuesByZdmc("BT", his_ybmc);
|
||||
//在字典没有找到对应样本类型,则增加一个样本类型的基础数据
|
||||
if(bt_zddh == null || bt_zddh.equals("")){
|
||||
ComDict comDict = new ComDict();
|
||||
comDict.setZdlb("BT");
|
||||
int btMaxNum = commonMapper.getMaxComDict_BT();
|
||||
bt_zddh = String.valueOf(btMaxNum + 1);
|
||||
comDict.setZddh(bt_zddh);
|
||||
comDict.setZdmc(his_ybmc);
|
||||
comDict.setZdbz("N");
|
||||
String pinyin = PinyinUtil.getFirstLetter(his_ybmc, ""); //拼音首字母
|
||||
if(pinyin.length() >= 10){
|
||||
pinyin = pinyin.substring(0,8);
|
||||
}
|
||||
comDict.setZjf(pinyin);
|
||||
comDict.setYljg("1");
|
||||
insertComDict(comDict);
|
||||
}
|
||||
return bt_zddh;
|
||||
}
|
||||
|
||||
public String getBgddh(String sqxmdh){
|
||||
String bgddh = commonMapper.getBgddh(sqxmdh);
|
||||
return bgddh;
|
||||
}
|
||||
|
||||
public XmFee getXmFeeOne(String sfxmdh){
|
||||
QueryWrapper<XmFee> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sfxmdh",sfxmdh);
|
||||
XmFee xmFee = xmFeeMapper.selectOne(queryWrapper);
|
||||
return xmFee;
|
||||
}
|
||||
|
||||
public List<Map<String,Object>> getxm_reqitem_vs_reportitem(String yq,String sqh){
|
||||
List<Map<String, Object>> mapList = commonMapper.getxm_reqitem_vs_reportitem(yq, sqh);
|
||||
return mapList;
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void updateLabResult(LabResult labResult,Date jyrq,String yq,String ybh,String xmdh){
|
||||
QueryWrapper<LabResult> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
queryWrapper.eq("xmdh",xmdh);
|
||||
labResultMapper.update(labResult,queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取lis参数取值
|
||||
* @param yq
|
||||
* @param xxdh
|
||||
* @return
|
||||
*/
|
||||
public String getComOptValue(String yq,String xxdh){
|
||||
QueryWrapper<ComOpt> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("xxdh",xxdh);
|
||||
ComOpt comOpt = comOptMapper.selectOne(queryWrapper);
|
||||
if(comOpt == null){
|
||||
return "";
|
||||
}else{
|
||||
return comOpt.getXxqz();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除申请单
|
||||
*/
|
||||
@DSTransactional
|
||||
public void deleteSQD(String sqh){
|
||||
QueryWrapper<LabReqmain> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sqh",sqh);
|
||||
labReqmainMapper.delete(queryWrapper);
|
||||
QueryWrapper<LabReqdetail> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("sqh",sqh);
|
||||
labReqdetailMapper.delete(queryWrapper1);
|
||||
}
|
||||
|
||||
|
||||
public long getLabFeeitemClassCount(String sflbdh){
|
||||
QueryWrapper<LabFeeitemClass> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sflbdh",sflbdh);
|
||||
return labFeeitemClassMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
public long getLabFeeitemVsClassCount(String sfxmdh){
|
||||
QueryWrapper<LabFeeitemVsClass> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sfxmdh",sfxmdh);
|
||||
return labFeeitemVsClassMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void insertLabFeeitemClass(LabFeeitemClass labFeeitemClass){
|
||||
labFeeitemClassMapper.insert(labFeeitemClass);
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public void insertLabFeeitemVsClass(LabFeeitemVsClass labFeeitemVsClass){
|
||||
labFeeitemVsClassMapper.insert(labFeeitemVsClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费项目对照
|
||||
* @param sfxmdh
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> getFeeClass(String sfxmdh){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
List<Map<String, Object>> feeClassList = commonMapper.getFeeClassList(sfxmdh);
|
||||
for (int i = 0; i < feeClassList.size(); i++) {
|
||||
String sfxmdh1 = (String) feeClassList.get(i).get("sfxmdh");
|
||||
if(sfxmdh.equals(sfxmdh1)){
|
||||
map.put("sflbdh",feeClassList.get(i).get("sflbdh"));
|
||||
map.put("sflbjc",feeClassList.get(i).get("sflbjc"));
|
||||
map.put("bkcolor",feeClassList.get(i).get("bkcolor"));
|
||||
String xmjc = (String) feeClassList.get(i).get("xmjc");
|
||||
if( xmjc == null || xmjc.isEmpty()){
|
||||
xmjc = (String) feeClassList.get(i).get("sfxmmc");
|
||||
}
|
||||
map.put("xmjc",xmjc);
|
||||
map.put("sampletips",feeClassList.get(i).get("sampletips"));
|
||||
map.put("yblx",feeClassList.get(i).get("yblx"));
|
||||
map.put("printcnt",feeClassList.get(i).get("printcnt"));
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
public String getNextSeq_pro(String seqName,int position){
|
||||
String subMaxNo = "";
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("seqId",seqName);
|
||||
map.put("retCode","1");
|
||||
commonMapper.getNextSeq_pro(map);
|
||||
String maxNo = map.get("retCode");
|
||||
|
||||
|
||||
int length = maxNo.length();
|
||||
if(length > position){
|
||||
subMaxNo = maxNo.substring(length - position);
|
||||
}else{
|
||||
// int len = position - length ;
|
||||
subMaxNo = String.format("%0" + position + "d", Integer.valueOf(maxNo));
|
||||
}
|
||||
|
||||
return subMaxNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存发送报告定时任务
|
||||
* @param jyrq
|
||||
* @param yq
|
||||
* @param ybh
|
||||
* @param userid
|
||||
*/
|
||||
public void saveTimeTask(Date jyrq,String yq,String ybh,String userid,String status){
|
||||
|
||||
String recordid = DateUtil.format(jyrq,"yyyyMMdd")+"|"+yq.trim()+"|"+ybh;
|
||||
Hisinter_exec_log hisinterExecLog = new Hisinter_exec_log();
|
||||
hisinterExecLog.setLevel("sendReport");
|
||||
hisinterExecLog.setRecordid(recordid);
|
||||
hisinterExecLog.setExecdate(currentDateTime());
|
||||
hisinterExecLog.setExecuser(userid);
|
||||
hisinterExecLog.setStatus(status); //1.审核报告,0.取消审核
|
||||
LabPat labPatOne = getLabPatOne(jyrq, yq, ybh);
|
||||
if(labPatOne != null){
|
||||
String sqh = labPatOne.getSqh();
|
||||
if(sqh == null) sqh = "";
|
||||
hisinterExecLog.setTxt3(sqh);
|
||||
}
|
||||
saveHisinterExecLog(hisinterExecLog);
|
||||
}
|
||||
|
||||
|
||||
@DSTransactional
|
||||
public void updateXmFee(XmFee xmFee,String sfxmdh){
|
||||
QueryWrapper<XmFee> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sfxmdh",sfxmdh);
|
||||
xmFeeMapper.update(xmFee,queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@DSTransactional
|
||||
public void updateComUsr(ComUsr comUsr,String hisid){
|
||||
QueryWrapper<ComUsr> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("vshisuser",hisid);
|
||||
comUsrMapper.update(comUsr,queryWrapper);
|
||||
}
|
||||
|
||||
public List<ComUsr> getComUsrList(){
|
||||
return comUsrMapper.selectList(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void saveTimeTask(Date jyrq,String yq,String ybh,String userid,String status,String txt4){
|
||||
|
||||
String recordid = DateUtil.format(jyrq,"yyyyMMdd")+"|"+yq.trim()+"|"+ybh;
|
||||
Hisinter_exec_log hisinterExecLog = new Hisinter_exec_log();
|
||||
hisinterExecLog.setLevel("sendReport");
|
||||
hisinterExecLog.setRecordid(recordid);
|
||||
hisinterExecLog.setExecdate(currentDateTime());
|
||||
hisinterExecLog.setExecuser(userid);
|
||||
hisinterExecLog.setStatus(status); //1.审核报告,0.取消审核
|
||||
LabPat labPatOne = getLabPatOne(jyrq, yq, ybh);
|
||||
if(labPatOne != null){
|
||||
String sqh = labPatOne.getSqh();
|
||||
if(sqh == null) sqh = "";
|
||||
hisinterExecLog.setTxt3(sqh);
|
||||
}
|
||||
hisinterExecLog.setTxt4(txt4);
|
||||
saveHisinterExecLog(hisinterExecLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接写定时任务结果
|
||||
* @param level
|
||||
* @param recordid
|
||||
* @param userid
|
||||
* @param status
|
||||
* @param txt
|
||||
*/
|
||||
public void saveTimeTask(String level,String recordid,String userid,String status,String txt){
|
||||
|
||||
Hisinter_exec_log hisinterExecLog = new Hisinter_exec_log();
|
||||
hisinterExecLog.setLevel(level);
|
||||
hisinterExecLog.setRecordid(recordid);
|
||||
hisinterExecLog.setExecdate(currentDateTime());
|
||||
hisinterExecLog.setExecuser(userid);
|
||||
hisinterExecLog.setStatus(status);
|
||||
hisinterExecLog.setTextlog(txt);
|
||||
saveHisinterExecLog(hisinterExecLog);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.czlisinterface.system.utils;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.czlisinterface.system.mapper.LisLogMapper;
|
||||
import com.czlisinterface.system.pojo.LisLog;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Component
|
||||
@DSTransactional
|
||||
public class LisInterfaceLogUtil {
|
||||
@Resource
|
||||
private LisLogMapper lisLogMapper;
|
||||
@Resource
|
||||
private CommonUtil commonUtil;
|
||||
|
||||
|
||||
|
||||
public void logToDateBase(String level,String yhdh, String txt){
|
||||
logToDateBase("","",yhdh,level,txt);
|
||||
}
|
||||
/**
|
||||
* 增加日志
|
||||
* @param ip
|
||||
* @param computer
|
||||
* @param yhdh
|
||||
* @param level
|
||||
* @param txt
|
||||
*/
|
||||
|
||||
public void logToDateBase(String ip, String computer, String yhdh, String level, String txt){
|
||||
logToDateBase(ip,computer,yhdh,level,txt,"","","");
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加日志
|
||||
* @param ip
|
||||
* @param computer
|
||||
* @param yhdh
|
||||
* @param level
|
||||
* @param txt
|
||||
* @param ext1
|
||||
* @param ext2
|
||||
* @param ext3
|
||||
*/
|
||||
|
||||
public void logToDateBase(String ip,String computer,String yhdh,String level,String txt,String ext1,String ext2,String ext3) {
|
||||
LisLog lisLog = new LisLog();
|
||||
lisLog.setIp(ip);
|
||||
lisLog.setComputer(computer);
|
||||
lisLog.setLevel(level);
|
||||
lisLog.setLogtime(commonUtil.currentDateTime());
|
||||
lisLog.setTxt(txt);
|
||||
lisLog.setYhdh(yhdh);
|
||||
lisLog.setExt1(ext1);
|
||||
lisLog.setExt2(ext2);
|
||||
lisLog.setExt3(ext3);
|
||||
lisLogMapper.insert(lisLog);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,110 @@
|
||||
package com.czlisinterface.system.utils;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class LisUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 生日格式为:yyyy-MM-dd
|
||||
* 根据出生日期计算年龄
|
||||
* @param birthday
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,String> getAgeFromBirthDay(String birthday){
|
||||
Map<String,String> map = new HashMap<>();
|
||||
int age = DateUtil.ageOfNow(birthday);
|
||||
if(age > 0){
|
||||
map.put("age",String.valueOf(age));
|
||||
map.put("unit","岁");
|
||||
}else if(age == 0){
|
||||
//不足一年的
|
||||
long between = DateUtil.between(DateUtil.parse(birthday, "yyyy-MM-dd"), DateUtil.parse(DateUtil.today(), "yyyy-MM-dd"), DateUnit.DAY,true);
|
||||
|
||||
if(between/30 > 0){
|
||||
long month = between/30;
|
||||
map.put("age",String.valueOf(month));
|
||||
map.put("unit","月");
|
||||
}else if( between/30 == 0){
|
||||
//不足一月的
|
||||
map.put("age",String.valueOf(between));
|
||||
map.put("unit","天");
|
||||
}else{
|
||||
|
||||
}
|
||||
}else{
|
||||
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据年龄获取出生日期
|
||||
* @param nl
|
||||
* @return
|
||||
*/
|
||||
public static Date getBirthDayFromAge(int nl,String nldw){
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(DateUtil.date());
|
||||
switch (nldw){
|
||||
case "岁":
|
||||
cal.add(Calendar.YEAR,-nl);
|
||||
case "月":
|
||||
cal.add(Calendar.MONTH,-nl);
|
||||
case "天":
|
||||
cal.add(Calendar.DATE,-nl);
|
||||
}
|
||||
Date BirthDay = cal.getTime();
|
||||
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String format = df.format(BirthDay);
|
||||
return DateUtil.parse(format,"yyyy-MM-dd");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解决字符串长度比较和数据库不一致的问题,统一用GBK处理,这样一个汉字占两个字符
|
||||
* ,主要是如何得到字符串的实际占用字符空间长度,GBK和GB2312字符集,
|
||||
* 每个中文都是占用2个字节,UTF-8字符集,每个中文都是3个字节。英文在以上编码下都是单字节。
|
||||
* JAVA中String的length方法是按字符获取的,并非字节。
|
||||
* @param str
|
||||
* @return
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
public static int getStringLength(String str) {
|
||||
if(str == null || str.equals("")){
|
||||
return 0;
|
||||
}else{
|
||||
int length = 0;
|
||||
try {
|
||||
length = str.getBytes("gbk").length;
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return length;
|
||||
}
|
||||
}
|
||||
|
||||
public static String isBank(Object param){
|
||||
String s = String.valueOf(param);
|
||||
if(s.equals("null")){
|
||||
return "";
|
||||
}else{
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void test123(){
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.czlisinterface.system.utils;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.czlisinterface.system.mapper.LabPatWarningMapper;
|
||||
import com.czlisinterface.system.mapper.LabResultWarningMapper;
|
||||
import com.czlisinterface.system.pojo.LabPatWarning;
|
||||
import com.czlisinterface.system.pojo.LabResultWarning;
|
||||
import com.czlisinterface.system.pojo.Lis_patlog;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class LisWarningUtil {
|
||||
|
||||
@Resource
|
||||
LabPatWarningMapper labPatWarningMapper;
|
||||
@Resource
|
||||
LabResultWarningMapper labResultWarningMapper;
|
||||
// @Resource
|
||||
// CommonMapper commonMapper;
|
||||
|
||||
public LabPatWarning getLabPatWarningOne(Date jyrq, String yq, String ybh){
|
||||
QueryWrapper<LabPatWarning> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
LabPatWarning labPatWarning = labPatWarningMapper.selectOne(queryWrapper);
|
||||
return labPatWarning;
|
||||
}
|
||||
|
||||
public List<LabResultWarning> getLabResultWarningList(Date jyrq, String yq, String ybh){
|
||||
QueryWrapper<LabResultWarning> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("jyrq",jyrq);
|
||||
queryWrapper.eq("yq",yq);
|
||||
queryWrapper.eq("ybh",ybh);
|
||||
List<LabResultWarning> labResultWarnings = labResultWarningMapper.selectList(queryWrapper);
|
||||
return labResultWarnings;
|
||||
}
|
||||
|
||||
@DSTransactional
|
||||
public int updatePatWarning(LabPatWarning labPatWarning,Date jyrq,String yq,String ybh){
|
||||
UpdateWrapper<LabPatWarning> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("jyrq",jyrq);
|
||||
updateWrapper.eq("yq",yq);
|
||||
updateWrapper.eq("ybh",ybh);
|
||||
int update = labPatWarningMapper.update(labPatWarning, updateWrapper);
|
||||
return update;
|
||||
}
|
||||
|
||||
// public String getLabReqdetail_bz2(String yq,String xmdh,String sqh){
|
||||
// Map<String,Object> map = new HashMap<>();
|
||||
// map.put("yq",yq);
|
||||
// map.put("xmdh",xmdh);
|
||||
// map.put("sqh",sqh);
|
||||
// String labReqdetail_bz2 = commonMapper.getLabReqdetail_bz2(map);
|
||||
// return labReqdetail_bz2;
|
||||
// }
|
||||
|
||||
// public Lis_patlog getListpatlogOne(Date jyrq, String yq , String ybh){
|
||||
// Map<String,Object> map = new HashMap<>();
|
||||
// map.put("jyrq",jyrq);
|
||||
// map.put("yq",yq);
|
||||
// map.put("ybh",ybh);
|
||||
// return commonMapper.getLis_patlogOne(map);
|
||||
// }
|
||||
|
||||
@DSTransactional
|
||||
public void updateLabResultWarning(LabResultWarning labResultWarning,Date jyrq,String yq,String ybh,String xmdh){
|
||||
UpdateWrapper<LabResultWarning> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("jyrq",jyrq);
|
||||
updateWrapper.eq("yq",yq);
|
||||
updateWrapper.eq("ybh",ybh);
|
||||
updateWrapper.eq("xmdh",xmdh);
|
||||
labResultWarningMapper.update(labResultWarning, updateWrapper);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package com.czlisinterface.system.webservices;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.jws.WebService;
|
||||
|
||||
/**
|
||||
* WebService涉及到的有这些 "四解三类 ", 即四个注解,三个类
|
||||
*
|
||||
* @author shanhy
|
||||
* @WebMethod
|
||||
* @WebService
|
||||
* @WebResult
|
||||
* @WebParam SpringBus
|
||||
* Endpoint
|
||||
* EndpointImpl
|
||||
* <p>
|
||||
* 一般我们都会写一个接口,然后再写一个实现接口的实现类,但是这不是强制性的
|
||||
* @WebService 注解表明是一个webservice服务。
|
||||
* name:对外发布的服务名, 对应于<wsdl:portType name="ServerServiceDemo"></wsdl:portType>
|
||||
* targetNamespace:命名空间,一般是接口的包名倒序, 实现类与接口类的这个配置一定要一致这种错误
|
||||
* Exception in thread "main" org.apache.cxf.common.i18n.UncheckedException: No operation was found with the name xxxx
|
||||
* 对应于targetNamespace="http://server.webservice.example.com"
|
||||
* endpointInterface:服务接口全路径(如果是没有接口,直接写实现类的,该属性不用配置), 指定做SEI(Service EndPoint Interface)服务端点接口
|
||||
* serviceName:对应于<wsdl:service name="ServerServiceDemoImplService"></wsdl:service>
|
||||
* portName:对应于<wsdl:port binding="tns:ServerServiceDemoImplServiceSoapBinding" name="ServerServiceDemoPort"></wsdl:port>
|
||||
* @WebMethod 表示暴露的服务方法, 这里有接口ServerServiceDemo存在,在接口方法已加上@WebMethod, 所以在实现类中不用再加上,否则就要加上
|
||||
* operationName: 接口的方法名
|
||||
* action: 没发现又什么用处
|
||||
* exclude: 默认是false, 用于阻止将某一继承方法公开为web服务
|
||||
* @WebResult 表示方法的返回值
|
||||
* name:返回值的名称
|
||||
* partName:
|
||||
* targetNamespace:
|
||||
* header: 默认是false, 是否将参数放到头信息中,用于保护参数,默认在body中
|
||||
* @WebParam name:接口的参数
|
||||
* partName:
|
||||
* targetNamespace:
|
||||
* header: 默认是false, 是否将参数放到头信息中,用于保护参数,默认在body中
|
||||
* model:WebParam.Mode.IN/OUT/INOUT
|
||||
* @date 2020/11/19 20:29
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@ConditionalOnProperty(name="lisinterface.webservice.type",havingValue = "Demo",matchIfMissing = true)
|
||||
@WebService(name = LisWebService.WEBSERVICE_NAME, targetNamespace = LisWebService.TARGET_NAMESPACE,
|
||||
endpointInterface = LisWebService.WEBSERVICE_INTERFACE_NAME)
|
||||
public class DemoWebServiceImpl implements LisWebService {
|
||||
|
||||
@Override
|
||||
public String hello(String userName) {
|
||||
// if (StringUtils.isBlank(userName)) {
|
||||
// return "传入的name为空";
|
||||
// }
|
||||
return "Hello: ".concat(userName);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public String test(HashMap<String, String> headerMap, HashMap<String, String> parameterMap, String bodyJson) {
|
||||
// return "mapParameters";
|
||||
// }
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.czlisinterface.system.webservices;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebParam;
|
||||
import javax.jws.WebService;
|
||||
|
||||
@WebService(name = LisWebService.WEBSERVICE_NAME, targetNamespace = LisWebService.TARGET_NAMESPACE)
|
||||
public interface LisWebService {
|
||||
String WEBSERVICE_NAME = "LisWebService";
|
||||
String TARGET_NAMESPACE = "http://demo.webservice.shanhy.com";
|
||||
String WEBSERVICE_INTERFACE_NAME = "com.czlis.AllInterface.webservices.LisWebService";
|
||||
|
||||
@WebMethod
|
||||
String hello(@WebParam(name = "userName3") String name);
|
||||
|
||||
// @WebMethod
|
||||
// String test(@WebParam(name="headerMap") HashMap<String, String> headerMap, @WebParam HashMap<String, String> parameterMap, @WebParam String bodyJson);
|
||||
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.czlisinterface.system.webservices;
|
||||
|
||||
|
||||
import org.apache.cxf.Bus;
|
||||
import org.apache.cxf.bus.spring.SpringBus;
|
||||
import org.apache.cxf.jaxws.EndpointImpl;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.xml.ws.Endpoint;
|
||||
|
||||
/**
|
||||
* 注意:
|
||||
* org.apache.cxf.Bus
|
||||
* org.apache.cxf.bus.spring.SpringBus
|
||||
* org.apache.cxf.jaxws.EndpointImpl
|
||||
* javax.xml.ws.Endpoint
|
||||
*
|
||||
* @author shanhy
|
||||
* @date 2020/11/19 20:38
|
||||
*/
|
||||
@Configuration
|
||||
public class WebServiceConfiguration {
|
||||
|
||||
|
||||
@Resource
|
||||
private LisWebService lisWebService;
|
||||
|
||||
@Value("${lisinterface.action.type:}")
|
||||
private String lisClass;
|
||||
|
||||
@Value("${lisinterface.webservice.open:}")
|
||||
private String open;
|
||||
|
||||
/**
|
||||
* Apache CXF 核心架构是以BUS为核心,整合其他组件。
|
||||
* Bus是CXF的主干, 为共享资源提供一个可配置的场所,作用类似于Spring的ApplicationContext,这些共享资源包括
|
||||
* WSDl管理器、绑定工厂等。通过对BUS进行扩展,可以方便地容纳自己的资源,或者替换现有的资源。默认Bus实现基于Spring架构,
|
||||
* 通过依赖注入,在运行时将组件串联起来。BusFactory负责Bus的创建。默认的BusFactory是SpringBusFactory,对应于默认
|
||||
* 的Bus实现。在构造过程中,SpringBusFactory会搜索META-INF/cxf(包含在 CXF 的jar中)下的所有bean配置文件。
|
||||
* 根据这些配置文件构建一个ApplicationContext。开发者也可以提供自己的配置文件来定制Bus。
|
||||
*/
|
||||
@Bean(name = Bus.DEFAULT_BUS_ID)
|
||||
public SpringBus springBus() {
|
||||
return new SpringBus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 此方法作用是改变项目中服务名的前缀名,此处127.0.0.1或者localhost不能访问时,请使用ipconfig查看本机ip来访问
|
||||
* 此方法被注释后, 即不改变前缀名(默认是services), wsdl访问地址为 http://127.0.0.1:8080/services/ws/api?wsdl
|
||||
* 去掉注释后wsdl访问地址为:http://127.0.0.1:8080/soap/ws/api?wsdl
|
||||
* http://127.0.0.1:8080/soap/列出服务列表 或 http://127.0.0.1:8080/soap/ws/api?wsdl 查看实际的服务
|
||||
* 新建Servlet记得需要在启动类添加注解:@ServletComponentScan
|
||||
* <p>
|
||||
* 如果启动时出现错误:not loaded because DispatcherServlet Registration found non dispatcher servlet dispatcherServlet
|
||||
* 可能是springboot与cfx版本不兼容。
|
||||
* 同时在spring boot2.0.6之后的版本与xcf集成,不需要在定义以下方法,直接在application.properties配置文件中添加:
|
||||
* cxf.path=/service(默认是services)
|
||||
*/
|
||||
// @Bean
|
||||
// public ServletRegistrationBean dispatcherServlet() {
|
||||
// if(lisClass.equals("nzzyy")){
|
||||
// return new ServletRegistrationBean(new CXFServlet(), "/critical/*");
|
||||
// }
|
||||
// return new ServletRegistrationBean(new CXFServlet(), "/services/*");
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 地址改为了:http://127.0.0.1:9566/services
|
||||
* webservices访问地址:http://127.0.0.1:9566/services/ws/lisWsApi?wsdl
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Endpoint endpoint() {
|
||||
//没有位子启用这个。暂时注释掉
|
||||
if(open.equals("1")){
|
||||
Endpoint endpoint = new EndpointImpl(springBus(), lisWebService);
|
||||
switch (lisClass){
|
||||
// case "nzzyy":
|
||||
// endpoint.publish("/ws/receiverCritical");
|
||||
// break;
|
||||
// default:
|
||||
// endpoint.publish("/ws/lisWsApi");
|
||||
// break;
|
||||
}
|
||||
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
90
liscommon/src/main/resources/mapper/CommonMapper.xml
Normal file
90
liscommon/src/main/resources/mapper/CommonMapper.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?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.czlisinterface.system.mapper.CommonMapper">
|
||||
<select id="getOption" parameterType="map" resultType="java.lang.String">
|
||||
select top 1 xxqz from com_opt where yq = #{yq} and xxdh = #{xxdh}
|
||||
</select>
|
||||
|
||||
<select id="getUserCount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
select count(1) from com_usr where yhdh = #{yhdh}
|
||||
</select>
|
||||
|
||||
<select id="getUserHISId" parameterType="java.lang.String" resultType="com.czlisinterface.system.pojo.ComUsr">
|
||||
SELECT * FROM com_usr WHERE yhdh = #{yhdh}
|
||||
</select>
|
||||
|
||||
<select id="getFeeClassList" parameterType="java.lang.String" resultType="map">
|
||||
SELECT
|
||||
lab_feeitemclass.sflbdh ,
|
||||
lab_feeitemclass.sflbmc ,
|
||||
lab_feeitemclass.sflbjc ,
|
||||
lab_feeitemclass.bkcolor ,
|
||||
lab_feeitemclass.bglqdh ,
|
||||
xm_fee.bz ,
|
||||
xm_fee.sfxmmc ,
|
||||
lab_feeitemclass.sampletips ,
|
||||
lab_feeitem_vs_class.sfxmdh ,
|
||||
lab_feeitemclass.yblx ,
|
||||
lab_feeitemclass.printcnt,
|
||||
xm_fee.yblx
|
||||
FROM lab_feeitem_vs_class ,
|
||||
lab_feeitemclass ,
|
||||
xm_fee
|
||||
WHERE ( lab_feeitem_vs_class.sflbdh = lab_feeitemclass.sflbdh )
|
||||
AND ( lab_feeitem_vs_class.sfxmdh = xm_fee.sfxmdh )
|
||||
<if test="sfxmdh != null and sfxmdh.length > 0">
|
||||
AND lab_feeitem_vs_class.sfxmdh = #{sfxmdh}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getCurrentTime" resultType="java.util.Date">
|
||||
select getdate()
|
||||
</select>
|
||||
|
||||
<select id="getLabInstr" parameterType="string" resultType="com.czlisinterface.system.pojo.LabInstr">
|
||||
select * from lab_instr where yq = #{yq}
|
||||
</select>
|
||||
|
||||
<select id="getXmMed" parameterType="string" resultType="com.czlisinterface.system.pojo.XmMed">
|
||||
select * from xm_med where ywdh=#{ywdh}
|
||||
</select>
|
||||
|
||||
<select id="getDisLabReqdetail" parameterType="string" resultType="map">
|
||||
select distinct(bz2) as bz2, bz1,sqxmdh,sqxmmc,sl,dj,jjzt from lab_reqdetail where sqh = #{sqh}
|
||||
</select>
|
||||
|
||||
<select id="getLabReqdetail_bz2" parameterType="map" resultType="string">
|
||||
select top 1 b.bz2 from lab_result a,lab_reqdetail b,lab_pat c where a.jyrq = c.jyrq and a.yq = c.yq and a.ybh = c.ybh and b.sqh = c.sqh and a.sqxmdh = b.sqxmdh
|
||||
and c.yq = #{yq} and a.xmdh = #{xmdh} and c.sqh = #{sqh}
|
||||
</select>
|
||||
|
||||
<select id="getTopTask" parameterType="map" resultType="com.czlisinterface.system.pojo.Hisinter_exec_log">
|
||||
<![CDATA[ select top 100 * from hisinter_exec_log where level = #{level} and (txt1 = '' or txt1 is null) and execdate < getdate() - 0.01 ORDER BY id]]>
|
||||
</select>
|
||||
|
||||
<select id="getMaxComDict_BT" resultType="int">
|
||||
SELECT MAX(CONVERT(INT,zddh)) FROM com_dict WHERE zdlb = 'BT'
|
||||
</select>
|
||||
|
||||
<select id="getBgddh" parameterType="string" resultType="string">
|
||||
SELECT sflbdh from lab_feeitem_vs_class where sfxmdh=#{sqxmdh};
|
||||
</select>
|
||||
|
||||
<select id="getxm_reqitem_vs_reportitem" parameterType="string" resultType="map">
|
||||
select distinct xm_reqitem_vs_reportitem.sqxmdh,xm_reqitem_vs_reportitem.xmdh
|
||||
from lab_reqdetail,xm_reqitem_vs_reportitem
|
||||
where xm_reqitem_vs_reportitem.sqxmdh=lab_reqdetail.sqxmdh and
|
||||
xm_reqitem_vs_reportitem.yq=#{yq} and
|
||||
lab_reqdetail.sqh=#{sqh}
|
||||
</select>
|
||||
|
||||
<select id="getLis_patlogOne" parameterType="map" resultType="com.czlisinterface.system.pojo.Lis_patlog">
|
||||
select top 1 * from lis_patlog where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh} order by xgrq desc
|
||||
</select>
|
||||
|
||||
<select id="getLabPatList" resultType="com.czlisinterface.system.pojo.LabPat">
|
||||
select * from lab_pat where sqh = #{sqh} and yljg = #{yljg}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
26
lisinterface_jldermyy/pom.xml
Normal file
26
lisinterface_jldermyy/pom.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>lisinterface8.0</artifactId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>lisinterface_jldermyy</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>lisinterface_jldermyy</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>liscommon</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -0,0 +1,9 @@
|
||||
package com.czlisinterface.jldermyy.mapper;
|
||||
|
||||
import com.czlisinterface.system.pojo.LabReqmain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HisMapper_jldermyy {
|
||||
List<LabReqmain> getLabreqmain();
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.czlisinterface.jldermyy.service.impl;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.czlisinterface.jldermyy.mapper.HisMapper_jldermyy;
|
||||
import com.czlisinterface.system.mapper.CommonMapper;
|
||||
import com.czlisinterface.system.pojo.ComUsr;
|
||||
import com.czlisinterface.system.pojo.LabReqmain;
|
||||
import com.czlisinterface.system.pojo.Result;
|
||||
import com.czlisinterface.system.service.impl.CommonImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 监利第二人民医院
|
||||
* 三佳his接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@ConditionalOnProperty(name="lisinterface.action.type",havingValue = "jldermyy_new1")
|
||||
public class Lisinterface_jldermyy extends CommonImpl {
|
||||
|
||||
@Resource
|
||||
CommonMapper commonMapper;
|
||||
@Resource
|
||||
HisMapper_jldermyy hisMapperJldermyy;
|
||||
|
||||
|
||||
public Result test11(String param){
|
||||
// log.error("测试一条error日志");
|
||||
// log.debug("debug日志是否也能被记录呢?");
|
||||
// ComUsr userHISId = commonMapper.getUserHISId("00453");
|
||||
// return new Result("0",userHISId.toString());
|
||||
List<LabReqmain> labreqmain = hisMapperJldermyy.getLabreqmain();
|
||||
return new Result("0",labreqmain.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?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.czlisinterface.jldermyy.mapper.HisMapper_jldermyy">
|
||||
<select id="getLabreqmain" resultType="com.czlisinterface.system.pojo.LabReqmain">
|
||||
select * from lab_reqmain where sqh = '20221201167604'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
130
lisinterface_start/pom.xml
Normal file
130
lisinterface_start/pom.xml
Normal file
@ -0,0 +1,130 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>lisinterface8.0</artifactId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>lisinterface_start</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>lisinterface_start</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>liscommon</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>lisinterface_jldermyy</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!--打包时去除第三方依赖-->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<layout>ZIP</layout>
|
||||
<includes>
|
||||
<include>
|
||||
<groupId>non-exists</groupId>
|
||||
<artifactId>non-exists</artifactId>
|
||||
</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<configuration>
|
||||
<!-- 不打包资源文件(配置文件和依赖包分开) -->
|
||||
<excludes>
|
||||
<exclude>*.yml</exclude>
|
||||
<include>*.xml</include>
|
||||
<exclude>*.properties</exclude>
|
||||
<exclude>static/**</exclude>
|
||||
</excludes>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<!-- MANIFEST.MF 中 Class-Path 加入前缀 -->
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
<!-- jar包不包含唯一版本标识 -->
|
||||
<useUniqueVersions>false</useUniqueVersions>
|
||||
<!--指定入口类 -->
|
||||
<mainClass>com.czlisinterface.start.InterfaceApplication</mainClass>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<!--MANIFEST.MF 中 Class-Path 加入资源文件目录 -->
|
||||
<Class-Path>./config/</Class-Path>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 该插件的作用是用于复制依赖的jar包到指定的文件夹里 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/lib/</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- 该插件的作用是用于复制指定的文件 -->
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<executions>
|
||||
<execution> <!-- 复制配置文件 -->
|
||||
<id>copy-resources</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>*.yml</include>
|
||||
<include>*.xml</include>
|
||||
<include>*.properties</include>
|
||||
<include>static/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<outputDirectory>${project.build.directory}/config</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,19 @@
|
||||
package com.czlisinterface.start;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
@SpringBootApplication
|
||||
@MapperScan("com.czlisinterface.**.mapper")
|
||||
@ComponentScan(basePackages = {"com.czlisinterface"})
|
||||
@EnableTransactionManagement
|
||||
@ServletComponentScan
|
||||
public class InterfaceApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(InterfaceApplication.class,args);
|
||||
}
|
||||
}
|
||||
50
lisinterface_start/src/main/resources/application-bj.yml
Normal file
50
lisinterface_start/src/main/resources/application-bj.yml
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
primary: master
|
||||
strict: false
|
||||
datasource:
|
||||
# 配置数据源信息
|
||||
#lis数据库配置
|
||||
master:
|
||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=lisnet_ss
|
||||
username: sa
|
||||
password: jiangsheng
|
||||
#院感数据库
|
||||
sqlyg:
|
||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=lisnet_ss
|
||||
username: sa
|
||||
password: jiangsheng
|
||||
|
||||
#HIS数据库
|
||||
sqlhis:
|
||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=lisnet_ss
|
||||
username: sa
|
||||
password: jiangsheng
|
||||
|
||||
#体检数据库
|
||||
sqltj:
|
||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=lisnet_ss
|
||||
username: sa
|
||||
password: jiangsheng
|
||||
|
||||
logging:
|
||||
file:
|
||||
# 日志目录
|
||||
#name: D:/log/springboot.log
|
||||
path: D:/log_lisinterface
|
||||
|
||||
#项目配置信息
|
||||
lisinterface:
|
||||
action:
|
||||
type: jldermyy_new1 #接口对象名
|
||||
task:
|
||||
type: 0 #开启定时任务 0为不开启,其他值为开启
|
||||
cron: 0/10 * * * * ?
|
||||
job: jldermyy_new1 #开启任务的后台定时业务类
|
||||
|
||||
26
lisinterface_start/src/main/resources/application.yml
Normal file
26
lisinterface_start/src/main/resources/application.yml
Normal file
@ -0,0 +1,26 @@
|
||||
server:
|
||||
port: 9566
|
||||
tomcat:
|
||||
accept-count: 1000
|
||||
threads:
|
||||
# tomcat最大线程数,默认为200
|
||||
max: 800
|
||||
# Tomcat启动初始化的线程数,默认值10
|
||||
min-spare: 100
|
||||
|
||||
spring:
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
profiles:
|
||||
active: bj
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
#日志输入
|
||||
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 这个配置会将执行的sql打印出来,这个可以存放在文件中 StdOutImpl的是只能打印到控制台
|
||||
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||
# mybatis-plus默认开启了下滑线转换驼峰 需要关闭(设置为false)
|
||||
map-underscore-to-camel-case: false
|
||||
|
||||
109
lisinterface_start/src/main/resources/logback-spring.xml
Normal file
109
lisinterface_start/src/main/resources/logback-spring.xml
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 子节点<property> :用来定义变量值,它有两个属性name和value,通过<property>定义的值会被插入到logger上下文中,可以使“${}”来使用变量-->
|
||||
<property name="pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %c{1} %L [%p] %m%n %caller{0}"/>
|
||||
<!-- 直接本配置文件配置,name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。java.io.tmpdir的值从虚拟机参数中获取:-Djava.io.tmpdir -->
|
||||
<property name="LOG_PATH" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}"/>
|
||||
|
||||
<!-- 获取Environment中的值; 属性文件中可以设置 log.path的值来动态变更路径-->
|
||||
<springProperty scope="context" name="log.path" source="log.path"/>
|
||||
|
||||
<!-- 把日志输出到控制台-->
|
||||
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder charset="UTF-8">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度,%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} >>> %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="common" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_PATH}/common.log</file>
|
||||
<!-- 如果是 true,日志被追加到文件结尾,如果是 false,清空现存文件,默认是true。 -->
|
||||
<append>true</append>
|
||||
<!-- 对记录事件进行格式化 -->
|
||||
<encoder charset="UTF-8">
|
||||
<pattern>${pattern}</pattern>
|
||||
</encoder>
|
||||
<!-- 匹配>=INFO级别的日志-->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>INFO</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<!-- 最常用的滚动策略,它根据时间来制定滚动策略,既负责滚动也负责出发滚动-->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/common.log.%d{yyyy-MM-dd}</fileNamePattern>
|
||||
<!-- 可选节点,控制保留的归档文件的最大天数。-->
|
||||
<maxHistory>30</maxHistory>
|
||||
<!-- 这个是按照文件大小进行保存-->
|
||||
<!-- <fileNamePattern>${LOG_PATH}/common.log.%d{yyyy-MM-dd}_%i</fileNamePattern>-->
|
||||
<!-- <!– 可选节点,控制保留的归档文件的最大天数。–>-->
|
||||
<!-- <maxHistory>30</maxHistory>-->
|
||||
<!-- <maxFileSize>10MB</maxFileSize>-->
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="exception" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_PATH}/exception.log</file>
|
||||
<append>true</append>
|
||||
<!-- 匹配>=ERROR级别的日志-->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<encoder charset="UTF-8">
|
||||
<pattern>${pattern}</pattern>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/exception.log.%d{yyyy-MM-dd}</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
|
||||
<appender name="mysql_log" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_PATH}/mysql_log.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件输出文件名 -->
|
||||
<FileNamePattern>${LOG_PATH}/mysql_log.log.%d{yyyy-MM-dd}</FileNamePattern>
|
||||
<!-- 日志文件保留天数 -->
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder" charset="UTF-8">
|
||||
<pattern>${pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="com.czlisinterface.system.common.MapperTurboFilter"/>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>DEBUG</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 打印mysql日志 name= 存放mapper的包名; 注意mybatis-plus.configuration.log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||
如果log-impl: org.apache.ibatis.logging.stdout.StdOutImpl ;则只会打印到控制台;不会存放到文件
|
||||
-->
|
||||
<logger name="com.czlisinterface" level="DEBUG" additivity="true">
|
||||
<!-- <appender-ref ref="stdout"/>-->
|
||||
<appender-ref ref="mysql_log" />
|
||||
</logger>
|
||||
|
||||
|
||||
<!-- 用来设置某一个包或具体的某一个类的日志打印级别、以及指定<appender>。
|
||||
name: 用来指定受此loger约束的某一个包或者具体的某一个类。
|
||||
level: 如果未设置此属性,那么当前loger将会继承上级的级别。上级是<root>
|
||||
addtivity:是否向上级logger传递打印信息。默认是true
|
||||
-->
|
||||
|
||||
|
||||
<!--它是根loger,是所有<loger>的上级。只有一个level属性,因为name已经被命名为"root",且已经是最上级了。 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="stdout"/>
|
||||
<appender-ref ref="common"/>
|
||||
<appender-ref ref="exception"/>
|
||||
</root>
|
||||
</configuration>
|
||||
65
pom.xml
Normal file
65
pom.xml
Normal file
@ -0,0 +1,65 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>lisinterface8.0</artifactId>
|
||||
<version>1.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>lisinterface8.0</name>
|
||||
<modules>
|
||||
<module>liscommon</module>
|
||||
<module>lisinterface_jldermyy</module>
|
||||
<module>lisinterface_start</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
Loading…
x
Reference in New Issue
Block a user