浏览代码

服务号接口地址换成https

lighter 1 年之前
父节点
当前提交
5a49399c1a

+ 0 - 38
src/main/java/thyyxxk/webserver/controller/outpatient/mzpayqrcode/MzPayQrcodeController.java

@@ -1,38 +0,0 @@
-package thyyxxk.webserver.controller.outpatient.mzpayqrcode;
-
-import com.alibaba.fastjson.JSONObject;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import thyyxxk.webserver.config.auth.PassToken;
-import thyyxxk.webserver.entity.ResultVo;
-import thyyxxk.webserver.entity.mzpayqrcode.RoughIndex;
-import thyyxxk.webserver.service.mzpayqrcode.MzPayQrcodeService;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author dj
- */
-@RestController
-@RequestMapping("/mzPayQrCode")
-public class MzPayQrcodeController {
-    private final MzPayQrcodeService service;
-
-    @Autowired
-    public MzPayQrcodeController(MzPayQrcodeService service) {
-        this.service = service;
-    }
-
-    @GetMapping("/getRoughList")
-    public ResultVo<List<Map<String, String>>> getRoughList(@RequestParam("patientId") String patientId) {
-        return service.getRoughList(patientId);
-    }
-
-    @PassToken
-    @PostMapping("/getDetailFees")
-    public ResultVo<JSONObject> getDetailFees(@RequestBody RoughIndex param) {
-        return service.getDetailFees(param);
-    }
-
-}

+ 0 - 11
src/main/java/thyyxxk/webserver/dao/his/outpatient/MzPayQrcodeDao.java

@@ -1,11 +0,0 @@
-package thyyxxk.webserver.dao.his.outpatient;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-@Mapper
-public interface MzPayQrcodeDao {
-    @Select("select ltrim(rtrim(social_no)) from mz_patient_mi where patient_id=#{patientId}")
-    String selectSocialNoByPatientId(@Param("patientId") String patientId);
-}

+ 0 - 20
src/main/java/thyyxxk/webserver/entity/mzpayqrcode/PatInfo.java

@@ -1,20 +0,0 @@
-package thyyxxk.webserver.entity.mzpayqrcode;
-
-import lombok.Data;
-
-@Data
-public class PatInfo {
-    private String patMobile;
-    private String patCardNo;
-    private Integer resultCode;
-    private String patSex;
-    private Integer patIdType;
-    private String patName;
-    private String patHisNo;
-    private Integer patCardType;
-    private String inPatientNo;
-    private Integer patAge;
-    private String patBirth;
-    private String patAddress;
-    private String patIdNo;
-}

+ 0 - 16
src/main/java/thyyxxk/webserver/entity/mzpayqrcode/RoughIndex.java

@@ -1,16 +0,0 @@
-package thyyxxk.webserver.entity.mzpayqrcode;
-
-import lombok.Data;
-
-@Data
-public class RoughIndex {
-    private String patientId;
-    private String deptName;
-    private String doctorName;
-    private Integer totalAmt;
-    private String patName;
-    private Integer selfAmt;
-    private String payName;
-    private String priceTime;
-    private String hisOrdNum;
-}

+ 2 - 2
src/main/java/thyyxxk/webserver/service/externalhttp/WxServer.java

@@ -17,9 +17,9 @@ public interface WxServer {
      * @param: obj
      * @return: com.alibaba.fastjson.JSONObject
      **/
-    @Post(url = "http://192.168.200.3/wxserver/wxApi/pushMessage")
+    @Post(url = "https://staticweb.hnthyy.cn/wxserver/wxApi/pushMessage")
     JSONObject pushMessagePreBedNo(@JSONBody JSONObject obj);
 
-    @Post(url = "http://192.168.200.3/wxserver/wxApi/pushMessage2")
+    @Post(url = "https://staticweb.hnthyy.cn/wxserver/wxApi/pushMessage2")
     String pushMessage2(@JSONBody JSONObject obj);
 }

+ 0 - 136
src/main/java/thyyxxk/webserver/service/mzpayqrcode/MzPayQrcodeService.java

@@ -1,136 +0,0 @@
-package thyyxxk.webserver.service.mzpayqrcode;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.web.client.RestTemplate;
-import thyyxxk.webserver.config.exception.ExceptionEnum;
-import thyyxxk.webserver.constants.Capacity;
-import thyyxxk.webserver.dao.his.outpatient.MzPayQrcodeDao;
-import thyyxxk.webserver.entity.ResultVo;
-import thyyxxk.webserver.entity.mzpayqrcode.PatInfo;
-import thyyxxk.webserver.entity.mzpayqrcode.RoughIndex;
-import thyyxxk.webserver.service.externalhttp.ThmzSystem;
-import thyyxxk.webserver.utils.*;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author dj
- */
-@Slf4j
-@Service
-public class MzPayQrcodeService {
-    private final MzPayQrcodeDao dao;
-    private static final String MZ_PAY_QRCODE_URL = "http://192.168.200.3/wxserver/wxApi/genMzPayQrcode";
-    private static final int MIN_PATIENT_ID_LENGTH = 7;
-    private final ThmzSystem thmz;
-    @Value("${thmz-api-url}")
-    private String thmzApiUrl;
-
-    @Autowired
-    public MzPayQrcodeService(MzPayQrcodeDao dao, ThmzSystem thmz) {
-        this.dao = dao;
-        this.thmz = thmz;
-    }
-
-    private PatInfo getPatientInfo(String patientId) {
-        String socialNo = dao.selectSocialNoByPatientId(patientId);
-        JSONObject obj = new JSONObject();
-        obj.put("patIdType", 11);
-        obj.put("patIdNo", socialNo);
-        return thmz.queryPatientInfo(thmzApiUrl, obj);
-    }
-
-    public ResultVo<List<Map<String, String>>> getRoughList(String patientId) {
-        if (null == patientId || patientId.length() < MIN_PATIENT_ID_LENGTH) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请输入正确的门诊ID号。");
-        }
-        patientId = patientId.trim();
-        JSONObject obj = new JSONObject();
-        obj.put("patCardType", 21);
-        obj.put("patCardNo", patientId);
-        obj.put("hisOrdNum", "");
-        Map<String, Object> hrgRes = thmz.getMzChargeDetailForUnPaid(thmzApiUrl, obj);
-        if (null == hrgRes) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "网络服务错误!");
-        }
-        if ((int) hrgRes.get("resultCode") != 0 ) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, hrgRes.get("resultMessage").toString());
-        }
-        List<Map<String, String>> list = FilterUtil.cast(hrgRes.get("data"));
-        for (Map<String, String> item : list) {
-            item.put("fixedAmt", DecimalUtil.divide(String.valueOf(item.get("totalAmt")), "100", 2));
-        }
-        return ResultVoUtil.success(list);
-    }
-
-    @SuppressWarnings("unchecked")
-    public ResultVo<JSONObject> getDetailFees(RoughIndex param) {
-        PatInfo patInfo = getPatientInfo(param.getPatientId());
-        if (null == patInfo || null == patInfo.getResultCode() || 0 != patInfo.getResultCode()) {
-            return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, "无法获取到患者个人信息!");
-        }
-        JSONObject obj = new JSONObject();
-        obj.put("patCardType", 21);
-        obj.put("patCardNo", param.getPatientId());
-        obj.put("hisOrdNum", param.getHisOrdNum());
-        Map<String, Object> hrgRes = thmz.getChargeDetailByHisOrdNum(thmzApiUrl, obj);
-        if (null == hrgRes) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "网络服务错误!");
-        }
-        if ((int) hrgRes.get("resultCode") != 0 ) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, hrgRes.get("resultMessage").toString());
-        }
-        List<Map<String, String>> list = FilterUtil.cast(hrgRes.get("data"));
-        JSONObject retObj = new JSONObject();
-        retObj.put("list", makeSimpleData(list));
-        RestTemplate restTemplate = new RestTemplate();
-        ResultVo<String> qrResult = restTemplate.postForObject(MZ_PAY_QRCODE_URL, param, ResultVo.class);
-        if (null == qrResult || qrResult.getCode() != ExceptionEnum.SUCCESS.getCode()) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请求微信支付二维码失败,请联系管理员。");
-        }
-        retObj.put("wxQrcode", qrResult.getData());
-        return ResultVoUtil.success(retObj);
-    }
-
-    private JSONArray makeSimpleData(List<Map<String, String>> arr) {
-        JSONArray array = new JSONArray();
-        Map<String, String> map = new HashMap<>(Capacity.DEFAULT);
-        for (Map<String, String> item : arr) {
-            final String itemType = "".equals(item.get("itemType")) ?
-                    " - " : item.get("itemType");
-            String execDeptName = "".equals(item.get("execDeptName")) ?
-                    " - " : item.get("execDeptName");
-            String execDeptAddress = "".equals(item.get("execDeptAddress")) ?
-                    " - " : item.get("execDeptAddress");
-            if ("静脉采血".equals(item.get("itemName"))) {
-                execDeptName = "急诊抽血室";
-                execDeptAddress = "门诊大楼一楼";
-            }
-            String key = itemType + "^" + execDeptName + "^" + execDeptAddress;
-            if (!map.containsKey(key)) {
-                map.put(key, String.valueOf(item.get("itemTotalFee")));
-            } else {
-                String fee = DecimalUtil.add(String.valueOf(map.get(key)), String.valueOf(item.get("itemTotalFee")));
-                map.replace(key, fee);
-            }
-        }
-        for (Map.Entry<String, String> entry : map.entrySet()) {
-            String[] keys = entry.getKey().split("\\^");
-            JSONObject obj = new JSONObject();
-            obj.put("itemType", keys[0]);
-            obj.put("execDeptName", keys[1]);
-            obj.put("execDeptAddress", keys[2]);
-            obj.put("itemTotalFee", entry.getValue());
-            obj.put("fixedAmt", DecimalUtil.divide(entry.getValue(), "100", 2));
-            array.add(obj);
-        }
-        return array;
-    }
-}

+ 8 - 9
src/main/resources/application.yml

@@ -86,7 +86,7 @@ forest:
   log-response-status: true
   connect-timeout: 1500
   variables:
-    socketCenter: http://localhost:8707/socketApi
+    socketCenter: http://demo.hnthyy.cn:8707/socketApi
 
 mybatis-plus:
   configuration:
@@ -138,27 +138,26 @@ is-prod: false
 triage-notify-url: http://localhost:8082/triage/roomScreen/pushMsg
 si-tj-url: http://jkglcsx.server.zhongmeihealth.com/openInter
 
-#正式环境
 si-api-url: http://dms.hun.hsip.gov.cn/isp-api/powercsb/1101
 si-access-key: 04eMGRg7beAO6vqwrZiLacV8Uy3jNn7QGDUcBO
 si-secret-key: SK3Oip3a2R3NLz2xm58Mpmi69oFu96KrdKNRKglN
+
+#正式环境
 si-zy-fee-url: http://172.16.32.166:1000
 si-mz-fee-url: http://172.16.32.166:1100/mzFee
-si-injury-fee-url: http://172.16.32.163:2100/siInjury
+#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
 
 #测试环境
-#si-api-url: http://10.93.30.130:20001/isp-api/powercsb/1101
-#si-access-key: Zgs5jfxaKb86XbCuUzLK9EhFjiQfHR1vydaPzp
-#si-secret-key: SKT2ETMT3XkAYApqh79DCnN9ZjfbQEBMPU0GyLz9
 #si-zy-fee-url: http://localhost:1000
 #si-mz-fee-url: http://localhost:1100/mzFee
-#si-injury-fee-url: http://localhost:2100/siInjury
+si-injury-fee-url: http://localhost:2100/siInjury
 si-injury-systm-url: http://localhost:2000/siInjury
-#thmz-api-url: http://172.16.30.33:81/thmz/api/v1
 
-appletThmzUrl: http://172.16.30.119:8089/thmz
+#thmz-api-url: http://172.16.30.119:8089/thmz/api/v1
+#thmz-api-url: http://demo.hnthyy.cn:8089/thmz/api/v1
+appletThmzUrl: http://demo.hnthyy.cn:8089/thmz
 
 #logging:
 #  level: