|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
+import thyyxxk.sizyfeeoprnsystm.dao.SiLogDao;
|
|
|
import thyyxxk.sizyfeeoprnsystm.dao.SiZyDao;
|
|
|
import thyyxxk.sizyfeeoprnsystm.dicts.MdtrtCertType;
|
|
|
import thyyxxk.sizyfeeoprnsystm.dicts.PsnSetlWay;
|
|
@@ -30,13 +31,15 @@ public class SiZyFeeService {
|
|
|
private static final String ERROR_MESSAGE = "err_msg";
|
|
|
private static final String OUTPUT = "output";
|
|
|
private final SiZyDao zyDao;
|
|
|
+ private final SiLogDao logDao;
|
|
|
private final ExecService exec;
|
|
|
@Value("${upld-notify-url}")
|
|
|
private String upldNotifyUrl;
|
|
|
|
|
|
@Autowired
|
|
|
- public SiZyFeeService(SiZyDao zyDao, ExecService exec) {
|
|
|
+ public SiZyFeeService(SiZyDao zyDao, SiLogDao logDao, ExecService exec) {
|
|
|
this.zyDao = zyDao;
|
|
|
+ this.logDao = logDao;
|
|
|
this.exec = exec;
|
|
|
}
|
|
|
|
|
@@ -243,10 +246,12 @@ public class SiZyFeeService {
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
JSONObject setlinfo = result.getJSONObject(OUTPUT).getJSONObject("setlinfo");
|
|
|
String fundPay = setlinfo.getString("fund_pay_sumamt");
|
|
|
if (DecimalUtil.compare(fundPay, p.getTotalCharge()) == 1) {
|