From 0b92601f31ea8701711ca4e0037184d8cac22caa Mon Sep 17 00:00:00 2001
From: zjh <zjh@888>
Date: 星期一, 24 六月 2024 19:12:18 +0800
Subject: [PATCH] zjh 本地 2024/06/24 --1

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java |  134 ++++++++++++++++++++++----------------------
 1 files changed, 68 insertions(+), 66 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
index 355843d..b39aa29 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
@@ -352,78 +352,80 @@
         //寮�鍚拰his瀵规帴
         if(null !=sfkqdyhis && sfkqdyhis.equals("Y")){
 
-            String baoGaoDan = ltkjHybgdService.getJianYanBaoGaoDan(order.getCardId());
-            if(null !=baoGaoDan){
-                Date dates = new Date();
-                Map<String,Object> map=new HashMap<>();
-                map.put("his_registration_id",order.getCardId());
-                map.put("ksbm","");
-                map.put("pationid","");
-                map.put("ksrq",DateUtil.format(DateUtil.beginOfDay(dates), "yyyy-MM-dd HH:mm:ss"));
-                map.put("jsrq",DateUtil.format(DateUtil.endOfDay(dates), "yyyy-MM-dd HH:mm:ss"));
-                map.put("pagecount",10);
-                map.put("page",1);
-                AjaxResult result = controller.Getlabreportinfo(map);
-                String result1 = getAjaxResult(result);
-                JSONObject object = getJSONObject(result1);
-                String code = object.getStr("ResultCode");
-                if(null ==code || !code.equals("0")){
-                    return AjaxResult.error("鍖栭獙椤圭洰鏆傛椂鏃犵粨鏋�,璇风◢鍚庡悓姝�!!!");
-                }
-                JSONArray data = object.getJSONArray("ResultData");
-                for (Object datum : data) {
-                    JSONObject jsonObject = (JSONObject)datum;
-                    LtkjHysqd jybgid = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(order.getCardId(), jsonObject.getStr("JYBGID"));
-                    if(null !=jybgid){
-                        continue;
+            List<String> baoGaoDans = ltkjHybgdService.getJianYanBaoGaoDan(order.getCardId());
+            if(null !=baoGaoDans && baoGaoDans.size()>0){
+//                for (String baoGaoDan : baoGaoDans) {
+                    Date dates = new Date();
+                    Map<String,Object> map=new HashMap<>();
+                    map.put("his_registration_id",order.getCardId());
+                    map.put("ksbm","");
+                    map.put("pationid","");
+                    map.put("ksrq",DateUtil.format(DateUtil.beginOfDay(dates), "yyyy-MM-dd HH:mm:ss"));
+                    map.put("jsrq",DateUtil.format(DateUtil.endOfDay(dates), "yyyy-MM-dd HH:mm:ss"));
+                    map.put("pagecount",10);
+                    map.put("page",1);
+                    AjaxResult result = controller.Getlabreportinfo(map);
+                    String result1 = getAjaxResult(result);
+                    JSONObject object = getJSONObject(result1);
+                    String code = object.getStr("ResultCode");
+                    if(null ==code || !code.equals("0")){
+                        return AjaxResult.error("鍖栭獙椤圭洰鏆傛椂鏃犵粨鏋�,璇风◢鍚庡悓姝�!!!");
                     }
-                    LtkjHysqd hysqd=new LtkjHysqd();
-                    hysqd.setTjh(order.getCardId());
-                    hysqd.setTmh(jsonObject.getStr("JYBGID"));
-                    hysqd.setBbbh(jsonObject.getStr("BBDM"));
-                    hysqd.setBbmc(jsonObject.getStr("BBMC"));
-                    hysqd.setXmid(jsonObject.getStr("JYXMDM"));
-                    hysqd.setXmmc(jsonObject.getStr("JYXMMC"));
-                    hysqd.setSqsj(jsonObject.getStr("SQRQ"));
-                    hysqd.setSqys(jsonObject.getStr("SQRBH"));
-                    hysqd.setJgsj(jsonObject.getStr("JYBGRQ"));
-                    hysqd.setSqrxm(jsonObject.getStr("SQRXM"));
-                    hysqd.setSqdh(jsonObject.getStr("SQDBH"));
-                    if (ltkjHysqdService.save(hysqd)) {
-                        Map<String,Object> hashMap=new HashMap<>();
-                        hashMap.put("jybgid",hysqd.getTmh());
-                        AjaxResult bgdres = controller.Getlabdetailinfo(hashMap);
-                        String result2 = getAjaxResult(bgdres);
-                        JSONObject object1 = getJSONObject(result2);
-                        String code1 = object1.getStr("ResultCode");
-                        if(null ==code1 || !code1.equals("0")){
-                            return AjaxResult.error("鍖栭獙椤圭洰鏆傛椂鏃犵粨鏋�,璇风◢鍚庡悓姝�!!!");
+                    JSONArray data = object.getJSONArray("ResultData");
+                    for (Object datum : data) {
+                        JSONObject jsonObject = (JSONObject)datum;
+                        LtkjHysqd jybgid = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(order.getCardId(), jsonObject.getStr("JYBGID"));
+                        if(null !=jybgid){
+                            continue;
                         }
-                        JSONArray datas = object1.getJSONArray("ResultData");
-                        for (Object o : datas) {
-                            JSONObject js = (JSONObject)o;
+                        LtkjHysqd hysqd=new LtkjHysqd();
+                        hysqd.setTjh(order.getCardId());
+                        hysqd.setTmh(jsonObject.getStr("JYBGID"));
+                        hysqd.setBbbh(jsonObject.getStr("BBDM"));
+                        hysqd.setBbmc(jsonObject.getStr("BBMC"));
+                        hysqd.setXmid(jsonObject.getStr("JYXMDM"));
+                        hysqd.setXmmc(jsonObject.getStr("JYXMMC"));
+                        hysqd.setSqsj(jsonObject.getStr("SQRQ"));
+                        hysqd.setSqys(jsonObject.getStr("SQRBH"));
+                        hysqd.setJgsj(jsonObject.getStr("JYBGRQ"));
+                        hysqd.setSqrxm(jsonObject.getStr("SQRXM"));
+                        hysqd.setSqdh(jsonObject.getStr("SQDBH"));
+                        if (ltkjHysqdService.save(hysqd)) {
+                            Map<String,Object> hashMap=new HashMap<>();
+                            hashMap.put("jybgid",hysqd.getTmh());
+                            AjaxResult bgdres = controller.Getlabdetailinfo(hashMap);
+                            String result2 = getAjaxResult(bgdres);
+                            JSONObject object1 = getJSONObject(result2);
+                            String code1 = object1.getStr("ResultCode");
+                            if(null ==code1 || !code1.equals("0")){
+                                return AjaxResult.error("鍖栭獙椤圭洰鏆傛椂鏃犵粨鏋�,璇风◢鍚庡悓姝�!!!");
+                            }
+                            JSONArray datas = object1.getJSONArray("ResultData");
+                            for (Object o : datas) {
+                                JSONObject js = (JSONObject)o;
 //                            ltkjHybgdService.deletedLtkjHybgdByTjhAndTmh(jsonObject.getStr("JYBGID"));
-                            LtkjHybgd bgd=new LtkjHybgd();
-                            bgd.setTmh(hysqd.getTmh());
-                            bgd.setJcxmid(js.getStr("JCZBDM"));
-                            bgd.setJcxm(js.getStr("JCZBMC"));
-                            bgd.setTdh(js.getStr(""));
-                            bgd.setJyjg(js.getStr("JCZBJG"));
-                            bgd.setJgdw(js.getStr("JLDW"));
-                            bgd.setFwzdz(js.getStr(""));
-                            bgd.setFwzgz(js.getStr(""));
-                            bgd.setFwz(js.getStr("CKZFW"));
-                            bgd.setJysj(js.getStr("BGRQ"));
-                            bgd.setJyys(js.getStr("JCRBH"));
-                            bgd.setShsj(js.getStr("BGRQ"));
-                            bgd.setShsj(js.getStr("BGRQ"));
-                            bgd.setShys(js.getStr("SHRBH"));
-                            bgd.setYcbz(js.getStr("YCTS"));
+                                LtkjHybgd bgd=new LtkjHybgd();
+                                bgd.setTmh(hysqd.getTmh());
+                                bgd.setJcxmid(js.getStr("JCZBDM"));
+                                bgd.setJcxm(js.getStr("JCZBMC"));
+                                bgd.setTdh(js.getStr(""));
+                                bgd.setJyjg(js.getStr("JCZBJG"));
+                                bgd.setJgdw(js.getStr("JLDW"));
+                                bgd.setFwzdz(js.getStr(""));
+                                bgd.setFwzgz(js.getStr(""));
+                                bgd.setFwz(js.getStr("CKZFW"));
+                                bgd.setJysj(js.getStr("BGRQ"));
+                                bgd.setJyys(js.getStr("JCRBH"));
+                                bgd.setShsj(js.getStr("BGRQ"));
+                                bgd.setShsj(js.getStr("BGRQ"));
+                                bgd.setShys(js.getStr("SHRBH"));
+                                bgd.setYcbz(js.getStr("YCTS"));
 //                            bgd.setTpurl(js.getStr(""));
-                            ltkjHybgdService.save(bgd);
+                                ltkjHybgdService.save(bgd);
+                            }
                         }
                     }
-                }
+//                }
                 //鍚屾鍖栭獙椤圭洰
                 testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId());
                 //鍚屾妫�鏌ラ」鐩�

--
Gitblit v1.8.0