Pārlūkot izejas kodu

优化移动医保支付获取体检

lighter 4 mēneši atpakaļ
vecāks
revīzija
d4d1294299

+ 5 - 9
src/main/java/thyyxxk/wxservice_server/controller/api/PowersiMiPayPlugin.java

@@ -128,14 +128,10 @@ public class PowersiMiPayPlugin {
                 if (billInfo.getVipFlag() != 0) {
                     continue;
                 }
-                String url = hisMipApi + "/writeMtReceipt?hisOrdNum=" + billInfo.getBizId();
-                String writeMtReceipt = new RestTemplate().getForObject(url, String.class);
-                if (Objects.equals(writeMtReceipt, "SUCCESS")) {
-                    billInfo.setIdNo(request.getString("idNo"));
-                    billInfo.setIdType(request.getString("idType"));
-                    billInfo.setDeptId(dao.selectDeptId(billInfo.getDeptName()));
-                    list.add(billInfo);
-                }
+                billInfo.setIdNo(request.getString("idNo"));
+                billInfo.setIdType(request.getString("idType"));
+                billInfo.setDeptId(dao.selectDeptId(billInfo.getDeptName()));
+                list.add(billInfo);
             }
         }
         if (list.isEmpty()) {
@@ -170,9 +166,9 @@ public class PowersiMiPayPlugin {
             res.put("message", "bizId[" + bizId + "]不正确!");
             return res;
         }
+
         request.put("patNo", arr[0]);
         request.put("times", Integer.parseInt(arr[1]));
-
         Upload6201 upload6201 = new RestTemplate().postForObject(hisMipApi + "/getUpload6201", request, Upload6201.class);
         if (null == upload6201) {
             JSONObject res = new JSONObject();

+ 1 - 1
src/main/java/thyyxxk/wxservice_server/dao/api/PowersiPluginDao.java

@@ -26,7 +26,7 @@ public interface PowersiPluginDao extends BaseMapper<PowersiMipSetlinfo> {
             "openid=#{openid},ybzf=1 where his_order_num=#{hisOrdNum}")
     void lockYbOrder(String hisOrdNum, String openid, int flag);
 
-    @Select("select rtrim(patient_id) from mz_patient_mi where social_no=#{id}")
+    @Select("select top 2 patient_id from mz_patient_mi where social_no={id} order by lv_date desc")
     List<String> selectPatientCount(String id);
 
     @Select("select top 1 rtrim(code) from zd_unit_code " +