Ver Fonte

推荐人挂号

lighter há 2 meses atrás
pai
commit
6b02549cec

+ 19 - 0
src/main/java/thyyxxk/wxservice_server/controller/WeChatRedirectController.java

@@ -90,6 +90,8 @@ public class WeChatRedirectController {
             dao.deleteOldLoginRecord(id);
             dao.insertSelfMachineLogin(id);
         }
+        // 推荐人预约挂号链接。2801为推荐人工号,根据真实情况自行修改。
+        // https://huaihai-tech.com/wxservice/pathEntry?path=appointment_recStaff-2801
         try {
             response.sendRedirect("https://open.weixin.qq.com/connect/oauth2/authorize?" +
                     "appid=wx85bf3fd255d86750&redirect_uri=http://huaihai-tech.com/wxserver/redirect/page2?" +
@@ -99,6 +101,23 @@ public class WeChatRedirectController {
         }
     }
 
+    @PassToken
+    @GetMapping("/pathEntry2")
+    public void pathEntry2(@RequestParam("path") String path, HttpServletResponse response) {
+        if (path.startsWith("selfMachineLogin")) {
+            String id = path.split("_")[1];
+            dao.deleteOldLoginRecord(id);
+            dao.insertSelfMachineLogin(id);
+        }
+        try {
+            response.sendRedirect("https://open.weixin.qq.com/connect/oauth2/authorize?" +
+                    "appid=wxbde6b16acad84204&redirect_uri=http://staticweb.hnthyy.cn/wxserver/redirect/page2?" +
+                    "to=" + path + "&response_type=code&scope=snsapi_base&state=1#wechat_redirect");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
     @PassToken
     @GetMapping("/expertReg")
     public void expertReg(@RequestParam("doc") String doc, HttpServletResponse response) {

+ 2 - 2
src/main/java/thyyxxk/wxservice_server/dao/WxApiDao.java

@@ -37,13 +37,13 @@ public interface WxApiDao {
             "create_datetime,trade_state,serial_no,order_type,his_ord_num," +
             "mzy_request_id,yj_req_no,his_status,query_state_times,ap_time," +
             "fundpay_amt,acctpay_amt,coupon_amt,cashpay_amt,coupon_id,sgl_check_id," +
-            "sgl_check_notified,drug_purchase_id,wxmall_package_id) " +
+            "sgl_check_notified,drug_purchase_id,wxmall_package_id,rec_staff) " +
             "values (#{body},#{openid},#{totalFee},#{patientId},#{patientName},#{inpatientNo}," +
             "#{admissTimes},#{appId},#{mchId},#{prepayId},#{timeStamp},#{tradeNo},#{createOrderSign}," +
             "#{paySign},#{spbillCreateIp},#{createDatetime},#{tradeState},#{serialNo},#{orderType}," +
             "#{hisOrdNum},#{mzyRequestId},#{yjReqNo},0,0,#{apTime},#{fundpayAmt}," +
             "#{acctpayAmt},#{couponAmt},#{cashpayAmt},#{couponId},#{sglCheckId}," +
-            "#{sglCheckNotified},#{drugPurchaseId},#{wxmallPackageId})")
+            "#{sglCheckNotified},#{drugPurchaseId},#{wxmallPackageId},#{recStaff})")
     void insertNewOrder(WxPayOrder param);
 
     @Select("select * from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=0")

+ 2 - 0
src/main/java/thyyxxk/wxservice_server/entity/appointment/MzyReqrec.java

@@ -46,6 +46,8 @@ public class MzyReqrec {
      * */
     private String agtordnum;
 
+    private String recStaff;
+
     public String getPaymode() {
         return StringUtil.isBlank(paymode) ? null : paymode;
     }

+ 2 - 0
src/main/java/thyyxxk/wxservice_server/entity/wxapi/WxPayOrder.java

@@ -1,5 +1,6 @@
 package thyyxxk.wxservice_server.entity.wxapi;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.wechat.pay.java.service.payments.model.Transaction;
 import lombok.Data;
@@ -63,6 +64,7 @@ public class WxPayOrder {
     private Boolean sglCheckNotified;
     private String drugPurchaseId;
     private String wxmallPackageId;
+    private String recStaff;
 
     public Boolean sglCheckNotNotified() {
         return orderType == OrderType.INSPECTIONS.getCode()

+ 19 - 9
src/main/java/thyyxxk/wxservice_server/factory/thmz/model/SaveAppointmentRequest.java

@@ -10,20 +10,22 @@ import java.math.BigDecimal;
 public class SaveAppointmentRequest {
     @Setter
     private MzyReqrec mzyReqrec;
-    private Integer mzyRequestId;
-    private BigDecimal totalFee;
-    private BigDecimal fundpayAmt;
-    private BigDecimal acctpayAmt;
-    private BigDecimal couponAmt;
-    private BigDecimal cashpayAmt;
-
-    public SaveAppointmentRequest(Integer mzyRequestId, BigDecimal totalFee, BigDecimal fundpayAmt, BigDecimal acctpayAmt, BigDecimal couponAmt, BigDecimal cashpayAmt) {
+    private final Integer mzyRequestId;
+    private final BigDecimal totalFee;
+    private final BigDecimal fundpayAmt;
+    private final BigDecimal acctpayAmt;
+    private final BigDecimal couponAmt;
+    private final BigDecimal cashpayAmt;
+    private final String recStaff;
+
+    public SaveAppointmentRequest(Integer mzyRequestId, BigDecimal totalFee, BigDecimal fundpayAmt, BigDecimal acctpayAmt, BigDecimal couponAmt, BigDecimal cashpayAmt, String recStaff) {
         this.mzyRequestId = mzyRequestId;
         this.totalFee = totalFee;
         this.fundpayAmt = fundpayAmt;
         this.acctpayAmt = acctpayAmt;
         this.couponAmt = couponAmt;
         this.cashpayAmt = cashpayAmt;
+        this.recStaff = recStaff;
     }
 
     public static class Builder {
@@ -37,6 +39,7 @@ public class SaveAppointmentRequest {
         private String psordnum;
         private String agtordnum;
         private String apTime;
+        private String recStaff;
 
 
         public Builder mzyRequestId(Integer mzyRequestId) {
@@ -89,14 +92,21 @@ public class SaveAppointmentRequest {
             return this;
         }
 
+        public Builder recStaff(String recStaff) {
+            this.recStaff = recStaff;
+            return this;
+        }
+
         public SaveAppointmentRequest build() {
-            SaveAppointmentRequest request = new SaveAppointmentRequest(mzyRequestId, totalFee, fundpayAmt, acctpayAmt, couponAmt, cashpayAmt);
+            SaveAppointmentRequest request = new SaveAppointmentRequest(mzyRequestId, totalFee, fundpayAmt,
+                    acctpayAmt, couponAmt, cashpayAmt, recStaff);
             MzyReqrec mzyReqrec = new MzyReqrec();
             mzyReqrec.setPaymode("WX");
             mzyReqrec.setPatientId(this.patientId);
             mzyReqrec.setPsordnum(this.psordnum);
             mzyReqrec.setAgtordnum(this.agtordnum);
             mzyReqrec.setApTime(this.apTime);
+            mzyReqrec.setRecStaff(this.recStaff);
             request.setMzyReqrec(mzyReqrec);
             return request;
         }

+ 2 - 1
src/main/java/thyyxxk/wxservice_server/service/SavePayResultService.java

@@ -97,7 +97,8 @@ public class SavePayResultService {
                 .totalFee(order.getTotalFee()).fundpayAmt(order.getFundpayAmt())
                 .acctpayAmt(order.getAcctpayAmt()).couponAmt(order.getCouponAmt())
                 .cashpayAmt(order.getCashpayAmt()).psordnum(order.getTradeNo())
-                .agtordnum(order.getSerialNo()).apTime(order.getApTime()).build();
+                .agtordnum(order.getSerialNo()).apTime(order.getApTime())
+                .recStaff(order.getRecStaff()).build();
         String saveAppointmentResponse = thmzService.saveAppointment(request);
         return afterSaveAllAppointment(saveAppointmentResponse, order, payTime);
     }

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

@@ -44,7 +44,7 @@ mybatis-plus:
 thyy:
   api-addr:
     his-mip-api: http://172.16.30.26:1100/mobilePayApi
-    thmz-api: http://demo.hnthyy.cn:8089//thmz
+    thmz-api: http://172.16.30.119:8089//thmz
     chronic-api: http://172.16.32.160:8077/chronicDisease
     physical-check-api: http://172.16.32.183:8888/bdp/dataservice/api
     add-face-api: http://172.16.30.66:20923/thyy/api/haikang/door/addFaceRecognition