Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
27
openhis-server-new/AGENTS.md
Normal file
27
openhis-server-new/AGENTS.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# OpenHIS 铁律
|
||||||
|
|
||||||
|
## 铁律 #1: 修改完必须测试
|
||||||
|
**任何代码修改后,必须完成以下测试才能提交:**
|
||||||
|
|
||||||
|
### 白盒测试
|
||||||
|
- `mvn clean compile` 编译通过
|
||||||
|
- 单元测试通过(如有)
|
||||||
|
|
||||||
|
### 黑盒测试
|
||||||
|
- 启动应用,验证无启动报错
|
||||||
|
- 测试关键接口(登录、核心业务接口)
|
||||||
|
- 验证请求响应正确
|
||||||
|
|
||||||
|
### 冒烟测试
|
||||||
|
- 应用正常启动(端口监听)
|
||||||
|
- 健康检查接口返回正常
|
||||||
|
- 基础 CRUD 操作正常
|
||||||
|
|
||||||
|
## 铁律 #2: Flyway 迁移
|
||||||
|
但凡遇到有新建表和字段的,通过 Flyway 框架去实现。
|
||||||
|
|
||||||
|
## 铁律 #3: 先分解再行动
|
||||||
|
任何非平凡任务先出 plan 再执行。
|
||||||
|
|
||||||
|
## 铁律 #4: 验证后信
|
||||||
|
每次修改后必须验证编译通过,不信记忆。
|
||||||
@@ -81,8 +81,8 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient5</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -12,12 +12,17 @@ import com.openhis.web.externalintegration.appservice.IFoodborneAcquisitionAppSe
|
|||||||
import com.openhis.web.externalintegration.dto.FaSimplediseaseAddNopwParam;
|
import com.openhis.web.externalintegration.dto.FaSimplediseaseAddNopwParam;
|
||||||
import com.openhis.web.externalintegration.mapper.FoodborneAcquisitionAppMapper;
|
import com.openhis.web.externalintegration.mapper.FoodborneAcquisitionAppMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.hc.client5.http.classic.methods.HttpGet;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
|
||||||
|
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
|
||||||
|
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
|
||||||
|
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
|
||||||
|
import org.apache.hc.core5.ssl.SSLContexts;
|
||||||
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -83,12 +88,24 @@ public class FoodborneAcquisitionAppServiceImpl implements IFoodborneAcquisition
|
|||||||
return R.fail("【食源性判断接口】未找到有效诊断");
|
return R.fail("【食源性判断接口】未找到有效诊断");
|
||||||
}
|
}
|
||||||
// 设置超时时间
|
// 设置超时时间
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(3000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(3000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(30000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setSocketTimeout(30000).build();
|
|
||||||
// 创建无视SSL验证的HttpClient
|
// 创建无视SSL验证的HttpClient
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig)
|
HttpClientConnectionManager connectionManager;
|
||||||
.setSSLSocketFactory(CommonUtil.createIgnoreSslSocketFactory()).build();
|
try {
|
||||||
CloseableHttpResponse response = null;
|
connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
|
||||||
|
.setSSLSocketFactory(SSLConnectionSocketFactoryBuilder.create()
|
||||||
|
.setSslContext(SSLContexts.custom().loadTrustMaterial(null, (chain, authType) -> true).build())
|
||||||
|
.setHostnameVerifier(NoopHostnameVerifier.INSTANCE)
|
||||||
|
.build())
|
||||||
|
.build();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("Failed to create SSL connection manager", e);
|
||||||
|
}
|
||||||
|
CloseableHttpClient httpClient = HttpClients.custom()
|
||||||
|
.setDefaultRequestConfig(requestConfig)
|
||||||
|
.setConnectionManager(connectionManager)
|
||||||
|
.build();
|
||||||
|
ClassicHttpResponse response = null;
|
||||||
// 发起HTTP请求
|
// 发起HTTP请求
|
||||||
try {
|
try {
|
||||||
// 对参数值进行URL编码
|
// 对参数值进行URL编码
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ import com.openhis.web.nenu.dto.GfStudentListImportDto;
|
|||||||
import com.openhis.web.nenu.dto.GfStudentPeisDto;
|
import com.openhis.web.nenu.dto.GfStudentPeisDto;
|
||||||
import com.openhis.web.nenu.dto.PeisStudentPatientDto;
|
import com.openhis.web.nenu.dto.PeisStudentPatientDto;
|
||||||
import com.openhis.web.nenu.mapper.GfStudentListAppMapper;
|
import com.openhis.web.nenu.mapper.GfStudentListAppMapper;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@@ -576,10 +576,9 @@ public class GfStudentListAppServiceImpl implements IGfStudentListAppService {
|
|||||||
*/
|
*/
|
||||||
private boolean sendSingleBatchHttpRequest(PeisStudentPatientDto peisStudentPatientDto) {
|
private boolean sendSingleBatchHttpRequest(PeisStudentPatientDto peisStudentPatientDto) {
|
||||||
|
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setSocketTimeout(90000).build();
|
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||||
CloseableHttpResponse response = null;
|
ClassicHttpResponse response = null;
|
||||||
// 发送请求
|
// 发送请求
|
||||||
try {
|
try {
|
||||||
HttpPost httpPost = new HttpPost(TenantOptionUtil.getOptionContent(TenantOptionDict.PEIS_SERVER_URL) + "/wx/auth/syncHisInfo");
|
HttpPost httpPost = new HttpPost(TenantOptionUtil.getOptionContent(TenantOptionDict.PEIS_SERVER_URL) + "/wx/auth/syncHisInfo");
|
||||||
|
|||||||
@@ -44,15 +44,15 @@ import org.apache.velocity.VelocityContext;
|
|||||||
import org.apache.velocity.app.Velocity;
|
import org.apache.velocity.app.Velocity;
|
||||||
import org.apache.velocity.runtime.RuntimeConstants;
|
import org.apache.velocity.runtime.RuntimeConstants;
|
||||||
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
|
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ import com.openhis.web.paymentmanage.mapper.PaymentMapper;
|
|||||||
import com.openhis.yb.dto.PaymentDetailDto;
|
import com.openhis.yb.dto.PaymentDetailDto;
|
||||||
import com.openhis.yb.dto.ThreePartPayDto;
|
import com.openhis.yb.dto.ThreePartPayDto;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.hc.client5.http.classic.methods.HttpGet;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -548,10 +548,9 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
private String httpGet(String url) {
|
private String httpGet(String url) {
|
||||||
String resultString = "";
|
String resultString = "";
|
||||||
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setSocketTimeout(90000).build();
|
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||||
CloseableHttpResponse response = null;
|
ClassicHttpResponse response = null;
|
||||||
// 发送请求
|
// 发送请求
|
||||||
try {
|
try {
|
||||||
HttpGet httpGet = new HttpGet(url);
|
HttpGet httpGet = new HttpGet(url);
|
||||||
@@ -583,10 +582,9 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String resultString = "";
|
String resultString = "";
|
||||||
|
|
||||||
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setSocketTimeout(90000).build();
|
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||||
CloseableHttpResponse response = null;
|
ClassicHttpResponse response = null;
|
||||||
// 发送请求
|
// 发送请求
|
||||||
try {
|
try {
|
||||||
HttpPost httpPost = new HttpPost(url);
|
HttpPost httpPost = new HttpPost(url);
|
||||||
|
|||||||
@@ -0,0 +1,337 @@
|
|||||||
|
package com.openhis.web.techstation.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.core.common.core.controller.BaseController;
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
|
import com.core.common.core.page.TableDataInfo;
|
||||||
|
import com.openhis.check.domain.ExamApply;
|
||||||
|
import com.openhis.check.domain.ExamApplyItem;
|
||||||
|
import com.openhis.check.service.IExamApplyItemService;
|
||||||
|
import com.openhis.check.service.IExamApplyService;
|
||||||
|
import com.openhis.lab.domain.InspectionLabApply;
|
||||||
|
import com.openhis.lab.service.IInspectionLabApplyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医技工作站 Controller
|
||||||
|
* <p>
|
||||||
|
* 职责:
|
||||||
|
* 1. 医技执行 — 查询待执行的检查/检验申请单,执行确认
|
||||||
|
* 2. 医技退费审批 — 查询待退费审批的申请单,审批通过/驳回
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/tech-station")
|
||||||
|
public class TechStationController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExamApplyService examApplyService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExamApplyItemService examApplyItemService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInspectionLabApplyService inspectionLabApplyService;
|
||||||
|
|
||||||
|
// ========== 医技执行 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待执行列表(检查 + 检验)
|
||||||
|
* 查询已收费但未执行的申请单
|
||||||
|
*/
|
||||||
|
@GetMapping("/execute/list")
|
||||||
|
public TableDataInfo executeList(
|
||||||
|
@RequestParam(value = "applyType", required = false) String applyType,
|
||||||
|
@RequestParam(value = "patientName", required = false) String patientName,
|
||||||
|
@RequestParam(value = "applyNo", required = false) String applyNo,
|
||||||
|
@RequestParam(value = "startTime", required = false) String startTime,
|
||||||
|
@RequestParam(value = "endTime", required = false) String endTime) {
|
||||||
|
|
||||||
|
startPage();
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 查询检查申请单(exam_apply)
|
||||||
|
// applyStatus: 1=已收费, 2=已预约, 3=已签到 → 待执行
|
||||||
|
if (applyType == null || "exam".equals(applyType)) {
|
||||||
|
LambdaQueryWrapper<ExamApply> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(ExamApply::getIsCharged, 1)
|
||||||
|
.eq(ExamApply::getIsExecuted, 0)
|
||||||
|
.ne(ExamApply::getApplyStatus, 6); // 排除作废
|
||||||
|
if (patientName != null && !patientName.isEmpty()) {
|
||||||
|
wrapper.like(ExamApply::getPatientId, patientName);
|
||||||
|
}
|
||||||
|
if (applyNo != null && !applyNo.isEmpty()) {
|
||||||
|
wrapper.like(ExamApply::getApplyNo, applyNo);
|
||||||
|
}
|
||||||
|
wrapper.orderByDesc(ExamApply::getApplyTime);
|
||||||
|
List<ExamApply> examList = examApplyService.list(wrapper);
|
||||||
|
for (ExamApply exam : examList) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("applyNo", exam.getApplyNo());
|
||||||
|
item.put("applyType", "exam");
|
||||||
|
item.put("applyTypeName", "检查");
|
||||||
|
item.put("patientId", exam.getPatientId());
|
||||||
|
item.put("visitNo", exam.getVisitNo());
|
||||||
|
item.put("applyDeptCode", exam.getApplyDeptCode());
|
||||||
|
item.put("applyDocCode", exam.getApplyDocCode());
|
||||||
|
item.put("applyTime", exam.getApplyTime());
|
||||||
|
item.put("clinicDesc", exam.getClinicDesc());
|
||||||
|
item.put("examTypeCode", exam.getExamTypeCode());
|
||||||
|
item.put("inspectionArea", exam.getInspectionArea());
|
||||||
|
item.put("inspectionMethod", exam.getInspectionMethod());
|
||||||
|
item.put("applyStatus", exam.getApplyStatus());
|
||||||
|
item.put("isUrgent", exam.getIsUrgent());
|
||||||
|
item.put("applyRemark", exam.getApplyRemark());
|
||||||
|
resultList.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询检验申请单(lab_apply)
|
||||||
|
// applyStatus: 2=已收费 → 待执行
|
||||||
|
if (applyType == null || "lab".equals(applyType)) {
|
||||||
|
LambdaQueryWrapper<InspectionLabApply> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(InspectionLabApply::getApplyStatus, 2L);
|
||||||
|
if (patientName != null && !patientName.isEmpty()) {
|
||||||
|
wrapper.like(InspectionLabApply::getPatientName, patientName);
|
||||||
|
}
|
||||||
|
if (applyNo != null && !applyNo.isEmpty()) {
|
||||||
|
wrapper.like(InspectionLabApply::getApplyNo, applyNo);
|
||||||
|
}
|
||||||
|
wrapper.orderByDesc(InspectionLabApply::getApplyTime);
|
||||||
|
List<InspectionLabApply> labList = inspectionLabApplyService.list(wrapper);
|
||||||
|
for (InspectionLabApply lab : labList) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("applyNo", lab.getApplyNo());
|
||||||
|
item.put("applyType", "lab");
|
||||||
|
item.put("applyTypeName", "检验");
|
||||||
|
item.put("patientId", lab.getPatientId());
|
||||||
|
item.put("patientName", lab.getPatientName());
|
||||||
|
item.put("medicalrecordNumber", lab.getMedicalrecordNumber());
|
||||||
|
item.put("applyDeptCode", lab.getApplyDeptCode());
|
||||||
|
item.put("applyDepartment", lab.getApplyDepartment());
|
||||||
|
item.put("applyDocCode", lab.getApplyDocCode());
|
||||||
|
item.put("applyDocName", lab.getApplyDocName());
|
||||||
|
item.put("applyTime", lab.getApplyTime());
|
||||||
|
item.put("clinicDiag", lab.getClinicDiag());
|
||||||
|
item.put("inspectionItem", lab.getInspectionItem());
|
||||||
|
item.put("specimenName", lab.getSpecimenName());
|
||||||
|
item.put("priorityCode", lab.getPriorityCode());
|
||||||
|
item.put("applyStatus", lab.getApplyStatus());
|
||||||
|
item.put("applyRemark", lab.getApplyRemark());
|
||||||
|
resultList.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按申请时间倒序排序
|
||||||
|
resultList.sort((a, b) -> {
|
||||||
|
Object timeA = a.get("applyTime");
|
||||||
|
Object timeB = b.get("applyTime");
|
||||||
|
if (timeA == null && timeB == null) return 0;
|
||||||
|
if (timeA == null) return 1;
|
||||||
|
if (timeB == null) return -1;
|
||||||
|
if (timeA instanceof LocalDateTime && timeB instanceof LocalDateTime) {
|
||||||
|
return ((LocalDateTime) timeB).compareTo((LocalDateTime) timeA);
|
||||||
|
}
|
||||||
|
if (timeA instanceof Date && timeB instanceof Date) {
|
||||||
|
return ((Date) timeB).compareTo((Date) timeA);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
return getDataTable(resultList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行确认(检查申请单)
|
||||||
|
*/
|
||||||
|
@PutMapping("/execute/exam/{applyNo}")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult executeExam(@PathVariable String applyNo) {
|
||||||
|
ExamApply examApply = examApplyService.getById(applyNo);
|
||||||
|
if (examApply == null) {
|
||||||
|
return AjaxResult.error("申请单不存在");
|
||||||
|
}
|
||||||
|
if (examApply.getIsExecuted() == 1) {
|
||||||
|
return AjaxResult.error("该申请单已执行");
|
||||||
|
}
|
||||||
|
examApply.setIsExecuted(1);
|
||||||
|
examApply.setApplyStatus(5); // 已完成
|
||||||
|
examApplyService.updateById(examApply);
|
||||||
|
return AjaxResult.success("执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行确认(检验申请单)
|
||||||
|
*/
|
||||||
|
@PutMapping("/execute/lab/{applyNo}")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult executeLab(@PathVariable String applyNo) {
|
||||||
|
LambdaQueryWrapper<InspectionLabApply> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(InspectionLabApply::getApplyNo, applyNo);
|
||||||
|
InspectionLabApply labApply = inspectionLabApplyService.getOne(wrapper);
|
||||||
|
if (labApply == null) {
|
||||||
|
return AjaxResult.error("申请单不存在");
|
||||||
|
}
|
||||||
|
if (labApply.getApplyStatus() == 3L) {
|
||||||
|
return AjaxResult.error("该申请单已执行");
|
||||||
|
}
|
||||||
|
labApply.setApplyStatus(3L); // 已执行/已完成
|
||||||
|
inspectionLabApplyService.updateById(labApply);
|
||||||
|
return AjaxResult.success("执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 医技退费审批 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待退费审批列表
|
||||||
|
* 查询 isRefunded=1(已申请退费)且需要审批的申请单
|
||||||
|
*/
|
||||||
|
@GetMapping("/refund-approve/list")
|
||||||
|
public TableDataInfo refundApproveList(
|
||||||
|
@RequestParam(value = "applyType", required = false) String applyType,
|
||||||
|
@RequestParam(value = "patientName", required = false) String patientName,
|
||||||
|
@RequestParam(value = "applyNo", required = false) String applyNo,
|
||||||
|
@RequestParam(value = "approveStatus", required = false) Integer approveStatus) {
|
||||||
|
|
||||||
|
startPage();
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 查询已申请退费的检查申请单
|
||||||
|
if (applyType == null || "exam".equals(applyType)) {
|
||||||
|
LambdaQueryWrapper<ExamApply> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(ExamApply::getIsRefunded, 1);
|
||||||
|
// applyStatus=6 表示作废(退费申请)
|
||||||
|
if (approveStatus != null) {
|
||||||
|
wrapper.eq(ExamApply::getApplyStatus, approveStatus);
|
||||||
|
}
|
||||||
|
if (patientName != null && !patientName.isEmpty()) {
|
||||||
|
wrapper.like(ExamApply::getPatientId, patientName);
|
||||||
|
}
|
||||||
|
if (applyNo != null && !applyNo.isEmpty()) {
|
||||||
|
wrapper.like(ExamApply::getApplyNo, applyNo);
|
||||||
|
}
|
||||||
|
wrapper.orderByDesc(ExamApply::getApplyTime);
|
||||||
|
List<ExamApply> examList = examApplyService.list(wrapper);
|
||||||
|
for (ExamApply exam : examList) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("applyNo", exam.getApplyNo());
|
||||||
|
item.put("applyType", "exam");
|
||||||
|
item.put("applyTypeName", "检查");
|
||||||
|
item.put("patientId", exam.getPatientId());
|
||||||
|
item.put("visitNo", exam.getVisitNo());
|
||||||
|
item.put("applyDeptCode", exam.getApplyDeptCode());
|
||||||
|
item.put("applyDocCode", exam.getApplyDocCode());
|
||||||
|
item.put("applyTime", exam.getApplyTime());
|
||||||
|
item.put("clinicDesc", exam.getClinicDesc());
|
||||||
|
item.put("applyStatus", exam.getApplyStatus());
|
||||||
|
item.put("isRefunded", exam.getIsRefunded());
|
||||||
|
item.put("applyRemark", exam.getApplyRemark());
|
||||||
|
resultList.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询已申请退费的检验申请单(applyStatus=5 表示待退)
|
||||||
|
if (applyType == null || "lab".equals(applyType)) {
|
||||||
|
LambdaQueryWrapper<InspectionLabApply> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(InspectionLabApply::getApplyStatus, 5L);
|
||||||
|
if (patientName != null && !patientName.isEmpty()) {
|
||||||
|
wrapper.like(InspectionLabApply::getPatientName, patientName);
|
||||||
|
}
|
||||||
|
if (applyNo != null && !applyNo.isEmpty()) {
|
||||||
|
wrapper.like(InspectionLabApply::getApplyNo, applyNo);
|
||||||
|
}
|
||||||
|
wrapper.orderByDesc(InspectionLabApply::getApplyTime);
|
||||||
|
List<InspectionLabApply> labList = inspectionLabApplyService.list(wrapper);
|
||||||
|
for (InspectionLabApply lab : labList) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("applyNo", lab.getApplyNo());
|
||||||
|
item.put("applyType", "lab");
|
||||||
|
item.put("applyTypeName", "检验");
|
||||||
|
item.put("patientId", lab.getPatientId());
|
||||||
|
item.put("patientName", lab.getPatientName());
|
||||||
|
item.put("medicalrecordNumber", lab.getMedicalrecordNumber());
|
||||||
|
item.put("applyDeptCode", lab.getApplyDeptCode());
|
||||||
|
item.put("applyDepartment", lab.getApplyDepartment());
|
||||||
|
item.put("applyDocCode", lab.getApplyDocCode());
|
||||||
|
item.put("applyDocName", lab.getApplyDocName());
|
||||||
|
item.put("applyTime", lab.getApplyTime());
|
||||||
|
item.put("clinicDiag", lab.getClinicDiag());
|
||||||
|
item.put("applyStatus", lab.getApplyStatus());
|
||||||
|
item.put("applyRemark", lab.getApplyRemark());
|
||||||
|
resultList.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return getDataTable(resultList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退费审批通过(检查)
|
||||||
|
*/
|
||||||
|
@PutMapping("/refund-approve/approve/exam/{applyNo}")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult approveExamRefund(@PathVariable String applyNo) {
|
||||||
|
ExamApply examApply = examApplyService.getById(applyNo);
|
||||||
|
if (examApply == null) {
|
||||||
|
return AjaxResult.error("申请单不存在");
|
||||||
|
}
|
||||||
|
examApply.setApplyStatus(6); // 作废(退费完成)
|
||||||
|
examApplyService.updateById(examApply);
|
||||||
|
return AjaxResult.success("审批通过");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退费审批驳回(检查)
|
||||||
|
*/
|
||||||
|
@PutMapping("/refund-approve/reject/exam/{applyNo}")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult rejectExamRefund(@PathVariable String applyNo) {
|
||||||
|
ExamApply examApply = examApplyService.getById(applyNo);
|
||||||
|
if (examApply == null) {
|
||||||
|
return AjaxResult.error("申请单不存在");
|
||||||
|
}
|
||||||
|
examApply.setIsRefunded(0); // 恢复为未退费
|
||||||
|
examApplyService.updateById(examApply);
|
||||||
|
return AjaxResult.success("已驳回");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退费审批通过(检验)
|
||||||
|
*/
|
||||||
|
@PutMapping("/refund-approve/approve/lab/{applyNo}")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult approveLabRefund(@PathVariable String applyNo) {
|
||||||
|
LambdaQueryWrapper<InspectionLabApply> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(InspectionLabApply::getApplyNo, applyNo);
|
||||||
|
InspectionLabApply labApply = inspectionLabApplyService.getOne(wrapper);
|
||||||
|
if (labApply == null) {
|
||||||
|
return AjaxResult.error("申请单不存在");
|
||||||
|
}
|
||||||
|
labApply.setApplyStatus(6L); // 作废(退费完成)
|
||||||
|
inspectionLabApplyService.updateById(labApply);
|
||||||
|
return AjaxResult.success("审批通过");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退费审批驳回(检验)
|
||||||
|
*/
|
||||||
|
@PutMapping("/refund-approve/reject/lab/{applyNo}")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult rejectLabRefund(@PathVariable String applyNo) {
|
||||||
|
LambdaQueryWrapper<InspectionLabApply> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(InspectionLabApply::getApplyNo, applyNo);
|
||||||
|
InspectionLabApply labApply = inspectionLabApplyService.getOne(wrapper);
|
||||||
|
if (labApply == null) {
|
||||||
|
return AjaxResult.error("申请单不存在");
|
||||||
|
}
|
||||||
|
labApply.setApplyStatus(2L); // 恢复为已收费
|
||||||
|
inspectionLabApplyService.updateById(labApply);
|
||||||
|
return AjaxResult.success("已驳回");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,13 +3,12 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||||
|
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.client.ClientProtocolException;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.client.methods.HttpUriRequest;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.core5.http.HttpEntity;
|
||||||
import org.apache.http.impl.client.HttpClientBuilder;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.apache.http.util.EntityUtils;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -17,28 +16,22 @@ import java.util.Map;
|
|||||||
|
|
||||||
public abstract class HttpReques {
|
public abstract class HttpReques {
|
||||||
|
|
||||||
// 创建HttpClientBuilder
|
|
||||||
private HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
|
||||||
// HttpClient
|
// HttpClient
|
||||||
private CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
|
private CloseableHttpClient closeableHttpClient = HttpClients.createDefault();
|
||||||
|
|
||||||
|
protected HttpUriRequestBase httpReques;
|
||||||
|
|
||||||
protected HttpUriRequest httpReques;
|
|
||||||
// HttpUriRequest httpReques;
|
|
||||||
@SuppressWarnings("finally")
|
@SuppressWarnings("finally")
|
||||||
public Map<String, String> executeResponse() {
|
public Map<String, String> executeResponse() {
|
||||||
Map<String, String> context = new HashMap<>();
|
Map<String, String> context = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
// closeableHttpClient= WebClientDevWrapper.wrapClient(closeableHttpClient);
|
// 执行请求
|
||||||
// 设置请求头
|
ClassicHttpResponse httpResponse = closeableHttpClient.executeOpen(null, httpReques, null);
|
||||||
// 设置请求
|
|
||||||
HttpResponse httpResponse = closeableHttpClient.execute(httpReques);
|
|
||||||
HttpEntity entity = httpResponse.getEntity();
|
HttpEntity entity = httpResponse.getEntity();
|
||||||
// 响应状态
|
// 响应状态
|
||||||
int status = httpResponse.getStatusLine().getStatusCode();
|
int status = httpResponse.getCode();
|
||||||
context.put("msg", EntityUtils.toString(entity,"utf-8"));
|
context.put("msg", EntityUtils.toString(entity,"utf-8"));
|
||||||
context.put("status", status+"");
|
context.put("status", status+"");
|
||||||
} catch (ClientProtocolException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||||
|
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.classic.methods.HttpGet;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class HttpRequesGet extends HttpReques {
|
public class HttpRequesGet extends HttpReques {
|
||||||
|
|
||||||
@@ -29,9 +30,11 @@ public class HttpRequesGet extends HttpReques {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HttpGet httpGet = new HttpGet(sb.toString());
|
HttpGet httpGet = new HttpGet(sb.toString());
|
||||||
RequestConfig requestConfig = RequestConfig.custom()
|
RequestConfig requestConfig = RequestConfig.custom()
|
||||||
.setConnectTimeout(20000).setConnectionRequestTimeout(15000)
|
.setConnectTimeout(20, TimeUnit.SECONDS)
|
||||||
.setSocketTimeout(20000).build();
|
.setConnectionRequestTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.setResponseTimeout(20, TimeUnit.SECONDS)
|
||||||
|
.build();
|
||||||
|
|
||||||
httpGet.setConfig(requestConfig);
|
httpGet.setConfig(requestConfig);
|
||||||
if (headers != null) {
|
if (headers != null) {
|
||||||
|
|||||||
@@ -7,17 +7,18 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import org.apache.http.NameValuePair;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.message.BasicNameValuePair;
|
||||||
import org.apache.http.message.BasicNameValuePair;
|
import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -27,11 +28,14 @@ public class HttpRequesPost extends HttpReques {
|
|||||||
public HttpRequesPost(String path, Map<String, Object> param, Map<String, String> headers) {
|
public HttpRequesPost(String path, Map<String, Object> param, Map<String, String> headers) {
|
||||||
HttpPost httpPost = new HttpPost(path);
|
HttpPost httpPost = new HttpPost(path);
|
||||||
try {
|
try {
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000)
|
RequestConfig requestConfig = RequestConfig.custom()
|
||||||
.setConnectionRequestTimeout(20000).setSocketTimeout(20000).build();
|
.setConnectTimeout(20, TimeUnit.SECONDS)
|
||||||
|
.setConnectionRequestTimeout(20, TimeUnit.SECONDS)
|
||||||
|
.setResponseTimeout(20, TimeUnit.SECONDS)
|
||||||
|
.build();
|
||||||
httpPost.setConfig(requestConfig);
|
httpPost.setConfig(requestConfig);
|
||||||
// 创建参数队列
|
// 创建参数队列
|
||||||
List<NameValuePair> formparams = new ArrayList<NameValuePair>();
|
List<BasicNameValuePair> formparams = new ArrayList<>();
|
||||||
if (param != null) {
|
if (param != null) {
|
||||||
for (String key : param.keySet()) {
|
for (String key : param.keySet()) {
|
||||||
if (param.get(key) != null) {
|
if (param.get(key) != null) {
|
||||||
@@ -39,14 +43,14 @@ public class HttpRequesPost extends HttpReques {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, "UTF-8");
|
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, StandardCharsets.UTF_8);
|
||||||
httpPost.setEntity(entity);
|
httpPost.setEntity(entity);
|
||||||
if (headers != null) {
|
if (headers != null) {
|
||||||
for (String key : headers.keySet()) {
|
for (String key : headers.keySet()) {
|
||||||
httpPost.addHeader(key, headers.get(key));
|
httpPost.addHeader(key, headers.get(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (Exception e) {
|
||||||
log.error("Exception occurred", e);
|
log.error("Exception occurred", e);
|
||||||
}
|
}
|
||||||
this.httpReques = httpPost;
|
this.httpReques = httpPost;
|
||||||
@@ -55,15 +59,16 @@ public class HttpRequesPost extends HttpReques {
|
|||||||
public HttpRequesPost(String path, Map<String, Object> param, Map<String, Object> headers, String requestType) {
|
public HttpRequesPost(String path, Map<String, Object> param, Map<String, Object> headers, String requestType) {
|
||||||
HttpPost httpPost = new HttpPost(path);
|
HttpPost httpPost = new HttpPost(path);
|
||||||
try {
|
try {
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000)
|
RequestConfig requestConfig = RequestConfig.custom()
|
||||||
.setConnectionRequestTimeout(5000).setSocketTimeout(5000).build();
|
.setConnectTimeout(5, TimeUnit.SECONDS)
|
||||||
|
.setConnectionRequestTimeout(5, TimeUnit.SECONDS)
|
||||||
|
.setResponseTimeout(5, TimeUnit.SECONDS)
|
||||||
|
.build();
|
||||||
httpPost.setConfig(requestConfig);
|
httpPost.setConfig(requestConfig);
|
||||||
// 创建参数队列
|
// 创建参数队列
|
||||||
if ("json".equals(requestType.toLowerCase())) {
|
if ("json".equals(requestType.toLowerCase())) {
|
||||||
// 解决中文乱码问题
|
// 解决中文乱码问题
|
||||||
StringEntity entity = new StringEntity(JSON.toJSONString(param), "utf-8");
|
StringEntity entity = new StringEntity(JSON.toJSONString(param), ContentType.APPLICATION_JSON);
|
||||||
entity.setContentEncoding("UTF-8");
|
|
||||||
entity.setContentType("application/json");
|
|
||||||
httpPost.setEntity(entity);
|
httpPost.setEntity(entity);
|
||||||
} else if("xml".equals(requestType.toLowerCase())){
|
} else if("xml".equals(requestType.toLowerCase())){
|
||||||
StringBuffer xml=new StringBuffer();
|
StringBuffer xml=new StringBuffer();
|
||||||
@@ -75,14 +80,12 @@ public class HttpRequesPost extends HttpReques {
|
|||||||
}
|
}
|
||||||
xml.append("</xml>");
|
xml.append("</xml>");
|
||||||
// 解决中文乱码问题
|
// 解决中文乱码问题
|
||||||
StringEntity entity = new StringEntity(xml.toString(), "utf-8");
|
StringEntity entity = new StringEntity(xml.toString(), ContentType.TEXT_XML.withCharset(StandardCharsets.UTF_8));
|
||||||
entity.setContentEncoding("UTF-8");
|
|
||||||
entity.setContentType("text/xml");
|
|
||||||
log.info("----------xml:"+xml.toString());
|
log.info("----------xml:"+xml.toString());
|
||||||
httpPost.setEntity(entity);
|
httpPost.setEntity(entity);
|
||||||
|
|
||||||
} else if ("".equals(requestType) || requestType == null) {
|
} else if ("".equals(requestType) || requestType == null) {
|
||||||
List<NameValuePair> formParams = new ArrayList<NameValuePair>();
|
List<BasicNameValuePair> formParams = new ArrayList<>();
|
||||||
if (param != null) {
|
if (param != null) {
|
||||||
for (String key : param.keySet()) {
|
for (String key : param.keySet()) {
|
||||||
if (param.get(key) != null) {
|
if (param.get(key) != null) {
|
||||||
@@ -90,7 +93,7 @@ public class HttpRequesPost extends HttpReques {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formParams, "UTF-8");
|
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formParams, StandardCharsets.UTF_8);
|
||||||
httpPost.setEntity(entity);
|
httpPost.setEntity(entity);
|
||||||
}
|
}
|
||||||
if (headers != null) {
|
if (headers != null) {
|
||||||
@@ -98,7 +101,7 @@ public class HttpRequesPost extends HttpReques {
|
|||||||
httpPost.addHeader(key, headers.get(key).toString());
|
httpPost.addHeader(key, headers.get(key).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (Exception e) {
|
||||||
log.error("Exception occurred", e);
|
log.error("Exception occurred", e);
|
||||||
}
|
}
|
||||||
this.httpReques = httpPost;
|
this.httpReques = httpPost;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.HttpEntity;
|
||||||
import org.apache.http.message.BasicHeader;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName HttpsClientUtil
|
* @ClassName HttpsClientUtil
|
||||||
@@ -18,27 +18,33 @@ import org.apache.http.util.EntityUtils;
|
|||||||
**/
|
**/
|
||||||
public class HttpsClientUtil {
|
public class HttpsClientUtil {
|
||||||
|
|
||||||
public static String doPost(String url,String jsonData){
|
public static String doPost(String url, String jsonData) {
|
||||||
HttpClient httpClient = null;
|
CloseableHttpClient httpClient = null;
|
||||||
HttpPost httpPost = null;
|
|
||||||
String result = null;
|
String result = null;
|
||||||
try{
|
try {
|
||||||
httpClient = new SSLClient();
|
httpClient = SSLClient.create();
|
||||||
httpPost = new HttpPost(url);
|
HttpPost httpPost = new HttpPost(url);
|
||||||
httpPost.addHeader("Content-Type", "application/json");
|
httpPost.addHeader("Content-Type", "application/json");
|
||||||
StringEntity se = new StringEntity(jsonData);
|
StringEntity se = new StringEntity(jsonData, ContentType.APPLICATION_JSON);
|
||||||
se.setContentType("text/json");
|
|
||||||
se.setContentEncoding(new BasicHeader("Content-Type", "application/json"));
|
|
||||||
httpPost.setEntity(se);
|
httpPost.setEntity(se);
|
||||||
HttpResponse response = httpClient.execute(httpPost);
|
ClassicHttpResponse response = httpClient.executeOpen(null, httpPost, null);
|
||||||
if(response != null){
|
if (response != null) {
|
||||||
HttpEntity resEntity = response.getEntity();
|
HttpEntity resEntity = response.getEntity();
|
||||||
if(resEntity != null){
|
if (resEntity != null) {
|
||||||
result = EntityUtils.toString(resEntity,"utf-8");
|
result = EntityUtils.toString(resEntity, "utf-8");
|
||||||
|
}
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (httpClient != null) {
|
||||||
|
try {
|
||||||
|
httpClient.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||||
|
|
||||||
import org.apache.http.conn.ClientConnectionManager;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.conn.scheme.Scheme;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.conn.scheme.SchemeRegistry;
|
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
|
||||||
import org.apache.http.conn.ssl.SSLSocketFactory;
|
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
|
||||||
import org.apache.http.impl.client.DefaultHttpClient;
|
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
|
||||||
|
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
|
||||||
|
import org.apache.hc.core5.ssl.SSLContexts;
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
@@ -14,38 +16,27 @@ import java.security.cert.X509Certificate;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName SSLClient
|
* @ClassName SSLClient
|
||||||
* @Description TODO
|
* @Description SSL Client for HTTPS connections (trust all)
|
||||||
* @Author raymond
|
* @Author raymond
|
||||||
* @Date 2024/1/9 08:28
|
* @Date 2024/1/9 08:28
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
**/
|
**/
|
||||||
@SuppressWarnings("deprecation")
|
public class SSLClient {
|
||||||
public class SSLClient extends DefaultHttpClient {
|
|
||||||
|
|
||||||
public SSLClient() throws Exception {
|
public static CloseableHttpClient create() throws Exception {
|
||||||
super();
|
SSLContext ctx = SSLContexts.custom()
|
||||||
SSLContext ctx = SSLContext.getInstance("TLS");
|
.loadTrustMaterial(null, (chain, authType) -> true)
|
||||||
X509TrustManager tm = new X509TrustManager() {
|
.build();
|
||||||
@Override
|
|
||||||
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
|
HttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
|
||||||
|
.setSSLSocketFactory(SSLConnectionSocketFactoryBuilder.create()
|
||||||
}
|
.setSslContext(ctx)
|
||||||
|
.setHostnameVerifier(NoopHostnameVerifier.INSTANCE)
|
||||||
@Override
|
.build())
|
||||||
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
|
.build();
|
||||||
|
|
||||||
}
|
return HttpClients.custom()
|
||||||
|
.setConnectionManager(connectionManager)
|
||||||
@Override
|
.build();
|
||||||
public X509Certificate[] getAcceptedIssuers() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ctx.init(null,new TrustManager[]{tm},null);
|
|
||||||
SSLSocketFactory ssf = new SSLSocketFactory(ctx,SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
|
|
||||||
ClientConnectionManager ccm = this.getConnectionManager();
|
|
||||||
SchemeRegistry registry = ccm.getSchemeRegistry();
|
|
||||||
registry.register(new Scheme("https",443,ssf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
/**
|
|
||||||
* @Title: WebClientDevWrapper.java
|
|
||||||
* @Package com.hmc.core.util.http_client
|
|
||||||
* @Description: TODO(用一句话描述该文件做什么)
|
|
||||||
* @author daniel
|
|
||||||
* @date 2016年9月26日 下午5:28:13
|
|
||||||
* @version V1.0
|
|
||||||
*/
|
|
||||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
|
||||||
|
|
||||||
import org.apache.http.conn.scheme.Scheme;
|
|
||||||
import org.apache.http.conn.scheme.SchemeRegistry;
|
|
||||||
import org.apache.http.conn.ssl.SSLSocketFactory;
|
|
||||||
import org.apache.http.impl.client.DefaultHttpClient;
|
|
||||||
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
|
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.security.cert.CertificateException;
|
|
||||||
import java.security.cert.X509Certificate;
|
|
||||||
|
|
||||||
|
|
||||||
public class WebClientDevWrapper {
|
|
||||||
public static DefaultHttpClient wrapClient(org.apache.http.client.HttpClient base) {
|
|
||||||
try {
|
|
||||||
SSLContext ctx = SSLContext.getInstance("TLS");
|
|
||||||
X509TrustManager tm = new X509TrustManager() {
|
|
||||||
@Override
|
|
||||||
public X509Certificate[] getAcceptedIssuers() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {}
|
|
||||||
@Override
|
|
||||||
public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {}
|
|
||||||
};
|
|
||||||
ctx.init(null, new TrustManager[] { tm }, null);
|
|
||||||
SSLSocketFactory ssf = new SSLSocketFactory(ctx, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
|
|
||||||
SchemeRegistry registry = new SchemeRegistry();
|
|
||||||
registry.register(new Scheme("https", 443, ssf));
|
|
||||||
ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(registry);
|
|
||||||
return new DefaultHttpClient(mgr, base.getParams());
|
|
||||||
} catch (Exception ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,14 +15,14 @@ import com.openhis.yb.dto.BaseInfo;
|
|||||||
import com.openhis.yb.dto.BaseParam;
|
import com.openhis.yb.dto.BaseParam;
|
||||||
import com.openhis.yb.util.YbParamBuilderUtil;
|
import com.openhis.yb.util.YbParamBuilderUtil;
|
||||||
import com.openhis.ybelep.domain.*;
|
import com.openhis.ybelep.domain.*;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -232,10 +232,9 @@ public class YbEleHttpServiceImpl implements IYbEleHttpService {
|
|||||||
BaseParam baseParam = new BaseParam();
|
BaseParam baseParam = new BaseParam();
|
||||||
baseParam.setBaseInfo(baseInfo).setData(o);
|
baseParam.setBaseInfo(baseInfo).setData(o);
|
||||||
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(90000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setSocketTimeout(90000).build();
|
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||||
CloseableHttpResponse response = null;
|
ClassicHttpResponse response = null;
|
||||||
// 发送请求
|
// 发送请求
|
||||||
try {
|
try {
|
||||||
HttpPost httpPost = new HttpPost(url);
|
HttpPost httpPost = new HttpPost(url);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient5</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.openhis.common.utils;
|
|||||||
|
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
|
||||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient5</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- 共通-->
|
<!-- 共通-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -12,14 +12,19 @@ import com.openhis.crosssystem.dto.*;
|
|||||||
import com.openhis.crosssystem.enums.LisAgeUnit;
|
import com.openhis.crosssystem.enums.LisAgeUnit;
|
||||||
import com.openhis.crosssystem.enums.PacsAgeUnit;
|
import com.openhis.crosssystem.enums.PacsAgeUnit;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
|
||||||
|
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
|
||||||
|
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
|
||||||
|
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
|
||||||
|
import org.apache.hc.core5.ssl.SSLContexts;
|
||||||
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -104,12 +109,24 @@ public class CrossSystemSendApplyUtil {
|
|||||||
.setGroupName(lisApplyDto.getGroupList().stream().map(LisApplyGroupDto::getGroupName)
|
.setGroupName(lisApplyDto.getGroupList().stream().map(LisApplyGroupDto::getGroupName)
|
||||||
.collect(Collectors.joining("+")));
|
.collect(Collectors.joining("+")));
|
||||||
// 设置超时时间
|
// 设置超时时间
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(3000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(3000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(30000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setSocketTimeout(30000).build();
|
|
||||||
// 创建无视SSL验证的HttpClient
|
// 创建无视SSL验证的HttpClient
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig)
|
HttpClientConnectionManager connectionManager;
|
||||||
.setSSLSocketFactory(CommonUtil.createIgnoreSslSocketFactory()).build();
|
try {
|
||||||
CloseableHttpResponse response = null;
|
connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
|
||||||
|
.setSSLSocketFactory(SSLConnectionSocketFactoryBuilder.create()
|
||||||
|
.setSslContext(SSLContexts.custom().loadTrustMaterial(null, (chain, authType) -> true).build())
|
||||||
|
.setHostnameVerifier(NoopHostnameVerifier.INSTANCE)
|
||||||
|
.build())
|
||||||
|
.build();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("Failed to create SSL connection manager", e);
|
||||||
|
}
|
||||||
|
CloseableHttpClient httpClient = HttpClients.custom()
|
||||||
|
.setDefaultRequestConfig(requestConfig)
|
||||||
|
.setConnectionManager(connectionManager)
|
||||||
|
.build();
|
||||||
|
ClassicHttpResponse response = null;
|
||||||
// 发起HTTP请求
|
// 发起HTTP请求
|
||||||
try {
|
try {
|
||||||
HttpPost httpPost = new HttpPost(apiUrl);
|
HttpPost httpPost = new HttpPost(apiUrl);
|
||||||
@@ -207,12 +224,24 @@ public class CrossSystemSendApplyUtil {
|
|||||||
// 必填 【检查项目名称】
|
// 必填 【检查项目名称】
|
||||||
.setGroupName(pacsApplyDto.getGroupName());
|
.setGroupName(pacsApplyDto.getGroupName());
|
||||||
// 设置超时时间
|
// 设置超时时间
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(3000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(3000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(30000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setSocketTimeout(30000).build();
|
|
||||||
// 创建无视SSL验证的HttpClient
|
// 创建无视SSL验证的HttpClient
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig)
|
HttpClientConnectionManager connectionManager;
|
||||||
.setSSLSocketFactory(CommonUtil.createIgnoreSslSocketFactory()).build();
|
try {
|
||||||
CloseableHttpResponse response = null;
|
connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
|
||||||
|
.setSSLSocketFactory(SSLConnectionSocketFactoryBuilder.create()
|
||||||
|
.setSslContext(SSLContexts.custom().loadTrustMaterial(null, (chain, authType) -> true).build())
|
||||||
|
.setHostnameVerifier(NoopHostnameVerifier.INSTANCE)
|
||||||
|
.build())
|
||||||
|
.build();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("Failed to create SSL connection manager", e);
|
||||||
|
}
|
||||||
|
CloseableHttpClient httpClient = HttpClients.custom()
|
||||||
|
.setDefaultRequestConfig(requestConfig)
|
||||||
|
.setConnectionManager(connectionManager)
|
||||||
|
.build();
|
||||||
|
ClassicHttpResponse response = null;
|
||||||
// 发起HTTP请求
|
// 发起HTTP请求
|
||||||
try {
|
try {
|
||||||
HttpPost httpPost = new HttpPost(apiUrl);
|
HttpPost httpPost = new HttpPost(apiUrl);
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ import com.openhis.yb.dto.*;
|
|||||||
import com.openhis.yb.model.Clinic2207OrderModel;
|
import com.openhis.yb.model.Clinic2207OrderModel;
|
||||||
import com.openhis.yb.model.Clinic2207OrderParam;
|
import com.openhis.yb.model.Clinic2207OrderParam;
|
||||||
import com.openhis.yb.util.YbParamBuilderUtil;
|
import com.openhis.yb.util.YbParamBuilderUtil;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -756,10 +756,9 @@ public class YbHttpUtils {
|
|||||||
baseParam.setBaseInfo(ybParamBuilderUtil.getBaseInfo(parseObject(JSON.toJSONString(o)), contract)).setData(o);
|
baseParam.setBaseInfo(ybParamBuilderUtil.getBaseInfo(parseObject(JSON.toJSONString(o)), contract)).setData(o);
|
||||||
logger.info("【请求路径】:" + url + ";【入参】: " + JSON.toJSONString(baseParam));
|
logger.info("【请求路径】:" + url + ";【入参】: " + JSON.toJSONString(baseParam));
|
||||||
// 创建Http请求
|
// 创建Http请求
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(300000)
|
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(300000, java.util.concurrent.TimeUnit.MILLISECONDS).setConnectionRequestTimeout(300000, java.util.concurrent.TimeUnit.MILLISECONDS).setResponseTimeout(300000, java.util.concurrent.TimeUnit.MILLISECONDS).build();
|
||||||
.setConnectionRequestTimeout(300000).setSocketTimeout(300000).build();
|
|
||||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||||
CloseableHttpResponse response = null;
|
ClassicHttpResponse response = null;
|
||||||
// 发送请求
|
// 发送请求
|
||||||
try {
|
try {
|
||||||
HttpPost httpPost = new HttpPost(url);
|
HttpPost httpPost = new HttpPost(url);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<flowable.version>7.1.0</flowable.version>
|
<flowable.version>7.1.0</flowable.version>
|
||||||
<postgresql.version>42.7.10</postgresql.version>
|
<postgresql.version>42.7.10</postgresql.version>
|
||||||
<aviator.version>5.3.3</aviator.version>
|
<aviator.version>5.3.3</aviator.version>
|
||||||
<httpclient.version>4.5.14</httpclient.version>
|
<httpclient5.version>5.6.1</httpclient5.version>
|
||||||
<fastjson2.version>2.0.61</fastjson2.version>
|
<fastjson2.version>2.0.61</fastjson2.version>
|
||||||
<pinyin4j.version>2.5.1</pinyin4j.version>
|
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||||
<liteflow-spring-boot-starter.version>2.12.4.1</liteflow-spring-boot-starter.version>
|
<liteflow-spring-boot-starter.version>2.12.4.1</liteflow-spring-boot-starter.version>
|
||||||
@@ -351,9 +351,9 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- JSQlParser - MyBatis Plus 3.5.9+ 需要 4.6+ -->
|
<!-- JSQlParser - MyBatis Plus 3.5.9+ 需要 4.6+ -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient5</artifactId>
|
||||||
<version>${httpclient.version}</version>
|
<version>${httpclient5.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|||||||
71
openhis-ui-vue3/src/api/techStation/index.js
Normal file
71
openhis-ui-vue3/src/api/techStation/index.js
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// ========== 医技执行 ==========
|
||||||
|
|
||||||
|
// 查询待执行列表
|
||||||
|
export function listExecuteOrders(query) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/execute/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行确认(检查)
|
||||||
|
export function executeExamOrder(applyNo) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/execute/exam/' + applyNo,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行确认(检验)
|
||||||
|
export function executeLabOrder(applyNo) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/execute/lab/' + applyNo,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 医技退费审批 ==========
|
||||||
|
|
||||||
|
// 查询待退费审批列表
|
||||||
|
export function listRefundApproveOrders(query) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/refund-approve/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退费审批通过(检查)
|
||||||
|
export function approveExamRefund(applyNo) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/refund-approve/approve/exam/' + applyNo,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退费审批驳回(检查)
|
||||||
|
export function rejectExamRefund(applyNo) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/refund-approve/reject/exam/' + applyNo,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退费审批通过(检验)
|
||||||
|
export function approveLabRefund(applyNo) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/refund-approve/approve/lab/' + applyNo,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退费审批驳回(检验)
|
||||||
|
export function rejectLabRefund(applyNo) {
|
||||||
|
return request({
|
||||||
|
url: '/tech-station/refund-approve/reject/lab/' + applyNo,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
76
openhis-ui-vue3/src/components/VxeTableCompat/index.vue
Normal file
76
openhis-ui-vue3/src/components/VxeTableCompat/index.vue
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
/**
|
||||||
|
* VxeTable 兼容层 — 归一化 vxe-table v4 事件参数,匹配 el-table 约定
|
||||||
|
*
|
||||||
|
* el-table: @cell-click(row, column, event)
|
||||||
|
* vxe-table: @cell-click({ row, column, $event, ... })
|
||||||
|
*
|
||||||
|
* 归一化规则:
|
||||||
|
* @cell-click → handler(row, column, $event)
|
||||||
|
* @current-change → handler(newValue, oldValue)
|
||||||
|
*/
|
||||||
|
import { ref, h, defineComponent } from 'vue'
|
||||||
|
import { VxeTable } from 'vxe-table'
|
||||||
|
|
||||||
|
// 需要归一化的事件映射:vxe-table params → el-table args
|
||||||
|
const NORMALIZE_EVENTS: Record<string, (p: any) => any[]> = {
|
||||||
|
'cell-click': (p) => [p?.row, p?.column, p?.$event],
|
||||||
|
'current-change': (p) => [p?.newValue ?? p?.row, p?.oldValue],
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'VxeTableCompat',
|
||||||
|
inheritAttrs: false,
|
||||||
|
|
||||||
|
setup(_props, { attrs, slots, expose }) {
|
||||||
|
const tableRef = ref<any>(null)
|
||||||
|
|
||||||
|
// 构建代理后的事件监听器
|
||||||
|
const proxiedAttrs: Record<string, any> = {}
|
||||||
|
|
||||||
|
for (const [key, value] of Object.entries(attrs)) {
|
||||||
|
if (key.startsWith('on') && typeof value === 'function') {
|
||||||
|
// onCellClick → cell-click
|
||||||
|
const rawEvent = key.slice(2) // CellClick
|
||||||
|
const eventName = rawEvent
|
||||||
|
.replace(/([A-Z])/g, '-$1')
|
||||||
|
.toLowerCase()
|
||||||
|
.replace(/^-/, '') // cell-click
|
||||||
|
|
||||||
|
if (eventName in NORMALIZE_EVENTS) {
|
||||||
|
proxiedAttrs[key] = (vxeParams: any) => {
|
||||||
|
const normalizer = NORMALIZE_EVENTS[eventName]
|
||||||
|
const normalizedArgs = normalizer(vxeParams)
|
||||||
|
;(value as Function)(...normalizedArgs)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
proxiedAttrs[key] = value
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
proxiedAttrs[key] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
expose({
|
||||||
|
tableRef,
|
||||||
|
clearCheckboxRow: () => tableRef.value?.clearCheckboxRow(),
|
||||||
|
clearSelection: () => tableRef.value?.clearCheckboxRow(),
|
||||||
|
setCurrentRow: (row: any) => tableRef.value?.setCurrentRow(row),
|
||||||
|
toggleRowExpand: (row: any, expanded?: boolean) =>
|
||||||
|
tableRef.value?.toggleRowExpand(row, expanded),
|
||||||
|
toggleRowExpansion: (row: any, expanded?: boolean) =>
|
||||||
|
tableRef.value?.toggleRowExpand(row, expanded),
|
||||||
|
getCheckboxRecords: () => tableRef.value?.getCheckboxRecords(),
|
||||||
|
getSelectionRows: () => tableRef.value?.getCheckboxRecords(),
|
||||||
|
})
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
return h(
|
||||||
|
VxeTable,
|
||||||
|
{ ...proxiedAttrs, ref: tableRef },
|
||||||
|
slots
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -2,6 +2,7 @@ import {createApp, nextTick} from 'vue';
|
|||||||
|
|
||||||
import VxeUIAll from 'vxe-table';
|
import VxeUIAll from 'vxe-table';
|
||||||
import 'vxe-table/lib/style.css';
|
import 'vxe-table/lib/style.css';
|
||||||
|
import VxeTableCompat from '@/components/VxeTableCompat';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
// 导入 hiprint 并挂载到全局 window 对象
|
// 导入 hiprint 并挂载到全局 window 对象
|
||||||
@@ -122,6 +123,8 @@ app.use(ElementPlus, {
|
|||||||
size: Cookies.get('size') || 'default',
|
size: Cookies.get('size') || 'default',
|
||||||
});
|
});
|
||||||
app.use(VxeUIAll);
|
app.use(VxeUIAll);
|
||||||
|
// 全局注册 vxe-table 兼容层:归一化 cell-click/current-change 事件参数
|
||||||
|
app.component('vxe-table', VxeTableCompat);
|
||||||
|
|
||||||
// 导入公告帮助工具
|
// 导入公告帮助工具
|
||||||
import { initNoticePopupAfterLogin } from '@/utils/noticeHelper'
|
import { initNoticePopupAfterLogin } from '@/utils/noticeHelper'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="business">
|
<div class="business">
|
||||||
<!-- <vxe-table
|
<!-- <vxe-table
|
||||||
@@ -474,63 +474,63 @@ const init = async () => {
|
|||||||
const handleSpan = ({ row, column, rowIndex, columnIndex }) => {
|
const handleSpan = ({ row, column, rowIndex, columnIndex }) => {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
if (rowIndex === 0) {
|
if (rowIndex === 0) {
|
||||||
return [dangerData.value.length, 1];
|
return { rowspan: dangerData.value.length, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 27) {
|
} else if (rowIndex > 0 && rowIndex < 27) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
if (rowIndex === 27) {
|
if (rowIndex === 27) {
|
||||||
return [1, 4];
|
return { rowspan: 1, colspan: 4 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (columnIndex === 1) {
|
if (columnIndex === 1) {
|
||||||
if (rowIndex === 0) {
|
if (rowIndex === 0) {
|
||||||
return [4, 1];
|
return { rowspan: 4, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 4) {
|
} else if (rowIndex > 0 && rowIndex < 4) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
if (rowIndex === 4) {
|
if (rowIndex === 4) {
|
||||||
return [3, 1];
|
return { rowspan: 3, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 7) {
|
} else if (rowIndex > 0 && rowIndex < 7) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
if (rowIndex === 7) {
|
if (rowIndex === 7) {
|
||||||
return [4, 1];
|
return { rowspan: 4, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 11) {
|
} else if (rowIndex > 0 && rowIndex < 11) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
if (rowIndex === 11) {
|
if (rowIndex === 11) {
|
||||||
return [3, 1];
|
return { rowspan: 3, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 14) {
|
} else if (rowIndex > 0 && rowIndex < 14) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
if (rowIndex === 14) {
|
if (rowIndex === 14) {
|
||||||
return [7, 1];
|
return { rowspan: 7, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 21) {
|
} else if (rowIndex > 0 && rowIndex < 21) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
if (rowIndex === 21) {
|
if (rowIndex === 21) {
|
||||||
return [6, 1];
|
return { rowspan: 6, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 27) {
|
} else if (rowIndex > 0 && rowIndex < 27) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
};
|
};
|
||||||
|
|
||||||
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||||
// 护理措施
|
// 护理措施
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
if (rowIndex === 0) {
|
if (rowIndex === 0) {
|
||||||
return [nursingData.value.length, 1];
|
return { rowspan: nursingData.value.length, colspan: 1 };
|
||||||
} else if (rowIndex > 0 && rowIndex < 8) {
|
} else if (rowIndex > 0 && rowIndex < 8) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
// 护士签名
|
// 护士签名
|
||||||
if (rowIndex === 8) {
|
if (rowIndex === 8) {
|
||||||
return [1, 2];
|
return { rowspan: 1, colspan: 2 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
ref="tableWrapper"
|
ref="tableWrapper"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
ref="tableWrapper"
|
ref="tableWrapper"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<!-- 中间组套列表 -->
|
<!-- 中间组套列表 -->
|
||||||
<div class="section-card-left">
|
<div class="section-card-left">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
ref="tableWrapper"
|
ref="tableWrapper"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-loading="readCardLoading"
|
v-loading="readCardLoading"
|
||||||
style="display: flex; justify-content: space-between"
|
style="display: flex; justify-content: space-between"
|
||||||
@@ -741,7 +741,7 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
// 操作列索引为10(从0开始计数)
|
// 操作列索引为10(从0开始计数)
|
||||||
// 如果当前行的paymentId为空,则不合并
|
// 如果当前行的paymentId为空,则不合并
|
||||||
if (!row.paymentId) {
|
if (!row.paymentId) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找相同paymentId的连续行
|
// 查找相同paymentId的连续行
|
||||||
@@ -755,14 +755,14 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [spanCount, 1];
|
return { rowspan: spanCount, colspan: 1 };
|
||||||
} else {
|
} else {
|
||||||
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 其他列不合并
|
// 其他列不合并
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// function printCharge(row) {
|
// function printCharge(row) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
title="补打挂号单凭证"
|
title="补打挂号单凭证"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
style="display: flex; justify-content: space-between"
|
style="display: flex; justify-content: space-between"
|
||||||
@@ -528,7 +528,7 @@ async function handleReadCard(value) {
|
|||||||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
if (columnIndex === 10) {
|
if (columnIndex === 10) {
|
||||||
if (!row.paymentId) {
|
if (!row.paymentId) {
|
||||||
return [1,1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
let spanCount = 1;
|
let spanCount = 1;
|
||||||
if (rowIndex === 0 || chargeList.value[rowIndex - 1].paymentId !== row.paymentId) {
|
if (rowIndex === 0 || chargeList.value[rowIndex - 1].paymentId !== row.paymentId) {
|
||||||
@@ -539,12 +539,12 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [spanCount, 1];
|
return { rowspan: spanCount, colspan: 1 };
|
||||||
} else {
|
} else {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打印功能
|
// 打印功能
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
ref="tableWrapper"
|
ref="tableWrapper"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col
|
<el-col
|
||||||
@@ -751,13 +751,13 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
const groupId = row.groupId;
|
const groupId = row.groupId;
|
||||||
// 如果没有groupId,则不合并
|
// 如果没有groupId,则不合并
|
||||||
if (groupId === undefined || groupId === null) {
|
if (groupId === undefined || groupId === null) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 向上查找相同groupId的行,如果找到则隐藏当前行
|
// 向上查找相同groupId的行,如果找到则隐藏当前行
|
||||||
for (let i = rowIndex - 1; i >= 0; i--) {
|
for (let i = rowIndex - 1; i >= 0; i--) {
|
||||||
if (activityList.value[i].groupId === groupId) {
|
if (activityList.value[i].groupId === groupId) {
|
||||||
return [0, 0]; // 隐藏被合并的行
|
return { rowspan: 0, colspan: 0 }; // 隐藏被合并的行
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -773,9 +773,9 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [spanCount, 1];
|
return { rowspan: spanCount, colspan: 1 };
|
||||||
}
|
}
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打印处方
|
// 打印处方
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- 左侧患者列表 -->
|
<!-- 左侧患者列表 -->
|
||||||
<el-card class="patient-list">
|
<el-card class="patient-list">
|
||||||
@@ -420,7 +420,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
|
|
||||||
// 检查当前列是否需要合并
|
// 检查当前列是否需要合并
|
||||||
if (!mergeColumns.includes(columnIndex)) {
|
if (!mergeColumns.includes(columnIndex)) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前行的 requestId
|
// 获取当前行的 requestId
|
||||||
@@ -428,7 +428,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
|
|
||||||
// 如果没有 requestId,不进行合并
|
// 如果没有 requestId,不进行合并
|
||||||
if (!currentRequestId) {
|
if (!currentRequestId) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找具有相同 requestId 的连续行
|
// 查找具有相同 requestId 的连续行
|
||||||
@@ -444,7 +444,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
|
|
||||||
// 如果当前行不是合并组的第一行,则不显示
|
// 如果当前行不是合并组的第一行,则不显示
|
||||||
if (startIndex !== rowIndex) {
|
if (startIndex !== rowIndex) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 向下查找相同 requestId 的行
|
// 向下查找相同 requestId 的行
|
||||||
|
|||||||
@@ -1,2 +1,190 @@
|
|||||||
<template>
|
<template>
|
||||||
</template>
|
<div class="app-container">
|
||||||
|
<!-- 搜索栏 -->
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryFormRef"
|
||||||
|
:model="queryParams"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
<el-form-item title="申请类型" field="applyType">
|
||||||
|
<el-select v-model="queryParams.applyType" placeholder="全部" clearable>
|
||||||
|
<el-option title="全部" value="" />
|
||||||
|
<el-option title="检查" value="exam" />
|
||||||
|
<el-option title="检验" value="lab" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item title="申请单号" field="applyNo">
|
||||||
|
<el-input v-model="queryParams.applyNo" placeholder="请输入申请单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item title="患者姓名" field="patientName">
|
||||||
|
<el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!-- 操作栏 -->
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-check" size="small" :disabled="single" @click="handleExecute">
|
||||||
|
执行确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 数据表格 -->
|
||||||
|
<vxe-table v-loading="loading" :data="orderList" @checkbox-change="handleSelectionChange" border stripe>
|
||||||
|
<vxe-column type="checkbox" width="55" align="center" />
|
||||||
|
<vxe-column title="申请单号" field="applyNo" width="180" :show-overflow="true" />
|
||||||
|
<vxe-column title="申请类型" field="applyTypeName" width="80" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag :type="row.applyType === 'exam' ? 'primary' : 'success'" size="small">
|
||||||
|
{{ row.applyTypeName }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column title="患者ID" field="patientId" width="120" :show-overflow="true" />
|
||||||
|
<vxe-column title="患者姓名" field="patientName" width="100" :show-overflow="true" />
|
||||||
|
<vxe-column title="就诊号" field="visitNo" width="140" :show-overflow="true" />
|
||||||
|
<vxe-column title="开单科室" field="applyDeptCode" width="120" :show-overflow="true" />
|
||||||
|
<vxe-column title="申请医生" field="applyDocName" width="100" :show-overflow="true" />
|
||||||
|
<vxe-column title="申请时间" field="applyTime" width="170" align="center" />
|
||||||
|
<vxe-column title="诊断/描述" field="clinicDesc" min-width="180" :show-overflow="true" />
|
||||||
|
<vxe-column title="加急" width="70" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.isUrgent === 1" type="danger" size="small">加急</el-tag>
|
||||||
|
<span v-else>普通</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column title="状态" width="100" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag :type="statusTagType(row.applyStatus)" size="small">
|
||||||
|
{{ statusText(row) }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column title="操作" width="120" align="center" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" link size="small" @click="handleExecuteSingle(row)">
|
||||||
|
执行确认
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import { listExecuteOrders, executeExamOrder, executeLabOrder } from '@/api/techStation'
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const showSearch = ref(true)
|
||||||
|
const orderList = ref([])
|
||||||
|
const total = ref(0)
|
||||||
|
const ids = ref([])
|
||||||
|
const single = ref(true)
|
||||||
|
const multiple = ref(true)
|
||||||
|
const queryFormRef = ref(null)
|
||||||
|
|
||||||
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
applyType: '',
|
||||||
|
patientName: '',
|
||||||
|
applyNo: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
// 状态文本映射
|
||||||
|
function statusText(row) {
|
||||||
|
if (row.applyType === 'exam') {
|
||||||
|
const map = { 0: '已开单', 1: '已收费', 2: '已预约', 3: '已签到', 4: '部分报告', 5: '已完成', 6: '已作废' }
|
||||||
|
return map[row.applyStatus] || '未知'
|
||||||
|
}
|
||||||
|
const map = { 1: '待发送', 2: '已收费', 3: '已执行' }
|
||||||
|
return map[row.applyStatus] || '未知'
|
||||||
|
}
|
||||||
|
|
||||||
|
function statusTagType(status) {
|
||||||
|
if (status === 1) return 'warning'
|
||||||
|
if (status === 2 || status === 3) return 'primary'
|
||||||
|
if (status === 5) return 'success'
|
||||||
|
if (status === 6) return 'info'
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getList() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const res = await listExecuteOrders(queryParams)
|
||||||
|
orderList.value = res.rows || []
|
||||||
|
total.value = res.total || 0
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetQuery() {
|
||||||
|
queryFormRef.value?.resetFields()
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
queryParams.applyType = ''
|
||||||
|
queryParams.patientName = ''
|
||||||
|
queryParams.applyNo = ''
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map(item => item.applyNo)
|
||||||
|
single.value = selection.length !== 1
|
||||||
|
multiple.value = !selection.length
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleExecute() {
|
||||||
|
const row = orderList.value.find(item => item.applyNo === ids.value[0])
|
||||||
|
if (!row) return
|
||||||
|
await doExecute(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleExecuteSingle(row) {
|
||||||
|
await doExecute(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doExecute(row) {
|
||||||
|
await ElMessageBox.confirm(`确认执行申请单 ${row.applyNo}?`, '执行确认', { type: 'warning' })
|
||||||
|
try {
|
||||||
|
if (row.applyType === 'exam') {
|
||||||
|
await executeExamOrder(row.applyNo)
|
||||||
|
} else {
|
||||||
|
await executeLabOrder(row.applyNo)
|
||||||
|
}
|
||||||
|
ElMessage.success('执行成功')
|
||||||
|
getList()
|
||||||
|
} catch (e) {
|
||||||
|
ElMessage.error(e.message || '执行失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -1,2 +1,206 @@
|
|||||||
<template>
|
<template>
|
||||||
</template>
|
<div class="app-container">
|
||||||
|
<!-- 搜索栏 -->
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
ref="queryFormRef"
|
||||||
|
:model="queryParams"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
<el-form-item title="申请类型" field="applyType">
|
||||||
|
<el-select v-model="queryParams.applyType" placeholder="全部" clearable>
|
||||||
|
<el-option title="全部" value="" />
|
||||||
|
<el-option title="检查" value="exam" />
|
||||||
|
<el-option title="检验" value="lab" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item title="申请单号" field="applyNo">
|
||||||
|
<el-input v-model="queryParams.applyNo" placeholder="请输入申请单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item title="患者姓名" field="patientName">
|
||||||
|
<el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!-- 操作栏 -->
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="el-icon-check" size="small" :disabled="single" @click="handleApprove">
|
||||||
|
审批通过
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="el-icon-close" size="small" :disabled="single" @click="handleReject">
|
||||||
|
驳回
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 数据表格 -->
|
||||||
|
<vxe-table v-loading="loading" :data="orderList" @checkbox-change="handleSelectionChange" border stripe>
|
||||||
|
<vxe-column type="checkbox" width="55" align="center" />
|
||||||
|
<vxe-column title="申请单号" field="applyNo" width="180" :show-overflow="true" />
|
||||||
|
<vxe-column title="申请类型" field="applyTypeName" width="80" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag :type="row.applyType === 'exam' ? 'primary' : 'success'" size="small">
|
||||||
|
{{ row.applyTypeName }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column title="患者ID" field="patientId" width="120" :show-overflow="true" />
|
||||||
|
<vxe-column title="患者姓名" field="patientName" width="100" :show-overflow="true" />
|
||||||
|
<vxe-column title="就诊号" field="visitNo" width="140" :show-overflow="true" />
|
||||||
|
<vxe-column title="开单科室" field="applyDeptCode" width="120" :show-overflow="true" />
|
||||||
|
<vxe-column title="申请医生" field="applyDocName" width="100" :show-overflow="true" />
|
||||||
|
<vxe-column title="申请时间" field="applyTime" width="170" align="center" />
|
||||||
|
<vxe-column title="诊断/描述" field="clinicDesc" min-width="180" :show-overflow="true" />
|
||||||
|
<vxe-column title="申请状态" width="100" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag type="warning" size="small">待审批</el-tag>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column title="备注" field="applyRemark" width="150" :show-overflow="true" />
|
||||||
|
<vxe-column title="操作" width="160" align="center" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="success" link size="small" @click="handleApproveSingle(row)">
|
||||||
|
通过
|
||||||
|
</el-button>
|
||||||
|
<el-button type="danger" link size="small" @click="handleRejectSingle(row)">
|
||||||
|
驳回
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import {
|
||||||
|
listRefundApproveOrders,
|
||||||
|
approveExamRefund,
|
||||||
|
rejectExamRefund,
|
||||||
|
approveLabRefund,
|
||||||
|
rejectLabRefund
|
||||||
|
} from '@/api/techStation'
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const showSearch = ref(true)
|
||||||
|
const orderList = ref([])
|
||||||
|
const total = ref(0)
|
||||||
|
const ids = ref([])
|
||||||
|
const applyTypes = ref([])
|
||||||
|
const single = ref(true)
|
||||||
|
const multiple = ref(true)
|
||||||
|
const queryFormRef = ref(null)
|
||||||
|
|
||||||
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
applyType: '',
|
||||||
|
patientName: '',
|
||||||
|
applyNo: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
async function getList() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const res = await listRefundApproveOrders(queryParams)
|
||||||
|
orderList.value = res.rows || []
|
||||||
|
total.value = res.total || 0
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetQuery() {
|
||||||
|
queryFormRef.value?.resetFields()
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
queryParams.applyType = ''
|
||||||
|
queryParams.patientName = ''
|
||||||
|
queryParams.applyNo = ''
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map(item => item.applyNo)
|
||||||
|
applyTypes.value = selection.map(item => item.applyType)
|
||||||
|
single.value = selection.length !== 1
|
||||||
|
multiple.value = !selection.length
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doApprove(row) {
|
||||||
|
await ElMessageBox.confirm(`确认审批通过申请单 ${row.applyNo}?`, '审批确认', { type: 'success' })
|
||||||
|
try {
|
||||||
|
if (row.applyType === 'exam') {
|
||||||
|
await approveExamRefund(row.applyNo)
|
||||||
|
} else {
|
||||||
|
await approveLabRefund(row.applyNo)
|
||||||
|
}
|
||||||
|
ElMessage.success('审批通过')
|
||||||
|
getList()
|
||||||
|
} catch (e) {
|
||||||
|
ElMessage.error(e.message || '审批失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doReject(row) {
|
||||||
|
await ElMessageBox.confirm(`确认驳回申请单 ${row.applyNo} 的退费申请?`, '驳回确认', { type: 'warning' })
|
||||||
|
try {
|
||||||
|
if (row.applyType === 'exam') {
|
||||||
|
await rejectExamRefund(row.applyNo)
|
||||||
|
} else {
|
||||||
|
await rejectLabRefund(row.applyNo)
|
||||||
|
}
|
||||||
|
ElMessage.success('已驳回')
|
||||||
|
getList()
|
||||||
|
} catch (e) {
|
||||||
|
ElMessage.error(e.message || '驳回失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleApprove() {
|
||||||
|
const row = orderList.value.find(item => item.applyNo === ids.value[0])
|
||||||
|
if (!row) return
|
||||||
|
doApprove(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleReject() {
|
||||||
|
const row = orderList.value.find(item => item.applyNo === ids.value[0])
|
||||||
|
if (!row) return
|
||||||
|
doReject(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleApproveSingle(row) {
|
||||||
|
doApprove(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleRejectSingle(row) {
|
||||||
|
doReject(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="consultation-application-container">
|
<div class="consultation-application-container">
|
||||||
<!-- 页面标题 -->
|
<!-- 页面标题 -->
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container consultation-confirmation">
|
<div class="app-container consultation-confirmation">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<span class="tab-title">会诊确认</span>
|
<span class="tab-title">会诊确认</span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
ref="tableWrapper"
|
ref="tableWrapper"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="drawer"
|
v-model="drawer"
|
||||||
title="医嘱组套"
|
title="医嘱组套"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
ref="tableWrapper"
|
ref="tableWrapper"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
@@ -722,15 +722,15 @@ function spanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
const count = medicineInfoList.value.filter(
|
const count = medicineInfoList.value.filter(
|
||||||
(item) => item.prescriptionNo === prescriptionNo
|
(item) => item.prescriptionNo === prescriptionNo
|
||||||
).length;
|
).length;
|
||||||
return [count, 1]; // 合并count行,1列
|
return { rowspan: count, colspan: 1 }; // 合并count行,1列
|
||||||
} else {
|
} else {
|
||||||
return [0, 0]; // 其他行不显示
|
return { rowspan: 0, colspan: 0 }; // 其他行不显示
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他列不进行合并
|
// 其他列不进行合并
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectionChange(selectedRows, currentRow) {
|
function handleSelectionChange(selectedRows, currentRow) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="med-summary-container">
|
<div class="med-summary-container">
|
||||||
<div class="summary-card" style="width: 40%; height: 80vh">
|
<div class="summary-card" style="width: 40%; height: 80vh">
|
||||||
<div class="summary-card-header">{{ '汇总单' }}</div>
|
<div class="summary-card-header">{{ '汇总单' }}</div>
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
border
|
border
|
||||||
auto-resize
|
auto-resize
|
||||||
@cell-click="({ row }) => getDetails(row)"
|
@cell-click="(row) => getDetails(row)"
|
||||||
>
|
>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- 左侧患者列表 -->
|
<!-- 左侧患者列表 -->
|
||||||
<el-card class="patient-list">
|
<el-card class="patient-list">
|
||||||
@@ -421,7 +421,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
|
|
||||||
// 检查当前列是否需要合并
|
// 检查当前列是否需要合并
|
||||||
if (!mergeColumns.includes(columnIndex)) {
|
if (!mergeColumns.includes(columnIndex)) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前行的 requestId
|
// 获取当前行的 requestId
|
||||||
@@ -429,7 +429,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
|
|
||||||
// 如果没有 requestId,不进行合并
|
// 如果没有 requestId,不进行合并
|
||||||
if (!currentRequestId) {
|
if (!currentRequestId) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找具有相同 requestId 的连续行
|
// 查找具有相同 requestId 的连续行
|
||||||
@@ -445,7 +445,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
|
|
||||||
// 如果当前行不是合并组的第一行,则不显示
|
// 如果当前行不是合并组的第一行,则不显示
|
||||||
if (startIndex !== rowIndex) {
|
if (startIndex !== rowIndex) {
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 向下查找相同 requestId 的行
|
// 向下查找相同 requestId 的行
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-loading="readCardLoading"
|
v-loading="readCardLoading"
|
||||||
style="display: flex; justify-content: space-between"
|
style="display: flex; justify-content: space-between"
|
||||||
@@ -865,7 +865,7 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
// 操作列索引为10(从0开始计数)
|
// 操作列索引为10(从0开始计数)
|
||||||
// 如果当前行的paymentId为空,则不合并
|
// 如果当前行的paymentId为空,则不合并
|
||||||
if (!row.paymentId) {
|
if (!row.paymentId) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找相同paymentId的连续行
|
// 查找相同paymentId的连续行
|
||||||
@@ -879,14 +879,14 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [spanCount, 1];
|
return { rowspan: spanCount, colspan: 1 };
|
||||||
} else {
|
} else {
|
||||||
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
||||||
return [0, 0];
|
return { rowspan: 0, colspan: 0 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 其他列不合并
|
// 其他列不合并
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
function printCharge(row) {
|
function printCharge(row) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="diagnose-container">
|
<div class="diagnose-container">
|
||||||
<!-- 常用诊断、个人诊断、科室诊断、历史诊断 -->
|
<!-- 常用诊断、个人诊断、科室诊断、历史诊断 -->
|
||||||
<diagnose-folder
|
<diagnose-folder
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
<vxe-table
|
<vxe-table
|
||||||
:data="filteredSyndromeList"
|
:data="filteredSyndromeList"
|
||||||
max-height="300"
|
max-height="300"
|
||||||
@cell-click="({ row }) => handleSelectSyndrome(row, scope.row)"
|
@cell-click="(row) => handleSelectSyndrome(row, scope.row)"
|
||||||
>
|
>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
title="证候名称"
|
title="证候名称"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="medicalOrderList-container">
|
<div class="medicalOrderList-container">
|
||||||
<div class="search-container">
|
<div class="search-container">
|
||||||
<el-space
|
<el-space
|
||||||
@@ -430,22 +430,22 @@ const arraySpanMethod = ({
|
|||||||
// 如果是父级行
|
// 如果是父级行
|
||||||
if (row.children && row.children.length > 0) {
|
if (row.children && row.children.length > 0) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
// 如果是患者列
|
// 如果是患者列
|
||||||
if (columnIndex === 1) {
|
if (columnIndex === 1) {
|
||||||
return [1, 16]
|
return { rowspan: 1, colspan: 16 }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return [1, 0]
|
return { rowspan: 1, colspan: 0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果是子级行,显示其他列
|
// 如果是子级行,显示其他列
|
||||||
if (!row.children || row.children.length == 0) {
|
if (!row.children || row.children.length == 0) {
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
// 如果是父级行,隐藏其他列
|
// 如果是父级行,隐藏其他列
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
const drugDistributionSummaryData = ref([
|
const drugDistributionSummaryData = ref([
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: sjjh
|
* @Author: sjjh
|
||||||
* @Date: 2025-04-16 20:54:48
|
* @Date: 2025-04-16 20:54:48
|
||||||
* @Description:
|
* @Description:
|
||||||
@@ -229,21 +229,21 @@ const arraySpanMethod = ({
|
|||||||
// 如果是父级行
|
// 如果是父级行
|
||||||
if (row.children && row.children.length > 0) {
|
if (row.children && row.children.length > 0) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
// 如果是患者列
|
// 如果是患者列
|
||||||
if (columnIndex === 1) {
|
if (columnIndex === 1) {
|
||||||
return [1, 6]
|
return { rowspan: 1, colspan: 6 }
|
||||||
} else {
|
} else {
|
||||||
return [1, 0]
|
return { rowspan: 1, colspan: 0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果是子级行,显示其他列
|
// 如果是子级行,显示其他列
|
||||||
if (!row.children || row.children.length == 0) {
|
if (!row.children || row.children.length == 0) {
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
// 如果是父级行,隐藏其他列
|
// 如果是父级行,隐藏其他列
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
const statusOptions = [
|
const statusOptions = [
|
||||||
{ value: '全部', label: '全部' },
|
{ value: '全部', label: '全部' },
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: sjjh
|
* @Author: sjjh
|
||||||
* @Date: 2025-04-16 20:54:48
|
* @Date: 2025-04-16 20:54:48
|
||||||
* @Description:
|
* @Description:
|
||||||
@@ -339,21 +339,21 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
|||||||
// 如果是父级行
|
// 如果是父级行
|
||||||
if (row.children && row.children.length > 0) {
|
if (row.children && row.children.length > 0) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
// 如果是患者列
|
// 如果是患者列
|
||||||
if (columnIndex === 1) {
|
if (columnIndex === 1) {
|
||||||
return [1, 6];
|
return { rowspan: 1, colspan: 6 };
|
||||||
} else {
|
} else {
|
||||||
return [1, 0];
|
return { rowspan: 1, colspan: 0 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果是子级行,显示其他列
|
// 如果是子级行,显示其他列
|
||||||
if (!row.children || row.children.length == 0) {
|
if (!row.children || row.children.length == 0) {
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
// 如果是父级行,隐藏其他列
|
// 如果是父级行,隐藏其他列
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
};
|
};
|
||||||
const statusOptions = [
|
const statusOptions = [
|
||||||
{ value: '未执行', label: '未执行' },
|
{ value: '未执行', label: '未执行' },
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: sjjh
|
* @Author: sjjh
|
||||||
* @Date: 2025-09-09 13:49:40
|
* @Date: 2025-09-09 13:49:40
|
||||||
* @Description: 药品发送
|
* @Description: 药品发送
|
||||||
@@ -238,21 +238,21 @@ const arraySpanMethod = ({
|
|||||||
// 如果是父级行
|
// 如果是父级行
|
||||||
if (row.children && row.children.length > 0) {
|
if (row.children && row.children.length > 0) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
// 如果是患者列
|
// 如果是患者列
|
||||||
if (columnIndex === 1) {
|
if (columnIndex === 1) {
|
||||||
return [1, 7]
|
return { rowspan: 1, colspan: 7 }
|
||||||
} else {
|
} else {
|
||||||
return [1, 0]
|
return { rowspan: 1, colspan: 0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果是子级行,显示其他列
|
// 如果是子级行,显示其他列
|
||||||
if (!row.children || row.children.length == 0) {
|
if (!row.children || row.children.length == 0) {
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
// 如果是父级行,隐藏其他列
|
// 如果是父级行,隐藏其他列
|
||||||
return [1, 1]
|
return { rowspan: 1, colspan: 1 }
|
||||||
}
|
}
|
||||||
const collectTsableData = ref([
|
const collectTsableData = ref([
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
@@ -1000,15 +1000,15 @@ function spanMethod({row, column, rowIndex, columnIndex}) {
|
|||||||
const count = medicineInfoList.value.filter(
|
const count = medicineInfoList.value.filter(
|
||||||
(item) => item.prescriptionNo === prescriptionNo
|
(item) => item.prescriptionNo === prescriptionNo
|
||||||
).length;
|
).length;
|
||||||
return [count, 1]; // 合并count行,1列
|
return { rowspan: count, colspan: 1 }; // 合并count行,1列
|
||||||
} else {
|
} else {
|
||||||
return [0, 0]; // 其他行不显示
|
return { rowspan: 0, colspan: 0 }; // 其他行不显示
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他列不进行合并
|
// 其他列不进行合并
|
||||||
return [1, 1];
|
return { rowspan: 1, colspan: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单元格类名设置
|
// 单元格类名设置
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 查询表单 -->
|
<!-- 查询表单 -->
|
||||||
<el-form
|
<el-form
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 顶部筛选区 -->
|
<!-- 顶部筛选区 -->
|
||||||
<el-form
|
<el-form
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<h4 class="form-header h4">
|
<h4 class="form-header h4">
|
||||||
基本信息
|
基本信息
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<h4 class="form-header h4">
|
<h4 class="form-header h4">
|
||||||
角色信息
|
角色信息
|
||||||
</h4>
|
</h4>
|
||||||
<vxe-table
|
<vxe-table :checkbox-config="{ reserve: true }"
|
||||||
ref="roleRef"
|
ref="roleRef"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:row-key="getRowKey"
|
:row-key="getRowKey"
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:reserve-selection="true"
|
|
||||||
width="55"
|
width="55"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<h4 class="form-header h4">
|
<h4 class="form-header h4">
|
||||||
基本信息
|
基本信息
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<h4 class="form-header h4">
|
<h4 class="form-header h4">
|
||||||
角色信息
|
角色信息
|
||||||
</h4>
|
</h4>
|
||||||
<vxe-table
|
<vxe-table :checkbox-config="{ reserve: true }"
|
||||||
ref="roleRef"
|
ref="roleRef"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:row-key="getRowKey"
|
:row-key="getRowKey"
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:reserve-selection="true"
|
|
||||||
width="55"
|
width="55"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
|
|||||||
18
openhis-ui-vue3/vitest.config.ts
Normal file
18
openhis-ui-vue3/vitest.config.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { defineConfig } from 'vitest/config'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import path from 'path'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'~': path.resolve(__dirname, './'),
|
||||||
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
globals: true,
|
||||||
|
environment: 'jsdom',
|
||||||
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user