|
@@ -33,6 +33,10 @@ public class SelfpayService {
|
|
|
this.exec = exec;
|
|
|
}
|
|
|
|
|
|
+ public void resetSelfUpladStatus(BriefLedgerFile ledgerFile) {
|
|
|
+ dao.resetSelfUploadStatus(ledgerFile);
|
|
|
+ }
|
|
|
+
|
|
|
public JSONObject uploadSelfpayMedfee(BriefLedgerFile ledgerFile) {
|
|
|
FmiOwnpayPatnDise dise = dao.selectPatnDise(ledgerFile.getPatNo(), ledgerFile.getTimes());
|
|
|
if (null == dise) {
|
|
@@ -67,7 +71,19 @@ public class SelfpayService {
|
|
|
array.add(JSONObject.parseObject(JSONObject.toJSONString(dise)));
|
|
|
input.put("fmiOwnpayPatnDiseListDDTOS", array);
|
|
|
Queue<FmiOwnpayPatnFee> fees = dao.selectOwnpayFees(ledgerFile);
|
|
|
- return executeBatchUpload(ledgerFile.getPatNo(), ledgerFile.getTimes(), input, fees);
|
|
|
+
|
|
|
+ JSONObject uploadResult = executeBatchUpload(ledgerFile.getPatNo(), ledgerFile.getTimes(), input, fees);
|
|
|
+ if (null != uploadResult
|
|
|
+ && null != uploadResult.getInteger("code")
|
|
|
+ && uploadResult.getInteger("code") == 0) {
|
|
|
+ ledgerFile.setSelfpayUploaded(1);
|
|
|
+ dao.updateLedgerFileUploaded(ledgerFile);
|
|
|
+ } else {
|
|
|
+ log.error("【{}】自费病人费用明细信息上传失败:{}", ledgerFile, uploadResult);
|
|
|
+ ledgerFile.setSelfpayUploaded(2);
|
|
|
+ dao.updateLedgerFileUploaded(ledgerFile);
|
|
|
+ }
|
|
|
+ return uploadResult;
|
|
|
}
|
|
|
|
|
|
private JSONObject executeBatchUpload(String patNo, int times, JSONObject input, Queue<FmiOwnpayPatnFee> fees) {
|