fix: 提交预约补充成功 peId 与失败 errorMsg 日志,日志 pattern 去掉 %file:%line 消除 ?:?

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-09-10 14:02:53 +08:00
co-authored by Claude Code
parent a3566c1f0c
commit b871409361
2 changed files with 13 additions and 2 deletions
@@ -100,8 +100,10 @@ public class OrderService {
if (result.getPeId() == null) {
throw BusinessException.procFailed("医院未返回体检编号");
}
log.info("提交预约成功:peId={}", result.getPeId());
return result.getPeId();
} else {
log.warn("提交预约失败:errorMsg={}", result.getErrorMsg());
throwHospitalFailed(result.getErrorMsg());
// 不可达,仅为满足 Java 返回类型要求
throw new IllegalStateException("unreachable");
@@ -119,6 +121,7 @@ public class OrderService {
/** 批量添加/修改单位;返回失败信息(全部成功返回 null) */
public String addUnits(List<Map<String, Object>> units) {
log.info("添加单位:units={}", units);
StringBuilder errors = new StringBuilder();
boolean useV2 = "V2".equals(getHmVer());
for (int index = 0; index < units.size(); index++) {
@@ -176,6 +179,14 @@ public class OrderService {
return enrichResultAll(adapter().getResultByPeId(peId));
}
/**
* 15.2 体检状态(简):返回原始基础字段,不做报告组装(对齐原 hospitalmiddle 的 getResultStatus)。
* 与 getResultByPeId 的区别在于不调用 enrichResultAll,故不含 conclusion/suggest/hospitalId/resultVoList。
*/
public List<MedicalMiddleResultVo> getResultStatus(String peId) {
return adapter().getResultByPeId(peId);
}
public Map<String, Object> getPeIdAndDateByIdcard(String idNo) {
return adapter().getPeIdAndDateByIdcard(idNo);
}
+2 -2
View File
@@ -30,7 +30,7 @@
<totalSizeCap>5GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
<pattern>%date [%thread] %-5level [%logger{50}] - %msg%n</pattern>
</encoder>
</appender>
@@ -44,7 +44,7 @@
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
<pattern>%date [%thread] %-5level [%logger{50}] - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>