Bläddra i källkod

配置文件中的链接优化,添加门禁人脸信息

lighter 7 månader sedan
förälder
incheckning
a37a004c1d

+ 25 - 0
src/main/java/thyyxxk/wxservice_server/config/properties/ApiAddr.java

@@ -0,0 +1,25 @@
+package thyyxxk.wxservice_server.config.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "thyy.api-addr")
+public class ApiAddr {
+    // 移动医保支付HIS业务
+    private String hisMipApi;
+
+    // 泰和门诊HIS业务
+    private String thmzApi;
+
+    // 慢病业务
+    private String chronicApi;
+
+    // 体检业务
+    private String physicalCheckApi;
+
+    // 海康添加/修改人脸信息
+    private String addFaceApi;
+}

+ 7 - 7
src/main/java/thyyxxk/wxservice_server/controller/ChronicDiseaseController.java

@@ -4,11 +4,11 @@ import com.alibaba.fastjson.JSON;
 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.web.bind.annotation.*;
 import org.springframework.web.client.RestTemplate;
 import thyyxxk.wxservice_server.config.auth.PassToken;
 import thyyxxk.wxservice_server.config.exception.ExceptionEnum;
+import thyyxxk.wxservice_server.config.properties.ApiAddr;
 import thyyxxk.wxservice_server.constant.AgnterRelations;
 import thyyxxk.wxservice_server.dao.ChronicDiseaseDao;
 import thyyxxk.wxservice_server.entity.PureCodeName;
@@ -26,19 +26,19 @@ import java.util.Map;
 @RequestMapping("/chronicDisease")
 public class ChronicDiseaseController {
     private final ChronicDiseaseDao dao;
-    @Value("${chronicUrl}")
-    private String chronicUrl;
+    private final String chronicApi;
 
     @Autowired
-    public ChronicDiseaseController(ChronicDiseaseDao dao) {
+    public ChronicDiseaseController(ChronicDiseaseDao dao, ApiAddr apiAddr) {
         this.dao = dao;
+        this.chronicApi = apiAddr.getChronicApi();
     }
 
     @PassToken
     @GetMapping("/getCrmDictionary")
     public ResultVo<Map<String, List<PureCodeName>>> getCrmDictionary() {
         ResultVo<Map<String, List<PureCodeName>>> response = new RestTemplate()
-                .getForObject(chronicUrl + "/getCrmDictionary", ResultVo.class);
+                .getForObject(chronicApi + "/getCrmDictionary", ResultVo.class);
         if (null == response) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -59,7 +59,7 @@ public class ChronicDiseaseController {
     @GetMapping("/selectCrmPatientMiByCode")
     public ResultVo<CrmPatientMi> selectCrmPatientMiByCode(@RequestParam("keyCode") String keyCode) {
         ResultVo<LinkedHashMap<String, Object>> response = new RestTemplate().getForObject(
-                chronicUrl + "/selectCrmPatientMiByCode?keyCode=" + keyCode, ResultVo.class);
+                chronicApi + "/selectCrmPatientMiByCode?keyCode=" + keyCode, ResultVo.class);
         log.info("【{}】获取慢病信息:{}", keyCode, JSONObject.toJSON(response));
         if (null == response || response.getCode() != ExceptionEnum.SUCCESS.getCode()) {
             return getBasePatientInfo(keyCode);
@@ -105,7 +105,7 @@ public class ChronicDiseaseController {
             params.setCreatId("99999");
         }
         JSONObject response = new RestTemplate()
-                .postForObject(chronicUrl + "/saveCrmPatientMi", params, JSONObject.class);
+                .postForObject(chronicApi + "/saveCrmPatientMi", params, JSONObject.class);
         log.info("提交慢病患者信息:\n参数:{}\n结果:{}", JSONObject.toJSON(params), response);
         if (null == response) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);

+ 7 - 0
src/main/java/thyyxxk/wxservice_server/controller/InpatientController.java

@@ -4,9 +4,11 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import thyyxxk.wxservice_server.config.auth.PassToken;
 import thyyxxk.wxservice_server.entity.ResultVo;
+import thyyxxk.wxservice_server.entity.inpatient.DoorFace;
 import thyyxxk.wxservice_server.entity.inpatient.GetZyFeeParam;
 import thyyxxk.wxservice_server.entity.inpatient.InpatientInfo;
 import thyyxxk.wxservice_server.service.InpatientService;
+import thyyxxk.wxservice_server.utils.ResultVoUtil;
 
 import java.util.Map;
 
@@ -44,4 +46,9 @@ public class InpatientController {
     public ResultVo<Map<String, Object>> getPrepaidHistory(@RequestParam("patientId") String patientId) {
         return service.getPrepaidHistory(patientId);
     }
+
+    @PostMapping("/updateDoorFace")
+    public ResultVo<String> updateDoorFace(@RequestBody DoorFace request) {
+        return service.updateDoorFace(request);
+    }
 }

+ 6 - 7
src/main/java/thyyxxk/wxservice_server/controller/api/PowersiMiPayPlugin.java

@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
@@ -13,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.client.RestTemplate;
 import thyyxxk.wxservice_server.config.auth.PassToken;
 import thyyxxk.wxservice_server.config.exception.ExceptionEnum;
+import thyyxxk.wxservice_server.config.properties.ApiAddr;
 import thyyxxk.wxservice_server.dao.api.PowersiPluginDao;
 import thyyxxk.wxservice_server.entity.ResultVo;
 import thyyxxk.wxservice_server.entity.assessment.PushQuestionnaireVisit;
@@ -44,18 +44,17 @@ public class PowersiMiPayPlugin {
     private final IdCardAnalyzeService idCardAnalyzeService;
     private final ThmzService thmzService;
     private final PushWxMessageService messageService;
-
-    @Value("${hisMipUrl}")
-    private String hisMipUrl;
+    private final String hisMipApi;
 
     private final DataHandler dataHandler = DataHandler.newInstance();
 
     @Autowired
-    public PowersiMiPayPlugin(PowersiPluginDao dao, IdCardAnalyzeService idCardAnalyzeService, ThmzService thmzService, PushWxMessageService messageService) throws IOException {
+    public PowersiMiPayPlugin(PowersiPluginDao dao, IdCardAnalyzeService idCardAnalyzeService, ThmzService thmzService, PushWxMessageService messageService, ApiAddr apiAddr) throws IOException {
         this.dao = dao;
         this.idCardAnalyzeService = idCardAnalyzeService;
         this.thmzService = thmzService;
         this.messageService = messageService;
+        this.hisMipApi = apiAddr.getHisMipApi();
     }
 
     @PostMapping("/lockOrder")
@@ -122,7 +121,7 @@ public class PowersiMiPayPlugin {
                 if (billInfo.getVipFlag() != 0) {
                     continue;
                 }
-                String url = hisMipUrl + "/writeMtReceipt?hisOrdNum=" + billInfo.getBizId();
+                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"));
@@ -167,7 +166,7 @@ public class PowersiMiPayPlugin {
         request.put("patNo", arr[0]);
         request.put("times", Integer.parseInt(arr[1]));
 
-        Upload6201 upload6201 = new RestTemplate().postForObject(hisMipUrl + "/getUpload6201", request, Upload6201.class);
+        Upload6201 upload6201 = new RestTemplate().postForObject(hisMipApi + "/getUpload6201", request, Upload6201.class);
         if (null == upload6201) {
             JSONObject res = new JSONObject();
             res.put("code", -1);

+ 10 - 0
src/main/java/thyyxxk/wxservice_server/entity/inpatient/DoorFace.java

@@ -0,0 +1,10 @@
+package thyyxxk.wxservice_server.entity.inpatient;
+
+import lombok.Data;
+
+@Data
+public class DoorFace {
+    private String patNo;
+    private Integer times;
+    private String faceData;
+}

+ 26 - 25
src/main/java/thyyxxk/wxservice_server/factory/thmz/ThmzService.java

@@ -5,10 +5,10 @@ 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.wxservice_server.config.exception.ExceptionEnum;
+import thyyxxk.wxservice_server.config.properties.ApiAddr;
 import thyyxxk.wxservice_server.entity.ResultVo;
 import thyyxxk.wxservice_server.entity.appointment.MzyReqrec;
 import thyyxxk.wxservice_server.entity.hrgresponse.*;
@@ -26,13 +26,14 @@ import java.util.concurrent.TimeUnit;
 @Slf4j
 @Service
 public class ThmzService {
-    @Value("${hrgApiUrl}")
-    private String thmzApiUrl;
+    private final String thmzApi;
     private final RedisLikeService redis;
 
+
     @Autowired
-    public ThmzService(RedisLikeService redis) {
+    public ThmzService(RedisLikeService redis, ApiAddr apiAddr) {
         this.redis = redis;
+        this.thmzApi = apiAddr.getThmzApi();
     }
 
     public JSONObject queryPatientInfo(String patIdNo) {
@@ -40,7 +41,7 @@ public class ThmzService {
         JSONObject params = new JSONObject();
         params.put("patIdType", "11");
         params.put("patIdNo", patIdNo);
-        JSONObject response = template.postForObject(thmzApiUrl + "/queryPatientInfo", params, JSONObject.class);
+        JSONObject response = template.postForObject(thmzApi + "/queryPatientInfo", params, JSONObject.class);
         log.info("在绑卡前查询患者信息:\n参数:{}\n结果:{}", params, response);
         if (null == response || response.getInteger("resultCode") != 0) {
             return null;
@@ -50,7 +51,7 @@ public class ThmzService {
 
     public String savePatientInfo(CreatCardParam request) {
         CreateCardResponse response = new RestTemplate()
-                .postForObject(thmzApiUrl + "/savePatientInfo", request, CreateCardResponse.class);
+                .postForObject(thmzApi + "/savePatientInfo", request, CreateCardResponse.class);
         log.info("首诊患者建档:\n参数:{}\n结果:{}", JSON.toJSON(request), JSON.toJSON(response));
         if (null == response) {
             return "ERROR:网络异常。";
@@ -63,7 +64,7 @@ public class ThmzService {
 
     public List<Map<String, Object>> getMzClass() {
         RestTemplate template = new RestTemplate();
-        MzClassResponse response = template.getForObject(thmzApiUrl + "/getMzClass", MzClassResponse.class);
+        MzClassResponse response = template.getForObject(thmzApi + "/getMzClass", MzClassResponse.class);
         log.info("获取门诊科室分类:{}", JSON.toJSON(response));
         if (null == response || 0 != response.getResultCode()) {
             return new ArrayList<>();
@@ -72,9 +73,9 @@ public class ThmzService {
     }
 
     public List<Map<String, Object>> getUnitCodeByMzClass(QueryUnitCodeRequest request) {
-        String url = thmzApiUrl + "/getUnitCodeByMzClass";
+        String url = thmzApi + "/getUnitCodeByMzClass";
         if (request.isP4Request()) {
-            url = thmzApiUrl + "/getP4UnitCode";
+            url = thmzApi + "/getP4UnitCode";
         }
         MzClassResponse response = new RestTemplate().postForObject(url, request, MzClassResponse.class);
         log.info("获取门诊科室列表:{}", JSON.toJSON(response));
@@ -85,7 +86,7 @@ public class ThmzService {
     }
 
     public List<Map<String, Object>> getDoctorByDateAndDept(QueryMzDoctorRequest request) {
-        String url = String.format(thmzApiUrl
+        String url = String.format(thmzApi
                         + "/getDoctorByDateAndDept?requestDay=%s&unitCode=%s",
                 request.getRequestDay(), request.getUnitCode());
         SourcesResponse response = new RestTemplate().getForObject(url, SourcesResponse.class);
@@ -96,7 +97,7 @@ public class ThmzService {
     }
 
     public List<Map<String, Object>> getDoctorsArrangement(QueryMzDoctorRequest request) {
-        String url = String.format(thmzApiUrl + "/getRequestByDateAndDeptAndDoctor?requestDay=%s&unitCode=%s&doctorCode=%s",
+        String url = String.format(thmzApi + "/getRequestByDateAndDeptAndDoctor?requestDay=%s&unitCode=%s&doctorCode=%s",
                 request.getRequestDay(), request.getUnitCode(), request.getDoctorCode());
         SourcesResponse response = new RestTemplate().getForObject(url, SourcesResponse.class);
         if (null == response || null == response.getResultCode() || response.getResultCode() == -1) {
@@ -106,7 +107,7 @@ public class ThmzService {
     }
 
     public Map<String, Object> getRegisterCost(QueryRegisterCostRequest request) {
-        String url = String.format(thmzApiUrl + "/getMzChargeTypeByRequestIdForHaiCi?" +
+        String url = String.format(thmzApi + "/getMzChargeTypeByRequestIdForHaiCi?" +
                 "mzyRequestId=%d&patientId=%s", request.getMzyRequestId(), request.getPatientId());
         HrgCommonResponse data = new RestTemplate().getForObject(url, HrgCommonResponse.class);
         log.info("获取挂号费用:\n参数:{}\n结果:{}", JSON.toJSON(request), JSON.toJSON(data));
@@ -122,7 +123,7 @@ public class ThmzService {
     public List<Map<String, String>> getPaidMzGhList(String patientId) {
         JSONObject params = new JSONObject();
         params.put("patientId", patientId);
-        SourcesResponse response = new RestTemplate().postForObject(thmzApiUrl
+        SourcesResponse response = new RestTemplate().postForObject(thmzApi
                 + "/getRegistrationForPaid", params, SourcesResponse.class);
         if (null == response || response.getResultCode() != 0) {
             return new ArrayList<>();
@@ -131,7 +132,7 @@ public class ThmzService {
     }
 
     public List<MzyReqrec> listMzyReqrec(QueryMzyReqrecRequest request) {
-        String url = thmzApiUrl + "/listMzyReqrec?patientId=" + request.getPatientId()
+        String url = thmzApi + "/listMzyReqrec?patientId=" + request.getPatientId()
                 + "&payMark=" + request.getPayMark();
         List<MzyReqrec> list = new ArrayList<>();
         JSONObject response = new RestTemplate().getForObject(url, JSONObject.class);
@@ -157,7 +158,7 @@ public class ThmzService {
     }
 
     public MzyReqrec getMzyReqrecInfo(QueryMzyReqrecRequest request) {
-        String url = thmzApiUrl + "/getMzyReqrecInfo?patientId=" +
+        String url = thmzApi + "/getMzyReqrecInfo?patientId=" +
                 request.getPatientId() + "&times=" + request.getTimes();
         JSONObject response = new RestTemplate().getForObject(url, JSONObject.class);
         if (null == response || 0 != response.getInteger("resultCode")) {
@@ -178,7 +179,7 @@ public class ThmzService {
     }
 
     public String cancelReqFromHis(QueryMzyReqrecRequest request) {
-        String url = thmzApiUrl + "/cancelReqrec";
+        String url = thmzApi + "/cancelReqrec";
         JSONObject response = new RestTemplate().postForObject(url, request, JSONObject.class);
         log.info("自助退号:\n参数:{}\n结果:{}", JSON.toJSON(request), response);
         if (null == response) {
@@ -191,7 +192,7 @@ public class ThmzService {
     }
 
     public ResultVo<List<Map<String, Object>>> getMzChargeDetailForUnPaid(QueryReceiptRequest request) {
-        String url = thmzApiUrl + "/getMzChargeDetailForUnPaid";
+        String url = thmzApi + "/getMzChargeDetailForUnPaid";
         SourcesResponse response = new RestTemplate()
                 .postForObject(url, request, SourcesResponse.class);
         if (null == response || null == response.getResultCode()) {
@@ -204,7 +205,7 @@ public class ThmzService {
     }
 
     public ResultVo<List<Map<String, Object>>> getChargeDetailByHisOrdNum(QueryReceiptRequest request) {
-        String url = thmzApiUrl + "/getChargeDetailByHisOrdNum";
+        String url = thmzApi + "/getChargeDetailByHisOrdNum";
         SourcesResponse response = new RestTemplate()
                 .postForObject(url, request, SourcesResponse.class);
         if (null == response || null == response.getResultCode()) {
@@ -217,14 +218,14 @@ public class ThmzService {
     }
 
     public ResultVo<List<Map<String, String>>> getMzPaidList(QueryReceiptRequest request) {
-        String url = thmzApiUrl + "/getMzChargeDetailForPaid";
+        String url = thmzApi + "/getMzChargeDetailForPaid";
         SourcesResponse hrgResponse = new RestTemplate()
                 .postForObject(url, request, SourcesResponse.class);
         return ThmzUtil.getResultVoCompletableFuture(hrgResponse);
     }
 
     public ResultVo<List<Map<String, Object>>> getMzPaidDetail(QueryReceiptRequest request) {
-        String url = thmzApiUrl + "/getSfjkMzbrmx?djh=" + request.getHisOrdNum();
+        String url = thmzApi + "/getSfjkMzbrmx?djh=" + request.getHisOrdNum();
         SourcesResponse hrgResponse = new RestTemplate()
                 .getForObject(url, SourcesResponse.class);
         if (null == hrgResponse) {
@@ -238,7 +239,7 @@ public class ThmzService {
 
     public ResultVo<List<Map<String, String>>> getParentIdByPatientId(String patientId) {
         RestTemplate restTemplate = new RestTemplate();
-        String url = thmzApiUrl + "/getParentIdByPatientId?patientId=" + patientId;
+        String url = thmzApi + "/getParentIdByPatientId?patientId=" + patientId;
         HrgCommonResponse response = restTemplate.getForObject(url, HrgCommonResponse.class);
         if (null != response && response.getCode() == 0) {
             return ResultVoUtil.success(CastUtil.cast(response.getData()));
@@ -268,7 +269,7 @@ public class ThmzService {
     }
 
     private ExceptionEnum saveMzPayResult(SaveMzPayRequest request, int times) {
-        String url = request.isNormalClinic() ? thmzApiUrl + "/payChargeDetailFormHaiCi"
+        String url = request.isNormalClinic() ? thmzApi + "/payChargeDetailFormHaiCi"
                 : "http://172.16.32.160:8088/thmz/api/v1/payChargeDetailFormHaiCi";
         String des = request.isNormalClinic() ? "门诊" : "医美";
         RestTemplate template = new RestTemplate();
@@ -290,7 +291,7 @@ public class ThmzService {
 
     public String saveAppointment(SaveAppointmentRequest request) {
         RestTemplate template = new RestTemplate();
-        SaveGhFeeResponse response = template.postForObject(thmzApiUrl + "/payRegistrationFormHaiCi",
+        SaveGhFeeResponse response = template.postForObject(thmzApi + "/payRegistrationFormHaiCi",
                 request, SaveGhFeeResponse.class);
         log.info("保存挂号信息: \n参数:{},\n结果:{}", JSON.toJSON(request), JSON.toJSON(response));
         if (null == response) {
@@ -304,7 +305,7 @@ public class ThmzService {
 
     public String saveClinicRegister(SaveClinicRegisterRequest request) {
         SaveGhFeeResponse response = new RestTemplate()
-                .postForObject(thmzApiUrl + "/payRegistration", request, SaveGhFeeResponse.class);
+                .postForObject(thmzApi + "/payRegistration", request, SaveGhFeeResponse.class);
         log.info("保存诊间挂号信息: \n参数:{},\n结果:{}", JSON.toJSON(request), JSON.toJSON(response));
         if (null == response) {
             return "ERROR:保存诊间挂号信息失败,门诊接口返回空。";
@@ -317,7 +318,7 @@ public class ThmzService {
 
     public String saveTemplate(SaveTemplateRequest request) {
         HrgCommonResponse response = new RestTemplate().
-                postForObject(thmzApiUrl + "/saveTcPrescription", request, HrgCommonResponse.class);
+                postForObject(thmzApi + "/saveTcPrescription", request, HrgCommonResponse.class);
         log.info("保存套餐缴费:\n参数:{}\n结果:{}", JSON.toJSON(request), JSON.toJSON(response));
         if (null == response) {
             return "ERROR:保存套餐缴费失败,门诊接口返回空。";

+ 12 - 12
src/main/java/thyyxxk/wxservice_server/service/BookableService.java

@@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSONObject;
 import com.wechat.pay.java.service.payments.model.Transaction;
 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.wxservice_server.config.exception.ExceptionEnum;
+import thyyxxk.wxservice_server.config.properties.ApiAddr;
 import thyyxxk.wxservice_server.constant.Constants;
 import thyyxxk.wxservice_server.dao.BookableDao;
 import thyyxxk.wxservice_server.entity.ResultVo;
@@ -33,15 +33,15 @@ import java.util.concurrent.TimeUnit;
 public class BookableService {
     private final BookableDao dao;
     private final WxRefundService refundService;
+    private final String thmzApi;
     DelayQueue<BookedYjReq> queue = new DelayQueue<>();
 
-    @Value("${hrgApiUrl}")
-    private String hrgApiUrl;
 
     @Autowired
-    public BookableService(BookableDao dao, WxRefundService refundService) {
+    public BookableService(BookableDao dao, WxRefundService refundService, ApiAddr apiAddr) {
         this.dao = dao;
         this.refundService = refundService;
+        this.thmzApi = apiAddr.getThmzApi();
     }
 
     public ResultVo<List<BookedYjReq>> getDirectBookableItems() {
@@ -65,7 +65,7 @@ public class BookableService {
         book.getMzBlRecord().setEmrFzjc("申请" + yjReq.getName());
         book.getMzBlRecord().setEmrProcess("申请" + yjReq.getName());
         RestTemplate restTemplate = new RestTemplate();
-        SaveMzFeeResponse hrgResponse = restTemplate.postForObject(hrgApiUrl + "/savePrescription", book, SaveMzFeeResponse.class);
+        SaveMzFeeResponse hrgResponse = restTemplate.postForObject(thmzApi + "/savePrescription", book, SaveMzFeeResponse.class);
         log.info("自助开单预约:\n参数:{}\n结果:{}", JSONObject.toJSONString(book), JSONObject.toJSONString(hrgResponse));
         if (null == hrgResponse) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
@@ -89,7 +89,7 @@ public class BookableService {
                     BookedYjReq bookedItem = queue.take();
                     Integer payMark = dao.selectPayMarkByReqNo(bookedItem.getReqNo());
                     if (null != payMark && payMark == 5) {
-                        String url = hrgApiUrl + "/cancelApplyScheduleOfMedical?scheduleId=" + bookedItem.getId();
+                        String url = thmzApi + "/cancelApplyScheduleOfMedical?scheduleId=" + bookedItem.getId();
                         HrgCommonResponse res = restTemplate.getForObject(url, HrgCommonResponse.class);
                         dao.revokeMzYjReq(bookedItem.getReqNo(), 1);
                         log.info("自动取消未支付的检验检查预约结果:{},容器剩余:{}", res, queue.size());
@@ -106,7 +106,7 @@ public class BookableService {
         String[] dateRange = DateUtil.getDatesInOneWeek();
         RestTemplate restTemplate = new RestTemplate();
         HrgCommonResponse hrgResponse = restTemplate
-                .getForObject(String.format(hrgApiUrl + "/getFullScheduleOfMedicalForPlatform?depNo=%s&beginTime=%s&endTime=%s",
+                .getForObject(String.format(thmzApi + "/getFullScheduleOfMedicalForPlatform?depNo=%s&beginTime=%s&endTime=%s",
                         execUnit, dateRange[0], dateRange[6]), HrgCommonResponse.class);
         if (null == hrgResponse) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "网络服务错误!");
@@ -143,7 +143,7 @@ public class BookableService {
         String[] dateRange = DateUtil.getDatesInOneWeek();
         RestTemplate restTemplate = new RestTemplate();
         HrgCommonResponse hrgResponse = restTemplate
-                .getForObject(String.format(hrgApiUrl + "/getFullScheduleOfMedicalForPlatform?depNo=%s&beginTime=%s&endTime=%s",
+                .getForObject(String.format(thmzApi + "/getFullScheduleOfMedicalForPlatform?depNo=%s&beginTime=%s&endTime=%s",
                         execUnit, dateRange[0], dateRange[6]), HrgCommonResponse.class);
         if (null == hrgResponse) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "网络服务错误!");
@@ -198,7 +198,7 @@ public class BookableService {
         }
         log.info("自助开单预约:{}", JSONObject.toJSONString(book));
         RestTemplate restTemplate = new RestTemplate();
-        SaveMzFeeResponse hrgResponse = restTemplate.postForObject(hrgApiUrl + "/savePrescription", book, SaveMzFeeResponse.class);
+        SaveMzFeeResponse hrgResponse = restTemplate.postForObject(thmzApi + "/savePrescription", book, SaveMzFeeResponse.class);
         log.info("自助开单:{},结果:{}", param, hrgResponse);
         if (null == hrgResponse) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
@@ -224,7 +224,7 @@ public class BookableService {
         // 心电图检查结果
         obj.put("xdtjcjg", 0);
         obj.put("actOrderNo", reqNo);
-        HrgCommonResponse hrgCommonResponse = restTemplate.postForObject(hrgApiUrl + "/applyScheduleOfMedicalForPlatform",
+        HrgCommonResponse hrgCommonResponse = restTemplate.postForObject(thmzApi + "/applyScheduleOfMedicalForPlatform",
                 obj, HrgCommonResponse.class);
         if (null == hrgCommonResponse) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
@@ -248,7 +248,7 @@ public class BookableService {
         obj.put("xdtjcjg", 0);
         obj.put("actOrderNo", param.getReqNo());
         RestTemplate restTemplate = new RestTemplate();
-        HrgCommonResponse hrgCommonResponse = restTemplate.postForObject(hrgApiUrl + "/applyScheduleOfMedicalForPlatform",
+        HrgCommonResponse hrgCommonResponse = restTemplate.postForObject(thmzApi + "/applyScheduleOfMedicalForPlatform",
                 obj, HrgCommonResponse.class);
         if (null == hrgCommonResponse) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
@@ -280,7 +280,7 @@ public class BookableService {
             JSONObject param = new JSONObject();
             param.put("hisOrdNum", order.getHisOrdNum());
             RestTemplate template = new RestTemplate();
-            SaveMzFeeResponse response = template.postForObject(hrgApiUrl + "/saveRefundFeeFormHaiCi",
+            SaveMzFeeResponse response = template.postForObject(thmzApi + "/saveRefundFeeFormHaiCi",
                     param, SaveMzFeeResponse.class);
             log.info("【hisOrdNum: {}】撤销处方结果:{}", order.getHisOrdNum(), response);
             if (null == response || null == response.getResultCode()) {

+ 12 - 1
src/main/java/thyyxxk/wxservice_server/service/InpatientService.java

@@ -3,10 +3,13 @@ package thyyxxk.wxservice_server.service;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
 import thyyxxk.wxservice_server.config.exception.ExceptionEnum;
+import thyyxxk.wxservice_server.config.properties.ApiAddr;
 import thyyxxk.wxservice_server.constant.Constants;
 import thyyxxk.wxservice_server.dao.InpatientDao;
 import thyyxxk.wxservice_server.entity.ResultVo;
+import thyyxxk.wxservice_server.entity.inpatient.DoorFace;
 import thyyxxk.wxservice_server.entity.inpatient.GetZyFeeParam;
 import thyyxxk.wxservice_server.entity.inpatient.InpatientInfo;
 import thyyxxk.wxservice_server.entity.inpatient.ZyFee;
@@ -23,10 +26,12 @@ import java.util.*;
 @Service
 public class InpatientService {
     private final InpatientDao dao;
+    private final String addFaceApi;
 
     @Autowired
-    public InpatientService(InpatientDao dao) {
+    public InpatientService(InpatientDao dao, ApiAddr apiAddr) {
         this.dao = dao;
+        this.addFaceApi = apiAddr.getAddFaceApi();
     }
 
     public ResultVo<InpatientInfo> getInpatientInfo(String patientId) {
@@ -95,4 +100,10 @@ public class InpatientService {
         log.info("getInpatientNoByPatientId:{}, {}", patientId, inpatientNos);
         return inpatientNos;
     }
+
+    public ResultVo<String> updateDoorFace(DoorFace request) {
+        log.info("修改人脸信息:{}", request.getFaceData());
+        request.setFaceData(request.getFaceData().split("base64,")[1]);
+        return new RestTemplate().postForObject(addFaceApi, request, ResultVo.class);
+    }
 }

+ 8 - 8
src/main/java/thyyxxk/wxservice_server/service/PowersiPhysicalCheckService.java

@@ -4,10 +4,10 @@ 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.wxservice_server.config.exception.ExceptionEnum;
+import thyyxxk.wxservice_server.config.properties.ApiAddr;
 import thyyxxk.wxservice_server.dao.PhysicalExamDao;
 import thyyxxk.wxservice_server.entity.ResultVo;
 import thyyxxk.wxservice_server.entity.physicalcheck.PhysicalCheckIndexInquiry;
@@ -23,12 +23,12 @@ import java.util.List;
 @Slf4j
 @Service
 public class PowersiPhysicalCheckService {
-    @Value("${physicalCheck}")
-    private String physicalCheckUrl;
+    private final String physicalCheckApi;
     private final PhysicalExamDao dao;
 
     @Autowired
-    public PowersiPhysicalCheckService(PhysicalExamDao dao) {
+    public PowersiPhysicalCheckService(ApiAddr apiAddr, PhysicalExamDao dao) {
+        this.physicalCheckApi = apiAddr.getPhysicalCheckApi();
         this.dao = dao;
     }
 
@@ -36,7 +36,7 @@ public class PowersiPhysicalCheckService {
         if (dao.selectSocialNoAndPatIdMatch(inquiry) < 1) {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "就诊人和身份证不匹配,没有查询的权限。");
         }
-        String url = physicalCheckUrl + "317926227bc2431399c86240375ba549?IDCARD=" +
+        String url = physicalCheckApi + "/317926227bc2431399c86240375ba549?IDCARD=" +
                 inquiry.getIdCard() + "&IDCARDTYPE=01&pageNo=" + inquiry.getPageNo();
         RestTemplate template = new RestTemplate();
         JSONObject rawdata = template.getForObject(url, JSONObject.class);
@@ -86,7 +86,7 @@ public class PowersiPhysicalCheckService {
 
     private ResultVo<JSONObject> getSummary(String tjid) {
         RestTemplate template = new RestTemplate();
-        JSONObject rawdata = template.getForObject(physicalCheckUrl + "7033a7386d0e45d295b7a13dd079704e?tjid=" + tjid, JSONObject.class);
+        JSONObject rawdata = template.getForObject(physicalCheckApi + "/7033a7386d0e45d295b7a13dd079704e?tjid=" + tjid, JSONObject.class);
         if (null == rawdata) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -106,7 +106,7 @@ public class PowersiPhysicalCheckService {
 
     private ResultVo<List<JSONObject>> getExamItems(String tjid) {
         RestTemplate template = new RestTemplate();
-        JSONObject rawdata = template.getForObject(physicalCheckUrl + "f9c6ad55fa1b43b8a6f9e44cc7e126b9?tjid=" + tjid, JSONObject.class);
+        JSONObject rawdata = template.getForObject(physicalCheckApi + "/f9c6ad55fa1b43b8a6f9e44cc7e126b9?tjid=" + tjid, JSONObject.class);
         if (null == rawdata) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -150,7 +150,7 @@ public class PowersiPhysicalCheckService {
 
     private ResultVo<JSONObject> getExamResult(String tjid) {
         RestTemplate template = new RestTemplate();
-        JSONObject rawdata = template.getForObject(physicalCheckUrl + "92eef45c69974df4869b3eed05f5234f?tjid=" + tjid, JSONObject.class);
+        JSONObject rawdata = template.getForObject(physicalCheckApi + "/92eef45c69974df4869b3eed05f5234f?tjid=" + tjid, JSONObject.class);
         if (null == rawdata) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }

+ 0 - 14
src/main/resources/META-INF/additional-spring-configuration-metadata.json

@@ -1,14 +0,0 @@
-{
-  "properties": [
-    {
-      "name": "hrgApiUrl",
-      "type": "java.lang.String",
-      "description": "hrgApiUrl."
-    },
-    {
-      "name": "inspectionUrl",
-      "type": "java.lang.String",
-      "description": "inspectionUrl."
-    }
-  ]
-}

+ 8 - 6
src/main/resources/application-8083.yml

@@ -79,10 +79,12 @@ management:
     prometheus:
       enabled: true
 
-siMzApiUrl: http://172.16.32.166:1100/mzFee
-hisMipUrl: http://172.16.32.166:1100/mobilePayApi
-hrgApiUrl: http://172.16.32.160:81/thmz/api/v1
-chronicUrl: http://172.16.32.160:8077/chronicDisease
-inspectionUrl: http://172.16.32.178:622/pushservice.asmx?wsdl
-physicalCheck: http://172.16.32.183:8888/bdp/dataservice/api/
+thyy:
+  apiAddr:
+    his-mip-api: http://172.16.32.166:1100/mobilePayApi
+    thmz-api: http://172.16.32.160:81/thmz/api/v1
+    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.32.167:20923/thyy/api/haikang/door/addFaceRecognition
+
 production: true

+ 9 - 6
src/main/resources/application-8085.yml

@@ -37,6 +37,7 @@ spring:
     format:
       date: yyyy-MM-dd
       date-time: yyyy-MM-dd HH:mm:ss
+
 mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
@@ -79,10 +80,12 @@ management:
     prometheus:
       enabled: true
 
-siMzApiUrl: http://172.16.32.166:1100/mzFee
-hisMipUrl: http://172.16.32.166:1100/mobilePayApi
-hrgApiUrl: http://172.16.32.160:81/thmz/api/v1
-chronicUrl: http://172.16.32.160:8077/chronicDisease
-inspectionUrl: http://172.16.32.178:622/pushservice.asmx?wsdl
-physicalCheck: http://172.16.32.183:8888/bdp/dataservice/api/
+thyy:
+  apiAddr:
+    his-mip-api: http://172.16.32.166:1100/mobilePayApi
+    thmz-api: http://172.16.32.160:81/thmz/api/v1
+    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.32.167:20923/thyy/api/haikang/door/addFaceRecognition
+
 production: true

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

@@ -41,13 +41,12 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
 
-siMzApiUrl: http://172.16.30.26:1100/mzFee
-hisMipUrl: http://172.16.30.26:1100/mobilePayApi
-chronicUrl: http://localhost:8706/chronicDisease
-#hrgApiUrl: http://demo.hnthyy.cn:8089/thmz/api/v1
-hrgApiUrl: http://172.16.30.119:8089/thmz/api/v1
-inspectionUrl: http://172.16.32.178:622/pushservice.asmx?wsdl
-physicalCheck: http://172.16.32.183:8888/bdp/dataservice/api/
+thyy:
+  apiAddr:
+    his-mip-api: http://172.16.30.26:1100/mobilePayApi
+    thmz-api: http://172.16.30.99:8089/thmz/api/v1
+    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
 
-
-production: false
+production: false

+ 7 - 7
src/main/resources/application-prod.yml

@@ -41,12 +41,12 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
 
-
-siMzApiUrl: http://172.16.32.166:1100/mzFee
-hisMipUrl: http://172.16.32.166:1100/mobilePayApi
-hrgApiUrl: http://172.16.32.160:81/thmz/api/v1
-chronicUrl: http://172.16.32.160:8077/chronicDisease
-inspectionUrl: http://172.16.32.178:622/pushservice.asmx?wsdl
-physicalCheck: http://172.16.32.183:8888/bdp/dataservice/api/
+thyy:
+  apiAddr:
+    his-mip-api: http://172.16.32.166:1100/mobilePayApi
+    thmz-api: http://172.16.32.160:81/thmz/api/v1
+    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.32.167:20923/thyy/api/haikang/door/addFaceRecognition
 
 production: false

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

@@ -1,3 +1,3 @@
 spring:
   profiles:
-    active: prod
+    active: dev

+ 4 - 2
src/main/resources/weChatOfficialAccounts.properties

@@ -4,11 +4,15 @@ ticket=
 
 appId=wxbde6b16acad84204
 appSecret=923225c842f72c6cfa2c2530031db70f
+
 mchId=1574204121
 mchKey=lilaiwflzIOLJI2320JLZL2Llisd02ak
 mchApiV3Key=zxkkOIL9Z909lkjl2lzczi2KLsol2wct
 mchSerialNo=6574E696C4DB0B93EBD0D29B5DE809F31E04FC6D
 
+#mchId=1703306538
+#mchApiV3Key=K2a2c2Df4764f848fZb421f27fUI762z
+
 jsapiNotifyUrl=https://staticweb.hnthyy.cn/wxserver/wxPayNotify/jsapi
 nativeNotifyUrl=https://staticweb.hnthyy.cn/wxserver/wxPayNotify/native
 
@@ -16,8 +20,6 @@ qywxCorpId=wwf0b23c8b36012b34
 qywxSecret=wpHuNePfiDyotmpXjy5hUYGF0w8Ks5OPHSQp22z8oBk
 qywxToken=
 
-#appletAppId=wxb36274d68249fa33
-#appletAppSecret=e1063b25d70639115b7a22549c81f817
 appletAppId=wx8b231cd4c8e3ed95
 appletAppSecret=aacfee40027de8b4f4ea99dda3b4367f