高州健康平台接口
This commit is contained in:
parent
2481d72ba1
commit
22e5a9cac1
@ -1,12 +1,10 @@
|
||||
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";
|
||||
|
||||
@ -8,7 +8,7 @@ import javax.jws.WebService;
|
||||
public interface LisWebService {
|
||||
String WEBSERVICE_NAME = "LisWebService";
|
||||
String TARGET_NAMESPACE = "http://demo.webservice.shanhy.com";
|
||||
String WEBSERVICE_INTERFACE_NAME = "com.czlis.AllInterface.webservices.LisWebService";
|
||||
String WEBSERVICE_INTERFACE_NAME = "com.czlisinterface.system.webservices.LisWebService";
|
||||
|
||||
@WebMethod
|
||||
String hello(@WebParam(name = "userName3") String name);
|
||||
|
||||
@ -29,10 +29,10 @@ public class WebServiceConfiguration {
|
||||
private LisWebService lisWebService;
|
||||
|
||||
@Value("${lisinterface.action.type:}")
|
||||
private String lisClass;
|
||||
String lisClass;
|
||||
|
||||
@Value("${lisinterface.webservice.open:}")
|
||||
private String open;
|
||||
String open;
|
||||
|
||||
/**
|
||||
* Apache CXF 核心架构是以BUS为核心,整合其他组件。
|
||||
@ -76,16 +76,15 @@ public class WebServiceConfiguration {
|
||||
*/
|
||||
@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;
|
||||
case "nzzyy":
|
||||
endpoint.publish("/ws/receiverCritical");
|
||||
break;
|
||||
default:
|
||||
endpoint.publish("/ws/lisWsApi");
|
||||
break;
|
||||
}
|
||||
|
||||
return endpoint;
|
||||
|
||||
26
lisinterface_gzszyy/pom.xml
Normal file
26
lisinterface_gzszyy/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_gzszyy</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>lisinterface_gzszyy</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,7 @@
|
||||
package com.czlisinterface.gzszyy.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.gzszyy.pojo.LabUploadreportPt;
|
||||
|
||||
public interface LabUploadreportPtMapper extends BaseMapper<LabUploadreportPt> {
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.czlisinterface.gzszyy.mapper;
|
||||
|
||||
import com.czlisinterface.gzszyy.pojo.V_LAR_EXAM_INFO;
|
||||
import com.czlisinterface.gzszyy.pojo.V_TESTDETAILS;
|
||||
import com.czlisinterface.gzszyy.pojo.V_lab_microbe;
|
||||
import com.czlisinterface.gzszyy.pojo.V_lab_susceptibility;
|
||||
import com.czlisinterface.system.pojo.LabReqmain;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface LisMapper_gzszyy {
|
||||
List<V_LAR_EXAM_INFO> getV_LAR_EXAM_INFO(@Param("jyrq") Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||
List<V_TESTDETAILS> getV_TESTDETAILS(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||
List<V_lab_susceptibility> getV_lab_susceptibility(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||
List<V_lab_microbe> getV_lab_microbe(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||
List<Map<String,Object>> getData();
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.czlisinterface.gzszyy.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.gzszyy.pojo.V_LAR_EXAM_INFO;
|
||||
|
||||
@DS("sqlpt")
|
||||
public interface V_LAR_EXAM_INFOMapper extends BaseMapper<V_LAR_EXAM_INFO> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.czlisinterface.gzszyy.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.gzszyy.pojo.V_TESTDETAILS;
|
||||
|
||||
@DS("sqlpt")
|
||||
public interface V_TESTDETAILSMapper extends BaseMapper<V_TESTDETAILS> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.czlisinterface.gzszyy.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.gzszyy.pojo.V_lab_microbe;
|
||||
|
||||
@DS("sqlpt")
|
||||
public interface V_lab_microbeMapper extends BaseMapper<V_lab_microbe> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.czlisinterface.gzszyy.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.czlisinterface.gzszyy.pojo.V_lab_susceptibility;
|
||||
|
||||
@DS("sqlpt")
|
||||
public interface V_lab_susceptibilityMapper extends BaseMapper<V_lab_susceptibility> {
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.czlisinterface.gzszyy.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LabUploadreportPt {
|
||||
private String uptype;
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
private Date shsj;
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.czlisinterface.gzszyy.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("LAR_EXAM_INFO")
|
||||
public class V_LAR_EXAM_INFO {
|
||||
private String RPT_CODE;
|
||||
private String RPT_DT;
|
||||
private String PERSONAL_ID;
|
||||
private String APP_CODE;
|
||||
private String OP_EM_HP_EX_MARK;
|
||||
private String OP_EM_HP_EX_NO;
|
||||
private String CARDTYPE;
|
||||
private String CARDNO;
|
||||
private String NAME;
|
||||
private String SEX;
|
||||
private String SEX_NAME;
|
||||
private String BIRTHDAY;
|
||||
private String WARD_NAME;
|
||||
private String BED_NO;
|
||||
private String TEST_RPT_NAME;
|
||||
private String LAB_TYPE_CODE;
|
||||
private String LAB_TYPE_NAME;
|
||||
private String MICROBE_TEST_MARK;
|
||||
private String SPE_INSPECT_MARK;
|
||||
private String EXAM_PURPOSE;
|
||||
private String DETAIL_COUNT;
|
||||
private String DIAG_CODE;
|
||||
private String DIAG_NAME;
|
||||
private String SPECIMEN_NO;
|
||||
private String SAMP_CLASS;
|
||||
private String SAMP_CNAME;
|
||||
private String SPECIMEN_STATUS_DESC;
|
||||
private String SAMP_DT;
|
||||
private String SAMP_ORGAN_CODE;
|
||||
private String SAMP_ORGAN_NAME;
|
||||
private String SAMP_IDCARD;
|
||||
private String SAMP_NAME;
|
||||
private String ACCEPT_DT;
|
||||
private String TESTMETHOD;
|
||||
private String TEST_NOTE;
|
||||
private String ORGAN_CODE;
|
||||
private String ORGAN_NAME;
|
||||
private String APP_DPT_CODE;
|
||||
private String APP_DPT_NAME;
|
||||
private String APP_DOC_IDCARD;
|
||||
private String APP_DOC_NAME;
|
||||
private String TEST_DPT_CODE;
|
||||
private String TEST_DPT_NAME;
|
||||
private String TEST_DOC_IDCARD;
|
||||
private String TEST_DOC_NAME;
|
||||
private String TEST_DT;
|
||||
private String PRINT_DTIME;
|
||||
private String RPT_IDCARD;
|
||||
private String RPT_DOCTOR;
|
||||
private String RV_IDCARD;
|
||||
private String RV_NAME;
|
||||
private String CHECK_AUDIT_TIME;
|
||||
private Integer REC_NUMB;
|
||||
private String CARDTYPE_ORI;
|
||||
private String CARDTYPE_NAME_ORI;
|
||||
private String SAMP_ORGAN_CODE_ORI;
|
||||
private String SAMP_ORGAN_NAME_ORI;
|
||||
private String TEST_ORGAN_CODE_ORI;
|
||||
private String TEST_ORGAN_NAME_ORI;
|
||||
private String TEST_DPT_CODE_ORI;
|
||||
private String TEST_DPT_NAME_ORI;
|
||||
private String SAMP_CLASS_ORI;
|
||||
private String SAMP_CLASS_NAME_ORI;
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.czlisinterface.gzszyy.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("TESTDETAILS")
|
||||
public class V_TESTDETAILS {
|
||||
private String RESULT_ID;
|
||||
private String RPT_DT;
|
||||
private String PERSONAL_ID;
|
||||
private String APP_CODE;
|
||||
private String RPT_CODE;
|
||||
private String OP_EM_HP_EX_MARK;
|
||||
private String OP_EM_HP_EX_NO;
|
||||
private String CARDTYPE;
|
||||
private String CARDNO;
|
||||
private String LAB_TYPE_CODE;
|
||||
private String LAB_TYPE_NAME;
|
||||
private String EX_PROJ_CODE;
|
||||
private String EX_PROJ_NAME;
|
||||
private String INP_EX_PROJ_CODE;
|
||||
private String INP_EX_PROJ_NAME;
|
||||
private String HOS_EX_PROJ_CODE;
|
||||
private String HOS_EX_PROJ_NAME;
|
||||
private String EX_PROJ_SN;
|
||||
private String INDICATOR_CODE_RAW;
|
||||
private String INDICATOR_NAME_RAW;
|
||||
private String LONIC_CODE;
|
||||
private String EX_RPT_TYPE;
|
||||
private String NO_RPT;
|
||||
private String RPT_UNIT;
|
||||
private String IF_MARK;
|
||||
private String RESULT_INTERPRE_CODE;
|
||||
private String RESULT_INTERPRE_NAME;
|
||||
private String REF_RANGE;
|
||||
private BigDecimal UNL;
|
||||
private BigDecimal LNL;
|
||||
private BigDecimal UCL;
|
||||
private String LCL;
|
||||
private String ORGAN_CODE;
|
||||
private String ORGAN_NAME;
|
||||
private String DPT_CODE;
|
||||
private String DPT_NAME;
|
||||
private String TESTER_IDCARD;
|
||||
private String TESTER_NAME;
|
||||
private String TEST_DT;
|
||||
private String AUTH_DOCTOR_CODE;
|
||||
private String AUTH_DOCTOR_NAME;
|
||||
private String HOS_PACK_NO;
|
||||
private String HOS_PACK_NAME;
|
||||
private String EX_RPT_TYPE_ORI;
|
||||
private String EX_RPT_TYPE_NAME_ORI;
|
||||
private String EX_PROJ_CODE_ORI;
|
||||
private String EX_PROJ_NAME_ORI;
|
||||
private String ORGAN_CODE_ORI;
|
||||
private String ORGAN_NAME_ORI;
|
||||
private String DPT_CODE_ORI;
|
||||
private String DPT_NAME_ORI;
|
||||
private String CARDTYPE_ORI;
|
||||
private String CARDTYPE_NAME_ORI;
|
||||
private String TEST_EQUI_DESC;
|
||||
private String TEST_EQUI_ID;
|
||||
private String TEST_EQUI_NAME;
|
||||
private String PRINT_ORDER;
|
||||
private String PATHO_DESC;
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.czlisinterface.gzszyy.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_microbe")
|
||||
public class V_lab_microbe {
|
||||
private String ORGAN_CODE;
|
||||
private String ORGAN_NAME;
|
||||
private String LAB_RESULT_ID;
|
||||
private String RPT_CODE;
|
||||
private String PATIENT_ID;
|
||||
private String OP_EM_HP_EX_MARK;
|
||||
private String OP_EM_HP_EX_NO;
|
||||
private String CARDTYPE;
|
||||
private String CARDNO;
|
||||
private String MICROBE_CODE_RAW;
|
||||
private String MICROBE_NAME_RAW;
|
||||
private String MICROBE_CODE;
|
||||
private String MICROBE_NAME;
|
||||
private String LAB_INSTRUMENT_NAME;
|
||||
private String LAB_TEST_METHOD;
|
||||
private String MICROBE_CULTURE_DESC;
|
||||
private String COLONY_FORM;
|
||||
private String MICROBE_AMOUNT;
|
||||
private String MULTI_BACTERIA_MARK;
|
||||
private String CULTURE_MEDIUM;
|
||||
private String CULTURE_DURATION;
|
||||
private String CULTURE_CONDITION;
|
||||
private String FINDING_WAY;
|
||||
private String NO_RPT;
|
||||
private String TEST_EQUI_DESC;
|
||||
private String TEST_EQUI_ID;
|
||||
private String TEST_EQUI_NAME;
|
||||
private String EXP_BOARD_ORDER;
|
||||
private String EXP_BOARD_NAME;
|
||||
private String TEST_PERFORMER_ID;
|
||||
private String TEST_PERFORMER_NAME;
|
||||
private String TEST_DTIME;
|
||||
private String AUTHENTICATOR_ID;
|
||||
private String AUTHENTICATOR_NAME;
|
||||
private String AUTHENTICATION_DTIME;
|
||||
private String LAST_UPDATE_DTIME;
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.czlisinterface.gzszyy.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("lab_susceptibility")
|
||||
public class V_lab_susceptibility {
|
||||
private String ORGAN_CODE;
|
||||
private String ORGAN_NAME;
|
||||
private String SUSCEPT_RESULT_ID;
|
||||
private String PATIENT_ID;
|
||||
private String OP_EM_HP_EX_MARK;
|
||||
private String OP_EM_HP_EX_NO;
|
||||
private String CARDTYPE;
|
||||
private String CARDNO;
|
||||
private String RPT_CODE;
|
||||
private String PRINT_ORDER;
|
||||
private String MICROBE_CODE;
|
||||
private String MICROBE_NAME;
|
||||
private String SEQUENCE_NO;
|
||||
private String SUSC_METHOD;
|
||||
private String ANTIBIOTIC_CODE;
|
||||
private String ANTIBIOTIC_NAME;
|
||||
private String SENSITIVITY_CODE;
|
||||
private String SENSITIVITY_NAME;
|
||||
private String REF_RANGER;
|
||||
private String DRUG_CONCENTRATION;
|
||||
private String BACSTA_CONCEN;
|
||||
private String BACSTA_DIAMETER;
|
||||
private String SUSC_RESULT_DESC;
|
||||
private String IS_NATURAL_RESISTANCE;
|
||||
private String EXP_BOARD_ORDER;
|
||||
private String TEST_PERFORMER_ID;
|
||||
private String TEST_PERFORMER_NAME;
|
||||
private String TEST_DTIME;
|
||||
private String RESULT_DTIME;
|
||||
private String AUTHENTICATOR_ID;
|
||||
private String AUTHENTICATOR_NAME;
|
||||
private String AUTHENTICATION_DTIME;
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
package com.czlisinterface.gzszyy.service.impl;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.czlisinterface.gzszyy.mapper.*;
|
||||
import com.czlisinterface.gzszyy.pojo.*;
|
||||
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 com.czlisinterface.system.pojo.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 高州市中医院接口
|
||||
* 全民健康平台接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@ConditionalOnProperty(name="lisinterface.action.type",havingValue = "gzszyy")
|
||||
public class Lisinterface_gzszyy extends CommonImpl {
|
||||
|
||||
@Resource
|
||||
LisMapper_gzszyy lisMapperGzszyy;
|
||||
@Resource
|
||||
V_lab_microbeMapper vLabMicrobeMapper;
|
||||
@Resource
|
||||
V_lab_susceptibilityMapper vLabSusceptibilityMapper;
|
||||
@Resource
|
||||
V_LAR_EXAM_INFOMapper vLAR_EXAM_INFOMapper;
|
||||
@Resource
|
||||
V_TESTDETAILSMapper vTESTDETAILSMapper;
|
||||
@Resource
|
||||
LabUploadreportPtMapper labUploadreportPtMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 发送数据到平台中间库,为mysql数据库
|
||||
* @return
|
||||
*/
|
||||
public Result sendData(){
|
||||
List<Map<String, Object>> dataList = lisMapperGzszyy.getData();
|
||||
for (Map<String, Object> stringObjectMap : dataList) {
|
||||
Date jyrq = (Date) stringObjectMap.get("jyrq");
|
||||
String yq = stringObjectMap.get("yq").toString();
|
||||
String ybh = stringObjectMap.get("ybh").toString();
|
||||
Date confirmdt = (Date)stringObjectMap.get("confirmdt");
|
||||
List<V_LAR_EXAM_INFO> vLarExamInfoList = lisMapperGzszyy.getV_LAR_EXAM_INFO(jyrq, yq, ybh);
|
||||
LabUploadreportPt labUploadreportPt = new LabUploadreportPt();
|
||||
labUploadreportPt.setJyrq(jyrq);
|
||||
labUploadreportPt.setYq(yq);
|
||||
labUploadreportPt.setYbh(ybh);
|
||||
labUploadreportPt.setShsj(confirmdt);
|
||||
try{
|
||||
for (V_LAR_EXAM_INFO vLarExamInfo : vLarExamInfoList) {
|
||||
vLAR_EXAM_INFOMapper.insert(vLarExamInfo);
|
||||
}
|
||||
List<V_TESTDETAILS> vTestdetailsList = lisMapperGzszyy.getV_TESTDETAILS(jyrq, yq, ybh);
|
||||
for (V_TESTDETAILS vTestdetails : vTestdetailsList) {
|
||||
vTESTDETAILSMapper.insert(vTestdetails);
|
||||
}
|
||||
List<V_lab_susceptibility> vLabSusceptibilityList = lisMapperGzszyy.getV_lab_susceptibility(jyrq, yq, ybh);
|
||||
for (V_lab_susceptibility vLabSusceptibility : vLabSusceptibilityList) {
|
||||
vLabSusceptibilityMapper.insert(vLabSusceptibility);
|
||||
}
|
||||
List<V_lab_microbe> vLabMicrobeList = lisMapperGzszyy.getV_lab_microbe(jyrq, yq, ybh);
|
||||
for (V_lab_microbe vLabMicrobe : vLabMicrobeList) {
|
||||
vLabMicrobeMapper.insert(vLabMicrobe);
|
||||
}
|
||||
labUploadreportPt.setUptype("1"); //成功
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
labUploadreportPt.setUptype("0"); //失败
|
||||
log.error("插入数据到健康平台中间表失败;",e);
|
||||
}
|
||||
|
||||
labUploadreportPtMapper.insert(labUploadreportPt);
|
||||
|
||||
}
|
||||
return new Result("0","上传成功!");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.czlisinterface.gzszyy.task;
|
||||
|
||||
import com.czlisinterface.gzszyy.service.impl.Lisinterface_gzszyy;
|
||||
import com.czlisinterface.system.pojo.Result;
|
||||
import com.czlisinterface.system.task.BaskCommonTask;
|
||||
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.Date;
|
||||
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@ConditionalOnProperty(name="lisinterface.task.job",havingValue = "gzszyy")
|
||||
public class GzszyyTask extends BaskCommonTask {
|
||||
|
||||
@Resource
|
||||
Lisinterface_gzszyy lisinterfaceGzszyy;
|
||||
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
sendData();
|
||||
}
|
||||
|
||||
public void sendData(){
|
||||
lisinterfaceGzszyy.sendData();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
<?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.gzszyy.mapper.LisMapper_gzszyy">
|
||||
<select id="getV_LAR_EXAM_INFO" resultType="com.czlisinterface.gzszyy.pojo.V_LAR_EXAM_INFO">
|
||||
select * from V_LAR_EXAM_INFO where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
||||
</select>
|
||||
|
||||
<select id="getV_TESTDETAILS" resultType="com.czlisinterface.gzszyy.pojo.V_TESTDETAILS">
|
||||
select * from V_TESTDETAILS where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
||||
</select>
|
||||
|
||||
<select id="getV_lab_susceptibility" resultType="com.czlisinterface.gzszyy.pojo.V_lab_susceptibility">
|
||||
select * from V_lab_susceptibility where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
||||
</select>
|
||||
|
||||
<select id="getV_lab_microbe" resultType="com.czlisinterface.gzszyy.pojo.V_lab_microbe">
|
||||
select * from V_lab_microbe where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
||||
</select>
|
||||
|
||||
<select id="getData" resultType="map">
|
||||
<![CDATA[
|
||||
select top 100 brly,brdh,brxm,sqh,yq,jyrq,ybh,confirmdt,convert(varchar(8),a.jyrq,112)+'_' + rtrim(a.yq) + '_' + a.ybh as bgdh
|
||||
from lab_pat a
|
||||
where a.jgbz ='2' and a.sqh <>'' AND a.brly IN('1','3')
|
||||
and a.yq in (select yq from lab_instr)
|
||||
and (select count(1) from v_LAR_EXAM_INFO c where a.ybh=c.ybh and a.yq=c.yq and a.jyrq=c.jyrq)>0
|
||||
and (select count(1) from lab_uploadreport_pt d where a.ybh=d.ybh and a.yq=d.yq and a.jyrq=d.jyrq)<=0
|
||||
and a.jyrq>= '2024-01-01'
|
||||
]]>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,8 @@
|
||||
package com.czlisinterface.jldermyy.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface LisMapper_jldermyy {
|
||||
List<Map<String,Object>> getAddChange(String sfxmdh);
|
||||
}
|
||||
@ -47,8 +47,8 @@ public class Lisinterface_jldermyy extends CommonImpl {
|
||||
|
||||
@Resource
|
||||
CommonUtil commonUtil;
|
||||
// @Resource
|
||||
// HisMapper_jldermyy hisMapperJldermyy;
|
||||
@Resource
|
||||
HisMapper_jldermyy hisMapperJldermyy;
|
||||
@Resource
|
||||
LisWarningUtil lisWarningUtil;
|
||||
|
||||
@ -64,6 +64,9 @@ public class Lisinterface_jldermyy extends CommonImpl {
|
||||
switch (method){
|
||||
case "getDictDPM":
|
||||
return getDictDPM("");
|
||||
case "test":
|
||||
List<LabReqmain> labreqmain = hisMapperJldermyy.getLabreqmain();
|
||||
return new Result("0","查询成功!",labreqmain);
|
||||
}
|
||||
|
||||
return new Result("-1","没有找到接口方法!");
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package com.czlisinterface.jldermyy.webservice;
|
||||
|
||||
import cn.hutool.core.util.XmlUtil;
|
||||
import com.czlisinterface.jldermyy.mapper.LisMapper_jldermyy;
|
||||
import com.czlisinterface.jldermyy.service.impl.Lisinterface_jldermyy;
|
||||
import com.czlisinterface.system.utils.CommonUtil;
|
||||
import com.czlisinterface.system.webservices.LisWebService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
@ -8,16 +11,23 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.jws.WebService;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@ConditionalOnProperty(name="lisinterface.webservice.type",havingValue = "yzsfybjy")
|
||||
@ConditionalOnProperty(name="lisinterface.webservice.type",havingValue = "jldermyy_new1")
|
||||
@WebService(name = LisWebService.WEBSERVICE_NAME, targetNamespace = LisWebService.TARGET_NAMESPACE,
|
||||
endpointInterface = LisWebServicesImpl_jldermyy.WEBSERVICE_INTERFACE_NAME)
|
||||
public class LisWebServicesImpl_jldermyy implements LisWebServices_jldermyy{
|
||||
|
||||
@Resource
|
||||
LisMapper_jldermyy lisMapperJldermyy;
|
||||
@Resource
|
||||
CommonUtil commonUtil;
|
||||
|
||||
/**
|
||||
* 采血费附加计费
|
||||
* @param xmlStr
|
||||
@ -25,9 +35,11 @@ public class LisWebServicesImpl_jldermyy implements LisWebServices_jldermyy{
|
||||
*/
|
||||
@Override
|
||||
public String bloodCharge(String xmlStr) {
|
||||
log.info("采血附加费接口:{}",xmlStr);
|
||||
log.info("采血附加费接口,入参:{}",xmlStr);
|
||||
try{
|
||||
Document document = XmlUtil.parseXml(xmlStr);
|
||||
NodeList nodeListBySample = XmlUtil.getNodeListByXPath("//Req/LisSamplecollect/Row", document);
|
||||
String sfxmdhStr = "";
|
||||
for (int i = 1; i <= nodeListBySample.getLength(); i++) {
|
||||
String deptId = String.valueOf(XmlUtil.getByXPath("//Req/LisSamplecollect/Row[" + i + "]/DeptId", document, XPathConstants.STRING));
|
||||
String orderCode = String.valueOf(XmlUtil.getByXPath("//Req/LisSamplecollect/Row[" + i + "]/OrderCode", document, XPathConstants.STRING));
|
||||
@ -36,14 +48,56 @@ public class LisWebServicesImpl_jldermyy implements LisWebServices_jldermyy{
|
||||
System.out.println("deptId:"+deptId);
|
||||
System.out.println("orderCode:"+orderCode);
|
||||
System.out.println("applyNo:"+applyNo);
|
||||
sfxmdhStr += ",'"+ orderCode + "'";
|
||||
}
|
||||
//返回参数
|
||||
Map<String,Object> outCalcModelMap = new HashMap<String,Object>();
|
||||
outCalcModelMap.put("Status","");
|
||||
outCalcModelMap.put("Content","");
|
||||
outCalcModelMap.put("CollNum","");
|
||||
List<Map<String,Object>> conList = new ArrayList<Map<String,Object>>();
|
||||
List<Map<String, Object>> addChangeList = lisMapperJldermyy.getAddChange(sfxmdhStr);
|
||||
for (Map<String, Object> stringObjectMap : addChangeList) {
|
||||
if(stringObjectMap == null) continue;
|
||||
String sampletips = String.valueOf(stringObjectMap.get("sampletips"));
|
||||
String sfxmdm = String.valueOf(stringObjectMap.get("sfxmdm"));
|
||||
Map<String,Object> conListMap = new HashMap<>();
|
||||
conListMap.put("ContainerId","");
|
||||
conListMap.put("ContainerName",sampletips);
|
||||
conListMap.put("ContainerNum","1");
|
||||
conListMap.put("ContainerFeeCode",sfxmdm);
|
||||
conList.add(conListMap);
|
||||
}
|
||||
outCalcModelMap.put("ConList",conList);
|
||||
outCalcModelMap.put("OrderCodeList",sfxmdhStr);//医嘱号列表,用逗号隔开
|
||||
return toXmlStr(outCalcModelMap,"0","成功!");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("调用接口失败:"+e);
|
||||
return toXmlStr(null,"-1","失败!"+e.getMessage());
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String hello(String name) {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
private String toXmlStr(Map<String, Object> paramMap,String ret,String msg){
|
||||
Map<String,Object> msgHeadMap = new HashMap<>();
|
||||
msgHeadMap.put("SrvId","02025");
|
||||
msgHeadMap.put("ResSysId","041001-4");
|
||||
msgHeadMap.put("ResTag","");
|
||||
msgHeadMap.put("ResMsg","");
|
||||
msgHeadMap.put("MsgId", UUID.randomUUID());
|
||||
msgHeadMap.put("MsgCheckCode","");
|
||||
msgHeadMap.put("Dt",commonUtil.currentStringTime());
|
||||
msgHeadMap.put("Remark","");
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("MsgHead",msgHeadMap);
|
||||
map.put("OutCalcModel",paramMap);
|
||||
return XmlUtil.mapToXmlStr(map, "Req");
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
<?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.LisMapper_jldermyy">
|
||||
<select id="getAddChange" parameterType="string" resultType="map">
|
||||
<![CDATA[SELECT
|
||||
distinct
|
||||
lab_feeitem_vs_class.sflbdh,
|
||||
lab_feeitemclass.sflbmc,
|
||||
lab_feeitemclass.sampletips,
|
||||
lab_feeitemclass.sfxmdm
|
||||
|
||||
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 )
|
||||
and lab_feeitemclass.yblx <> '末梢血' and lab_feeitemclass.yblx LIKE '%血%' and lab_feeitem_vs_class.sfxmdh in ( ${sfxmdh}) ]]>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -32,6 +32,11 @@
|
||||
<artifactId>lisinterface_yzsfybjy</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>lisinterface_gzszyy</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@ -80,6 +85,7 @@
|
||||
liscommon-1.0.jar
|
||||
lisinterface_jldermyy-1.0.jar
|
||||
lisinterface_yzsfybjy-1.0.jar
|
||||
lisinterface_gzszyy-1.0.jar
|
||||
</Class-Path>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user