瀏覽代碼

医保移动支付要用医保科室编码和名称

lighter 9 月之前
父節點
當前提交
40bcd2ea9f

+ 6 - 7
src/main/java/thyyxxk/simzfeeoprnsystm/dao/MobilePayDao.java

@@ -12,11 +12,10 @@ public interface MobilePayDao extends BaseMapper<MobilePay> {
             "medOrgOrd=rtrim(patient_id)+'_'+cast(times as varchar)+'_1', " +
             "begntime=convert(varchar(19), visit_date, 21), " +
             "iptOtpNo=rtrim(patient_id), " +
-            "atddrNo=rtrim(doctor_code), " +
+            "atddrNo=(select rtrim(d.yb_code) from a_employee_mi d where d.code=doctor_code), " +
             "drName=(select rtrim(d.name) from a_employee_mi d where d.code=doctor_code), " +
-            "deptId=rtrim(visit_dept_code), " +
-            "deptName=(select rtrim(d.name) from zd_unit_code d where d.code=visit_dept_code), " +
-            "caty=(select rtrim(d.si_caty) from zd_unit_code d where d.code=visit_dept_code), " +
+            "deptId=(select d.si_caty from zd_unit_code d where d.code=visit_dept_code), " +
+            "deptName=(select rtrim(d.si_caty_name) from zd_unit_code d where d.code=visit_dept_code), " +
             "feeType='01', " +
             "medfeeSumamt=(select cast(sum(d.charge_fee) as decimal(16,2)) from t_mt_receipt d where d.patient_id=#{patNo} and d.times=#{times}), " +
             "acctUsedFlag='1', " +
@@ -44,15 +43,15 @@ public interface MobilePayDao extends BaseMapper<MobilePay> {
             "quantity as cnt, price as pric,hospApprFlag='1', " +
             "bilgDrCodg=(select rtrim(yb_code) from a_employee_mi where code=input_staff), " +
             "input_man as bilgDrName,medListName=a.his_item_name, " +
-            "bilgDeptCodg=rtrim(b.visit_dept_code), " +
-            "bilgDeptName=(select rtrim(d.name) from zd_unit_code d where d.code=b.visit_dept_code) " +
+            "bilgDeptCodg=(select d.si_caty from zd_unit_code d where d.code=b.visit_dept_code), " +
+            "bilgDeptName=(select rtrim(d.si_caty_name) from zd_unit_code d where d.code=b.visit_dept_code) " +
             "from t_mt_receipt a, mz_visit_table b " +
             "where a.patient_id=#{patNo} and a.times=#{times} " +
             "and b.patient_id=a.patient_id and b.times=a.times")
     List<Feedetail> selectMpFees(@Param("patNo") String patNo, @Param("times") int times);
 
     @Select("select icd_code_new as icdCode,icd_text_new as icdName," +
-            "visit_date,drCode=rtrim(doctor_code)," +
+            "visit_date,drCode=(select rtrim(d.yb_code) from a_employee_mi d where d.code=doctor_code)," +
             "drName=(select rtrim(d.name) from a_employee_mi d where d.code=doctor_code) " +
             "from mz_visit_table where patient_id=#{patNo} and times=#{times}")
     VisitTableIcd selectMzVisitIcd(@Param("patNo") String patNo, @Param("times") int times);

+ 1 - 0
src/main/java/thyyxxk/simzfeeoprnsystm/service/MobilePayService.java

@@ -41,6 +41,7 @@ public class MobilePayService {
             throw new Exception("mz_visit_table患者信息为空,请联系医生重开处方。");
         }
         upload6201.setMedType("11");
+        upload6201.setCaty(upload6201.getDeptId());
         List<Diseinfo> diseinfoList = dao.selectMpDiseinfos(request.getPatNo(), request.getTimes());
         if (diseinfoList.isEmpty()) {
             VisitTableIcd icd = dao.selectMzVisitIcd(request.getPatNo(), request.getTimes());

+ 6 - 0
src/main/java/thyyxxk/simzfeeoprnsystm/service/SiMzFeeService.java

@@ -665,6 +665,12 @@ public class SiMzFeeService {
         mzptnt.setAcctUsedFlag(param.getAcctUsedFlag());
         mzptnt.setStraitSettle(param.getStraitSettle());
 
+        // 生成医保费用
+        String mzReceipts = generateSiMzFees(mzptnt);
+        if (!mzReceipts.equals("SUCCESS")) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, mzReceipts);
+        }
+
         // 填充医保基本信息
         SiPatInfo siPatInfo = mzDao.selectSiPatInfoForMz(mzptnt.getPatNo(), mzptnt.getTimes());
         mzptnt.setInsuplcAdmdvs(siPatInfo.getInsuplcAdmdvs());

+ 15 - 7
src/main/java/thyyxxk/simzfeeoprnsystm/utils/SiUtil.java

@@ -61,14 +61,22 @@ public class SiUtil {
 
     public static HttpHeaders getHttpHeaders(SiFunction function) {
         String timestamp = String.valueOf(System.currentTimeMillis());
+        String signature = getSignature(timestamp, function.getCode());
         HttpHeaders headers = new HttpHeaders();
-        headers.add("_api_access_key", apiAccessKey);
-        headers.add("_api_secreKey", apiSecretKey);
-        headers.add("_api_name", REQ_HEADER_PREFIX + function.getCode());
-        headers.add("_api_version", API_VERSION);
-        headers.add("_api_timestamp", timestamp);
-        headers.add("_api_signature", getSignature(timestamp, function.getCode()));
-        headers.add("Content-Type", "application/json");
+//        headers.add("_api_access_key", apiAccessKey);
+//        headers.add("_api_secreKey", apiSecretKey);
+//        headers.add("_api_name", REQ_HEADER_PREFIX + function.getCode());
+//        headers.add("_api_version", API_VERSION);
+//        headers.add("_api_timestamp", timestamp);
+//        headers.add("_api_signature", getSignature(timestamp, function.getCode()));
+//        headers.add("Content-Type", "application/json");
+
+        headers.add("apiAccessKey", apiAccessKey);
+        headers.add("apiSecreKey", apiSecretKey);
+        headers.add("apiName", function.getCode());
+        headers.add("apiVersion", API_VERSION);
+        headers.add("apiTimestamp", timestamp);
+        headers.add("apiSignature", signature);
         return headers;
     }
 

+ 57 - 0
src/main/resources/application-dev.yml

@@ -0,0 +1,57 @@
+server:
+  port: 1100
+  servlet:
+    encoding:
+      charset: UTF-8
+      force: true
+      enabled: true
+  tomcat:
+    uri-encoding: UTF-8
+
+spring:
+  thymeleaf:
+    cache: false
+  datasource:
+    dynamic:
+      primary: his
+      strict: false
+      datasource:
+        his:
+          url: "jdbc:sqlserver://172.16.32.168:1433;databaseName=thxyhisdb"
+          username: "sa"
+          password:
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+        thmz:
+          url: "jdbc:mariadb://172.16.32.160:3306/thyy_mz_system?useUnicode=true&characterEncoding=utf-8"
+          username: "root"
+          password: "thyy@2018"
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "org.mariadb.jdbc.Driver"
+    hikari:
+      minimum-idle: 3
+      idle-timeout: 180000
+      maximum-pool-size: 10
+      auto-commit: true
+      pool-name: lisDbPool
+      connection-timeout: 30000
+      connection-test-query: select 1
+  jackson:
+    time-zone: GMT+8
+    date-format: yyyy-MM-dd HH:mm:ss
+forest:
+  timeout: 0
+  read-timeout: 0
+  log-enabled: false
+  log-request: false
+  log-response-status: false
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+
+#正式环境
+si-api-url: http://webhis.thyy.cn:8077/ybjkdz
+si-access-key: 04eMGRg7beAO6vqwrZiLacV8Uy3jNn7QGDUcBO
+si-secret-key: SK3Oip3a2R3NLz2xm58Mpmi69oFu96KrdKNRKglN
+web-his-url: http://172.16.32.160:8077
+thmz-url: http://172.16.32.160:81/thmz