Compare commits
15 Commits
upgrade/sp
...
4ff36fba20
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ff36fba20 | |||
| 04840fde0e | |||
|
|
a77d4e8b03 | ||
| 71835c7fd1 | |||
|
|
b5082c526f | ||
| f3ce360714 | |||
| b61084d8db | |||
| 4ebb21915d | |||
| 14cb913943 | |||
| e0d4c203e4 | |||
|
|
0e69a01120 | ||
| af5d411e52 | |||
| c0149693f5 | |||
| 7e8d32a851 | |||
| efb9b49d5c |
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: 验证后信
|
||||
每次修改后必须验证编译通过,不信记忆。
|
||||
@@ -9,9 +9,14 @@ import java.sql.Statement;
|
||||
*/
|
||||
public class DatabaseFieldAdder {
|
||||
public static void main(String[] args) {
|
||||
String url = "jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public";
|
||||
String username = "postgresql";
|
||||
String password = "Jchl1528";
|
||||
String url = System.getenv("DB_URL");
|
||||
String username = System.getenv("DB_USERNAME");
|
||||
String password = System.getenv("DB_PASSWORD");
|
||||
|
||||
if (url == null || username == null || password == null) {
|
||||
System.err.println("Please set DB_URL, DB_USERNAME, DB_PASSWORD environment variables");
|
||||
return;
|
||||
}
|
||||
|
||||
try (Connection conn = DriverManager.getConnection(url, username, password);
|
||||
Statement stmt = conn.createStatement()) {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.web.controller.system;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.core.common.annotation.Log;
|
||||
import com.core.common.core.controller.BaseController;
|
||||
import com.core.common.core.domain.AjaxResult;
|
||||
@@ -24,6 +27,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping("/system/config")
|
||||
public class SysConfigController extends BaseController {
|
||||
private static final Logger log = LoggerFactory.getLogger(SysConfigController.class);
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
@@ -72,13 +76,13 @@ public class SysConfigController extends BaseController {
|
||||
result.put("code", 200);
|
||||
result.put("msg", "操作成功");
|
||||
result.put("data", configValue); // 明确设置 data 字段,即使值为空字符串
|
||||
System.out.println("=== getConfigKey 调试信息 ===");
|
||||
System.out.println("configKey: " + configKey);
|
||||
System.out.println("configValue: [" + configValue + "]");
|
||||
System.out.println("result.data: " + result.get("data"));
|
||||
System.out.println("result.msg: " + result.get("msg"));
|
||||
System.out.println("result.code: " + result.get("code"));
|
||||
System.out.println("============================");
|
||||
log.info("=== getConfigKey 调试信息 ===");
|
||||
log.info("configKey: " + configKey);
|
||||
log.info("configValue: [" + configValue + "]");
|
||||
log.info("result.data: " + result.get("data"));
|
||||
log.info("result.msg: " + result.get("msg"));
|
||||
log.info("result.code: " + result.get("code"));
|
||||
log.info("============================");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -197,6 +197,12 @@
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -267,6 +267,6 @@ public class LoginUser implements UserDetails {
|
||||
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
return null;
|
||||
return java.util.Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1040,7 +1040,8 @@ public class NewExcelUtil<T> {
|
||||
try {
|
||||
temp = Double.valueOf(text);
|
||||
} catch (NumberFormatException e) {
|
||||
}
|
||||
log.debug("Caught expected exception: {}", e.getMessage());
|
||||
}
|
||||
statistics.put(index, statistics.get(index) + temp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.common.utils.html;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.core.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -8,6 +11,7 @@ import com.core.common.utils.StringUtils;
|
||||
* @author system
|
||||
*/
|
||||
public class EscapeUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(EscapeUtil.class);
|
||||
public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)";
|
||||
|
||||
private static final char[][] TEXT = new char[64][];
|
||||
@@ -133,8 +137,8 @@ public class EscapeUtil {
|
||||
// String html = "<scr<script>ipt>alert(\"XSS\")</scr<script>ipt>";
|
||||
// String html = "<123";
|
||||
// String html = "123>";
|
||||
System.out.println("clean: " + EscapeUtil.clean(html));
|
||||
System.out.println("escape: " + escape);
|
||||
System.out.println("unescape: " + EscapeUtil.unescape(escape));
|
||||
log.info("clean: " + EscapeUtil.clean(html));
|
||||
log.info("escape: " + escape);
|
||||
log.info("unescape: " + EscapeUtil.unescape(escape));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.common.utils.ip;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.core.common.utils.ServletUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
|
||||
@@ -13,6 +16,7 @@ import java.net.UnknownHostException;
|
||||
* @author system
|
||||
*/
|
||||
public class IpUtils {
|
||||
private static final Logger log = LoggerFactory.getLogger(IpUtils.class);
|
||||
public final static String REGX_0_255 = "(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)";
|
||||
// 匹配 ip
|
||||
public final static String REGX_IP = "((" + REGX_0_255 + "\\.){3}" + REGX_0_255 + ")";
|
||||
@@ -193,7 +197,8 @@ public class IpUtils {
|
||||
try {
|
||||
return InetAddress.getLocalHost().getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
}
|
||||
log.debug("Caught expected exception: {}", e.getMessage());
|
||||
}
|
||||
return "127.0.0.1";
|
||||
}
|
||||
|
||||
@@ -206,7 +211,8 @@ public class IpUtils {
|
||||
try {
|
||||
return InetAddress.getLocalHost().getHostName();
|
||||
} catch (UnknownHostException e) {
|
||||
}
|
||||
log.debug("Caught expected exception: {}", e.getMessage());
|
||||
}
|
||||
return "未知";
|
||||
}
|
||||
|
||||
|
||||
@@ -1165,7 +1165,8 @@ public class ExcelUtil<T> {
|
||||
try {
|
||||
temp = Double.valueOf(text);
|
||||
} catch (NumberFormatException e) {
|
||||
}
|
||||
log.debug("Caught expected exception: {}", e.getMessage());
|
||||
}
|
||||
statistics.put(index, statistics.get(index) + temp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.core.common.core.text;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* Convert 工具类单元测试
|
||||
*/
|
||||
class ConvertTest {
|
||||
|
||||
@Test
|
||||
void testToStr() {
|
||||
assertEquals("hello", Convert.toStr("hello"));
|
||||
assertEquals("123", Convert.toStr(123));
|
||||
assertEquals("true", Convert.toStr(true));
|
||||
assertNull(Convert.toStr(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToInt() {
|
||||
assertEquals(123, Convert.toInt("123"));
|
||||
assertEquals(123, Convert.toInt(123));
|
||||
assertNull(Convert.toInt("invalid"));
|
||||
assertNull(Convert.toInt(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToLong() {
|
||||
assertEquals(123L, Convert.toLong("123"));
|
||||
assertEquals(123L, Convert.toLong(123L));
|
||||
assertNull(Convert.toLong("invalid"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToDouble() {
|
||||
assertEquals(1.23, Convert.toDouble("1.23"), 0.001);
|
||||
assertEquals(1.23, Convert.toDouble(1.23), 0.001);
|
||||
assertNull(Convert.toDouble("invalid"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToFloat() {
|
||||
assertEquals(1.23f, Convert.toFloat("1.23"), 0.001);
|
||||
assertEquals(1.23f, Convert.toFloat(1.23f), 0.001);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToBool() {
|
||||
assertTrue(Convert.toBool("true"));
|
||||
assertTrue(Convert.toBool(true));
|
||||
assertFalse(Convert.toBool("false"));
|
||||
assertFalse(Convert.toBool(false));
|
||||
assertNull(Convert.toBool("invalid"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToByte() {
|
||||
assertEquals((byte) 123, Convert.toByte("123"));
|
||||
assertEquals((byte) 123, Convert.toByte((byte) 123));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToShort() {
|
||||
assertEquals((short) 123, Convert.toShort("123"));
|
||||
assertEquals((short) 123, Convert.toShort((short) 123));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToBigDecimal() {
|
||||
assertEquals(0, new BigDecimal("1.23").compareTo(Convert.toBigDecimal("1.23")));
|
||||
assertEquals(0, new BigDecimal("1.23").compareTo(Convert.toBigDecimal(1.23)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToBigInteger() {
|
||||
assertEquals(0, new BigInteger("123").compareTo(Convert.toBigInteger("123")));
|
||||
assertEquals(0, new BigInteger("123").compareTo(Convert.toBigInteger(123)));
|
||||
}
|
||||
}
|
||||
@@ -106,6 +106,12 @@
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -177,6 +177,7 @@ public class LogAspect {
|
||||
String jsonObj = JSON.toJSONString(o, excludePropertyPreFilter(excludeParamNames));
|
||||
params += jsonObj.toString() + " ";
|
||||
} catch (Exception e) {
|
||||
log.debug("Caught expected exception: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.framework.config;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
@@ -27,6 +30,7 @@ import java.util.TimeZone;
|
||||
// 指定要扫描的Mapper类的包的路径
|
||||
@MapperScan({"com.core.**.mapper", "com.openhis.**.mapper"})
|
||||
public class ApplicationConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(ApplicationConfig.class);
|
||||
|
||||
/** 支持多种日期格式的反序列化器 */
|
||||
private static final JsonDeserializer<LocalDateTime> LOCAL_DATE_TIME_DESERIALIZER = new JsonDeserializer<LocalDateTime>() {
|
||||
@@ -46,12 +50,14 @@ public class ApplicationConfig {
|
||||
try {
|
||||
return LocalDateTime.parse(cleaned, ISO_FORMATTER);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
// 尝试简单格式(yyyy-MM-dd HH:mm:ss)
|
||||
try {
|
||||
return LocalDateTime.parse(cleaned, SIMPLE_FORMATTER);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
// 尝试斜杠格式(yyyy/M/d HH:mm:ss)
|
||||
return LocalDateTime.parse(cleaned, SLASH_FORMATTER);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.framework.config;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.util.Utils;
|
||||
import com.core.common.enums.DataSourceType;
|
||||
@@ -21,6 +24,7 @@ import java.util.Map;
|
||||
|
||||
@Configuration
|
||||
public class DruidConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(DruidConfig.class);
|
||||
@Bean
|
||||
@ConfigurationProperties("spring.datasource.druid.master")
|
||||
public DataSource masterDataSource(DruidProperties druidProperties) {
|
||||
@@ -50,7 +54,8 @@ public class DruidConfig {
|
||||
DataSource dataSource = SpringUtils.getBean(beanName);
|
||||
targetDataSources.put(sourceName, dataSource);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
log.debug("Caught expected exception: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.framework.handler;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
@@ -14,6 +17,7 @@ import java.util.Date;
|
||||
|
||||
@Component
|
||||
public class MybastisColumnsHandler implements MetaObjectHandler {
|
||||
private static final Logger log = LoggerFactory.getLogger(MybastisColumnsHandler.class);
|
||||
|
||||
// 设置数据新增时候的,字段自动赋值规则
|
||||
@Override
|
||||
@@ -26,7 +30,8 @@ public class MybastisColumnsHandler implements MetaObjectHandler {
|
||||
username = loginUser.getUsername();
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
// 使用 fillStrategy 而不是 strictInsertFill,确保即使字段已设置也能填充(如果为null)
|
||||
this.fillStrategy(metaObject, "createBy", username != null ? username : "system");
|
||||
this.fillStrategy(metaObject, "tenantId", getCurrentTenantId());
|
||||
@@ -43,7 +48,8 @@ public class MybastisColumnsHandler implements MetaObjectHandler {
|
||||
username = loginUser.getUsername();
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
this.strictUpdateFill(metaObject, "updateBy", String.class, username);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.system.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.core.common.annotation.DataSource;
|
||||
import com.core.common.constant.CacheConstants;
|
||||
import com.core.common.constant.UserConstants;
|
||||
@@ -25,6 +28,7 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class SysConfigServiceImpl implements ISysConfigService {
|
||||
private static final Logger log = LoggerFactory.getLogger(SysConfigServiceImpl.class);
|
||||
@Autowired
|
||||
private SysConfigMapper configMapper;
|
||||
|
||||
@@ -70,24 +74,24 @@ public class SysConfigServiceImpl implements ISysConfigService {
|
||||
SysConfig retConfig = configMapper.selectConfig(config);
|
||||
if (StringUtils.isNotNull(retConfig)) {
|
||||
String dbValue = retConfig.getConfigValue();
|
||||
System.out.println("=== selectConfigByKey 调试信息 ===");
|
||||
System.out.println("configKey: " + configKey);
|
||||
System.out.println("retConfig: " + retConfig);
|
||||
System.out.println("configId: " + retConfig.getConfigId());
|
||||
System.out.println("configName: " + retConfig.getConfigName());
|
||||
System.out.println("configValue from DB: [" + dbValue + "]");
|
||||
System.out.println("configValue is null: " + (dbValue == null));
|
||||
System.out.println("configValue is empty: " + StringUtils.isEmpty(dbValue));
|
||||
System.out.println("================================");
|
||||
log.info("=== selectConfigByKey 调试信息 ===");
|
||||
log.info("configKey: " + configKey);
|
||||
log.info("retConfig: " + retConfig);
|
||||
log.info("configId: " + retConfig.getConfigId());
|
||||
log.info("configName: " + retConfig.getConfigName());
|
||||
log.info("configValue from DB: [" + dbValue + "]");
|
||||
log.info("configValue is null: " + (dbValue == null));
|
||||
log.info("configValue is empty: " + StringUtils.isEmpty(dbValue));
|
||||
log.info("================================");
|
||||
if (StringUtils.isNotEmpty(dbValue)) {
|
||||
redisCache.setCacheObject(getCacheKey(configKey), dbValue);
|
||||
return dbValue;
|
||||
} else {
|
||||
System.out.println("警告: configValue 为空,返回空字符串");
|
||||
log.info("警告: configValue 为空,返回空字符串");
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
} else {
|
||||
System.out.println("警告: 数据库中未找到 configKey=" + configKey + " 的记录");
|
||||
log.info("警告: 数据库中未找到 configKey=" + configKey + " 的记录");
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.core.common.utils.DictUtils;
|
||||
import com.core.system.mapper.SysDictDataMapper;
|
||||
import com.core.system.service.ISysDictDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -39,6 +40,7 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
|
||||
* @return 字典标签
|
||||
*/
|
||||
@Override
|
||||
@Cacheable(value = "dictLabelCache", key = "#dictType + ':' + #dictValue")
|
||||
public String selectDictLabel(String dictType, String dictValue) {
|
||||
return dictDataMapper.selectDictLabel(dictType, dictValue);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.core.system.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -36,6 +39,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant> implements ISysTenantService {
|
||||
private static final Logger log = LoggerFactory.getLogger(SysTenantServiceImpl.class);
|
||||
@Autowired
|
||||
private SysUserTenantMapper sysUserTenantMapper;
|
||||
@Autowired
|
||||
@@ -295,7 +299,8 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
.sort(Comparator.comparing(e -> !cacheTenant.equals(e.getId()), Comparator.naturalOrder()));
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
return R.ok(userBindTenantList);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||
<artifactId>httpclient5</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.openhis.web.ybmanage.config.YbServiceConfig;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -20,13 +23,14 @@ import java.net.UnknownHostException;
|
||||
@EnableConfigurationProperties(YbServiceConfig.class)
|
||||
@EnableAsync
|
||||
public class OpenHisApplication {
|
||||
private static final Logger log = LoggerFactory.getLogger(OpenHisApplication.class);
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
ConfigurableApplicationContext application = SpringApplication.run(OpenHisApplication.class, args);
|
||||
Environment env = application.getEnvironment();
|
||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||
String port = env.getProperty("server.port");
|
||||
String path = env.getProperty("server.servlet.context-path");
|
||||
System.out.println("\n----------------------------------------------------------\n\t"
|
||||
log.info("\n----------------------------------------------------------\n\t"
|
||||
+ "Application OpenHis is running! Access URLs:\n\t" + "Local: \t\thttp://localhost:" + port + path
|
||||
+ "/\n\t" + "External: \thttp://" + ip + ":" + port + path + "/\n"
|
||||
+ "----------------------------------------------------------");
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.quartz.task;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.core.framework.config.TenantContext;
|
||||
import com.openhis.administration.domain.Location;
|
||||
@@ -16,6 +19,7 @@ import java.util.List;
|
||||
*/
|
||||
@Component("ryTask")
|
||||
public class RyTask {
|
||||
private static final Logger log = LoggerFactory.getLogger(RyTask.class);
|
||||
|
||||
@Resource
|
||||
ILocationService locationService;
|
||||
@@ -27,7 +31,7 @@ public class RyTask {
|
||||
// 设置当前线程的租户ID
|
||||
TenantContext.setCurrentTenant(tenantId);
|
||||
List<Location> pharmacyList = locationService.getPharmacyList();
|
||||
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
|
||||
log.info(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
|
||||
} finally {
|
||||
// 清除线程局部变量,防止内存泄漏
|
||||
TenantContext.clear();
|
||||
@@ -36,10 +40,10 @@ public class RyTask {
|
||||
}
|
||||
|
||||
public void ryParams(String params) {
|
||||
System.out.println("执行有参方法:" + params);
|
||||
log.info("执行有参方法:" + params);
|
||||
}
|
||||
|
||||
public void ryNoParams() {
|
||||
System.out.println("执行无参方法");
|
||||
log.info("执行无参方法");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
package com.openhis.rule.component;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component("a")
|
||||
public class ACmp extends NodeComponent {
|
||||
private static final Logger log = LoggerFactory.getLogger(ACmp.class);
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
// do your business
|
||||
System.out.println("___aaa");
|
||||
log.info("___aaa");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
package com.openhis.rule.component;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component("b")
|
||||
public class BCmp extends NodeComponent {
|
||||
private static final Logger log = LoggerFactory.getLogger(BCmp.class);
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
// do your business
|
||||
System.out.println("___bbb");
|
||||
log.info("___bbb");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
package com.openhis.rule.component;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component("c")
|
||||
public class CCmp extends NodeComponent {
|
||||
private static final Logger log = LoggerFactory.getLogger(CCmp.class);
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
// do your business
|
||||
System.out.println("___ccc");
|
||||
log.info("___ccc");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.Inspection.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -32,6 +35,7 @@ import java.util.Objects;
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class SampleCollectManageAppService implements ISampleCollectAppManageAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(SampleCollectManageAppService.class);
|
||||
|
||||
private final SampleCollectMapper sampleCollectMapper;
|
||||
|
||||
@@ -96,7 +100,7 @@ public class SampleCollectManageAppService implements ISampleCollectAppManageApp
|
||||
});
|
||||
if (Objects.equals(status, SpecCollectStatus.RECEIVED.getValue())) {
|
||||
// TODO 接收样本后续逻辑
|
||||
System.err.println("接收样本后!!");
|
||||
log.error("接收样本后!!");
|
||||
|
||||
}
|
||||
return R.ok();
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.basicmanage.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.annotation.Log;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -20,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
@RequestMapping("/business-rule/outpatient-no")
|
||||
public class OutpatientNoSegmentController {
|
||||
private static final Logger log = LoggerFactory.getLogger(OutpatientNoSegmentController.class);
|
||||
|
||||
@Autowired
|
||||
private IOutpatientNoSegmentService outpatientNoSegmentService;
|
||||
@@ -128,8 +132,8 @@ public class OutpatientNoSegmentController {
|
||||
public R<?> deleteOutpatientNoSegment(@RequestBody java.util.Map<String, Object> request) {
|
||||
// 支持接收 Long[] 或 String[] 或混合类型,处理大整数ID
|
||||
Object idsObj = request.get("ids");
|
||||
System.out.println("删除请求 - 接收到的ids原始数据: " + idsObj);
|
||||
System.out.println("删除请求 - 接收到的ids类型: " + (idsObj != null ? idsObj.getClass().getName() : "null"));
|
||||
log.info("删除请求 - 接收到的ids原始数据: " + idsObj);
|
||||
log.info("删除请求 - 接收到的ids类型: " + (idsObj != null ? idsObj.getClass().getName() : "null"));
|
||||
|
||||
if (idsObj == null) {
|
||||
return R.fail("请选择要删除的数据");
|
||||
@@ -149,15 +153,15 @@ public class OutpatientNoSegmentController {
|
||||
} else if (idObj instanceof String) {
|
||||
try {
|
||||
String idStr = (String) idObj;
|
||||
System.out.println("删除请求 - 转换字符串ID: " + idStr);
|
||||
log.info("删除请求 - 转换字符串ID: " + idStr);
|
||||
ids[i] = Long.parseLong(idStr);
|
||||
System.out.println("删除请求 - 转换后的Long ID: " + ids[i]);
|
||||
log.info("删除请求 - 转换后的Long ID: " + ids[i]);
|
||||
// 验证转换是否正确
|
||||
if (!String.valueOf(ids[i]).equals(idStr)) {
|
||||
System.out.println("删除请求 - 警告:ID转换后值不匹配!原始: " + idStr + ", 转换后: " + ids[i]);
|
||||
log.info("删除请求 - 警告:ID转换后值不匹配!原始: " + idStr + ", 转换后: " + ids[i]);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
System.out.println("删除请求 - ID转换失败: " + idObj + ", 错误: " + e.getMessage());
|
||||
log.info("删除请求 - ID转换失败: " + idObj + ", 错误: " + e.getMessage());
|
||||
return R.fail("无效的ID格式: " + idObj);
|
||||
}
|
||||
} else if (idObj instanceof Number) {
|
||||
@@ -172,7 +176,7 @@ public class OutpatientNoSegmentController {
|
||||
return R.fail("无效的ID数组格式");
|
||||
}
|
||||
|
||||
System.out.println("删除请求 - 转换后的ids: " + java.util.Arrays.toString(ids));
|
||||
log.info("删除请求 - 转换后的ids: " + java.util.Arrays.toString(ids));
|
||||
|
||||
if (ids == null || ids.length == 0) {
|
||||
return R.fail("请选择要删除的数据");
|
||||
@@ -180,37 +184,37 @@ public class OutpatientNoSegmentController {
|
||||
|
||||
// 获取当前用户ID
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
System.out.println("删除请求 - 当前用户ID: " + userId);
|
||||
log.info("删除请求 - 当前用户ID: " + userId);
|
||||
|
||||
// 校验删除权限和使用状态
|
||||
for (Long id : ids) {
|
||||
System.out.println("删除验证 - 检查ID: " + id);
|
||||
log.info("删除验证 - 检查ID: " + id);
|
||||
OutpatientNoSegment segment = outpatientNoSegmentService.getById(id);
|
||||
|
||||
if (segment == null) {
|
||||
// 记录日志以便调试
|
||||
System.out.println("删除失败:记录不存在,ID=" + id + ",可能已被软删除或不存在");
|
||||
log.info("删除失败:记录不存在,ID=" + id + ",可能已被软删除或不存在");
|
||||
return R.fail("数据不存在,ID: " + id);
|
||||
}
|
||||
|
||||
System.out.println("删除验证 - 找到记录: ID=" + segment.getId() + ", operatorId=" + segment.getOperatorId() + ", usedNo=" + segment.getUsedNo() + ", startNo=" + segment.getStartNo());
|
||||
log.info("删除验证 - 找到记录: ID=" + segment.getId() + ", operatorId=" + segment.getOperatorId() + ", usedNo=" + segment.getUsedNo() + ", startNo=" + segment.getStartNo());
|
||||
|
||||
// 校验归属权
|
||||
if (!segment.getOperatorId().equals(userId)) {
|
||||
System.out.println("删除验证 - 权限检查失败: segment.operatorId=" + segment.getOperatorId() + ", userId=" + userId);
|
||||
log.info("删除验证 - 权限检查失败: segment.operatorId=" + segment.getOperatorId() + ", userId=" + userId);
|
||||
return R.fail("只能删除自己维护的门诊号码段");
|
||||
}
|
||||
|
||||
// 校验使用状态(使用号码=起始号码表示未使用)
|
||||
if (!segment.getUsedNo().equals(segment.getStartNo())) {
|
||||
System.out.println("删除验证 - 使用状态检查失败: usedNo=" + segment.getUsedNo() + ", startNo=" + segment.getStartNo());
|
||||
log.info("删除验证 - 使用状态检查失败: usedNo=" + segment.getUsedNo() + ", startNo=" + segment.getStartNo());
|
||||
return R.fail("已有门诊号码段已有使用的门诊号码,请核对!");
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("删除验证 - 所有检查通过,开始执行删除");
|
||||
log.info("删除验证 - 所有检查通过,开始执行删除");
|
||||
int rows = outpatientNoSegmentService.deleteOutpatientNoSegmentByIds(ids);
|
||||
System.out.println("删除执行 - 影响行数: " + rows);
|
||||
log.info("删除执行 - 影响行数: " + rows);
|
||||
return rows > 0 ? R.ok("删除成功") : R.fail("删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CatalogController {
|
||||
public R<?> getPage(Integer catalogType, @RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
System.out.println(ybServiceConfig.getUrl());
|
||||
log.info(ybServiceConfig.getUrl());
|
||||
return R.ok(iCatalogService.getPage(catalogType, searchKey, pageNo, pageSize, request));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.document.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.openhis.common.enums.DocTypeEnum;
|
||||
import com.openhis.web.document.dto.DirectoryNode;
|
||||
import com.openhis.web.document.dto.DocDefinitionDto;
|
||||
@@ -7,6 +10,7 @@ import com.openhis.web.document.dto.DocDefinitionDto;
|
||||
import java.util.*;
|
||||
|
||||
public class DocumentDirectoryProcessor {
|
||||
private static final Logger log = LoggerFactory.getLogger(DocumentDirectoryProcessor.class);
|
||||
|
||||
private static Long id;
|
||||
|
||||
@@ -154,7 +158,7 @@ public class DocumentDirectoryProcessor {
|
||||
public static void printDirectory(List<DirectoryNode> nodes, int indent) {
|
||||
for (DirectoryNode node : nodes) {
|
||||
// 打印缩进和节点信息
|
||||
System.out.println(" ".repeat(indent) + node.getName() + " (" + node.getLevel() + ")");
|
||||
log.info(" ".repeat(indent) + node.getName() + " (" + node.getLevel() + ")");
|
||||
// 递归打印子节点,缩进+1
|
||||
printDirectory(node.getChildren(), indent + 1);
|
||||
}
|
||||
|
||||
@@ -12,12 +12,17 @@ import com.openhis.web.externalintegration.appservice.IFoodborneAcquisitionAppSe
|
||||
import com.openhis.web.externalintegration.dto.FaSimplediseaseAddNopwParam;
|
||||
import com.openhis.web.externalintegration.mapper.FoodborneAcquisitionAppMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpGet;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
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.stereotype.Service;
|
||||
|
||||
@@ -83,12 +88,24 @@ public class FoodborneAcquisitionAppServiceImpl implements IFoodborneAcquisition
|
||||
return R.fail("【食源性判断接口】未找到有效诊断");
|
||||
}
|
||||
// 设置超时时间
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(3000)
|
||||
.setSocketTimeout(30000).build();
|
||||
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();
|
||||
// 创建无视SSL验证的HttpClient
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig)
|
||||
.setSSLSocketFactory(CommonUtil.createIgnoreSslSocketFactory()).build();
|
||||
CloseableHttpResponse response = null;
|
||||
HttpClientConnectionManager connectionManager;
|
||||
try {
|
||||
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请求
|
||||
try {
|
||||
// 对参数值进行URL编码
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.inhospitalnursestation.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
@@ -34,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(EncounterAutoRollAppServiceImpl.class);
|
||||
|
||||
@Resource
|
||||
EncounterAutoRollAppMapper encounterAutoRollAppMapper;
|
||||
@@ -183,7 +187,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer
|
||||
List<AutoRollNursingDto> nursingRequest = encounterAutoRollAppMapper.getNursingRequest(
|
||||
RequestStatus.COMPLETED.getValue(), ActivityDefCategory.NURSING.getValue(), encounterIdList);
|
||||
if (!nursingRequest.isEmpty()) {
|
||||
System.out.println("**************滚护理费start****************");
|
||||
log.info("**************滚护理费start****************");
|
||||
// 赋值计费的相关字段
|
||||
nursingRequest.forEach(nursingDto -> {
|
||||
inBedPatientInfo.stream()
|
||||
@@ -251,7 +255,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer
|
||||
|
||||
chargeItemService.save(chargeItem);
|
||||
}
|
||||
System.out.println("**************滚护理费end****************");
|
||||
log.info("**************滚护理费end****************");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,7 +281,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer
|
||||
List<AutoRollBasicServiceDto> autoRollBasicService = encounterAutoRollAppMapper
|
||||
.getAutoRollBasicService(PublicationStatus.ACTIVE.getValue(), encounterIdList);
|
||||
if (!autoRollBasicService.isEmpty()) {
|
||||
System.out.println("**************滚基础服务费start****************");
|
||||
log.info("**************滚基础服务费start****************");
|
||||
// 赋值计费的相关字段
|
||||
autoRollBasicService.forEach(basicServiceDto -> {
|
||||
inBedPatientInfo.stream()
|
||||
@@ -344,7 +348,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer
|
||||
|
||||
chargeItemService.save(chargeItem);
|
||||
}
|
||||
System.out.println("**************滚基础服务费end****************");
|
||||
log.info("**************滚基础服务费end****************");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.nenu.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -29,13 +32,13 @@ import com.openhis.web.nenu.dto.GfStudentListImportDto;
|
||||
import com.openhis.web.nenu.dto.GfStudentPeisDto;
|
||||
import com.openhis.web.nenu.dto.PeisStudentPatientDto;
|
||||
import com.openhis.web.nenu.mapper.GfStudentListAppMapper;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -56,6 +59,7 @@ import java.util.stream.IntStream;
|
||||
*/
|
||||
@Service
|
||||
public class GfStudentListAppServiceImpl implements IGfStudentListAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(GfStudentListAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private IPatientStudentService patientStudentService;
|
||||
@@ -150,7 +154,8 @@ public class GfStudentListAppServiceImpl implements IGfStudentListAppService {
|
||||
birthDate = IdCardUtil.extractBirthdayFromIdCard(gfStudentListDto.getIdNumber());
|
||||
age = IdCardUtil.calculateAgeFromIdCard(gfStudentListDto.getIdNumber());
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
// 生成姓名的拼音码和五笔码
|
||||
String pyStr = ChineseConvertUtils.toPinyinFirstLetter(gfStudentListDto.getName());
|
||||
String wbStr = ChineseConvertUtils.toWBFirstLetter(gfStudentListDto.getName());
|
||||
@@ -211,7 +216,8 @@ public class GfStudentListAppServiceImpl implements IGfStudentListAppService {
|
||||
birthDate = IdCardUtil.extractBirthdayFromIdCard(gfStudentListDto.getIdNumber());
|
||||
age = IdCardUtil.calculateAgeFromIdCard(gfStudentListDto.getIdNumber());
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
// 生成姓名的拼音码和五笔码
|
||||
String pyStr = ChineseConvertUtils.toPinyinFirstLetter(gfStudentListDto.getName());
|
||||
String wbStr = ChineseConvertUtils.toWBFirstLetter(gfStudentListDto.getName());
|
||||
@@ -286,7 +292,8 @@ public class GfStudentListAppServiceImpl implements IGfStudentListAppService {
|
||||
birthDate = IdCardUtil.extractBirthdayFromIdCard(importDto.getIdNumber());
|
||||
age = IdCardUtil.calculateAgeFromIdCard(importDto.getIdNumber());
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
// 生成姓名的拼音码和五笔码
|
||||
String pyStr = ChineseConvertUtils.toPinyinFirstLetter(importDto.getName());
|
||||
String wbStr = ChineseConvertUtils.toWBFirstLetter(importDto.getName());
|
||||
@@ -569,10 +576,9 @@ public class GfStudentListAppServiceImpl implements IGfStudentListAppService {
|
||||
*/
|
||||
private boolean sendSingleBatchHttpRequest(PeisStudentPatientDto peisStudentPatientDto) {
|
||||
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
||||
.setSocketTimeout(90000).build();
|
||||
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();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
ClassicHttpResponse response = null;
|
||||
// 发送请求
|
||||
try {
|
||||
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.runtime.RuntimeConstants;
|
||||
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -227,7 +227,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
template.merge(context, writer);
|
||||
return writer.toString();
|
||||
} catch (Exception e) {
|
||||
log.error("渲染发票模板失败", e);
|
||||
logger.error("渲染发票模板失败", e);
|
||||
return "<html><body><h2>渲染发票凭条失败:" + e.getMessage() + "</h2></body></html>";
|
||||
}
|
||||
}
|
||||
@@ -239,9 +239,9 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
try {
|
||||
Map<String, Object> receiptDetail = chargeBillService.getDetail(paymentId);
|
||||
bill.put("receiptData", receiptDetail);
|
||||
log.info("已成功获取并注入小票动态数据,paymentId: {}", paymentId);
|
||||
logger.info("已成功获取并注入小票动态数据,paymentId: {}", paymentId);
|
||||
} catch (Exception e) {
|
||||
log.error("获取小票数据失败,paymentId: {}", paymentId, e);
|
||||
logger.error("获取小票数据失败,paymentId: {}", paymentId, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
String srcdata;
|
||||
String srcmsg;
|
||||
|
||||
System.out.println(JSON.toJSONString(bill));
|
||||
logger.info(JSON.toJSONString(bill));
|
||||
logger.info("************************************** 分 割 线 ***************************************");
|
||||
logger.info("挂号请求参数:" + JSON.toJSONString(bill));
|
||||
logger.info("———————————————————————————————————————————————————————————————————————————————————————");
|
||||
@@ -799,7 +799,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
String redata64;
|
||||
String srcdata;
|
||||
String srcmsg;
|
||||
System.out.println(JSON.toJSONString(bill));
|
||||
logger.info(JSON.toJSONString(bill));
|
||||
JSONObject resobj;
|
||||
logger.info("************************************** 分 割 线 ***************************************");
|
||||
logger.info("门诊信息入参:" + JSON.toJSONString(bill));
|
||||
|
||||
@@ -496,8 +496,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
// for (String string : strings) {
|
||||
// ChargeItem byId = chargeItemService.getById(Long.parseLong(string));
|
||||
// if ("adm_healthcare_service".equals(byId.getServiceTable())) {
|
||||
// System.out.println("//****************************");
|
||||
// System.out.println(JSON.toJSONString(byId));
|
||||
// log.info("//****************************");
|
||||
// log.info(JSON.toJSONString(byId));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -578,8 +578,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
}
|
||||
|
||||
// for (Long chargeItemId : chargeItemIds) {
|
||||
// System.out.println(chargeItemId);
|
||||
// System.out.println(",");
|
||||
// log.info(chargeItemId);
|
||||
// log.info(",");
|
||||
// }
|
||||
List<ChargeItem> chargeItemList = chargeItemService.list(new LambdaQueryWrapper<ChargeItem>()
|
||||
.in(ChargeItem::getId, chargeItemIds).eq(ChargeItem::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
@@ -589,8 +589,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
|
||||
// for (ChargeItem chargeItem : chargeItemList) {
|
||||
// if("adm_healthcare_service".equals(chargeItem.getServiceTable())){
|
||||
// System.out.println("//****************************");
|
||||
// System.out.println(JSON.toJSONString(chargeItem));
|
||||
// log.info("//****************************");
|
||||
// log.info(JSON.toJSONString(chargeItem));
|
||||
// }
|
||||
// }
|
||||
// 查询收费定义列表
|
||||
@@ -892,8 +892,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
// for (String string : strings) {
|
||||
// ChargeItem byId = chargeItemService.getById(Long.parseLong(string));
|
||||
// if ("adm_healthcare_service".equals(byId.getServiceTable())) {
|
||||
// System.out.println("//****************************");
|
||||
// System.out.println(JSON.toJSONString(byId));
|
||||
// log.info("//****************************");
|
||||
// log.info(JSON.toJSONString(byId));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -931,11 +931,11 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
// }
|
||||
// }
|
||||
// if (bigDecimal.compareTo(paymentReconciliation.getTenderedAmount()) != 0) {
|
||||
// System.out.println("//////**********************///////");
|
||||
// System.out.println("payment:" + paymentReconciliation.getId());
|
||||
// System.out.println("paymentAmount:" + paymentReconciliation.getTenderedAmount());
|
||||
// System.out.println("payment应收:" + paymentReconciliation.getDisplayAmount());
|
||||
// System.out.println("//////**********************///////");
|
||||
// log.info("//////**********************///////");
|
||||
// log.info("payment:" + paymentReconciliation.getId());
|
||||
// log.info("paymentAmount:" + paymentReconciliation.getTenderedAmount());
|
||||
// log.info("payment应收:" + paymentReconciliation.getDisplayAmount());
|
||||
// log.info("//////**********************///////");
|
||||
// }
|
||||
// if (paymentReconciliation.getStatusEnum() == 3) {
|
||||
// continue;
|
||||
@@ -946,15 +946,15 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
// BigDecimal bigDecimal1 = BigDecimal.ZERO;
|
||||
// for (ChargeItemBaseInfoDto chargeItemBaseInfoById : chargeItemBaseInfoByIds) {
|
||||
// bigDecimal1 = bigDecimal1.add(chargeItemBaseInfoById.getTotalPrice());
|
||||
// System.out.println("收费项:" + chargeItemBaseInfoById.getTotalPrice());
|
||||
// log.info("收费项:" + chargeItemBaseInfoById.getTotalPrice());
|
||||
// }
|
||||
// System.out.println("付款:" + paymentReconciliation.getTenderedAmount());
|
||||
// log.info("付款:" + paymentReconciliation.getTenderedAmount());
|
||||
// if (bigDecimal1.compareTo(paymentReconciliation.getTenderedAmount()) != 0) {
|
||||
// System.out.println("//////**********************///////");
|
||||
// System.out.println("payment:" + paymentReconciliation.getId());
|
||||
// System.out.println("paymentAmount:" + paymentReconciliation.getTenderedAmount());
|
||||
// System.out.println("payment应收:" + paymentReconciliation.getDisplayAmount());
|
||||
// System.out.println("//////**********************///////");
|
||||
// log.info("//////**********************///////");
|
||||
// log.info("payment:" + paymentReconciliation.getId());
|
||||
// log.info("paymentAmount:" + paymentReconciliation.getTenderedAmount());
|
||||
// log.info("payment应收:" + paymentReconciliation.getDisplayAmount());
|
||||
// log.info("//////**********************///////");
|
||||
// }
|
||||
// }
|
||||
// List<ChargeItem> list1 = chargeItemService.list(new LambdaQueryWrapper<ChargeItem>()
|
||||
@@ -992,8 +992,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
|
||||
// for (ChargeItem chargeItem : chargeItemList) {
|
||||
// if("adm_healthcare_service".equals(chargeItem.getServiceTable())){
|
||||
// System.out.println("//****************************");
|
||||
// System.out.println(JSON.toJSONString(chargeItem));
|
||||
// log.info("//****************************");
|
||||
// log.info(JSON.toJSONString(chargeItem));
|
||||
// }
|
||||
// }
|
||||
// 查询收费定义列表
|
||||
@@ -1205,8 +1205,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
|
||||
Long definitionId = chargeItem.getDefinitionId();
|
||||
// if(chargeItemDefKV.get(definitionId)==null){
|
||||
// System.out.println(chargeItem.getId());
|
||||
// System.out.println(JSON.toJSONString(chargeItem));
|
||||
// log.info(chargeItem.getId());
|
||||
// log.info(JSON.toJSONString(chargeItem));
|
||||
// }
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition = chargeItemDefKV.get(definitionId).get(0);
|
||||
@@ -1311,8 +1311,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
|
||||
Long definitionId = chargeItem.getDefinitionId();
|
||||
// if(chargeItemDefKV.get(definitionId)==null){
|
||||
// System.out.println(chargeItem.getId());
|
||||
// System.out.println(JSON.toJSONString(chargeItem));
|
||||
// log.info(chargeItem.getId());
|
||||
// log.info(JSON.toJSONString(chargeItem));
|
||||
// }
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition = chargeItemDefKV.get(definitionId).get(0);
|
||||
@@ -1976,12 +1976,12 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
//
|
||||
// //payment维度的值大于收费项的值
|
||||
// if(paymentAmount.add(discountAmount).compareTo(chargeAmount)>0||chargeAmount.compareTo(paymentAmount.add(discountAmount))>0){
|
||||
// System.out.println("总价不对等,提示信息:paymentId:"+paymentReconciliationAccountDel.getId());
|
||||
// log.info("总价不对等,提示信息:paymentId:"+paymentReconciliationAccountDel.getId());
|
||||
// }
|
||||
//
|
||||
// //chargeItem维度折后价格的值大于payment维度的实收 或者 chargeItem维度折后价格的值小于payment维度的实收
|
||||
// if(chargeDiscountAmount.compareTo(paymentAmount)>0||paymentAmount.compareTo(chargeDiscountAmount)>0){
|
||||
// System.out.println("折后价格不对等,提示信息:paymentId:"+paymentReconciliationAccountDel.getId());
|
||||
// log.info("折后价格不对等,提示信息:paymentId:"+paymentReconciliationAccountDel.getId());
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -2661,7 +2661,7 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
|
||||
for (ChargeItem item : newChargeItemList) {
|
||||
if (item.getTotalPrice() == null) {
|
||||
System.out.println("这个收费项没有定义总价:" + item.getId());
|
||||
log.info("这个收费项没有定义总价:" + item.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2669,8 +2669,8 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
if (paymentReconciliationId == 1987152585230508034L || paymentReconciliationId == 1987153070121410561L
|
||||
|| paymentReconciliationId == 1984438852329246721L || paymentReconciliationId == 1984902967625117698L
|
||||
|| paymentReconciliationId == 1984778667126493186L || paymentReconciliationId == 1984780710054531074L) {
|
||||
System.out.println("主键id如下:" + paymentReconciliationId);
|
||||
System.out.println("待分配诊疗项目如下:" + JSON.toJSONString(newChargeItemList));
|
||||
log.info("主键id如下:" + paymentReconciliationId);
|
||||
log.info("待分配诊疗项目如下:" + JSON.toJSONString(newChargeItemList));
|
||||
}
|
||||
if (b.compareTo(BigDecimal.ZERO) > 0) {
|
||||
|
||||
|
||||
@@ -26,15 +26,15 @@ import com.openhis.web.paymentmanage.mapper.PaymentMapper;
|
||||
import com.openhis.yb.dto.PaymentDetailDto;
|
||||
import com.openhis.yb.dto.ThreePartPayDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpGet;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -84,7 +84,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
||||
//获取动态参数
|
||||
Map<String, String> paramMap = this.getParamMap(jsonObject, practitioner, null, null, null, null);
|
||||
|
||||
System.out.println("三方支付【签到】:");
|
||||
logger.info("三方支付【签到】:");
|
||||
logger.info("三方支付【签到】:");
|
||||
//执行请求
|
||||
String requestResult = executeRequest(requestMethod, threePartUrl, staticParam, paramMap);
|
||||
@@ -113,7 +113,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
||||
//获取动态参数
|
||||
Map<String, String> paramMap = this.getParamMap(jsonObject, practitioner, null, null, null, null);
|
||||
|
||||
System.out.println("三方支付【签出】:");
|
||||
logger.info("三方支付【签出】:");
|
||||
logger.info("三方支付【签出】:");
|
||||
//执行请求
|
||||
String requestResult = executeRequest(requestMethod, threePartUrl, staticParam, paramMap);
|
||||
@@ -508,7 +508,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
||||
//获取完整url
|
||||
String url = renderTemplateSafe(threePartUrl, map);
|
||||
|
||||
System.out.println("三方支付请求入参:" + url);
|
||||
logger.info("三方支付请求入参:" + url);
|
||||
logger.info("三方支付请求入参:" + url);
|
||||
|
||||
//发送请求
|
||||
@@ -526,14 +526,14 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
||||
data.putAll(staticDta);
|
||||
}
|
||||
|
||||
System.out.println("三方支付请求入参:" + data.toJSONString());
|
||||
logger.info("三方支付请求入参:" + data.toJSONString());
|
||||
logger.info("三方支付请求入参:" + data.toJSONString());
|
||||
|
||||
requestResult = httpPost(threePartUrl, data.toJSONString());
|
||||
|
||||
}
|
||||
|
||||
System.out.println("三方支付请求出参:" + requestResult);
|
||||
logger.info("三方支付请求出参:" + requestResult);
|
||||
logger.info("三方支付请求出参:" + requestResult);
|
||||
|
||||
return requestResult;
|
||||
@@ -548,25 +548,24 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
||||
private String httpGet(String url) {
|
||||
String resultString = "";
|
||||
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
||||
.setSocketTimeout(90000).build();
|
||||
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();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
ClassicHttpResponse response = null;
|
||||
// 发送请求
|
||||
try {
|
||||
HttpGet httpGet = new HttpGet(url);
|
||||
// 执行http请求
|
||||
response = httpClient.execute(httpGet);
|
||||
System.out.println("回复信息:" + JSON.toJSONString(response));
|
||||
logger.info("回复信息:" + JSON.toJSONString(response));
|
||||
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||
} catch (Exception e) {
|
||||
log.error("Http请求异常, url: {}", url, e);
|
||||
logger.error("Http请求异常, url: {}", url, e);
|
||||
throw new ServiceException("Http请求异常,请稍后再试。");
|
||||
} finally {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
log.error("关闭响应失败", e);
|
||||
logger.error("关闭响应失败", e);
|
||||
}
|
||||
}
|
||||
return resultString;
|
||||
@@ -583,10 +582,9 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
||||
String resultString = "";
|
||||
|
||||
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
||||
.setSocketTimeout(90000).build();
|
||||
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();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
ClassicHttpResponse response = null;
|
||||
// 发送请求
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
@@ -596,13 +594,13 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
||||
response = httpClient.execute(httpPost);
|
||||
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||
} catch (Exception e) {
|
||||
log.error("Http请求异常, url: {}", url, e);
|
||||
logger.error("Http请求异常, url: {}", url, e);
|
||||
throw new ServiceException("Http请求异常,请稍后再试。");
|
||||
} finally {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
log.error("关闭响应失败", e);
|
||||
logger.error("关闭响应失败", e);
|
||||
}
|
||||
}
|
||||
return resultString;
|
||||
|
||||
@@ -475,16 +475,22 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
if (surgeon != null && surgeon.getName() != null) {
|
||||
surgery.setMainSurgeonName(surgeon.getName());
|
||||
}
|
||||
} catch (NumberFormatException ignored) {}
|
||||
} catch (NumberFormatException ignored) {
|
||||
// intentionally ignored
|
||||
}
|
||||
}
|
||||
// 从 descJson 解析手术等级、麻醉方式
|
||||
String surgeryLevelStr = descMap != null ? (String) descMap.get("surgeryLevel") : null;
|
||||
if (surgeryLevelStr != null && !surgeryLevelStr.isEmpty()) {
|
||||
try { surgery.setSurgeryLevel(Integer.parseInt(surgeryLevelStr)); } catch (NumberFormatException ignored) {}
|
||||
try { surgery.setSurgeryLevel(Integer.parseInt(surgeryLevelStr)); } catch (NumberFormatException ignored) {
|
||||
// intentionally ignored
|
||||
}
|
||||
}
|
||||
String anesthesiaTypeStr = descMap != null ? (String) descMap.get("anesthesiaType") : null;
|
||||
if (anesthesiaTypeStr != null && !anesthesiaTypeStr.isEmpty()) {
|
||||
try { surgery.setAnesthesiaTypeEnum(Integer.parseInt(anesthesiaTypeStr)); } catch (NumberFormatException ignored) {}
|
||||
try { surgery.setAnesthesiaTypeEnum(Integer.parseInt(anesthesiaTypeStr)); } catch (NumberFormatException ignored) {
|
||||
// intentionally ignored
|
||||
}
|
||||
}
|
||||
// 填充患者姓名(从 adm_patient 查询)
|
||||
if (patientId != null) {
|
||||
@@ -493,7 +499,9 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
if (patient != null) {
|
||||
surgery.setPatientName(patient.getName());
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
} catch (Exception ignored) {
|
||||
// intentionally ignored
|
||||
}
|
||||
}
|
||||
|
||||
// 从 descJson 解析手术信息
|
||||
@@ -504,16 +512,22 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
surgery.setPreoperativeDiagnosis(preoperativeDiagnosis);
|
||||
// 解析费用
|
||||
if (surgeryFee != null && !surgeryFee.isEmpty()) {
|
||||
try { surgery.setSurgeryFee(new BigDecimal(surgeryFee)); } catch (NumberFormatException ignored) {}
|
||||
try { surgery.setSurgeryFee(new BigDecimal(surgeryFee)); } catch (NumberFormatException ignored) {
|
||||
// intentionally ignored
|
||||
}
|
||||
}
|
||||
if (anesthesiaFee != null && !anesthesiaFee.isEmpty()) {
|
||||
try { surgery.setAnesthesiaFee(new BigDecimal(anesthesiaFee)); } catch (NumberFormatException ignored) {}
|
||||
try { surgery.setAnesthesiaFee(new BigDecimal(anesthesiaFee)); } catch (NumberFormatException ignored) {
|
||||
// intentionally ignored
|
||||
}
|
||||
}
|
||||
// 解析计划手术时间
|
||||
if (plannedTime != null && !plannedTime.isEmpty()) {
|
||||
try {
|
||||
surgery.setPlannedTime(new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(plannedTime));
|
||||
} catch (Exception ignored) {}
|
||||
} catch (Exception ignored) {
|
||||
// intentionally ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
// 兜底:若 descJson 解析为空,从 activityList 获取手术名称
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -43,6 +46,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class InboundReportAppServiceImpl implements IInboundReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(InboundReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private InboundReportMapper inboundReportMapperMapper;
|
||||
@@ -184,7 +188,7 @@ public class InboundReportAppServiceImpl implements IInboundReportAppService {
|
||||
ExcelUtil<InboundReportPageDto> util = new ExcelUtil<>(InboundReportPageDto.class);
|
||||
util.exportExcel(response, receiptDetailList, excelName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AgeCalculatorUtil;
|
||||
@@ -33,8 +36,8 @@ import java.util.List;
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
public class InpatientMedicalRecordHomePageCollectionAppServiceImpl
|
||||
implements InpatientMedicalRecordHomePageCollectionAppService {
|
||||
public class InpatientMedicalRecordHomePageCollectionAppServiceImpl implements InpatientMedicalRecordHomePageCollectionAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(InpatientMedicalRecordHomePageCollectionAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private InpatientMedicalRecordHomePageCollectionMapper inpatientMedicalRecordHomePageCollectionMapper;
|
||||
@@ -343,8 +346,8 @@ public class InpatientMedicalRecordHomePageCollectionAppServiceImpl
|
||||
// 做成csv文件
|
||||
CsvFillerUtil.makeCsvFile(response, medicalRecordHomePageList);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("写入csv时发生错误:" + e.getMessage());
|
||||
log.error("Exception occurred", e);
|
||||
log.error("写入csv时发生错误:" + e.getMessage());
|
||||
return R.fail("写入csv时发生错误:" + e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -41,6 +44,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class InventoryProductReportAppServiceImpl implements IInventoryProductReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(InventoryProductReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private InventoryProductReportMapper inventoryProductReportMapper;
|
||||
@@ -194,7 +198,7 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
|
||||
// 导出到Excel
|
||||
ExcelFillerUtil.makeExcelFile(response, receiptDetailList, headers, excelName, totalValues);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -40,6 +43,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class LossReportAppServiceImpl implements ILossReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(LossReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private LossReportMapper lossReportMapper;
|
||||
@@ -151,7 +155,7 @@ public class LossReportAppServiceImpl implements ILossReportAppService {
|
||||
ExcelUtil<LossReportPageDto> util = new ExcelUtil<>(LossReportPageDto.class);
|
||||
util.exportExcel(response, receiptDetailList, excelName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.core.domain.entity.SysDictData;
|
||||
@@ -39,6 +42,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class MedicationDeviceReportAppServiceImpl implements IMedicationDeviceReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(MedicationDeviceReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private MedicationDeviceReportMapper medicationDeviceReportMapper;
|
||||
@@ -169,7 +173,7 @@ public class MedicationDeviceReportAppServiceImpl implements IMedicationDeviceRe
|
||||
// 导出到Excel
|
||||
ExcelFillerUtil.makeExcelFile(response, receiptDetailList, headers, excelName, totalValues);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -40,6 +43,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class OutboundReportAppServiceImpl implements IOutboundReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(OutboundReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
OutboundReportMapper outboundReportMapper;
|
||||
@@ -186,7 +190,7 @@ public class OutboundReportAppServiceImpl implements IOutboundReportAppService {
|
||||
ExcelUtil<OutboundReportPageDto> util = new ExcelUtil<>(OutboundReportPageDto.class);
|
||||
util.exportExcel(response, receiptDetailList, excelName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -43,6 +46,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class PurchaseReturnReportAppServiceImpl implements PurchaseReturnReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(PurchaseReturnReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private PurchaseReturnReportMapper purchaseReturnReportMapper;
|
||||
@@ -190,7 +194,7 @@ public class PurchaseReturnReportAppServiceImpl implements PurchaseReturnReportA
|
||||
// 导出到Excel
|
||||
ExcelFillerUtil.makeExcelFile(response, receiptDetailList, headers, excelName, totalValues);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -40,6 +43,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class ReturnIssueReportAppServiceImpl implements IReturnIssueReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(ReturnIssueReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
ReturnIssueReportMapper returnIssueReportMapper;
|
||||
@@ -193,7 +197,7 @@ public class ReturnIssueReportAppServiceImpl implements IReturnIssueReportAppSer
|
||||
// 导出到Excel
|
||||
ExcelFillerUtil.makeExcelFile(response, receiptDetailList, headers, excelName, totalValues);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -40,6 +43,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class StocktakingReportAppServiceImpl implements IStocktakingReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(StocktakingReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private StocktakingReportMapper stocktakingReportMapper;
|
||||
@@ -179,7 +183,7 @@ public class StocktakingReportAppServiceImpl implements IStocktakingReportAppSer
|
||||
ExcelUtil<StocktakingReportPageDto> util = new ExcelUtil<>(StocktakingReportPageDto.class);
|
||||
util.exportExcel(response, receiptDetailList, excelName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.reportmanage.appservice.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -41,6 +44,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class TransferReportAppServiceImpl implements ITransferReportAppService {
|
||||
private static final Logger log = LoggerFactory.getLogger(TransferReportAppServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private TransferReportMapper transferReportMapper;
|
||||
@@ -164,7 +168,7 @@ public class TransferReportAppServiceImpl implements ITransferReportAppService {
|
||||
ExcelUtil<TransferReportPageDto> util = new ExcelUtil<>(TransferReportPageDto.class);
|
||||
util.exportExcel(response, receiptDetailList, excelName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
return R.fail("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.reportmanage.utils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.web.reportmanage.dto.InpatientMedicalRecordHomePageCollectionDto;
|
||||
|
||||
@@ -22,6 +25,7 @@ import java.util.List;
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public final class CsvFillerUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(CsvFillerUtil.class);
|
||||
|
||||
// 表头
|
||||
public static final String headers =
|
||||
@@ -101,7 +105,7 @@ public final class CsvFillerUtil {
|
||||
// 重命名文件
|
||||
boolean renamed = targetFile.renameTo(renamedFile);
|
||||
if (renamed) {
|
||||
System.out.println("文件已存在,已重命名为:" + renamedFile.getAbsolutePath());
|
||||
log.info("文件已存在,已重命名为:" + renamedFile.getAbsolutePath());
|
||||
} else {
|
||||
throw new RuntimeException("无法重命名已存在的文件:" + targetFile.getAbsolutePath());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.reportmanage.utils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
@@ -24,6 +27,7 @@ import java.util.Map;
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public final class ExcelFillerUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(ExcelFillerUtil.class);
|
||||
|
||||
// 时间戳格式:年月日时分秒(确保文件名唯一)
|
||||
private static final SimpleDateFormat TIME_FORMATTER = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
@@ -125,7 +129,7 @@ public final class ExcelFillerUtil {
|
||||
value = field.get(dto); // 获取字段值
|
||||
} catch (NoSuchFieldException e) {
|
||||
// 如果字段不存在,输出警告信息
|
||||
System.err.println("DTO中不存在字段: " + fieldName);
|
||||
log.error("DTO中不存在字段: " + fieldName);
|
||||
}
|
||||
|
||||
Cell cell = setDate(dataRow.createCell(columnIndex), value, sheet, columnIndex);
|
||||
@@ -146,7 +150,7 @@ public final class ExcelFillerUtil {
|
||||
// 将字节流写入响应
|
||||
response.getOutputStream().write(outputStream.toByteArray());
|
||||
response.getOutputStream().flush();
|
||||
System.out.print("导出Excel完成");
|
||||
log.info("导出Excel完成");
|
||||
} catch (IOException e) {
|
||||
System.out.printf("导出Excel失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.methods.HttpUriRequest;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
@@ -17,28 +16,22 @@ import java.util.Map;
|
||||
|
||||
public abstract class HttpReques {
|
||||
|
||||
// 创建HttpClientBuilder
|
||||
private HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
||||
// HttpClient
|
||||
private CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
|
||||
private CloseableHttpClient closeableHttpClient = HttpClients.createDefault();
|
||||
|
||||
protected HttpUriRequestBase httpReques;
|
||||
|
||||
protected HttpUriRequest httpReques;
|
||||
// HttpUriRequest httpReques;
|
||||
@SuppressWarnings("finally")
|
||||
public Map<String, String> executeResponse() {
|
||||
Map<String, String> context = new HashMap<>();
|
||||
try {
|
||||
// closeableHttpClient= WebClientDevWrapper.wrapClient(closeableHttpClient);
|
||||
// 设置请求头
|
||||
// 设置请求
|
||||
HttpResponse httpResponse = closeableHttpClient.execute(httpReques);
|
||||
// 执行请求
|
||||
ClassicHttpResponse httpResponse = closeableHttpClient.executeOpen(null, httpReques, null);
|
||||
HttpEntity entity = httpResponse.getEntity();
|
||||
// 响应状态
|
||||
int status = httpResponse.getStatusLine().getStatusCode();
|
||||
int status = httpResponse.getCode();
|
||||
context.put("msg", EntityUtils.toString(entity,"utf-8"));
|
||||
context.put("status", status+"");
|
||||
} catch (ClientProtocolException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
*/
|
||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpGet;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class HttpRequesGet extends HttpReques {
|
||||
|
||||
@@ -29,9 +30,11 @@ public class HttpRequesGet extends HttpReques {
|
||||
}
|
||||
}
|
||||
HttpGet httpGet = new HttpGet(sb.toString());
|
||||
RequestConfig requestConfig = RequestConfig.custom()
|
||||
.setConnectTimeout(20000).setConnectionRequestTimeout(15000)
|
||||
.setSocketTimeout(20000).build();
|
||||
RequestConfig requestConfig = RequestConfig.custom()
|
||||
.setConnectTimeout(20, TimeUnit.SECONDS)
|
||||
.setConnectionRequestTimeout(15, TimeUnit.SECONDS)
|
||||
.setResponseTimeout(20, TimeUnit.SECONDS)
|
||||
.build();
|
||||
|
||||
httpGet.setConfig(requestConfig);
|
||||
if (headers != null) {
|
||||
|
||||
@@ -3,31 +3,39 @@
|
||||
*/
|
||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
import org.apache.hc.core5.http.message.BasicNameValuePair;
|
||||
import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
|
||||
public class HttpRequesPost extends HttpReques {
|
||||
private static final Logger log = LoggerFactory.getLogger(HttpRequesPost.class);
|
||||
|
||||
public HttpRequesPost(String path, Map<String, Object> param, Map<String, String> headers) {
|
||||
HttpPost httpPost = new HttpPost(path);
|
||||
try {
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000)
|
||||
.setConnectionRequestTimeout(20000).setSocketTimeout(20000).build();
|
||||
RequestConfig requestConfig = RequestConfig.custom()
|
||||
.setConnectTimeout(20, TimeUnit.SECONDS)
|
||||
.setConnectionRequestTimeout(20, TimeUnit.SECONDS)
|
||||
.setResponseTimeout(20, TimeUnit.SECONDS)
|
||||
.build();
|
||||
httpPost.setConfig(requestConfig);
|
||||
// 创建参数队列
|
||||
List<NameValuePair> formparams = new ArrayList<NameValuePair>();
|
||||
List<BasicNameValuePair> formparams = new ArrayList<>();
|
||||
if (param != null) {
|
||||
for (String key : param.keySet()) {
|
||||
if (param.get(key) != null) {
|
||||
@@ -35,15 +43,15 @@ public class HttpRequesPost extends HttpReques {
|
||||
}
|
||||
}
|
||||
}
|
||||
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, "UTF-8");
|
||||
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, StandardCharsets.UTF_8);
|
||||
httpPost.setEntity(entity);
|
||||
if (headers != null) {
|
||||
for (String key : headers.keySet()) {
|
||||
httpPost.addHeader(key, headers.get(key));
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
log.error("Exception occurred", e);
|
||||
}
|
||||
this.httpReques = httpPost;
|
||||
}
|
||||
@@ -51,15 +59,16 @@ public class HttpRequesPost extends HttpReques {
|
||||
public HttpRequesPost(String path, Map<String, Object> param, Map<String, Object> headers, String requestType) {
|
||||
HttpPost httpPost = new HttpPost(path);
|
||||
try {
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000)
|
||||
.setConnectionRequestTimeout(5000).setSocketTimeout(5000).build();
|
||||
RequestConfig requestConfig = RequestConfig.custom()
|
||||
.setConnectTimeout(5, TimeUnit.SECONDS)
|
||||
.setConnectionRequestTimeout(5, TimeUnit.SECONDS)
|
||||
.setResponseTimeout(5, TimeUnit.SECONDS)
|
||||
.build();
|
||||
httpPost.setConfig(requestConfig);
|
||||
// 创建参数队列
|
||||
if ("json".equals(requestType.toLowerCase())) {
|
||||
// 解决中文乱码问题
|
||||
StringEntity entity = new StringEntity(JSON.toJSONString(param), "utf-8");
|
||||
entity.setContentEncoding("UTF-8");
|
||||
entity.setContentType("application/json");
|
||||
StringEntity entity = new StringEntity(JSON.toJSONString(param), ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
} else if("xml".equals(requestType.toLowerCase())){
|
||||
StringBuffer xml=new StringBuffer();
|
||||
@@ -71,14 +80,12 @@ public class HttpRequesPost extends HttpReques {
|
||||
}
|
||||
xml.append("</xml>");
|
||||
// 解决中文乱码问题
|
||||
StringEntity entity = new StringEntity(xml.toString(), "utf-8");
|
||||
entity.setContentEncoding("UTF-8");
|
||||
entity.setContentType("text/xml");
|
||||
System.out.println("----------xml:"+xml.toString());
|
||||
StringEntity entity = new StringEntity(xml.toString(), ContentType.TEXT_XML.withCharset(StandardCharsets.UTF_8));
|
||||
log.info("----------xml:"+xml.toString());
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
} else if ("".equals(requestType) || requestType == null) {
|
||||
List<NameValuePair> formParams = new ArrayList<NameValuePair>();
|
||||
List<BasicNameValuePair> formParams = new ArrayList<>();
|
||||
if (param != null) {
|
||||
for (String key : param.keySet()) {
|
||||
if (param.get(key) != null) {
|
||||
@@ -86,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);
|
||||
}
|
||||
if (headers != null) {
|
||||
@@ -94,8 +101,8 @@ public class HttpRequesPost extends HttpReques {
|
||||
httpPost.addHeader(key, headers.get(key).toString());
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
log.error("Exception occurred", e);
|
||||
}
|
||||
this.httpReques = httpPost;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.message.BasicHeader;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
|
||||
/**
|
||||
* @ClassName HttpsClientUtil
|
||||
@@ -18,27 +18,33 @@ import org.apache.http.util.EntityUtils;
|
||||
**/
|
||||
public class HttpsClientUtil {
|
||||
|
||||
public static String doPost(String url,String jsonData){
|
||||
HttpClient httpClient = null;
|
||||
HttpPost httpPost = null;
|
||||
public static String doPost(String url, String jsonData) {
|
||||
CloseableHttpClient httpClient = null;
|
||||
String result = null;
|
||||
try{
|
||||
httpClient = new SSLClient();
|
||||
httpPost = new HttpPost(url);
|
||||
try {
|
||||
httpClient = SSLClient.create();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpPost.addHeader("Content-Type", "application/json");
|
||||
StringEntity se = new StringEntity(jsonData);
|
||||
se.setContentType("text/json");
|
||||
se.setContentEncoding(new BasicHeader("Content-Type", "application/json"));
|
||||
StringEntity se = new StringEntity(jsonData, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(se);
|
||||
HttpResponse response = httpClient.execute(httpPost);
|
||||
if(response != null){
|
||||
ClassicHttpResponse response = httpClient.executeOpen(null, httpPost, null);
|
||||
if (response != null) {
|
||||
HttpEntity resEntity = response.getEntity();
|
||||
if(resEntity != null){
|
||||
result = EntityUtils.toString(resEntity,"utf-8");
|
||||
if (resEntity != null) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.openhis.web.tencentJH.utils.httpUtil;
|
||||
|
||||
import org.apache.http.conn.ClientConnectionManager;
|
||||
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.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
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 javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
@@ -14,38 +16,27 @@ import java.security.cert.X509Certificate;
|
||||
|
||||
/**
|
||||
* @ClassName SSLClient
|
||||
* @Description TODO
|
||||
* @Description SSL Client for HTTPS connections (trust all)
|
||||
* @Author raymond
|
||||
* @Date 2024/1/9 08:28
|
||||
* @Version 1.0
|
||||
**/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SSLClient extends DefaultHttpClient {
|
||||
public class SSLClient {
|
||||
|
||||
public SSLClient() throws Exception {
|
||||
super();
|
||||
SSLContext ctx = SSLContext.getInstance("TLS");
|
||||
X509TrustManager tm = new X509TrustManager() {
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
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));
|
||||
public static CloseableHttpClient create() throws Exception {
|
||||
SSLContext ctx = SSLContexts.custom()
|
||||
.loadTrustMaterial(null, (chain, authType) -> true)
|
||||
.build();
|
||||
|
||||
HttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
|
||||
.setSSLSocketFactory(SSLConnectionSocketFactoryBuilder.create()
|
||||
.setSslContext(ctx)
|
||||
.setHostnameVerifier(NoopHostnameVerifier.INSTANCE)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
return HttpClients.custom()
|
||||
.setConnectionManager(connectionManager)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -810,7 +810,7 @@ public class TriageQueueAppServiceImpl implements TriageQueueAppService {
|
||||
|
||||
} catch (Exception e) {
|
||||
// SSE 推送失败不应该影响业务逻辑
|
||||
System.err.println("推送显示屏更新失败:" + e.getMessage());
|
||||
log.error("推送显示屏更新失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.ybmanage.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.core.common.annotation.Anonymous;
|
||||
@@ -70,6 +73,7 @@ import java.util.stream.Collectors;
|
||||
@RestController
|
||||
@RequestMapping("/yb-request")
|
||||
public class YbController {
|
||||
private static final Logger log = LoggerFactory.getLogger(YbController.class);
|
||||
|
||||
@Autowired
|
||||
YbDao ybDao;
|
||||
@@ -184,7 +188,7 @@ public class YbController {
|
||||
currentRangeResults.add(info5301SpecialConditionResult);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace(); // 处理日期解析异常
|
||||
log.error("Exception occurred", e); // 处理日期解析异常
|
||||
}
|
||||
}
|
||||
List<ConditionDefinition> conditionDefinitions = null;
|
||||
@@ -247,7 +251,7 @@ public class YbController {
|
||||
Financial3201Param financial3201Param = ybDao.getFinancial3201Param(settlement3201WebParam);
|
||||
Result result = ybHttpUtils.reconcileGeneralLedger(financial3201Param);
|
||||
if (result.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||
// System.out.println(JSON.parseObject(JSON.toJSONString(result.getResult())));
|
||||
// log.info(JSON.parseObject(JSON.toJSONString(result.getResult())));
|
||||
Financial3201Output financial3201Output
|
||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Financial3201Output.class);
|
||||
ybDao.saveReconcileGeneralLedger(financial3201Output, financial3201Param);
|
||||
@@ -293,7 +297,7 @@ public class YbController {
|
||||
|
||||
Result result = ybHttpUtils.reconcileGeneralLedger(financial3201Param);
|
||||
if (result.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||
// System.out.println(JSON.parseObject(JSON.toJSONString(result.getResult())));
|
||||
// log.info(JSON.parseObject(JSON.toJSONString(result.getResult())));
|
||||
Financial3201Output financial3201Output
|
||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Financial3201Output.class);
|
||||
ybDao.saveReconcileGeneralLedger(financial3201Output, financial3201Param);
|
||||
@@ -339,7 +343,7 @@ public class YbController {
|
||||
// for (Financial3202FileParam item : financial3202FileParams) {
|
||||
// // 假设每个实体都有toString()方法返回逗号分隔的属性
|
||||
// // 或者你可以自定义获取属性的方式
|
||||
// System.out.println(item.toString());
|
||||
// log.info(item.toString());
|
||||
// String line = item.getTxt();
|
||||
// writer.write(line);
|
||||
// writer.newLine();
|
||||
@@ -363,7 +367,7 @@ public class YbController {
|
||||
}
|
||||
writer.flush();
|
||||
}
|
||||
System.out.println(fileName);
|
||||
log.info(fileName);
|
||||
// return R.ok("生成txt文件成功,文件名称:"+fileName);
|
||||
}
|
||||
|
||||
@@ -424,7 +428,7 @@ public class YbController {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
throw new ServiceException("IO异常,异常信息:" + e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@ import com.openhis.yb.dto.BaseInfo;
|
||||
import com.openhis.yb.dto.BaseParam;
|
||||
import com.openhis.yb.util.YbParamBuilderUtil;
|
||||
import com.openhis.ybelep.domain.*;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -232,10 +232,9 @@ public class YbEleHttpServiceImpl implements IYbEleHttpService {
|
||||
BaseParam baseParam = new BaseParam();
|
||||
baseParam.setBaseInfo(baseInfo).setData(o);
|
||||
// 创建Http请求(2025/10/13 师大会超时故此由30000-》60000)
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(90000).setConnectionRequestTimeout(90000)
|
||||
.setSocketTimeout(90000).build();
|
||||
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();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
ClassicHttpResponse response = null;
|
||||
// 发送请求
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.ybmanage.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -76,6 +79,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class YbServiceImpl implements IYbService {
|
||||
private static final Logger log = LoggerFactory.getLogger(YbServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private YbMapper ybMapper;
|
||||
@@ -1209,7 +1213,7 @@ public class YbServiceImpl implements IYbService {
|
||||
try {
|
||||
this.saveCatalog(fileName,dtoMap);
|
||||
} catch (IOException e) {
|
||||
System.out.println("csv转换失败");
|
||||
log.info("csv转换失败");
|
||||
throw new ServiceException("csv转换失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.web.ybmanage.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.opencsv.bean.CsvToBean;
|
||||
import com.opencsv.bean.CsvToBeanBuilder;
|
||||
|
||||
@@ -13,6 +16,7 @@ import java.util.zip.ZipInputStream;
|
||||
|
||||
|
||||
public class CsvHelperZipProcessor {
|
||||
private static final Logger log = LoggerFactory.getLogger(CsvHelperZipProcessor.class);
|
||||
|
||||
|
||||
/**
|
||||
@@ -48,8 +52,8 @@ public class CsvHelperZipProcessor {
|
||||
throw new FileNotFoundException("ZIP文件不存在: " + zipFilePath);
|
||||
}
|
||||
|
||||
System.out.println("开始处理ZIP文件: " + zipFilePath);
|
||||
System.out.println("目标实体类: " + entityClass.getSimpleName());
|
||||
log.info("开始处理ZIP文件: " + zipFilePath);
|
||||
log.info("目标实体类: " + entityClass.getSimpleName());
|
||||
|
||||
try (FileInputStream fis = new FileInputStream(zipFile);
|
||||
ZipInputStream zis = new ZipInputStream(fis, StandardCharsets.UTF_8)) {
|
||||
@@ -61,7 +65,7 @@ public class CsvHelperZipProcessor {
|
||||
while ((entry = zis.getNextEntry()) != null) {
|
||||
if (!entry.isDirectory() && entry.getName().toLowerCase().endsWith(".txt")) {
|
||||
totalFiles++;
|
||||
System.out.println("处理文件[" + totalFiles + "]: " + entry.getName());
|
||||
log.info("处理文件[" + totalFiles + "]: " + entry.getName());
|
||||
|
||||
// 关键修复:将ZIP条目内容读取到内存中
|
||||
byte[] fileContent = readZipEntryContent(zis);
|
||||
@@ -70,12 +74,12 @@ public class CsvHelperZipProcessor {
|
||||
allRecords.addAll(fileRecords);
|
||||
totalRecords += fileRecords.size();
|
||||
|
||||
System.out.println("文件 " + entry.getName() + " 解析了 " + fileRecords.size() + " 条记录");
|
||||
log.info("文件 " + entry.getName() + " 解析了 " + fileRecords.size() + " 条记录");
|
||||
}
|
||||
// 不需要手动调用 zis.closeEntry(),try-with-resources会自动处理
|
||||
}
|
||||
|
||||
System.out.println("处理完成: " + totalFiles + " 个文件, 总共 " + totalRecords + " 条记录");
|
||||
log.info("处理完成: " + totalFiles + " 个文件, 总共 " + totalRecords + " 条记录");
|
||||
} // 这里会自动关闭 fis 和 zis
|
||||
// ==================== try-with-resources结束 ====================
|
||||
|
||||
@@ -129,10 +133,10 @@ public class CsvHelperZipProcessor {
|
||||
recordCount++;
|
||||
|
||||
if (recordCount % 1000 == 0) {
|
||||
System.out.println("已处理 " + recordCount + " 行");
|
||||
log.info("已处理 " + recordCount + " 行");
|
||||
}
|
||||
}
|
||||
System.out.println("文件处理完成,共 " + recordCount + " 行");
|
||||
log.info("文件处理完成,共 " + recordCount + " 行");
|
||||
} else {
|
||||
// 批量处理
|
||||
records = csvToBean.parse();
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.ybmanage.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.core.common.exception.ServiceException;
|
||||
@@ -53,6 +56,7 @@ import java.util.*;
|
||||
*/
|
||||
@Component
|
||||
public class YbEleParamBuilderUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(YbEleParamBuilderUtil.class);
|
||||
|
||||
/********************* 业务实体服务 *******************/
|
||||
|
||||
@@ -103,7 +107,7 @@ public class YbEleParamBuilderUtil {
|
||||
public static BigDecimal calculateAge(Date birthDate, Date beginTime) {
|
||||
// 验证输入参数是否为空
|
||||
if (Objects.isNull(birthDate)) {
|
||||
System.out.println("出生年月日不能为空!");
|
||||
log.info("出生年月日不能为空!");
|
||||
return null;
|
||||
}
|
||||
// 验证输入参数是否为空
|
||||
@@ -138,7 +142,7 @@ public class YbEleParamBuilderUtil {
|
||||
public static String fileToBase64(String filePath) {
|
||||
File file = new File(filePath);
|
||||
if (!file.exists()) {
|
||||
System.out.println("文件不存在!");
|
||||
log.info("文件不存在!");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -149,13 +153,13 @@ public class YbEleParamBuilderUtil {
|
||||
fileInputStream.read(fileContent);
|
||||
return Base64.getEncoder().encodeToString(fileContent);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
} finally {
|
||||
if (fileInputStream != null) {
|
||||
try {
|
||||
fileInputStream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("Exception occurred", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
secret: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 1000
|
||||
|
||||
@@ -147,5 +147,17 @@ liteflow:
|
||||
enable: true
|
||||
#liteflow的banner打印是否开启,默认为true
|
||||
print-banner: false
|
||||
|
||||
|
||||
# Actuator配置
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,metrics,prometheus
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
health:
|
||||
db:
|
||||
enabled: true
|
||||
redis:
|
||||
enabled: true
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||
<artifactId>httpclient5</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.openhis.common.utils;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.poi.ExcelUtil;
|
||||
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
|
||||
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.common.utils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
@@ -13,6 +16,7 @@ import java.time.format.DateTimeParseException;
|
||||
* @Version 1.0
|
||||
**/
|
||||
public class IdCardAgeCalculator {
|
||||
private static final Logger log = LoggerFactory.getLogger(IdCardAgeCalculator.class);
|
||||
/**
|
||||
* 根据身份证号计算年龄(支持15/18位)
|
||||
* @param idCard 身份证号
|
||||
@@ -21,7 +25,7 @@ public class IdCardAgeCalculator {
|
||||
public static int calculateAge(String idCard) {
|
||||
// 1. 校验身份证号合法性(基础校验:长度、非空)
|
||||
if (!isValidIdCard(idCard)) {
|
||||
System.out.println("身份证号格式非法!");
|
||||
log.info("身份证号格式非法!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -33,7 +37,7 @@ public class IdCardAgeCalculator {
|
||||
try {
|
||||
birthDate = LocalDate.parse(birthDateStr, DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
} catch (DateTimeParseException e) {
|
||||
System.out.println("出生日期解析失败,身份证号可能非法!");
|
||||
log.info("出生日期解析失败,身份证号可能非法!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -93,18 +97,18 @@ public class IdCardAgeCalculator {
|
||||
public static void main(String[] args) {
|
||||
// 测试1:18位身份证(出生日期2000-01-01,当前日期2024-05-20 → 年龄24)
|
||||
String idCard18 = "110101200001011234";
|
||||
System.out.println("18位身份证年龄:" + calculateAge(idCard18));
|
||||
log.info("18位身份证年龄:" + calculateAge(idCard18));
|
||||
|
||||
// 测试2:15位身份证(出生日期2000-01-01 → 15位表示为000101,补全后20000101)
|
||||
String idCard15 = "110101000101123";
|
||||
System.out.println("15位身份证年龄:" + calculateAge(idCard15));
|
||||
log.info("15位身份证年龄:" + calculateAge(idCard15));
|
||||
|
||||
// 测试3:未过生日的情况(出生日期2000-06-01,当前日期2024-05-20 → 年龄23)
|
||||
String idCardNotBirthday = "110101200006011234";
|
||||
System.out.println("未过生日的年龄:" + calculateAge(idCardNotBirthday));
|
||||
log.info("未过生日的年龄:" + calculateAge(idCardNotBirthday));
|
||||
|
||||
// 测试4:非法身份证号(长度错误)
|
||||
String idCardInvalid = "11010120000101123"; // 17位
|
||||
System.out.println("非法身份证年龄:" + calculateAge(idCardInvalid));
|
||||
log.info("非法身份证年龄:" + calculateAge(idCardInvalid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||
<artifactId>httpclient5</artifactId>
|
||||
</dependency>
|
||||
<!-- 共通-->
|
||||
<dependency>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.administration.domain.InvoiceSegment;
|
||||
@@ -18,6 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
|
||||
private static final Logger log = LoggerFactory.getLogger(InvoiceSegmentServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private InvoiceSegmentMapper invoiceSegmentMapper;
|
||||
@@ -49,57 +53,57 @@ public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
|
||||
*/
|
||||
@Override
|
||||
public int updateInvoiceSegment(InvoiceSegment invoiceSegment) {
|
||||
System.out.println("===== 开始更新发票段 ====");
|
||||
System.out.println("传入的invoiceSegment对象: id=" + invoiceSegment.getId() + ", segmentId=" + invoiceSegment.getSegmentId());
|
||||
log.info("===== 开始更新发票段 ====");
|
||||
log.info("传入的invoiceSegment对象: id=" + invoiceSegment.getId() + ", segmentId=" + invoiceSegment.getSegmentId());
|
||||
|
||||
// 确保必填字段存在
|
||||
if (invoiceSegment.getBeginNumber() == null || invoiceSegment.getEndNumber() == null) {
|
||||
System.out.println("错误: beginNumber或endNumber为空,无法更新");
|
||||
log.info("错误: beginNumber或endNumber为空,无法更新");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 先尝试直接通过id更新
|
||||
int rows = invoiceSegmentMapper.updateById(invoiceSegment);
|
||||
System.out.println("直接通过id更新结果: 影响行数=" + rows);
|
||||
log.info("直接通过id更新结果: 影响行数=" + rows);
|
||||
|
||||
// 如果直接更新失败,尝试多种查询策略
|
||||
if (rows == 0) {
|
||||
// 策略1: 使用传入的id作为segmentId查询(处理前端传入的keyId作为segment_id的情况)
|
||||
if (invoiceSegment.getId() != null) {
|
||||
System.out.println("策略1: 尝试将id=" + invoiceSegment.getId() + "作为segment_id查询");
|
||||
log.info("策略1: 尝试将id=" + invoiceSegment.getId() + "作为segment_id查询");
|
||||
LambdaQueryWrapper<InvoiceSegment> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getId());
|
||||
queryWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
|
||||
|
||||
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(queryWrapper);
|
||||
if (existingSegment != null) {
|
||||
System.out.println("策略1成功: 找到匹配的记录,原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
|
||||
log.info("策略1成功: 找到匹配的记录,原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
|
||||
invoiceSegment.setId(existingSegment.getId());
|
||||
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
|
||||
rows = invoiceSegmentMapper.updateById(invoiceSegment);
|
||||
System.out.println("更新结果: 影响行数=" + rows);
|
||||
log.info("更新结果: 影响行数=" + rows);
|
||||
}
|
||||
}
|
||||
|
||||
// 策略2: 使用传入的segmentId字段查询
|
||||
if (rows == 0 && invoiceSegment.getSegmentId() != null) {
|
||||
System.out.println("策略2: 尝试使用segmentId=" + invoiceSegment.getSegmentId() + "查询");
|
||||
log.info("策略2: 尝试使用segmentId=" + invoiceSegment.getSegmentId() + "查询");
|
||||
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
|
||||
segmentIdWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getSegmentId());
|
||||
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
|
||||
|
||||
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(segmentIdWrapper);
|
||||
if (existingSegment != null) {
|
||||
System.out.println("策略2成功: 找到匹配的记录,原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
|
||||
log.info("策略2成功: 找到匹配的记录,原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
|
||||
invoiceSegment.setId(existingSegment.getId());
|
||||
rows = invoiceSegmentMapper.updateById(invoiceSegment);
|
||||
System.out.println("更新结果: 影响行数=" + rows);
|
||||
log.info("更新结果: 影响行数=" + rows);
|
||||
}
|
||||
}
|
||||
|
||||
// 策略3: 基于业务键查询(beginNumber和endNumber通常是唯一的业务组合)
|
||||
if (rows == 0) {
|
||||
System.out.println("策略3: 尝试根据业务键查询,beginNumber=" + invoiceSegment.getBeginNumber() + ", endNumber=" + invoiceSegment.getEndNumber());
|
||||
log.info("策略3: 尝试根据业务键查询,beginNumber=" + invoiceSegment.getBeginNumber() + ", endNumber=" + invoiceSegment.getEndNumber());
|
||||
LambdaQueryWrapper<InvoiceSegment> businessWrapper = new LambdaQueryWrapper<>();
|
||||
businessWrapper.eq(InvoiceSegment::getBeginNumber, invoiceSegment.getBeginNumber());
|
||||
businessWrapper.eq(InvoiceSegment::getEndNumber, invoiceSegment.getEndNumber());
|
||||
@@ -107,27 +111,27 @@ public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
|
||||
|
||||
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(businessWrapper);
|
||||
if (existingSegment != null) {
|
||||
System.out.println("策略3成功: 找到匹配的记录,原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
|
||||
log.info("策略3成功: 找到匹配的记录,原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
|
||||
invoiceSegment.setId(existingSegment.getId());
|
||||
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
|
||||
rows = invoiceSegmentMapper.updateById(invoiceSegment);
|
||||
System.out.println("更新结果: 影响行数=" + rows);
|
||||
log.info("更新结果: 影响行数=" + rows);
|
||||
}
|
||||
}
|
||||
|
||||
// 策略4: 如果是特定场景下的已知ID问题,添加特殊处理逻辑
|
||||
if (rows == 0) {
|
||||
System.out.println("策略4: 检查是否需要特殊处理");
|
||||
log.info("策略4: 检查是否需要特殊处理");
|
||||
// 检查是否是之前日志中提到的ID问题
|
||||
if ("1990329963367977000".equals(invoiceSegment.getSegmentId() + "")) {
|
||||
System.out.println("检测到特殊ID模式,尝试替代查询");
|
||||
log.info("检测到特殊ID模式,尝试替代查询");
|
||||
// 这里可以添加更具体的替代查询逻辑
|
||||
}
|
||||
}
|
||||
|
||||
// 增强调试信息:显示当前表中所有可能相关的记录
|
||||
if (rows == 0) {
|
||||
System.out.println("所有查询策略都失败了,显示表中相关记录:");
|
||||
log.info("所有查询策略都失败了,显示表中相关记录:");
|
||||
// 查询条件可以根据实际情况调整
|
||||
LambdaQueryWrapper<InvoiceSegment> debugWrapper = new LambdaQueryWrapper<>();
|
||||
debugWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
|
||||
@@ -136,14 +140,14 @@ public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
|
||||
|
||||
List<InvoiceSegment> segments = invoiceSegmentMapper.selectList(debugWrapper);
|
||||
for (InvoiceSegment seg : segments) {
|
||||
System.out.println("记录: id=" + seg.getId() + ", segmentId=" + seg.getSegmentId() + ", beginNumber=" + seg.getBeginNumber() + ", endNumber=" + seg.getEndNumber());
|
||||
log.info("记录: id=" + seg.getId() + ", segmentId=" + seg.getSegmentId() + ", beginNumber=" + seg.getBeginNumber() + ", endNumber=" + seg.getEndNumber());
|
||||
}
|
||||
|
||||
System.out.println("提示: 请检查前端传递的ID是否与数据库中的记录匹配");
|
||||
log.info("提示: 请检查前端传递的ID是否与数据库中的记录匹配");
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("===== 更新发票段结束 ==== 最终结果: " + (rows > 0 ? "成功" : "失败"));
|
||||
log.info("===== 更新发票段结束 ==== 最终结果: " + (rows > 0 ? "成功" : "失败"));
|
||||
return rows;
|
||||
}
|
||||
|
||||
@@ -152,9 +156,9 @@ public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
|
||||
*/
|
||||
@Override
|
||||
public int deleteInvoiceSegmentByIds(Long[] ids) {
|
||||
System.out.println("删除发票段IDs: " + java.util.Arrays.toString(ids));
|
||||
log.info("删除发票段IDs: " + java.util.Arrays.toString(ids));
|
||||
List<Long> idList = java.util.Arrays.asList(ids);
|
||||
System.out.println("删除ID列表: " + idList);
|
||||
log.info("删除ID列表: " + idList);
|
||||
|
||||
// 检查记录是否存在且未被删除 - 先尝试通过id查找
|
||||
LambdaQueryWrapper<InvoiceSegment> checkWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -162,32 +166,32 @@ public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
|
||||
checkWrapper.eq(InvoiceSegment::getDeleteFlag, "0"); // 检查未被删除的记录
|
||||
List<InvoiceSegment> existingRecords = invoiceSegmentMapper.selectList(checkWrapper);
|
||||
|
||||
System.out.println("通过id检查到的未删除记录数: " + existingRecords.size());
|
||||
log.info("通过id检查到的未删除记录数: " + existingRecords.size());
|
||||
|
||||
// 如果通过id没有找到记录,尝试通过segment_id查找
|
||||
if (existingRecords.isEmpty()) {
|
||||
System.out.println("通过id未找到记录,尝试通过segment_id查找");
|
||||
log.info("通过id未找到记录,尝试通过segment_id查找");
|
||||
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
|
||||
segmentIdWrapper.in(InvoiceSegment::getSegmentId, idList);
|
||||
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
|
||||
existingRecords = invoiceSegmentMapper.selectList(segmentIdWrapper);
|
||||
System.out.println("通过segment_id检查到的未删除记录数: " + existingRecords.size());
|
||||
log.info("通过segment_id检查到的未删除记录数: " + existingRecords.size());
|
||||
|
||||
// 如果通过segment_id找到了记录,使用这些记录的id进行删除
|
||||
if (!existingRecords.isEmpty()) {
|
||||
List<Long> actualIds = existingRecords.stream()
|
||||
.map(InvoiceSegment::getId)
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
System.out.println("使用实际id列表进行删除: " + actualIds);
|
||||
log.info("使用实际id列表进行删除: " + actualIds);
|
||||
int rows = invoiceSegmentMapper.deleteBatchIds(actualIds);
|
||||
System.out.println("删除影响行数: " + rows);
|
||||
log.info("删除影响行数: " + rows);
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
|
||||
// 直接通过id删除
|
||||
int rows = invoiceSegmentMapper.deleteBatchIds(idList);
|
||||
System.out.println("删除影响行数: " + rows);
|
||||
log.info("删除影响行数: " + rows);
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.administration.domain.OutpatientNoSegment;
|
||||
@@ -20,6 +23,7 @@ import java.util.regex.Pattern;
|
||||
*/
|
||||
@Service
|
||||
public class OutpatientNoSegmentServiceImpl implements IOutpatientNoSegmentService {
|
||||
private static final Logger log = LoggerFactory.getLogger(OutpatientNoSegmentServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private OutpatientNoSegmentMapper outpatientNoSegmentMapper;
|
||||
@@ -76,27 +80,27 @@ public class OutpatientNoSegmentServiceImpl implements IOutpatientNoSegmentServi
|
||||
*/
|
||||
@Override
|
||||
public OutpatientNoSegment getById(Long id) {
|
||||
System.out.println("=== 查询门诊号码段开始 ===");
|
||||
System.out.println("查询ID: " + id);
|
||||
System.out.println("ID类型: " + (id != null ? id.getClass().getName() : "null"));
|
||||
System.out.println("ID值(字符串): " + String.valueOf(id));
|
||||
log.info("=== 查询门诊号码段开始 ===");
|
||||
log.info("查询ID: " + id);
|
||||
log.info("ID类型: " + (id != null ? id.getClass().getName() : "null"));
|
||||
log.info("ID值(字符串): " + String.valueOf(id));
|
||||
|
||||
// 使用 selectById 查询(会自动过滤 delete_flag = '1' 的记录)
|
||||
OutpatientNoSegment segment = outpatientNoSegmentMapper.selectById(id);
|
||||
|
||||
if (segment != null) {
|
||||
System.out.println("查询成功 - 找到记录:");
|
||||
System.out.println(" - 记录ID: " + segment.getId());
|
||||
System.out.println(" - 操作员ID: " + segment.getOperatorId());
|
||||
System.out.println(" - 起始号码: " + segment.getStartNo());
|
||||
System.out.println(" - 终止号码: " + segment.getEndNo());
|
||||
System.out.println(" - 使用号码: " + segment.getUsedNo());
|
||||
log.info("查询成功 - 找到记录:");
|
||||
log.info(" - 记录ID: " + segment.getId());
|
||||
log.info(" - 操作员ID: " + segment.getOperatorId());
|
||||
log.info(" - 起始号码: " + segment.getStartNo());
|
||||
log.info(" - 终止号码: " + segment.getEndNo());
|
||||
log.info(" - 使用号码: " + segment.getUsedNo());
|
||||
} else {
|
||||
System.out.println("查询失败 - 未找到记录");
|
||||
System.out.println("可能原因:");
|
||||
System.out.println(" 1. 记录不存在");
|
||||
System.out.println(" 2. 记录已被软删除(delete_flag = '1')");
|
||||
System.out.println(" 3. ID 不匹配");
|
||||
log.info("查询失败 - 未找到记录");
|
||||
log.info("可能原因:");
|
||||
log.info(" 1. 记录不存在");
|
||||
log.info(" 2. 记录已被软删除(delete_flag = '1')");
|
||||
log.info(" 3. ID 不匹配");
|
||||
|
||||
// 尝试直接查询数据库(包括已删除的记录)来验证记录是否存在
|
||||
try {
|
||||
@@ -106,12 +110,12 @@ public class OutpatientNoSegmentServiceImpl implements IOutpatientNoSegmentServi
|
||||
// 如果需要查询已删除的记录,需要使用原生 SQL 或禁用逻辑删除
|
||||
OutpatientNoSegment segmentWithDeleted = outpatientNoSegmentMapper.selectOne(queryWrapper);
|
||||
if (segmentWithDeleted != null) {
|
||||
System.out.println("使用 LambdaQueryWrapper 查询结果: 找到记录,ID=" + segmentWithDeleted.getId());
|
||||
log.info("使用 LambdaQueryWrapper 查询结果: 找到记录,ID=" + segmentWithDeleted.getId());
|
||||
} else {
|
||||
System.out.println("使用 LambdaQueryWrapper 查询结果: 未找到记录");
|
||||
log.info("使用 LambdaQueryWrapper 查询结果: 未找到记录");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("使用 LambdaQueryWrapper 查询时出错: " + e.getMessage());
|
||||
log.info("使用 LambdaQueryWrapper 查询时出错: " + e.getMessage());
|
||||
}
|
||||
|
||||
// 尝试查询所有记录(不限制 delete_flag)来验证 ID 是否存在
|
||||
@@ -121,10 +125,10 @@ public class OutpatientNoSegmentServiceImpl implements IOutpatientNoSegmentServi
|
||||
LambdaQueryWrapper<OutpatientNoSegment> allQuery = new LambdaQueryWrapper<>();
|
||||
// 查询所有未删除的记录
|
||||
List<OutpatientNoSegment> allSegments = outpatientNoSegmentMapper.selectList(allQuery);
|
||||
System.out.println("数据库中所有未删除的记录数: " + allSegments.size());
|
||||
System.out.println("所有记录的 ID 列表:");
|
||||
log.info("数据库中所有未删除的记录数: " + allSegments.size());
|
||||
log.info("所有记录的 ID 列表:");
|
||||
for (OutpatientNoSegment seg : allSegments) {
|
||||
System.out.println(" - ID: " + seg.getId() + " (类型: " + seg.getId().getClass().getName() + ")");
|
||||
log.info(" - ID: " + seg.getId() + " (类型: " + seg.getId().getClass().getName() + ")");
|
||||
// 检查是否有接近的 ID(可能是精度问题)
|
||||
if (seg.getId() != null) {
|
||||
String segIdStr = String.valueOf(seg.getId());
|
||||
@@ -132,16 +136,16 @@ public class OutpatientNoSegmentServiceImpl implements IOutpatientNoSegmentServi
|
||||
if (segIdStr.length() == searchIdStr.length() &&
|
||||
segIdStr.substring(0, Math.min(10, segIdStr.length())).equals(
|
||||
searchIdStr.substring(0, Math.min(10, searchIdStr.length())))) {
|
||||
System.out.println(" 警告:发现相似的 ID!");
|
||||
log.info(" 警告:发现相似的 ID!");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("查询所有记录时出错: " + e.getMessage());
|
||||
log.info("查询所有记录时出错: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("=== 查询门诊号码段结束 ===");
|
||||
log.info("=== 查询门诊号码段结束 ===");
|
||||
return segment;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,14 +12,19 @@ import com.openhis.crosssystem.dto.*;
|
||||
import com.openhis.crosssystem.enums.LisAgeUnit;
|
||||
import com.openhis.crosssystem.enums.PacsAgeUnit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
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 java.io.IOException;
|
||||
@@ -104,12 +109,24 @@ public class CrossSystemSendApplyUtil {
|
||||
.setGroupName(lisApplyDto.getGroupList().stream().map(LisApplyGroupDto::getGroupName)
|
||||
.collect(Collectors.joining("+")));
|
||||
// 设置超时时间
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(3000)
|
||||
.setSocketTimeout(30000).build();
|
||||
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();
|
||||
// 创建无视SSL验证的HttpClient
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig)
|
||||
.setSSLSocketFactory(CommonUtil.createIgnoreSslSocketFactory()).build();
|
||||
CloseableHttpResponse response = null;
|
||||
HttpClientConnectionManager connectionManager;
|
||||
try {
|
||||
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请求
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(apiUrl);
|
||||
@@ -207,12 +224,24 @@ public class CrossSystemSendApplyUtil {
|
||||
// 必填 【检查项目名称】
|
||||
.setGroupName(pacsApplyDto.getGroupName());
|
||||
// 设置超时时间
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(3000)
|
||||
.setSocketTimeout(30000).build();
|
||||
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();
|
||||
// 创建无视SSL验证的HttpClient
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig)
|
||||
.setSSLSocketFactory(CommonUtil.createIgnoreSslSocketFactory()).build();
|
||||
CloseableHttpResponse response = null;
|
||||
HttpClientConnectionManager connectionManager;
|
||||
try {
|
||||
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请求
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(apiUrl);
|
||||
|
||||
@@ -53,7 +53,8 @@ public class LabActivityDefinitionServiceImpl
|
||||
tenantId = loginUser.getTenantId() != null ? loginUser.getTenantId() : 1;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// intentionally ignored
|
||||
}
|
||||
entity.setCreateBy(createBy);
|
||||
entity.setTenantId(tenantId);
|
||||
if (entity.getCreateTime() == null) {
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.yb.service;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -71,6 +74,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
public class YbDao {
|
||||
private static final Logger log = LoggerFactory.getLogger(YbDao.class);
|
||||
|
||||
/**
|
||||
* ****************************** 业务服务 **********************************
|
||||
@@ -1388,12 +1392,12 @@ public class YbDao {
|
||||
// 分组处理
|
||||
// for (PaymentDecDetailUniAccountDto paymentDecDetailUniAccountDto : paymentDecDetailUniAccountDtos) {
|
||||
// if(StringUtils.isEmpty(paymentDecDetailUniAccountDto.getContractNo())){
|
||||
// System.out.println(paymentDecDetailUniAccountDto.getId());
|
||||
// log.info(paymentDecDetailUniAccountDto.getId());
|
||||
// }
|
||||
// }
|
||||
for (PaymentDecDetailUniAccountDto paymentDecDetailUniAccountDto : paymentDecDetailUniAccountDtos) {
|
||||
if (StringUtils.isEmpty(paymentDecDetailUniAccountDto.getContractNo())) {
|
||||
System.out.println(paymentDecDetailUniAccountDto.getId() + "payment主键:"
|
||||
log.info(paymentDecDetailUniAccountDto.getId() + "payment主键:"
|
||||
+ paymentDecDetailUniAccountDto.getReconciliationId());
|
||||
}
|
||||
}
|
||||
@@ -1577,9 +1581,9 @@ public class YbDao {
|
||||
// 该部分代码为辅助调试时使用,无任何业务处理 start
|
||||
// for (PaymentRecDetail paymentRecDetail : paymentRecDetailList) {
|
||||
// if (StringUtils.isEmpty(paymentRecDetail.getPayTransText())) {
|
||||
// System.out.println("*******************************************************************");
|
||||
// System.out.println(paymentRecDetail.getId() + "主键:" + paymentRecDetail.getReconciliationId());
|
||||
// System.out.println(JSON.toJSONString(paymentRecDetail));
|
||||
// log.info("*******************************************************************");
|
||||
// log.info(paymentRecDetail.getId() + "主键:" + paymentRecDetail.getReconciliationId());
|
||||
// log.info(JSON.toJSONString(paymentRecDetail));
|
||||
// // throw new ServiceException("paymentDetail无返回交易码");
|
||||
// }
|
||||
// }
|
||||
@@ -1728,7 +1732,7 @@ public class YbDao {
|
||||
// 该部分代码为辅助调试时使用,无任何业务处理 start
|
||||
for (PaymentRecDetail paymentRecDetail : paymentRecDetailList) {
|
||||
if (StringUtils.isEmpty(paymentRecDetail.getPayTransText())) {
|
||||
System.out.println(JSON.toJSONString(paymentRecDetail));
|
||||
log.info(JSON.toJSONString(paymentRecDetail));
|
||||
throw new ServiceException("paymentDetail无返回交易码");
|
||||
}
|
||||
}
|
||||
@@ -1906,7 +1910,7 @@ public class YbDao {
|
||||
// 该部分代码为辅助调试时使用,无任何业务处理 start
|
||||
for (PaymentRecDetail paymentRecDetail : paymentRecDetailList) {
|
||||
if (StringUtils.isEmpty(paymentRecDetail.getPayTransNo())) {
|
||||
System.out.println(JSON.toJSONString(paymentRecDetail));
|
||||
log.info(JSON.toJSONString(paymentRecDetail));
|
||||
throw new ServiceException("paymentDetail无返回交易码");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,14 +23,14 @@ import com.openhis.yb.dto.*;
|
||||
import com.openhis.yb.model.Clinic2207OrderModel;
|
||||
import com.openhis.yb.model.Clinic2207OrderParam;
|
||||
import com.openhis.yb.util.YbParamBuilderUtil;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.hc.client5.http.config.RequestConfig;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.io.entity.StringEntity;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -81,20 +81,20 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(resultString));
|
||||
logger.info(JSON.toJSONString(resultString));
|
||||
logger.info("【1101】返回参数:" + resultString);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
perinfo = parseObject(JSON.toJSONString(result.getResult()), Info1101Output.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -112,19 +112,19 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info("【2201】返回参数:" + s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
clinicReg2201Output = parseObject(JSON.toJSONString(result.getResult()), ClinicReg2201Output.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -142,19 +142,19 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info("【2202】返回参数:" + JSON.toJSONString(s));
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
clinicReg2201Output = parseObject(JSON.toJSONString(result.getResult()), ClinicReg2201Output.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -172,20 +172,20 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info("【2204】返回参数:" + s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
clinicFeedetail2204Result = parseObject(JSON.toJSONString(result.getResult()), Clinic2204OrderResult.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -206,20 +206,20 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2206】返回参数:" + JSON.toJSONString(s));
|
||||
logger.info("【2206】返回参数:" + JSON.toJSONString(s));
|
||||
logger.info(s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
clinic2206OrderResult = parseObject(JSON.toJSONString(result.getResult()), Clinic2206OrderOutput.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -239,20 +239,20 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info("【2207】返回参数:" + s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
clinic2206OrderResult = parseObject(JSON.toJSONString(result.getResult()), Clinic2207OrderModel.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -268,7 +268,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(resultString));
|
||||
logger.info(JSON.toJSONString(resultString));
|
||||
logger.info("【9001】返回参数:" + resultString);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -276,13 +276,13 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
sign = parseObject(JSON.toJSONString(result.getResult()), Sign9001Result.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -301,14 +301,14 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info(s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
@@ -331,20 +331,20 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info("【2208】返回参数:" + s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
clinicOrder2206Result
|
||||
= parseObject(JSON.toJSONString(result.getResult()), Clinic2208UnSetlInfoOutput.class);
|
||||
} else {
|
||||
@@ -362,7 +362,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info("【3301】返回参数:" + s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -370,7 +370,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -382,7 +382,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info("【3302】返回参数:" + s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -390,7 +390,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -414,7 +414,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info(s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -422,7 +422,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -434,7 +434,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info(s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -442,7 +442,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, FinancialSettlement3202Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -455,7 +455,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println(JSON.toJSONString(s));
|
||||
logger.info(JSON.toJSONString(s));
|
||||
logger.info(s);
|
||||
// 参数处理
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -463,7 +463,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, List.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -492,7 +492,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -510,7 +510,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Clearing3205AResult.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -528,7 +528,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -546,7 +546,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -564,7 +564,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -582,7 +582,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -600,7 +600,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -618,7 +618,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -636,7 +636,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -654,14 +654,14 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
// 转业务参数
|
||||
MedicalInventory3511Output medicalInventory3511Output = null;
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 401) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
medicalInventory3511Output
|
||||
= parseObject(JSON.toJSONString(result.getResult()), MedicalInventory3511Output.class);
|
||||
} else {
|
||||
@@ -683,7 +683,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -701,7 +701,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -719,7 +719,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -737,7 +737,7 @@ public class YbHttpUtils {
|
||||
try {
|
||||
result = mapper.readValue(s, Result.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -756,10 +756,9 @@ public class YbHttpUtils {
|
||||
baseParam.setBaseInfo(ybParamBuilderUtil.getBaseInfo(parseObject(JSON.toJSONString(o)), contract)).setData(o);
|
||||
logger.info("【请求路径】:" + url + ";【入参】: " + JSON.toJSONString(baseParam));
|
||||
// 创建Http请求
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(300000)
|
||||
.setConnectionRequestTimeout(300000).setSocketTimeout(300000).build();
|
||||
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();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
ClassicHttpResponse response = null;
|
||||
// 发送请求
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
@@ -772,7 +771,7 @@ public class YbHttpUtils {
|
||||
}
|
||||
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
throw new ServiceException("Http请求异常,请稍后再试。");
|
||||
} finally {
|
||||
if (response != null) {
|
||||
@@ -794,7 +793,7 @@ public class YbHttpUtils {
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/queryYbCatalogue",
|
||||
catalogue1312QueryParam, null);
|
||||
// System.out.println("--------1312resultString-------------" + resultString);
|
||||
// logger.info("--------1312resultString-------------" + resultString);
|
||||
// 1. 解析外层 JSON
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); // 启用 Snake Case 自动映射
|
||||
@@ -805,7 +804,7 @@ public class YbHttpUtils {
|
||||
outputList = mapper.readValue(resultStr, new TypeReference<List<Catalogue1312Output>>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
|
||||
return outputList;
|
||||
@@ -846,11 +845,11 @@ public class YbHttpUtils {
|
||||
response = restTemplate.postForEntity(
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/file-up2",
|
||||
new HttpEntity<>(body, headers), String.class);
|
||||
System.out.println(JSON.toJSONString(response));
|
||||
logger.info(JSON.toJSONString(response));
|
||||
// 清理临时文件
|
||||
// Files.deleteIfExists(tempFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception occurred", e);
|
||||
}
|
||||
return response;
|
||||
|
||||
@@ -878,7 +877,7 @@ public class YbHttpUtils {
|
||||
// try {
|
||||
// String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/file-up2",
|
||||
// file9101Param,null);
|
||||
// // System.out.println("--------1312resultString-------------" + resultString);
|
||||
// // logger.info("--------1312resultString-------------" + resultString);
|
||||
// // 1. 解析外层 JSON
|
||||
// ObjectMapper mapper = new ObjectMapper();
|
||||
// mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); // 启用 Snake Case 自动映射
|
||||
@@ -886,20 +885,20 @@ public class YbHttpUtils {
|
||||
// try {
|
||||
// result = mapper.readValue(resultString, Result.class);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// logger.error("Exception occurred", e);
|
||||
// }
|
||||
//
|
||||
// if (result == null) {
|
||||
// throw new ServiceException("未接收到医保返回参数");
|
||||
// } else if (result.getCode() == 200) {
|
||||
// System.out.println(JSON.toJSONString(result.getResult()));
|
||||
// logger.info(JSON.toJSONString(result.getResult()));
|
||||
// fileResult = JSON.parseObject(JSON.toJSONString(result.getResult()), FileResult.class);
|
||||
// } else {
|
||||
// throw new ServiceException(result.getMessage());
|
||||
// }
|
||||
// return fileResult;
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// logger.error("Exception occurred", e);
|
||||
// }
|
||||
// return fileResult;
|
||||
}
|
||||
@@ -916,7 +915,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【3101】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【3101】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【3101】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -928,7 +927,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
return parseObject(JSON.toJSONString(result.getResult()), Yb3101OutputResult.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -946,7 +945,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【3103】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【3103】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【3103】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -958,7 +957,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -971,7 +970,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2301】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2301】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2301】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -985,7 +984,7 @@ public class YbHttpUtils {
|
||||
} else if (result.getCode() == 200) {
|
||||
List<Yb2301OutputResult> yb2301OutputResults = new ArrayList<>();
|
||||
JSONObject jsonObject = parseObject(String.valueOf(result.getResult()));
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
logger.info(JSON.toJSONString(result.getResult()));
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("result");
|
||||
for (Object o : jsonArray) {
|
||||
yb2301OutputResults.add(JSON.parseObject(String.valueOf(o), Yb2301OutputResult.class));
|
||||
@@ -1003,7 +1002,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2303】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2303】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2303】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1028,7 +1027,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2304】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2304】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2304】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1061,7 +1060,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2305】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2305】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2305】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1094,7 +1093,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【5205】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【5205】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【5205】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1103,7 +1102,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return JSON.parseArray(result.getResult().toString(), Yb5205OutputSpecialDisease.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1126,7 +1125,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【" + catalogFileInput.getAddress() + "】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【" + catalogFileInput.getAddress() + "】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【" + catalogFileInput.getAddress() + "】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1139,7 +1138,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return JSON.parseObject(JSON.toJSONString(result.getResult()), FileResult.class);
|
||||
} else {
|
||||
return new FileResult().setErrMsg(result.getMessage());
|
||||
@@ -1158,7 +1157,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【9102】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【9102】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【9102】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1167,7 +1166,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return result.getResult().toString();
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1191,7 +1190,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2401】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2401】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2401】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1200,7 +1199,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return JSON.parseObject(result.getResult().toString(), InpatientReg.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1224,7 +1223,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2404】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2404】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2404】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1233,7 +1232,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -1257,7 +1256,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2402】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2402】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2402】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1266,7 +1265,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return JSON.parseObject(result.getResult().toString(), Yb2402InputParam.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1290,7 +1289,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2404】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2404】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2404】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1299,7 +1298,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -1322,7 +1321,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2405】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2405】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2405】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1331,7 +1330,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return;
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1348,7 +1347,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【4401】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4401】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4401】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1357,7 +1356,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return;
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1380,7 +1379,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【4401】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4401】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4401】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1389,7 +1388,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return;
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1407,7 +1406,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【4101A】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4101A】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4101A】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1416,7 +1415,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return;
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1434,7 +1433,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【4102】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4102】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【4102】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1443,7 +1442,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return;
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
@@ -1462,7 +1461,7 @@ public class YbHttpUtils {
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2302】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2302】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2302】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
@@ -1471,7 +1470,7 @@ public class YbHttpUtils {
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
logger.info(result.getResult().toString());
|
||||
return;
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.openhis;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
@@ -11,6 +14,7 @@ import org.springframework.core.env.Environment;
|
||||
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.core", "com.openhis"})
|
||||
public class OpenHisMiniApp {
|
||||
private static final Logger log = LoggerFactory.getLogger(OpenHisMiniApp.class);
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
ConfigurableApplicationContext application = SpringApplication.run(OpenHisMiniApp.class, args);
|
||||
@@ -18,7 +22,7 @@ public class OpenHisMiniApp {
|
||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||
String port = env.getProperty("server.port");
|
||||
String path = env.getProperty("server.servlet.context-path");
|
||||
System.out.println("\n----------------------------------------------------------\n\t"
|
||||
log.info("\n----------------------------------------------------------\n\t"
|
||||
+ "Application OpenHis is running! Access URLs:\n\t" + "Local: \t\thttp://localhost:" + port + path
|
||||
+ "/\n\t" + "External: \thttp://" + ip + ":" + port + path + "/\n"
|
||||
+ "----------------------------------------------------------");
|
||||
|
||||
@@ -99,7 +99,7 @@ token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
secret: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -42,11 +42,11 @@
|
||||
<flowable.version>7.1.0</flowable.version>
|
||||
<postgresql.version>42.7.10</postgresql.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>
|
||||
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||
<liteflow-spring-boot-starter.version>2.12.4.1</liteflow-spring-boot-starter.version>
|
||||
<hutool-all.version>5.8.35</hutool-all.version>
|
||||
<hutool-all.version>5.8.36</hutool-all.version>
|
||||
<bcprov-jdk18on.version>1.80</bcprov-jdk18on.version>
|
||||
<kernel.version>7.1.2</kernel.version>
|
||||
<itextpdf.version>5.5.13.4</itextpdf.version>
|
||||
@@ -293,6 +293,7 @@
|
||||
<version>${velocity.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Token生成与解析-->
|
||||
<!-- Token生成与解析-->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
@@ -350,9 +351,9 @@
|
||||
</dependency>
|
||||
<!-- JSQlParser - MyBatis Plus 3.5.9+ 需要 4.6+ -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>${httpclient.version}</version>
|
||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||
<artifactId>httpclient5</artifactId>
|
||||
<version>${httpclient5.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
@@ -426,4 +427,4 @@
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
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'
|
||||
})
|
||||
}
|
||||
63
openhis-ui-vue3/src/components/VxeTableCompat/index.vue
Normal file
63
openhis-ui-vue3/src/components/VxeTableCompat/index.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<script lang="ts">
|
||||
/**
|
||||
* VxeTable 归一化兼容层
|
||||
*
|
||||
* 拦截 cell-click 和 current-change 事件,
|
||||
* 将 vxe-table 的对象参数归一化为 el-table 风格的平铺参数。
|
||||
*/
|
||||
import { ref, h, defineComponent, Comment, Text, Fragment } from 'vue'
|
||||
import { VxeTable } from 'vxe-table'
|
||||
|
||||
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 innerRef = ref<any>(null)
|
||||
|
||||
// 将 attrs 中的 on* 监听器拆分处理
|
||||
const tableProps: Record<string, any> = {}
|
||||
for (const [key, value] of Object.entries(attrs)) {
|
||||
if (key.startsWith('on') && typeof value === 'function') {
|
||||
const rawEvent = key.slice(2)
|
||||
const eventName = rawEvent
|
||||
.replace(/([A-Z])/g, '-$1')
|
||||
.toLowerCase()
|
||||
.replace(/^-/, '')
|
||||
|
||||
if (eventName in NORMALIZE_EVENTS) {
|
||||
tableProps[key] = (vxeParams: any) => {
|
||||
const normalized = NORMALIZE_EVENTS[eventName](vxeParams)
|
||||
;(value as Function)(...normalized)
|
||||
}
|
||||
} else {
|
||||
tableProps[key] = value
|
||||
}
|
||||
} else {
|
||||
tableProps[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
expose({
|
||||
clearCheckboxRow: () => innerRef.value?.clearCheckboxRow(),
|
||||
clearSelection: () => innerRef.value?.clearCheckboxRow(),
|
||||
setCurrentRow: (row: any) => innerRef.value?.setCurrentRow(row),
|
||||
toggleRowExpand: (row: any, expanded?: boolean) =>
|
||||
innerRef.value?.toggleRowExpand(row, expanded),
|
||||
toggleRowExpansion: (row: any, expanded?: boolean) =>
|
||||
innerRef.value?.toggleRowExpand(row, expanded),
|
||||
getCheckboxRecords: () => innerRef.value?.getCheckboxRecords(),
|
||||
getSelectionRows: () => innerRef.value?.getCheckboxRecords(),
|
||||
})
|
||||
|
||||
return () => {
|
||||
return h(VxeTable, { ref: innerRef, ...tableProps }, slots)
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* Vite 插件:在构建时拦截依赖模块加载,返回兼容 Vue 3 的补丁版本。
|
||||
*
|
||||
* ⚠️ 不修改 node_modules 中的任何文件。
|
||||
@@ -6,10 +6,12 @@
|
||||
* 拦截清单:
|
||||
* 1. xe-utils/hasOwnProp.js — Vue 3 Proxy 兼容
|
||||
* 2. element-plus form-label-wrap.mjs — NaN 防护 + 生命周期守卫
|
||||
* 3. vxe-table table.js — cell-click/current-change 事件参数归一化
|
||||
*/
|
||||
|
||||
const VIRTUAL_HASOWNPROP = '\0patched:xe-utils/hasOwnProp'
|
||||
const VIRTUAL_FORM_LABEL = '\0patched:element-plus/form-label-wrap'
|
||||
const VIRTUAL_VXE_TABLE = '\0patched:vxe-table/table'
|
||||
|
||||
export default function patchDepsPlugin() {
|
||||
return {
|
||||
@@ -33,6 +35,13 @@ export default function patchDepsPlugin() {
|
||||
) {
|
||||
return VIRTUAL_FORM_LABEL
|
||||
}
|
||||
// 拦截 vxe-table table.js(主表格模块)
|
||||
if (
|
||||
source.includes('vxe-table') &&
|
||||
source.includes('table/src/table')
|
||||
) {
|
||||
return VIRTUAL_VXE_TABLE
|
||||
}
|
||||
},
|
||||
|
||||
// ── load: 对被拦截的模块返回补丁代码 ──
|
||||
@@ -43,6 +52,9 @@ export default function patchDepsPlugin() {
|
||||
if (id === VIRTUAL_FORM_LABEL) {
|
||||
return PATCHED_FORM_LABEL_WRAP
|
||||
}
|
||||
if (id === VIRTUAL_VXE_TABLE) {
|
||||
return getPatchedVxeTable()
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -50,10 +62,6 @@ export default function patchDepsPlugin() {
|
||||
// ═══════════════════════════════════════════════
|
||||
// 补丁 1:xe-utils hasOwnProp — Proxy 兼容
|
||||
// ═══════════════════════════════════════════════
|
||||
// 根因:Object.prototype.hasOwnProperty.call(proxyObj, key)
|
||||
// 在 Vue 3 reactive Proxy 上触发 reactivity 拦截,
|
||||
// 抛出 "obj.hasOwnProperty is not a function"。
|
||||
// ═══════════════════════════════════════════════
|
||||
const PATCHED_HASOWNPROP = `
|
||||
function hasOwnProp(obj, key) {
|
||||
if (obj == null) return false
|
||||
@@ -70,13 +78,6 @@ export { hasOwnProp }
|
||||
// ═══════════════════════════════════════════════
|
||||
// 补丁 2:element-plus form-label-wrap
|
||||
// ═══════════════════════════════════════════════
|
||||
// 根因:vxe-table 展开行收起时 el-form 组件已卸载,
|
||||
// 但 nextTick/onUpdated 回调仍访问已销毁的 formContext,
|
||||
// 导致 NaN width 和 teardown 错误。
|
||||
//
|
||||
// 策略:从原始文件读取内容,在运行时用正则替换。
|
||||
// 这样不依赖 node_modules 中的修改。
|
||||
// ═══════════════════════════════════════════════
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
@@ -98,12 +99,10 @@ function getFormLabelWrapCode() {
|
||||
const code = fs.readFileSync(filePath, 'utf-8')
|
||||
|
||||
cachedFormLabelWrap = code
|
||||
// NaN 防护
|
||||
.replace(
|
||||
'return Math.ceil(Number.parseFloat(width))',
|
||||
'return Math.ceil(Number.parseFloat(width)) || 0'
|
||||
)
|
||||
// _isMounted 守卫
|
||||
.replace(
|
||||
'const updateLabelWidth = (action = "update") => {',
|
||||
'let _isMounted = true;\n const updateLabelWidth = (action = "update") => {'
|
||||
@@ -140,4 +139,48 @@ function getFormLabelWrapCode() {
|
||||
return cachedFormLabelWrap
|
||||
}
|
||||
|
||||
const PATCHED_FORM_LABEL_WRAP = getFormLabelWrapCode()
|
||||
const PATCHED_FORM_LABEL_WRAP = getFormLabelWrapCode()
|
||||
|
||||
// ═══════════════════════════════════════════════
|
||||
// 补丁 3:vxe-table cell-click/current-change 事件归一化
|
||||
// ═══════════════════════════════════════════════
|
||||
// 根因:el-table @cell-click 直接传 (row, column, event)
|
||||
// vxe-table @cell-click 传 ({ row, column, $event, ... })
|
||||
// 126 个 handler 用 el-table 风格 (row) 签名,全部失效。
|
||||
//
|
||||
// 策略:在 dispatchEvent 调用前注入一行代码,
|
||||
// 将 params 对象自身赋值给 params.row,
|
||||
// 使 ({ row }) 解构和 row.xxx 直接访问都能工作。
|
||||
// ═══════════════════════════════════════════════
|
||||
let cachedVxeTable = null
|
||||
|
||||
function getPatchedVxeTable() {
|
||||
if (cachedVxeTable) return cachedVxeTable
|
||||
|
||||
const filePath = path.resolve(
|
||||
process.cwd(),
|
||||
'node_modules/vxe-table/es/table/src/table.js'
|
||||
)
|
||||
|
||||
if (!fs.existsSync(filePath)) {
|
||||
console.warn('[patch-deps] vxe-table table.js not found, skipping')
|
||||
return null
|
||||
}
|
||||
|
||||
let code = fs.readFileSync(filePath, 'utf-8')
|
||||
|
||||
// 修补 cell-click:在 dispatchEvent 前注入参数归一化
|
||||
code = code.replace(
|
||||
"dispatchEvent('cell-click', params, evnt);",
|
||||
`params.row = params; params.column = params.column; dispatchEvent('cell-click', params, evnt);`
|
||||
)
|
||||
|
||||
// 修补 current-change:在 dispatchEvent 前注入参数归一化
|
||||
code = code.replace(
|
||||
"dispatchEvent('current-change', Object.assign({ oldValue, newValue }, params), evnt);",
|
||||
`var _ccp = Object.assign({ oldValue, newValue }, params); _ccp.newValue = _ccp; _ccp.oldValue = oldValue; dispatchEvent('current-change', _ccp, evnt);`
|
||||
)
|
||||
|
||||
cachedVxeTable = code
|
||||
return cachedVxeTable
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<div class="business">
|
||||
<!-- <vxe-table
|
||||
@@ -474,63 +474,63 @@ const init = async () => {
|
||||
const handleSpan = ({ row, column, rowIndex, columnIndex }) => {
|
||||
if (columnIndex === 0) {
|
||||
if (rowIndex === 0) {
|
||||
return [dangerData.value.length, 1];
|
||||
return { rowspan: dangerData.value.length, colspan: 1 };
|
||||
} else if (rowIndex > 0 && rowIndex < 27) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
if (rowIndex === 27) {
|
||||
return [1, 4];
|
||||
return { rowspan: 1, colspan: 4 };
|
||||
}
|
||||
}
|
||||
if (columnIndex === 1) {
|
||||
if (rowIndex === 0) {
|
||||
return [4, 1];
|
||||
return { rowspan: 4, colspan: 1 };
|
||||
} else if (rowIndex > 0 && rowIndex < 4) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
if (rowIndex === 4) {
|
||||
return [3, 1];
|
||||
return { rowspan: 3, colspan: 1 };
|
||||
} else if (rowIndex > 0 && rowIndex < 7) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
if (rowIndex === 7) {
|
||||
return [4, 1];
|
||||
return { rowspan: 4, colspan: 1 };
|
||||
} else if (rowIndex > 0 && rowIndex < 11) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
if (rowIndex === 11) {
|
||||
return [3, 1];
|
||||
return { rowspan: 3, colspan: 1 };
|
||||
} else if (rowIndex > 0 && rowIndex < 14) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
if (rowIndex === 14) {
|
||||
return [7, 1];
|
||||
return { rowspan: 7, colspan: 1 };
|
||||
} else if (rowIndex > 0 && rowIndex < 21) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
if (rowIndex === 21) {
|
||||
return [6, 1];
|
||||
return { rowspan: 6, colspan: 1 };
|
||||
} 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 }) => {
|
||||
// 护理措施
|
||||
if (columnIndex === 0) {
|
||||
if (rowIndex === 0) {
|
||||
return [nursingData.value.length, 1];
|
||||
return { rowspan: nursingData.value.length, colspan: 1 };
|
||||
} else if (rowIndex > 0 && rowIndex < 8) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
// 护士签名
|
||||
if (rowIndex === 8) {
|
||||
return [1, 2];
|
||||
return { rowspan: 1, colspan: 2 };
|
||||
}
|
||||
}
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
};
|
||||
|
||||
const onSubmit = async () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
ref="tableWrapper"
|
||||
tabindex="0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
ref="tableWrapper"
|
||||
tabindex="0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="main-content">
|
||||
<!-- 中间组套列表 -->
|
||||
<div class="section-card-left">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
ref="tableWrapper"
|
||||
tabindex="0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
v-loading="readCardLoading"
|
||||
style="display: flex; justify-content: space-between"
|
||||
@@ -741,7 +741,7 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 操作列索引为10(从0开始计数)
|
||||
// 如果当前行的paymentId为空,则不合并
|
||||
if (!row.paymentId) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 查找相同paymentId的连续行
|
||||
@@ -755,14 +755,14 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [spanCount, 1];
|
||||
return { rowspan: spanCount, colspan: 1 };
|
||||
} else {
|
||||
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
// 其他列不合并
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// function printCharge(row) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="补打挂号单凭证"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
v-loading="loading"
|
||||
style="display: flex; justify-content: space-between"
|
||||
@@ -528,7 +528,7 @@ async function handleReadCard(value) {
|
||||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 10) {
|
||||
if (!row.paymentId) {
|
||||
return [1,1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
let spanCount = 1;
|
||||
if (rowIndex === 0 || chargeList.value[rowIndex - 1].paymentId !== row.paymentId) {
|
||||
@@ -539,12 +539,12 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [spanCount, 1];
|
||||
return { rowspan: spanCount, colspan: 1 };
|
||||
} else {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 打印功能
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
ref="tableWrapper"
|
||||
tabindex="0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col
|
||||
@@ -751,13 +751,13 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
const groupId = row.groupId;
|
||||
// 如果没有groupId,则不合并
|
||||
if (groupId === undefined || groupId === null) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 向上查找相同groupId的行,如果找到则隐藏当前行
|
||||
for (let i = rowIndex - 1; i >= 0; i--) {
|
||||
if (activityList.value[i].groupId === groupId) {
|
||||
return [0, 0]; // 隐藏被合并的行
|
||||
return { rowspan: 0, colspan: 0 }; // 隐藏被合并的行
|
||||
} else {
|
||||
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">
|
||||
<!-- 左侧患者列表 -->
|
||||
<el-card class="patient-list">
|
||||
@@ -420,7 +420,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
|
||||
// 检查当前列是否需要合并
|
||||
if (!mergeColumns.includes(columnIndex)) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 获取当前行的 requestId
|
||||
@@ -428,7 +428,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
|
||||
// 如果没有 requestId,不进行合并
|
||||
if (!currentRequestId) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 查找具有相同 requestId 的连续行
|
||||
@@ -444,7 +444,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
|
||||
// 如果当前行不是合并组的第一行,则不显示
|
||||
if (startIndex !== rowIndex) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
|
||||
// 向下查找相同 requestId 的行
|
||||
|
||||
@@ -1,2 +1,190 @@
|
||||
<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>
|
||||
<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="page-header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="app-container consultation-confirmation">
|
||||
<div class="page-header">
|
||||
<span class="tab-title">会诊确认</span>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
ref="tableWrapper"
|
||||
tabindex="0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<el-drawer
|
||||
v-model="drawer"
|
||||
title="医嘱组套"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
ref="tableWrapper"
|
||||
tabindex="0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="left">
|
||||
<div class="form">
|
||||
@@ -722,15 +722,15 @@ function spanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
const count = medicineInfoList.value.filter(
|
||||
(item) => item.prescriptionNo === prescriptionNo
|
||||
).length;
|
||||
return [count, 1]; // 合并count行,1列
|
||||
return { rowspan: count, colspan: 1 }; // 合并count行,1列
|
||||
} else {
|
||||
return [0, 0]; // 其他行不显示
|
||||
return { rowspan: 0, colspan: 0 }; // 其他行不显示
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 其他列不进行合并
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
function handleSelectionChange(selectedRows, currentRow) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="med-summary-container">
|
||||
<div class="summary-card" style="width: 40%; height: 80vh">
|
||||
<div class="summary-card-header">{{ '汇总单' }}</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
style="width: 100%"
|
||||
border
|
||||
auto-resize
|
||||
@cell-click="({ row }) => getDetails(row)"
|
||||
@cell-click="(row) => getDetails(row)"
|
||||
>
|
||||
<vxe-column
|
||||
type="checkbox"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 左侧患者列表 -->
|
||||
<el-card class="patient-list">
|
||||
@@ -421,7 +421,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
|
||||
// 检查当前列是否需要合并
|
||||
if (!mergeColumns.includes(columnIndex)) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 获取当前行的 requestId
|
||||
@@ -429,7 +429,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
|
||||
// 如果没有 requestId,不进行合并
|
||||
if (!currentRequestId) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 查找具有相同 requestId 的连续行
|
||||
@@ -445,7 +445,7 @@ function handelSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
|
||||
// 如果当前行不是合并组的第一行,则不显示
|
||||
if (startIndex !== rowIndex) {
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
|
||||
// 向下查找相同 requestId 的行
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
v-loading="readCardLoading"
|
||||
style="display: flex; justify-content: space-between"
|
||||
@@ -865,7 +865,7 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 操作列索引为10(从0开始计数)
|
||||
// 如果当前行的paymentId为空,则不合并
|
||||
if (!row.paymentId) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 查找相同paymentId的连续行
|
||||
@@ -879,14 +879,14 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [spanCount, 1];
|
||||
return { rowspan: spanCount, colspan: 1 };
|
||||
} else {
|
||||
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
// 其他列不合并
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
function printCharge(row) {
|
||||
|
||||
1543
openhis-ui-vue3/src/views/index.vue.bak
Normal file
1543
openhis-ui-vue3/src/views/index.vue.bak
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user