|
@@ -576,14 +576,20 @@ public class SiZyService {
|
|
|
Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, siPatInfo.getPsnNo()));
|
|
|
if (null == infcode) {
|
|
|
- return revokeDischarge(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (infcode == 0) {
|
|
|
+ String errMsg = null;
|
|
|
+ if (infcode != 0) {
|
|
|
+ errMsg = result.getString("err_msg");
|
|
|
+ }
|
|
|
+ ResultVo<String> rvkDischrgRslt = revokeDischarge(p);
|
|
|
+ if (rvkDischrgRslt.getCode() == ExceptionEnum.SUCCESS.getCode()) {
|
|
|
dao.updateRvkSetlMsgid(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), input.getString("msgid"));
|
|
|
setlinfodao.updateApplySettled(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), YesOrNo.NO.getCode());
|
|
|
transbackTables(p);
|
|
|
+ return rvkDischrgRslt;
|
|
|
}
|
|
|
- return revokeDischarge(p);
|
|
|
+ return null == errMsg ? rvkDischrgRslt : ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, errMsg);
|
|
|
}
|
|
|
|
|
|
private void transbackTables(ZyPatientInfo p) {
|