Compare commits

...

3 Commits

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>docus-report-manager</artifactId>
<artifactId>docus-report-unblocking</artifactId>
<dependencies>
<dependency>

@ -1,12 +1,11 @@
package com.docus.server;
import com.docus.server.reportmanager.service.ReportManagerService;
import com.docus.server.reportmanager.service.ReportSealedService;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
@ -18,8 +17,8 @@ import javax.xml.ws.Endpoint;
@Configuration
public class CxfConfig {
@Autowired
@Qualifier("SzyReportManagerService")
private ReportManagerService reportManagerService;
@Qualifier("SzyReportSealedService")
private ReportSealedService reportSealedService;
/**
* ServletbeanNamedispatcherServlet
@ -40,7 +39,7 @@ public class CxfConfig {
@Bean
@Qualifier("reportEndPoint")
public Endpoint reportEndPoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), reportManagerService);
EndpointImpl endpoint = new EndpointImpl(springBus(), reportSealedService);
endpoint.publish("/report");
return endpoint;
}

@ -0,0 +1,58 @@
package com.docus.server.reportmanager.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author jiashi
* @since 2023-05-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TSeal对象", description="在院封存")
public class TSeal implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "在院封存病案主键")
private String patientId;
@ApiModelProperty(value = "封存id")
private String sealId;
@ApiModelProperty(value = "住院号")
private String inpatientNo;
@ApiModelProperty(value = "住院就诊号")
private String jzh;
@ApiModelProperty(value = "患者姓名")
private String name;
@ApiModelProperty(value = "住院时间")
private Date admissDate;
@ApiModelProperty(value = "封存时间")
private Date sealDate;
@ApiModelProperty(value = "文件来源")
private Integer fileSource;
@ApiModelProperty(value = "就诊次数")
private Integer admissTimes;
@ApiModelProperty(value = "纸质是否签名 0否 1是")
private Integer signinfo;
@ApiModelProperty(value = "备注")
private String remark;
}

@ -31,4 +31,13 @@ public interface ScanAssortMapper {
* @author YongBin Wen
*/
List<Long> getIdByPatientTask(@Param("patientId") String patientId, @Param("taskId") Long taskId);
/**
*
* @date 2024/1/10 11:25
* @author YongBin Wen
* @param patientId
* @return int
*/
int unblocking(@Param("patientId")String patientId);
}

@ -0,0 +1,14 @@
package com.docus.server.reportmanager.mapper;
import com.docus.server.reportmanager.entity.TSeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author wyb
*/
@Mapper
public interface TSealMapper {
TSeal findByCondition(@Param("condition") TSeal condition);
}

@ -0,0 +1,21 @@
package com.docus.server.reportmanager.service;
import javax.jws.WebService;
/**
*
*
* @author YongBin Wen
* @date 2024/1/3 16:11
*/
@WebService
public interface ReportSealedService {
/**
*
*
* @param message
* @return
*/
String Q_WS_JFHZBL(String message);
}

@ -0,0 +1,81 @@
package com.docus.server.reportmanager.service.impl;
import com.docus.infrastructure.core.exception.BaseException;
import com.docus.server.reportmanager.entity.TSeal;
import com.docus.server.reportmanager.mapper.ScanAssortMapper;
import com.docus.server.reportmanager.mapper.TSealMapper;
import com.docus.server.reportmanager.service.ReportSealedService;
import com.docus.server.reportmanager.util.XmlUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.w3c.dom.Node;
import javax.annotation.Resource;
import java.util.Objects;
/**
* 广
*
* @author YongBin Wen
* @date 2024/1/3 16:11
*/
@Service("SzyReportSealedService")
@Slf4j
public class SzyReportSealedServiceImpl implements ReportSealedService {
@Resource
private ScanAssortMapper scanAssortMapper;
@Resource
private TSealMapper sealMapper;
@Override
public String Q_WS_JFHZBL(String message) {
log.info("广东省中医报告解封,收到解封患者病历的信息:{}", message);
try {
XmlUtil xmlUtil = XmlUtil.of(message);
// 住院流水号
Node jzhNode = xmlUtil.getNode("/Request/INHOSP_NO");
String jzh = jzhNode.getTextContent();
// 封存id
Node sealIdNode = xmlUtil.getNode("/Request/SEAL_ID");
String sealId = sealIdNode.getTextContent();
TSeal condition = new TSeal();
condition.setJzh(jzh);
condition.setSealId(sealId);
TSeal seal = sealMapper.findByCondition(condition);
if (Objects.isNull(seal)) {
log.error("不存在封存患者信息");
return error("不存在封存患者信息");
}
scanAssortMapper.unblocking(seal.getPatientId());
return success();
} catch (BaseException baseException) {
log.error(baseException.getMessage(), baseException);
return error(baseException.getMessage());
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
return error("系统内部错误,请联系开发人员");
}
}
private String error(String msg) {
return "<Response>\n" +
" <RetInfo>\n" +
" <RetCode>1</RetCode>\n" +
" <RetCon>" + msg + "</RetCon>\n" +
" </RetInfo>\n" +
"</Response>";
}
private String success() {
return "<Response>\n" +
" <RetInfo>\n" +
" <RetCode>0</RetCode>\n" +
" <RetCon>成功</RetCon>\n" +
" </RetInfo>\n" +
"</Response>";
}
}

@ -1,7 +1,7 @@
@echo off
set deployDir=%1\docus-report-manager
if %deployDir%=="" set deployDir=d:\webroot\docus-report-manager
set deployDir=%1\docus-report-unblocking
if %deployDir%=="" set deployDir=d:\webroot\docus-report-unblocking
set curr_file=%cd%
cd /d %deployDir%

@ -1,7 +1,7 @@
<service>
<id>docus-report-manager</id>
<name>生产-嘉时-报告管理服务</name>
<description>生产-嘉时-报告管理服务</description>
<id>docus-report-unblocking</id>
<name>生产-嘉时-报告解封</name>
<description>生产-嘉时-报告解封</description>
<startmode>Automatic</startmode>
<executable>%BASE%\start.bat</executable>
<log mode="none"></log>

@ -1,11 +1,11 @@
server:
port: 9444
port: 9445
spring:
application:
name: @artifactId@
profiles:
active: test
active: prod
datasource:
dynamic:
primary: master #设置默认的数据源默认值为master
@ -67,11 +67,11 @@ xxl:
admin:
addresses: http://job.docus.cn:8180/xxl-job-admin
executor:
appname: docus-report-manager
appname: docus-report-unblocking
address:
ip:
port: 19444
port: 19445
logretentiondays: 30
logpath: D:/xxl-job/docus-report-manager
logpath: D:/xxl-job/docus-report-unblocking

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="true" scanPeriod="1 seconds">
<contextName>docus-report-manager</contextName>
<contextName>docus-report-unblocking</contextName>
<property name="log.path" value="logs/logback"/>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
@ -21,7 +21,7 @@
<fileNamePattern>${log.path}%d.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>500MB</maxFileSize>
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<MaxHistory>60</MaxHistory>
</rollingPolicy>

@ -12,6 +12,11 @@
#{id}
</foreach>
</update>
<update id="unblocking">
UPDATE `docus_archivefile`.`t_scan_assort`
SET `sealed` = 0
WHERE `patient_id` = #{patientId}
</update>
<select id="getIdByPatientTask" resultType="java.lang.Long">
select id
from `docus_archivefile`.`t_scan_assort`

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.server.reportmanager.mapper.TSealMapper">
<select id="findByCondition" resultType="com.docus.server.reportmanager.entity.TSeal">
SELECT
*
FROM `docus_medicalrecord`.`t_seal`
<where>
<if test="condition.jzh != null and condition.jzh != ''">
and jzh=#{condition.jzh}
</if>
<if test="condition.sealId != null and condition.sealId != ''">
and seal_id=#{condition.sealId}
</if>
<if test="condition.patientId != null and condition.patientId != ''">
and patient_id=#{condition.patientId}
</if>
<if test="condition.name != null and condition.name != ''">
and name=#{condition.name}
</if>
</where>
</select>
</mapper>
Loading…
Cancel
Save