瀏覽代碼

出院后删除门禁信息

lighter 9 月之前
父節點
當前提交
51edeba78e

+ 14 - 0
src/main/java/thyyxxk/webserver/service/inpatient/DismissService.java

@@ -41,6 +41,8 @@ public class DismissService {
     private String siZyFeeUrl;
     @Value("${si-injury-fee-url}")
     private String siInjuryFeeUrl;
+    @Value("${rmHkUserApi}")
+    private String rmHkUserApi;
 
     @Autowired
     public DismissService(DismissDao dao, SiZySrvc zySrvc, SiInjuryFeeUpld injuryFeeUpld) {
@@ -428,9 +430,21 @@ public class DismissService {
             exception.setMessage("更新住院状态失败。" + code);
             throw new BizException(exception);
         }
+        destructionUser(settleFee);
         return "OK";
     }
 
+    private void destructionUser(MedinsSettleFee settle) {
+        try {
+            JSONObject obj = new JSONObject();
+            obj.put("patNo", settle.getInpatientNo());
+            obj.put("times", settle.getAdmissTimes());
+            new RestTemplate().postForObject(rmHkUserApi, obj, String.class);
+        } catch (Exception e) {
+            log.error("删除患者门禁出错", e);
+        }
+    }
+
     private int writeReceiptTable(MedinsSettleFee indata) {
         if (dao.beforeWriteReceiptTable(indata.getInpatientNo(), indata.getAdmissTimes(),
                 indata.getLedgerSn()) < 1) {

+ 2 - 1
src/main/resources/application-dev.yml

@@ -146,8 +146,9 @@ si-zy-fee-url: http://172.16.30.26:1000
 si-mz-fee-url: http://172.16.30.26:1100/mzFee
 si-injury-fee-url: http://172.16.30.26:2100/siInjury
 si-injury-systm-url: http://172.16.30.26:2000/siInjury
-thmz-api-url: http://172.16.30.119:8089/thmz/api/v1
+thmz-api-url: http://172.16.30.99:8089/thmz/api/v1
 appletThmzUrl: http://demo.hnthyy.cn:8089/thmz
+rmHkUserApi: http://172.16.30.66:20923/thyy/api/haikang/door/destructionUser
 
 thyy:
   ca:

+ 1 - 0
src/main/resources/application-prod.yml

@@ -148,6 +148,7 @@ si-injury-fee-url: http://172.16.32.163:2100/siInjury
 si-injury-systm-url: http://172.16.32.163:2000/siInjury
 thmz-api-url: http://172.16.32.160:81/thmz/api/v1
 appletThmzUrl: http://172.16.32.160:81/thmz
+rmHkUserApi: http://172.16.32.167:20923/thyy/api/haikang/door/destructionUser
 
 thyy:
   archive:

+ 1 - 0
src/main/resources/application-show.yml

@@ -102,3 +102,4 @@ si-injury-fee-url: http://localhost:2100/siInjury
 si-injury-systm-url: http://localhost:2000/siInjury
 thmz-api-url: http://demo.hnthyy.cn:8089/thmz/api/v1
 appletThmzUrl: http://demo.hnthyy.cn:8089/thmz
+rmHkUserApi: http://172.16.30.66:20923/thyy/api/haikang/door/destructionUser