From caf2599a9869244ded811018811c37a2aabac3fc Mon Sep 17 00:00:00 2001 From: vince <757871790@qq.com> Date: 星期三, 08 一月 2025 11:29:05 +0800 Subject: [PATCH] 优化测温协议 --- src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java | 81 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 80 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java b/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java index 1dc9881..182f078 100644 --- a/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java +++ b/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java @@ -128,6 +128,64 @@ return pushData(param, null, data); } +// @Override +// public ResponseDto pushFile(ApiParam param, ApiConfs conf, Object data) { +// +// String inteId = param.getInteId(); +// String kqdm = param.getKqdm(); +// +// try { +// +// if (null == conf) { +// conf = apiCommonService.getConf(kqdm); +// } +// //鑾峰彇TOKEN +// GD2022AuthToken token = getGD2022AuthToken(conf); +// +// ApiLog apiLog = new ApiLog(); +// apiLog.setId(ContextUtil.getUUID()); +// apiLog.setInteId(inteId); +// apiLog.setData(JSON.toJSONString(data)); +// apiLog.setKqdm(kqdm); +// apiLog.setUploadTime(new Date()); +// +// String wjdz = ""; +// if (Constant.API_CODE_1109.equals(inteId)) { +// //灏佽鏁版嵁,鑾峰彇鏂囦欢鍦板潃 +// Gd2022Api1109 api1109 = new Gd2022Api1109(); +// BeanUtils.copyProperties(data, api1109); +// wjdz = api1109.getWjdz(); +// } else if (Constant.API_CODE_1307.equals(inteId)) { +// //灏佽鏁版嵁,鑾峰彇鏂囦欢鍦板潃 +// Gd2022Api1307 api1307 = new Gd2022Api1307(); +// BeanUtils.copyProperties(data, api1307); +// wjdz = api1307.getWjdz(); +// } else if (Constant.API_CODE_1308.equals(inteId)) { +// //灏佽鏁版嵁,鑾峰彇鏂囦欢鍦板潃 +// Gd2022Api1308 api1308 = new Gd2022Api1308(); +// BeanUtils.copyProperties(data, api1308); +// wjdz = api1308.getWjdz(); +// } +// if (StringUtils.isEmpty(wjdz)) { +// ResponseDto responseDto = new ResponseDto(99, "娌℃湁鑾峰彇鍒版枃浠跺湴鍧�", wjdz); +// apiLog.setStatus(99); +// apiLog.setResult("娌℃湁鑾峰彇鍒版枃浠跺湴鍧�"); +// apiLogRep.save(apiLog); +// return responseDto; +// } +// //鍏堜笂浼犳枃浠�,鑾峰彇鏂囦欢id +// GD2022ResponseDto responseDto = GD2022HttpClientUtil.postUploadData(conf.getApiUrl(), token, wjdz); +// ResponseDto resd = new ResponseDto(); +// resd.setSuccess(responseDto.getCode() == 200 ? 0 : responseDto.getCode()); +// resd.setBizId((String) responseDto.getData()); +// resd.setMsg(responseDto.getMsg()); +// return resd; +// } catch (Exception e) { +// log.error(e.getMessage(), e); +// return new ResponseDto(99, e.getMessage()); +// } +// } + /** * 鎺ㄩ�佽储鍔℃暟鎹帴鍙� * @param param @@ -271,7 +329,23 @@ Gd2022Api1101 api1101 = new Gd2022Api1101(); BeanUtils.copyProperties(data, api1101); return JSON.toJSONString(api1101); - } else if (Constant.API_CODE_1109.equals(inteId)) { + } else if (Constant.API_CODE_1102.equals(inteId)) { + Gd2022Api1102 api1102 = new Gd2022Api1102(); + BeanUtils.copyProperties(data, api1102); + return JSON.toJSONString(api1102); + } else if (Constant.API_CODE_1103.equals(inteId)) { + Gd2022Api1103 api1103 = new Gd2022Api1103(); + BeanUtils.copyProperties(data, api1103); + return JSON.toJSONString(api1103); + } else if (Constant.API_CODE_1104.equals(inteId)) { + Gd2022Api1104 api1104 = new Gd2022Api1104(); + BeanUtils.copyProperties(data, api1104); + return JSON.toJSONString(api1104); + } else if (Constant.API_CODE_1105.equals(inteId)) { + Gd2022Api1105 api1105 = new Gd2022Api1105(); + BeanUtils.copyProperties(data, api1105); + return JSON.toJSONString(api1105); + }else if (Constant.API_CODE_1109.equals(inteId)) { //灏佽鏁版嵁 Gd2022Api1109 api1109 = new Gd2022Api1109(); BeanUtils.copyProperties(data, api1109); @@ -281,9 +355,14 @@ } //鍏堜笂浼犳枃浠�,鑾峰彇鏂囦欢id GD2022ResponseDto responseDto = GD2022HttpClientUtil.postUploadData(url, authToken, api1109.getWjdz()); + System.out.println((String) responseDto.getData()); //璁剧疆涓婁紶鏂囦欢id api1109.setFileStorageId((String) responseDto.getData()); return JSON.toJSONString(api1109); + }else if (Constant.API_CODE_1111.equals(inteId)) { + Gd2022Api1111 api1111 = new Gd2022Api1111(); + BeanUtils.copyProperties(data, api1111); + return JSON.toJSONString(api1111); } else if (Constant.API_CODE_1208.equals(inteId)) { Gd2022Api1208 api1208 = new Gd2022Api1208(); BeanUtils.copyProperties(data, api1208); -- Gitblit v1.9.3