|
@@ -61,7 +61,7 @@ public class DismissService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "获取帐页数失败。");
|
|
|
}
|
|
|
dao.acceptFeeStepOne(patNo, times);
|
|
|
- if(dao.acceptFeeStepTwo(patNo, times) < 0) {
|
|
|
+ if (dao.acceptFeeStepTwo(patNo, times) < 0) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "接收费用失败。");
|
|
|
}
|
|
|
if (dao.getOrderList(patNo, times) < 0) {
|
|
@@ -183,7 +183,7 @@ public class DismissService {
|
|
|
throw new BizException(exception);
|
|
|
}
|
|
|
dao.recountDeposit(patNo, times, ledgerSn);
|
|
|
- Date begntime = getBegntime(patNo,times,"zy_actpatient");
|
|
|
+ Date begntime = getBegntime(patNo, times, "zy_actpatient");
|
|
|
dismissFeeAnalyse(patNo, times, ledgerSn, begntime, tmpendtime);
|
|
|
|
|
|
if (dao.getFeeOffset(patNo, times, ledgerSn, begntime, tmpendtime) != 0) {
|
|
@@ -191,6 +191,19 @@ public class DismissService {
|
|
|
exception.setMessage("此患者明细费用与账页费用不一致。");
|
|
|
throw new BizException(exception);
|
|
|
}
|
|
|
+
|
|
|
+ int inhospdays = dao.selectInhospdays(patNo);
|
|
|
+ List<PureCodeName> charges = dao.selectChargeQuantities(patNo, times);
|
|
|
+ for (PureCodeName item : charges) {
|
|
|
+ if (item.getCode().equals("003")) {
|
|
|
+ if (DecimalUtil.compare(item.getName(), String.valueOf(inhospdays)) > 0) {
|
|
|
+ ExceptionEnum exception = ExceptionEnum.LOGICAL_ERROR;
|
|
|
+ exception.setMessage("此患者床位费收取超标。");
|
|
|
+ throw new BizException(exception);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
dao.deleteTemporaryTable(patNo, times);
|
|
|
PureCodeName medinfo = dao.selectMdtrtId(patNo, times, ledgerSn);
|
|
|
if (null == medinfo) {
|
|
@@ -314,7 +327,6 @@ public class DismissService {
|
|
|
Map<String, String> ledgerMap = initReceiptMap();
|
|
|
Map<String, String> infantMap = initReceiptMap();
|
|
|
Map<String, String> adultMap = initReceiptMap();
|
|
|
-
|
|
|
List<ReceiptFee> ledgerFees = dao.selectLedgerFees(patNo, times, ledgerSn, begntime, endtime);
|
|
|
if (null == ledgerFees) {
|
|
|
ledgerFees = new ArrayList<>();
|
|
@@ -340,14 +352,11 @@ public class DismissService {
|
|
|
restype = "al";
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
String deposit = dao.selectDepositSumamt(patNo, times, ledgerSn);
|
|
|
if (StringUtil.isBlank(deposit)) {
|
|
|
deposit = "0";
|
|
|
}
|
|
|
-
|
|
|
String balance = DecimalUtil.minus(deposit, ledgerMap.get("total"));
|
|
|
-
|
|
|
dao.updateZyLedgerFileCharges(patNo, times, ledgerSn, deposit, balance, restype, ledgerMap);
|
|
|
ReceiptEntity entity = new ReceiptEntity();
|
|
|
if (DecimalUtil.compare(infantMap.get("total"), "0") == 1) {
|