From 99eb091857a72a0defd0a5bdd2185d1d2d8da573 Mon Sep 17 00:00:00 2001
From: WS <1143478319@qq.com>
Date: 星期四, 07 九月 2023 18:26:14 +0800
Subject: [PATCH] 提交熏蒸备案

---
 src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java |  119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 118 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java b/src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java
index 26923c6..9f9f736 100644
--- a/src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java
+++ b/src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java
@@ -1,6 +1,23 @@
 package com.fzzy.otherview.gd2022.pr;
 
+import com.alibaba.fastjson.JSONObject;
+import com.bstek.dorado.annotation.DataProvider;
+import com.fzzy.api.entity.ApiInfoData;
+import com.fzzy.api.service.ApiCommonService;
+import com.fzzy.api.service.ApiPushManager;
+import com.fzzy.api.view.repository.ApiInfoDataRep;
+import com.fzzy.otherview.gd2022.dto.GdApi1023;
+import com.fzzy.otherview.gd2022.dto.GdApi1023Dtl;
+import com.fzzy.otherview.gd2022.dto.GdApi1023People;
+import com.fzzy.otherview.gd2022.dto.GdApi1023Way;
+import com.fzzy.otherview.whhpjl.WhjlConstant;
+import com.fzzy.otherview.whhpjl.dto.WhjlApi1101;
+import com.fzzy.push.gd2022.ApiCodeConstant;
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
+
+import java.util.*;
 
 /**
  * 骞夸笢鐪佹帴鍙�-1023 鐔忚捀澶囨
@@ -8,8 +25,108 @@
  * @author czt
  * @date 2023/8/17
  */
-@Component
+@Component(value = "gDApi1023PR")
 public class GDApi1023PR {
 
+    @Autowired
+    private ApiCommonService apiCommonService;
+    @Autowired
+    private ApiPushManager apiPushManager;
+    @Autowired
+    private ApiInfoDataRep apiInfoDataRep;
+
+    /**
+     * 鑾峰彇鐔忚捀澶囨涓昏〃淇℃伅
+     * gDApi1023PR#listData
+     *
+     * @return
+     */
+    @DataProvider
+    public List<GdApi1023> listData(Map<String, Object> param) {
+
+        List<ApiInfoData> result = apiInfoDataRep.getDataByInteId(ApiCodeConstant.API_1023);
+        if(null == result ||result.isEmpty()){
+            return null;
+        }
+        List<GdApi1023> list = new ArrayList<>();
+        GdApi1023 gbApi1023;
+        for (ApiInfoData infoData : result) {
+            GdApi1023 gdApi1023= JSONObject.parseObject(infoData.getData(), GdApi1023.class);
+            list.add(gdApi1023);
+        }
+        return list;
+    }
+
+    /**
+     * 鑾峰彇鐔忚捀浣滀笟浜哄憳淇℃伅琛�
+     * gDApi1023PR#peopleList
+     *
+     */
+    @DataProvider
+    public List<GdApi1023People> peopleList(Map<String, Object> param) throws Exception {
+        String xzbm = (String) param.get("xzbm");
+        String deptId = (String) param.get("deptId");
+        String tbrq = DateFormatUtils.format((Date) param.get("tbrq"), "yyyyMMdd");
+        String id = xzbm + deptId + tbrq;
+
+        List<ApiInfoData> infoData = apiInfoDataRep.getDataByDataId(id);
+        if(null == infoData || infoData.isEmpty()){
+            return null;
+        }
+        GdApi1023 gdApi1023= JSONObject.parseObject(infoData.get(0).getData(), GdApi1023.class);
+        if(null == gdApi1023){
+            return null;
+        }
+
+        return gdApi1023.getPeoples();
+    }
+
+    /**
+     * 鑾峰彇鐔忚捀澶囨鏂瑰紡琛ㄨ〃淇℃伅
+     * gDApi1023PR#wayList
+     *
+     */
+    @DataProvider
+    public List<GdApi1023Way> wayList(Map<String, Object> param) throws Exception {
+        String xzbm = (String) param.get("xzbm");
+        String deptId = (String) param.get("deptId");
+        String tbrq = DateFormatUtils.format((Date) param.get("tbrq"), "yyyyMMdd");
+        String id = xzbm + deptId + tbrq;
+
+        List<ApiInfoData> infoData = apiInfoDataRep.getDataByDataId(id);
+        if(null == infoData || infoData.isEmpty()){
+            return null;
+        }
+        GdApi1023 gdApi1023= JSONObject.parseObject(infoData.get(0).getData(), GdApi1023.class);
+        if(null == gdApi1023){
+            return null;
+        }
+
+        return gdApi1023.getWays();
+    }
+
+    /**
+     * 瀹炴柦鐔忚捀浣滀笟鐨勫偍绮伯鎯呮槑缁嗚〃
+     * gDApi1023PR#dtlList
+     *
+     */
+    @DataProvider
+    public List<GdApi1023Dtl> dtlList(Map<String, Object> param) throws Exception {
+        String xzbm = (String) param.get("xzbm");
+        String deptId = (String) param.get("deptId");
+        String tbrq = DateFormatUtils.format((Date) param.get("tbrq"), "yyyyMMdd");
+        String id = xzbm + deptId + tbrq;
+
+        List<ApiInfoData> infoData = apiInfoDataRep.getDataByDataId(id);
+        if(null == infoData || infoData.isEmpty()){
+            return null;
+        }
+        GdApi1023 gdApi1023= JSONObject.parseObject(infoData.get(0).getData(), GdApi1023.class);
+        if(null == gdApi1023){
+            return null;
+        }
+
+        return gdApi1023.getDtls();
+    }
 
 }

--
Gitblit v1.9.3