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 | 99 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 86 insertions(+), 13 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 fb3bca6..9f9f736 100644 --- a/src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java +++ b/src/main/java/com/fzzy/otherview/gd2022/pr/GDApi1023PR.java @@ -7,13 +7,17 @@ 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.ArrayList; -import java.util.List; +import java.util.*; /** * 骞夸笢鐪佹帴鍙�-1023 鐔忚捀澶囨 @@ -21,7 +25,7 @@ * @author czt * @date 2023/8/17 */ -@Component +@Component(value = "gDApi1023PR") public class GDApi1023PR { @Autowired @@ -32,28 +36,97 @@ private ApiInfoDataRep apiInfoDataRep; /** - * 鑾峰彇鍒楄〃淇℃伅 - * whjlApi1101PR#listData + * 鑾峰彇鐔忚捀澶囨涓昏〃淇℃伅 + * gDApi1023PR#listData * * @return */ @DataProvider - public List<GdApi1023> listData() { - List<ApiInfoData> result = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1101); + 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); -// gdApi1023.setKqdm(infoData.getKqdm()); -// gdApi1023.setCzbz(infoData.getCzbz()); -// gdApi1023.setUpdateTime(infoData.getUpdateTime()); -// gdApi1023.setBizId(infoData.getDataId()); -// list.add(GdApi1023); + 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