|
@@ -62,7 +62,7 @@ public class DismissService {
|
|
|
Integer retcode = response.getInteger("return_code");
|
|
|
if (null != retcode && retcode == 1) {
|
|
|
JSONArray retdata = response.getJSONArray("return_data");
|
|
|
- if (null == retdata || retdata.size() == 0) {
|
|
|
+ if (null == retdata || retdata.isEmpty()) {
|
|
|
return ResultVoUtil.success();
|
|
|
}
|
|
|
return ResultVoUtil.fail(ExceptionEnum.PRE_DISCHARGE_ERROR, retdata);
|
|
@@ -245,16 +245,28 @@ public class DismissService {
|
|
|
throw new BizException(exception);
|
|
|
}
|
|
|
List<IllegalFee> unhandledList = dao.hasUntreatedDrugOrder(patNo, times);
|
|
|
- if (unhandledList.size() > 0) {
|
|
|
+ if (!unhandledList.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.EXIST_UNHANDLED_DRUG_ORDER, unhandledList);
|
|
|
}
|
|
|
+ List<IllegalFee> refundDrugs = dao.selectPageNoTys(patNo, times);
|
|
|
+ if (!refundDrugs.isEmpty()) {
|
|
|
+ for (IllegalFee drug : refundDrugs) {
|
|
|
+ if (drug.getPageNoTy().equals("-1")) {
|
|
|
+ drug.setPageNoTy("未提交");
|
|
|
+ drug.setRemark("请护士提交退药单。");
|
|
|
+ } else {
|
|
|
+ drug.setRemark("请联系药房处理。");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.EXIST_UNHANDLED_REFUND_DRUG, refundDrugs);
|
|
|
+ }
|
|
|
if (dao.hasUnconfirmedMedicalTech(patNo, times, tmpendtime) > 0) {
|
|
|
ExceptionEnum exception = ExceptionEnum.LOGICAL_ERROR;
|
|
|
exception.setMessage("此患者有未确认的医技。");
|
|
|
throw new BizException(exception);
|
|
|
}
|
|
|
List<IllegalFee> feeNegativeList = dao.feeOrderNegative(patNo, times);
|
|
|
- if (feeNegativeList.size() > 0) {
|
|
|
+ if (!feeNegativeList.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.EXIST_NEGATIVE_FEES, feeNegativeList);
|
|
|
}
|
|
|
if (dao.hasSettled(patNo, times, ledgerSn) != 0) {
|