From dedacd79c93f8ef95e0cb986f5e7fbd27ddbd907 Mon Sep 17 00:00:00 2001
From: zhaowenxuan <chacca165@163.com>
Date: 星期四, 03 七月 2025 09:12:49 +0800
Subject: [PATCH] 2025-07-03

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java |   43 ++++++++++++++++++++++++++++++++++---------
 1 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
index 4cf674c..e7a3bd5 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
@@ -9,6 +9,7 @@
 
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
 import cn.hutool.extra.pinyin.PinyinUtil;
 import cn.hutool.json.JSONUtil;
 import com.ltkj.hosp.idutil.IdUtils;
@@ -19,6 +20,7 @@
 import com.ltkj.hosp.service.*;
 import com.ltkj.hosp.sqlDomain.*;
 import com.ltkj.system.service.ISysMenuService;
+import com.ltkj.web.wxUtils.HttpClientUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -412,20 +414,28 @@
     @GetMapping ("/tjjcycxm")//鍚屾his椤圭洰鍗曚环淇℃伅
 //    @PreAuthorize("@ss.hasPermi('system:config:tbhisproprice')")
     @ApiOperation (value = "tjjcycxm")
-    public AjaxResult tjjcycxm(@RequestParam(required = false)@ApiParam(value = "浣撴鍙�") String tjh) {
+    public AjaxResult tjjcycxm(@RequestParam(required = false)@ApiParam(value = "浣撴鍙�") String tjh,
+                               @RequestParam(defaultValue = "0",required = false)@ApiParam(value = "0 浠呭悓姝ユ湭瀹℃牳浜哄憳 1鎵�鏈変汉") String lx) {
         String yqbm = configService.selectConfigByKey("dqyyyqbm");
         if(StringUtil.isNotBlank(tjh)){
             zongjianshengchengyichangxiangmu(tjh, yqbm);
             return AjaxResult.success();
-        }
-        List<String> jc = orderService.getJianChaTjNum();
-        if (null != jc && !jc.isEmpty()) {
-            for (String s : jc) {
-                zongjianshengchengyichangxiangmu(s, yqbm);
-
+        }else {
+            List<String> jc =null;
+            if(lx.equals("0")){
+                jc = orderService.getJianChaTjNumWsh();
+            }else {
+                jc = orderService.getJianChaTjNum();
             }
+
+            if (null != jc && !jc.isEmpty()) {
+                for (String s : jc) {
+                    zongjianshengchengyichangxiangmu(s, yqbm);
+                }
+            }
+            return AjaxResult.success();
         }
-        return AjaxResult.success();
+
     }
 
     public void zongjianshengchengyichangxiangmu(String s, String yqbm) {
@@ -438,7 +448,7 @@
                     String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("銆倈锛泑;|,|锛�");
                     for (String jg : split) {
                         if(StringUtil.isNotBlank(jg) && !jg.contains("鏈寮傚父")
-                                && !jg.contains("鏈鏄庢樉寮傚父") && !jg.contains("鏈鍗犱綅")
+                                && !jg.contains("鏈鏄庢樉寮傚父") && !jg.contains("鏈鍗犱綅")  && !jg.contains("鏃犲紓甯�")
                                 && !jg.contains("鏈鏄庢樉")&& !jg.contains("姝e父")&& !jg.contains("鍙屼晶妞庨棿瀛旀棤鐙獎")&& !jg.contains("鏃犳畩")){
                             TjJcycxm jcycxm=new TjJcycxm();
                             jcycxm.setTjh(s);
@@ -482,4 +492,19 @@
         return AjaxResult.success(numbers);
     }
 
+    @GetMapping("/syncHisData")
+    public AjaxResult syncHisData(@RequestParam(value = "tbzd",required = false,defaultValue = "true") Boolean tbzd) {
+        if (tbzd) {
+            String apiUrl = configService.selectConfigByKey("common_api_url");
+            if (StrUtil.isBlank(apiUrl)) {
+                return AjaxResult.error("鏈厤缃甤ommon_api_url");
+            }
+            HttpClientUtils instance = HttpClientUtils.getInstance();
+            String sendHttpGet = instance.sendHttpGet(apiUrl);
+            if (!sendHttpGet.equals("success")) return AjaxResult.error("鍚屾澶辫触");
+        }
+        testMapper.updTbProHisPrice();
+        return AjaxResult.success();
+    }
+
 }

--
Gitblit v1.8.0