|
@@ -469,32 +469,35 @@ public class SiZyService {
|
|
|
setldetldao.insert(setldetailEntity);
|
|
|
}
|
|
|
|
|
|
- InstStlLdgChk ldgChk = new InstStlLdgChk();
|
|
|
- ldgChk.setInsutype(setlEntity.getInsutype());
|
|
|
- ldgChk.setClrType(ClrType.INPATIENT.getCode());
|
|
|
- ldgChk.setSetlOptins(setlEntity.getClrOptins());
|
|
|
- ldgChk.setStmtBegndate(setlEntity.getSetlTime());
|
|
|
- ldgChk.setStmtEnddate(setlEntity.getSetlTime());
|
|
|
- ResultVo<String> totalLedgerCheck = manageService.institutionSettlementLedgerCheck(ldgChk);
|
|
|
- if (totalLedgerCheck.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
- InsSetlDetlChk detlChk = new InsSetlDetlChk();
|
|
|
- detlChk.setSetlOptins(ldgChk.getSetlOptins());
|
|
|
- detlChk.setStmtBegndate(ldgChk.getStmtBegndate());
|
|
|
- detlChk.setStmtEnddate(ldgChk.getStmtEnddate());
|
|
|
- detlChk.setClrType(ldgChk.getClrType());
|
|
|
- detlChk.setRefdSetlFlag(YesOrNo.NO.getCodeStr());
|
|
|
- ResultVo<List<InsSetlDetlChkRslt>> detailLedgerCheck = manageService.institutionSettlementDetailCheck(detlChk);
|
|
|
- if (detailLedgerCheck.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
- revokeSettlement(p);
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, detailLedgerCheck.getMessage());
|
|
|
- }
|
|
|
- for (InsSetlDetlChkRslt insSetlDetlChkRslt : detailLedgerCheck.getData()) {
|
|
|
- if (Objects.equals(insSetlDetlChkRslt.getSetlId(), setlEntity.getSetlId())) {
|
|
|
- if (!Objects.equals(insSetlDetlChkRslt.getStmtRslt(), "0")) {
|
|
|
- revokeSettlement(p);
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, insSetlDetlChkRslt.getMemo());
|
|
|
+ // 跨省异地数据、省内异地数据、已退费数据不参与对账,对总账时无需统计进去。
|
|
|
+ if (setlEntity.getClrOptins().startsWith("4301")) {
|
|
|
+ InstStlLdgChk ldgChk = new InstStlLdgChk();
|
|
|
+ ldgChk.setInsutype(setlEntity.getInsutype());
|
|
|
+ ldgChk.setClrType(ClrType.INPATIENT.getCode());
|
|
|
+ ldgChk.setSetlOptins(setlEntity.getClrOptins());
|
|
|
+ ldgChk.setStmtBegndate(setlEntity.getSetlTime());
|
|
|
+ ldgChk.setStmtEnddate(setlEntity.getSetlTime());
|
|
|
+ ResultVo<String> totalLedgerCheck = manageService.institutionSettlementLedgerCheck(ldgChk);
|
|
|
+ if (totalLedgerCheck.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ InsSetlDetlChk detlChk = new InsSetlDetlChk();
|
|
|
+ detlChk.setSetlOptins(ldgChk.getSetlOptins());
|
|
|
+ detlChk.setStmtBegndate(ldgChk.getStmtBegndate());
|
|
|
+ detlChk.setStmtEnddate(ldgChk.getStmtEnddate());
|
|
|
+ detlChk.setClrType(ldgChk.getClrType());
|
|
|
+ detlChk.setRefdSetlFlag(YesOrNo.NO.getCodeStr());
|
|
|
+ ResultVo<List<InsSetlDetlChkRslt>> detailLedgerCheck = manageService.institutionSettlementDetailCheck(detlChk);
|
|
|
+ if (detailLedgerCheck.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ revokeSettlement(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, detailLedgerCheck.getMessage());
|
|
|
+ }
|
|
|
+ for (InsSetlDetlChkRslt insSetlDetlChkRslt : detailLedgerCheck.getData()) {
|
|
|
+ if (Objects.equals(insSetlDetlChkRslt.getSetlId(), setlEntity.getSetlId())) {
|
|
|
+ if (!Objects.equals(insSetlDetlChkRslt.getStmtRslt(), "0")) {
|
|
|
+ revokeSettlement(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, insSetlDetlChkRslt.getMemo());
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
}
|
|
|
}
|