refactor: 代码质量优化 + 安全修复 + 性能提升
P0 安全修复: - 修复 DatabaseFieldAdder.java 硬编码密码 → 改为环境变量 - 修复 11 个文件空 catch 块 → 添加日志记录 - 修复 40 个文件 System.out → 改为 SLF4J Logger P1 性能优化: - 启用 Spring Boot Actuator 健康检查 (health/info/metrics) - 为字典数据查询添加 @Cacheable 缓存 P2 测试: - 添加 Convert 工具类单元测试 (10 个测试用例) - 添加 spring-boot-starter-test 依赖 P3 版本升级: - hutool: 5.8.35 → 5.8.36 - httpclient 5.x (跳过, 改动量大) 验证: 编译通过 / 测试通过
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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无返回交易码");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -772,7 +772,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 +794,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 +805,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 +846,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 +878,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 +886,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 +916,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 +928,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 +946,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 +958,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 +971,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 +985,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 +1003,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 +1028,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 +1061,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 +1094,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 +1103,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 +1126,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 +1139,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 +1158,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 +1167,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 +1191,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 +1200,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 +1224,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 +1233,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 +1257,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 +1266,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 +1290,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 +1299,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 +1322,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 +1331,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 +1348,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 +1357,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 +1380,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 +1389,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 +1407,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 +1416,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 +1434,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 +1443,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 +1462,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 +1471,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());
|
||||
|
||||
Reference in New Issue
Block a user