新增病案查询接口,修改退费接口

This commit is contained in:
sangchengzhi
2026-01-22 10:41:24 +08:00
parent 8d2d948ea2
commit a2420d61fd
11 changed files with 333 additions and 17 deletions

View File

@@ -2219,7 +2219,18 @@ public class XmlUtil {
str.append(vo.getPages());
str.append("</Pages>");
str.append("<ZFamount>");
str.append(vo.getAmount());
// 安全的数值减法运算,处理可能的空值和精度问题
BigDecimal amount = vo.getAmount();
BigDecimal selectAmount = vo.getSelectAmount();
BigDecimal result = BigDecimal.ZERO;
if (amount != null && selectAmount != null) {
result = amount.subtract(selectAmount);
} else if (amount != null) {
result = amount;
} else if (selectAmount != null) {
result = selectAmount.negate();
}
str.append(result);
str.append("</ZFamount>");
str.append("</request>");
str.append("]]>");