Browse Source

评价器优化

lihong 1 year ago
parent
commit
16f815c0ca

+ 6 - 3
src/main/java/cn/hnthyy/thmz/service/impl/thmz/TsmzServiceImpl.java

@@ -12,6 +12,7 @@ import cn.hnthyy.thmz.mapper.his.mz.MzPatientMiMapper;
 import cn.hnthyy.thmz.service.thmz.TsmzService;
 import cn.hutool.core.convert.Convert;
 import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpStatus;
 import cn.hutool.json.JSONUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -22,7 +23,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
-import org.springframework.web.client.RestTemplate;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -529,8 +529,11 @@ public class TsmzServiceImpl implements TsmzService {
     public void evaluatorStart(EvaluateInfo evaluateInfo) {
         String realUrl = wxPayOrderServiceUrl + "/api/bjdeshun/evaluator/start";
         try {
-            log.info("[evaluatorStart]入参门诊={}",evaluateInfo);
-            new RestTemplate().postForObject(realUrl, evaluateInfo, String.class);
+            log.info("[evaluatorStart]入参={}",evaluateInfo);
+            HttpRequest.post(realUrl)
+                    .body(JsonUtil.object2Json(evaluateInfo))
+                    .timeout(2000)
+                    .execute();
         } catch (Exception e) {
             log.error(StrUtil.format("调用新评价器接口,病人id={},就诊次数times={}报错信息:", evaluateInfo.getPatNo(), evaluateInfo.getTimes()),e);
         }