|
|
@@ -20,7 +20,6 @@ import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
import thyyxxk.webserver.utils.TokenUtil;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -138,19 +137,18 @@ public class TransferInOfExpensesService {
|
|
|
List<MzChargeDetail> list = param.getList();
|
|
|
//查询流水号
|
|
|
Integer maxDetailSn = dao.getMaxDetailSn(param.getInpatientNo(), param.getAdmissTimes());
|
|
|
-
|
|
|
- // 获取 费用详情
|
|
|
- List<ZyDetailCharge> zyDetailCharges = new ArrayList<>();
|
|
|
// 获取 全部的费用
|
|
|
BigDecimal sum = new BigDecimal(0);
|
|
|
// 流水号取出这个患者流水值的最大值 在加 1
|
|
|
// 同时计算 出患者的总金额 以及 费用的类型
|
|
|
for (MzChargeDetail mzChargeDetail : list) {
|
|
|
+ if (mzChargeDetail.getChargeCodeMx().equals("BILL99")) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "舍尾金额,无法录入。");
|
|
|
+ }
|
|
|
ZyDetailCharge pojo = new ZyDetailCharge();
|
|
|
pojo.setChargeAmount(BigDecimal.valueOf(mzChargeDetail.getChargeAmount()).multiply(mzChargeDetail.getChargeFee()));
|
|
|
pojo.setAmount(mzChargeDetail.getChargeFee());
|
|
|
pojo.setBillItemCode(mzChargeDetail.getBillItemCode());
|
|
|
- zyDetailCharges.add(pojo);
|
|
|
mzChargeDetail.setDetailSn(maxDetailSn += 1);
|
|
|
sum = sum.add(pojo.getChargeAmount().multiply(pojo.getAmount()));
|
|
|
}
|