|
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.constants.sidicts.*;
|
|
|
import thyyxxk.webserver.constants.YesOrNo;
|
|
|
+import thyyxxk.webserver.dao.his.inpatient.PatientDao;
|
|
|
import thyyxxk.webserver.dao.his.medicalinsurance.*;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.inpatient.patient.NotUploadedFee;
|
|
@@ -41,6 +42,7 @@ public class SiZyService {
|
|
|
private static final String ERROR_MESSAGE = "err_msg";
|
|
|
private static final String OUTPUT = "output";
|
|
|
private final SiZyDao dao;
|
|
|
+ private final PatientDao patientDao;
|
|
|
private final SiQueryService queryService;
|
|
|
private final SiQueryDao queryDao;
|
|
|
private final SiSetlinfoDao setlinfodao;
|
|
@@ -55,10 +57,11 @@ public class SiZyService {
|
|
|
private String siZyFeeUrl;
|
|
|
|
|
|
@Autowired
|
|
|
- public SiZyService(SiZyDao dao, SiQueryService queryService, SiQueryDao queryDao, SiSetlinfoDao setlinfoDao,
|
|
|
+ public SiZyService(SiZyDao dao, PatientDao patientDao, SiQueryService queryService, SiQueryDao queryDao, SiSetlinfoDao setlinfoDao,
|
|
|
SiSetldetailDao setldetldao, SiChargeTempDao chrgtmpdao, SiLogDao logDao, ExecService exec,
|
|
|
DismissService dismissService, SiZySrvc zySrvc, SiManageService manageService) {
|
|
|
this.dao = dao;
|
|
|
+ this.patientDao = patientDao;
|
|
|
this.queryService = queryService;
|
|
|
this.queryDao = queryDao;
|
|
|
this.setlinfodao = setlinfoDao;
|
|
@@ -277,6 +280,13 @@ public class SiZyService {
|
|
|
JSONObject setlinfo = result.getJSONObject(OUTPUT).getJSONObject("setlinfo");
|
|
|
String fundPay = setlinfo.getString("fund_pay_sumamt");
|
|
|
dao.updateFundPay(fundPay, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
+ patientDao.recountDeposit(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
+ patientDao.updateBalance(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
+ String balance = patientDao.selectLedgerBalance(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
+ if (StringUtil.isBlank(balance)) {
|
|
|
+ balance = "0";
|
|
|
+ }
|
|
|
+ patientDao.updateZyActPatientBalance(p.getInpatientNo(), balance);
|
|
|
String message = "患者【" + p.getName() + "】院内总费用与医保中心总费用一致,医保报销金额为:¥ " + fundPay + "。";
|
|
|
return ResultVoUtil.success(message);
|
|
|
}
|