|
@@ -39,9 +39,9 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
|
|
|
@Override
|
|
|
public PayInfo uploadFees(String staffId, String patientId, Integer times, Integer receiptNo) {
|
|
|
- String balc = mzPatientMiMapper.selectMztczfsf(patientId,times,null);
|
|
|
+ String balc = mzPatientMiMapper.selectMztczfsf(patientId, times, null);
|
|
|
if (balc == null) {
|
|
|
- return null;
|
|
|
+ return null;
|
|
|
}
|
|
|
log.info("调用医保试算接口,操作人={},病人={},就诊次数={},缴费次数={}", staffId, patientId, times, receiptNo);
|
|
|
String realUrl = tsmzServiceUrl + "/uploadFees";
|
|
@@ -69,7 +69,7 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
payInfo.setCode(-1);
|
|
|
payInfo.setErrorMessage((String) resultJSONO.get("msg"));
|
|
|
return payInfo;
|
|
|
- }else if ((int) resultJSONO.get("code") == -2) {
|
|
|
+ } else if ((int) resultJSONO.get("code") == -2) {
|
|
|
PayInfo payInfo = new PayInfo();
|
|
|
payInfo.setCode(-2);
|
|
|
payInfo.setErrorMessage((String) resultJSONO.get("msg"));
|
|
@@ -122,12 +122,19 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
}
|
|
|
if ((int) resultJSONO.get("code") == 0) {
|
|
|
return getPayInfo(resultJSONO);
|
|
|
- } else if ((int) resultJSONO.get("code") == -1) {
|
|
|
+ }
|
|
|
+ if ((int) resultJSONO.get("code") == -1) {
|
|
|
PayInfo payInfo = new PayInfo();
|
|
|
payInfo.setCode(-1);
|
|
|
payInfo.setErrorMessage((String) resultJSONO.get("msg"));
|
|
|
return payInfo;
|
|
|
}
|
|
|
+ if ((int) resultJSONO.get("code") == -2) {
|
|
|
+ PayInfo payInfo = new PayInfo();
|
|
|
+ payInfo.setCode(-2);
|
|
|
+ payInfo.setErrorMessage((String) resultJSONO.get("msg"));
|
|
|
+ return payInfo;
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
log.error("特殊门诊病人取消费用上传失败,病人id={},就诊次数times={},缴费次数receiptNo={}", patientId, times, receiptNo);
|
|
|
e.printStackTrace();
|
|
@@ -238,7 +245,7 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
int code = (int) resultJSONO.get("code");
|
|
|
String msg = (String) resultJSONO.get("msg");
|
|
|
if (code == 0) {
|
|
|
- String balc = mzPatientMiMapper.selectMztczfsf(patientId,-1,"310");
|
|
|
+ String balc = mzPatientMiMapper.selectMztczfsf(patientId, -1, "310");
|
|
|
if (balc == null) {
|
|
|
resultMap.put("code", -2);
|
|
|
resultMap.put("message", "该患者无门诊共济信息!");
|
|
@@ -267,7 +274,7 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PayInfo directRegistration(String staffId, String patientId, Integer times, String readCardResult, Integer acctUsedFlag,String readCardType) {
|
|
|
+ public PayInfo directRegistration(String staffId, String patientId, Integer times, String readCardResult, Integer acctUsedFlag, String readCardType) {
|
|
|
log.info("调用职工门诊统筹试算接口,操作人={},病人={},就诊次数={}", staffId, patientId, times);
|
|
|
String realUrl = tsmzServiceUrl + "/directRegistration";
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
@@ -276,12 +283,12 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
map.put("patientId", patientId);
|
|
|
map.put("times", times);
|
|
|
map.put("readCardType", readCardType);
|
|
|
- map.put("acctUsedFlag", acctUsedFlag==null?0:acctUsedFlag);
|
|
|
+ map.put("acctUsedFlag", acctUsedFlag == null ? 0 : acctUsedFlag);
|
|
|
map.put("readCardResult", readCardResult);
|
|
|
//Map 转成 JSONObject 字符串
|
|
|
JSONObject jsonObj = new JSONObject(map);
|
|
|
try {
|
|
|
- String result = HttpUtil.sendHttpPost(realUrl, jsonObj.toString(), 20000);
|
|
|
+ String result = HttpUtil.sendHttpPost(realUrl, jsonObj.toString(), 20000);
|
|
|
if (StringUtils.isBlank(result)) {
|
|
|
return null;
|
|
|
}
|
|
@@ -296,7 +303,7 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
payInfo.setCode(-1);
|
|
|
payInfo.setErrorMessage((String) resultJSONO.get("msg"));
|
|
|
return payInfo;
|
|
|
- }else if ((int) resultJSONO.get("code") == -2) {
|
|
|
+ } else if ((int) resultJSONO.get("code") == -2) {
|
|
|
PayInfo payInfo = new PayInfo();
|
|
|
payInfo.setCode(-2);
|
|
|
payInfo.setErrorMessage((String) resultJSONO.get("msg"));
|
|
@@ -312,7 +319,7 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
|
|
|
@Override
|
|
|
@Async("asyncServiceExecutor")
|
|
|
- public void directRegistrationAsync(String staffId, String patientId, Integer times, String readCardResult, Integer acctUsedFlag,String readCardType) {
|
|
|
+ public void directRegistrationAsync(String staffId, String patientId, Integer times, String readCardResult, Integer acctUsedFlag, String readCardType) {
|
|
|
log.info("调用职工门诊统筹试算接口,操作人={},病人={},就诊次数={}", staffId, patientId, times);
|
|
|
String realUrl = tsmzServiceUrl + "/directRegistration";
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
@@ -321,7 +328,7 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
map.put("patientId", patientId);
|
|
|
map.put("times", times);
|
|
|
map.put("readCardType", readCardType);
|
|
|
- map.put("acctUsedFlag", acctUsedFlag==null?0:acctUsedFlag);
|
|
|
+ map.put("acctUsedFlag", acctUsedFlag == null ? 0 : acctUsedFlag);
|
|
|
map.put("readCardResult", readCardResult);
|
|
|
//Map 转成 JSONObject 字符串
|
|
|
JSONObject jsonObj = new JSONObject(map);
|
|
@@ -335,7 +342,7 @@ public class TsmzServiceImpl implements TsmzService {
|
|
|
|
|
|
@Override
|
|
|
public Map<String, BigDecimal> queryYbAmount(String patientId, Integer times) {
|
|
|
- return mzPatientMiMapper.selectYbAmount(patientId,times);
|
|
|
+ return mzPatientMiMapper.selectYbAmount(patientId, times);
|
|
|
}
|
|
|
|
|
|
}
|