|
@@ -343,7 +343,7 @@ public class SiMzFeeService {
|
|
|
}
|
|
|
|
|
|
private ResultVo<FundDetail> getFundDetailResultVo(MzPatientInfo p) {
|
|
|
- SiSetlinfo sisetl = mzDao.selectSettledInfo(p.getPatNo(), p.getTimes());
|
|
|
+ SiSetlinfo sisetl = mzDao.selectSettledInfo(p.getPatNo(), p.getTimes(), 0);
|
|
|
if (null != sisetl && null != sisetl.getSetlId()) {
|
|
|
return getFundDetailResultVo(sisetl);
|
|
|
}
|
|
@@ -357,6 +357,9 @@ public class SiMzFeeService {
|
|
|
fundDetail.setCashPay(String.valueOf(sisetl.getPsnCashPay()));
|
|
|
fundDetail.setAcctPay(String.valueOf(sisetl.getAcctPay()));
|
|
|
fundDetail.setSelfPay(String.valueOf(sisetl.getPsnPartAmt()));
|
|
|
+ if (sisetl.getRevoked() == 1) {
|
|
|
+ fundDetail.reverseAll();
|
|
|
+ }
|
|
|
return ResultVoUtil.success(fundDetail);
|
|
|
}
|
|
|
|
|
@@ -435,17 +438,14 @@ public class SiMzFeeService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
|
|
|
}
|
|
|
|
|
|
- public ResultVo<String> revokeOutpatientSettlement(MzPatientInfo p) {
|
|
|
+ public ResultVo<FundDetail> revokeOutpatientSettlement(MzPatientInfo p) {
|
|
|
if (null == p.getTimes()) {
|
|
|
p.setTimes(mzDao.selectMaxTimes(p.getPatNo()));
|
|
|
}
|
|
|
- QueryWrapper<SiSetlinfo> wrapper = new QueryWrapper<>();
|
|
|
- wrapper.eq("pat_no", p.getPatNo());
|
|
|
- wrapper.eq("times", p.getTimes());
|
|
|
- wrapper.eq("revoked", 0);
|
|
|
- SiSetlinfo setlinfo = setlinfoDao.selectOne(wrapper);
|
|
|
+ SiSetlinfo setlinfo = mzDao.selectSettledInfo(p.getPatNo(), p.getTimes(), 0);
|
|
|
if (null == setlinfo) {
|
|
|
- return ResultVoUtil.success("门诊结算撤销成功。");
|
|
|
+ setlinfo = mzDao.selectSettledInfo(p.getPatNo(), p.getTimes(), 1);
|
|
|
+ return getFundDetailResultVo(setlinfo);
|
|
|
}
|
|
|
JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.REVOKE_OUTPATIENT_SETTLEMENT,
|
|
|
mzDao.selectAdmdvs(setlinfo.getPatNo(), setlinfo.getTimes(), setlinfo.getLedgerSn()), p.getStaffId());
|
|
@@ -468,7 +468,7 @@ public class SiMzFeeService {
|
|
|
mzDao.deleteSetlInfo(p.getPatNo(), p.getTimes());
|
|
|
mzDao.deleteSetlDetail(p.getPatNo(), p.getTimes());
|
|
|
mzDao.updateRvkSetlMsgid(p.getPatNo(), p.getTimes(), input.getString("msgid"));
|
|
|
- return ResultVoUtil.success("门诊结算撤销成功。");
|
|
|
+ return getFundDetailResultVo(setlinfo);
|
|
|
}
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
|
|
|
}
|
|
@@ -496,4 +496,9 @@ public class SiMzFeeService {
|
|
|
revokeOutpatientRegistration(mzPatientInfo);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// public ResultVo<String> uploadClinicRecords() {
|
|
|
+// JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.UPLOAD_CLINIC_RECORDS, "", "99999");
|
|
|
+//
|
|
|
+// }
|
|
|
}
|