新增病案查询接口,修改退费接口
This commit is contained in:
@@ -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("]]>");
|
||||
|
||||
Reference in New Issue
Block a user