From 078bfa743804c25754162f5ec47231c499e28828 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 22 十二月 2023 11:29:12 +0800
Subject: [PATCH] ERP接口
---
server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 203 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 182 insertions(+), 21 deletions(-)
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
index f886834..825ab86 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -1,29 +1,19 @@
package com.doumee.core.haikang.service;
import com.alibaba.fastjson.JSONObject;
-import com.doumee.biz.system.SystemDictDataBiz;
-import com.doumee.core.haikang.model.param.request.*;
-import com.doumee.core.haikang.model.param.respose.*;
-import com.doumee.core.utils.Constants;
+import com.alibaba.fastjson.TypeReference;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.HKTools;
import com.doumee.core.haikang.model.param.BaseRequst;
import com.doumee.core.haikang.model.param.BaseResponse;
-import com.doumee.dao.business.model.InterfaceLog;
-import com.doumee.service.business.InterfaceLogService;
-import com.hikvision.artemis.sdk.config.ArtemisConfig;
+import com.doumee.core.haikang.model.param.request.*;
+import com.doumee.core.haikang.model.param.respose.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.PostConstruct;
-import com.alibaba.fastjson.TypeReference;
import java.io.InputStream;
-import java.util.Date;
import java.util.List;
@Slf4j
@@ -88,7 +78,7 @@
*鎵归噺鍒犻櫎缁勭粐鏁版嵁
* @return
*/
- public static BaseResponse delBatchOrg(OrgDelRequest param){
+ public static BaseResponse<List<OrgUpdateFailureResponse>> delBatchOrg(OrgDelRequest param){
log.info("銆愭捣搴峰垹闄ょ粍缁囥��================寮�濮�===="+JSONObject.toJSONString(param));
try {
@@ -161,13 +151,13 @@
*鎵归噺鍒犻櫎浜哄憳淇℃伅
* @return
*/
- public static BaseResponse<OrgOrUserAddFailureResponse> delBatchUser(List<UserAddRequest> param){
+ public static BaseResponse<List<UserDelResponse>> delBatchUser(UserDelRequest param){
log.info("銆愭捣搴锋壒閲忔柊澧炰汉鍛樸��================寮�濮�===="+JSONObject.toJSONString(param));
try {
String res = HKTools.delBatchUser(JSONObject.toJSONString(param));
TypeReference typeReference =
new TypeReference< BaseResponse<OrgOrUserAddFailureResponse>>(){};
- BaseResponse<OrgOrUserAddFailureResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ BaseResponse<List<UserDelResponse >> result = JSONObject.parseObject(res, typeReference.getType());
logResult(result,"娴峰悍鎵归噺鏂板浜哄憳");
return result;
}catch (Exception e){
@@ -179,7 +169,7 @@
*娣诲姞浜鸿劯淇℃伅
* @return
*/
- public static BaseResponse<FaceAddOrEditesponse> addFace(List<FaceAddRequest> param){
+ public static BaseResponse<FaceAddOrEditesponse> addFace( FaceAddRequest param){
log.info("銆愭捣搴锋坊鍔犱汉鑴镐俊鎭��================寮�濮�===="+JSONObject.toJSONString(param));
try {
String res = HKTools.addFace(JSONObject.toJSONString(param));
@@ -197,7 +187,7 @@
*缂栬緫浜鸿劯淇℃伅
* @return
*/
- public static BaseResponse<FaceAddOrEditesponse> editFace(List<FaceEditRequest> param){
+ public static BaseResponse<FaceAddOrEditesponse> editFace( FaceEditRequest param){
log.info("銆愭捣搴风紪杈戜汉鑴镐俊鎭��================寮�濮�===="+JSONObject.toJSONString(param));
try {
String res = HKTools.editFace(JSONObject.toJSONString(param));
@@ -241,6 +231,51 @@
return res;
}catch (Exception e){
log.error("銆愭捣搴蜂汉鑴歌闂浘鐗囨祦銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇璁垮璁板綍涓殑鍥剧墖
+ * @return
+ */
+ public static InputStream getVisitPicture(VisitPictureRequest param) {
+ log.info("銆愭捣搴疯瀹㈠浘鐗囨祦銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ InputStream res = HKTools.getVisitPicture(JSONObject.toJSONString(param));
+ log.error("銆愭捣搴疯瀹㈠浘鐗囨祦銆�================鎴愬姛====\n");
+ return res;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯瀹㈠浘鐗囨祦銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇闂ㄧ浜嬩欢鐨勫浘鐗�
+ * @return
+ */
+ public static InputStream getDevicePicture(DevicePictureRequest param) {
+ log.info("銆愭捣搴烽棬绂佷簨浠跺浘鐗囨祦銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ InputStream res = HKTools.getDevicePicture(JSONObject.toJSONString(param));
+ log.error("銆愭捣搴烽棬绂佷簨浠跺浘鐗囨祦銆�================鎴愬姛====\n");
+ return res;
+ }catch (Exception e){
+ log.error("銆愭捣搴烽棬绂佷簨浠跺浘鐗囨祦銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ * 鏌ヨ杞﹁締鎶撴媿鍥剧墖
+ * @return
+ */
+ public static InputStream getCarPicture(CarPictureRequest param) {
+ log.info("銆愭捣搴疯溅杈嗘姄鎷嶅浘鐗囧浘鐗囨祦銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ InputStream res = HKTools.getCarPicture(JSONObject.toJSONString(param));
+ log.error("銆愭捣搴疯溅杈嗘姄鎷嶅浘鐗囧浘鐗囨祦銆�================鎴愬姛====\n");
+ return res;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯溅杈嗘姄鎷嶅浘鐗囧浘鐗囨祦銆�================澶辫触====锛歕n"+ e.getMessage());
}
return null;
}
@@ -411,13 +446,13 @@
*璁垮鍏嶇櫥璁伴绾�
* @return
*/
- public static BaseResponse<VisitAppointmentVistorResponse> visitAppiontmentMDJ(VisitAppointmentMDJRequest param){
+ public static BaseResponse<VisitAppointmentMDJResponse> visitAppiontmentMDJ(VisitAppointmentMDJRequest param){
log.info("銆愭捣搴疯瀹㈠厤鐧昏棰勭害銆�================寮�濮�===="+JSONObject.toJSONString(param));
try {
String res = HKTools.visitAppiontmentMDJ(JSONObject.toJSONString(param));
TypeReference typeReference =
- new TypeReference< BaseResponse<VisitAppointmentVistorResponse> >(){};
- BaseResponse<VisitAppointmentVistorResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ new TypeReference< BaseResponse<VisitAppointmentMDJResponse> >(){};
+ BaseResponse<VisitAppointmentMDJResponse> result = JSONObject.parseObject(res, typeReference.getType());
logResult(result,"娴峰悍璁垮鍏嶇櫥璁伴绾�");
return result;
}catch (Exception e){
@@ -521,6 +556,132 @@
}
return null;
}
+ /**
+ *娴峰悍鍒涘缓涓�鍗¢�氫笅杞戒换鍔�
+ * @return
+ */
+ public static BaseResponse<TaskAdditionResponse> taskAddition(TaskAdditionRequest param){
+ log.info("銆愭捣搴峰垱寤轰竴鍗¢�氫笅杞戒换鍔°��================寮�濮�===="+JSONObject.toJSONString(param));
+ String res = null;
+ try {
+ res = HKTools.taskAddition(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse<TaskAdditionResponse>>(){};
+ BaseResponse<TaskAdditionResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鍒涘缓涓�鍗¢�氫笅杞戒换鍔�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴峰垱寤轰竴鍗¢�氫笅杞戒换鍔°��================澶辫触====锛歕n"+ e.getMessage());
+ }finally {
+ // saveInterfaceLog(param,res);
+ }
+ return null;
+ }
+ /**
+ *娴峰悍涓�鍗¢�氫换鍔℃坊鍔犳暟鎹�
+ * @return
+ */
+ public static BaseResponse taskDataAddition(TaskDataAdditionRequest param){
+ log.info("銆愭捣搴蜂竴鍗¢�氫换鍔℃坊鍔犳暟鎹��================寮�濮�===="+JSONObject.toJSONString(param));
+ String res = null;
+ try {
+ res = HKTools.taskDataAddition(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse >(){};
+ BaseResponse result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍涓�鍗¢�氫换鍔℃坊鍔犳暟鎹�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴蜂竴鍗¢�氫换鍔℃坊鍔犳暟鎹��================澶辫触====锛歕n"+ e.getMessage());
+ }finally {
+ // saveInterfaceLog(param,res);
+ }
+ return null;
+ }
+ /**
+ *娴峰悍涓�鍗¢�氫换鍔¤繘搴︽煡璇�
+ * @return
+ */
+ public static BaseResponse<TaskProgressNumResponse> taskProgressNum(TaskProgressRequest param){
+ log.info("銆愭捣搴蜂竴鍗¢�氫换鍔¤繘搴︽煡璇€��================寮�濮�===="+JSONObject.toJSONString(param));
+ String res = null;
+ try {
+ res = HKTools.taskProgressNum(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse<TaskProgressNumResponse> >(){};
+ BaseResponse<TaskProgressNumResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍涓�鍗¢�氫换鍔¤繘搴︽煡璇�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴蜂竴鍗¢�氫换鍔¤繘搴︽煡璇€��================澶辫触====锛歕n"+ e.getMessage());
+ }finally {
+ // saveInterfaceLog(param,res);
+ }
+ return null;
+ }
+ /**
+ *娴峰悍涓�鍗¢�氳澶囬�氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯呮�绘暟v2
+ * @return
+ */
+ public static BaseResponse<TaskProgressResponse> taskProgress(TaskProgressRequest param){
+ log.info("銆愭捣搴蜂竴鍗¢�氳澶囬�氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯呮�绘暟銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ String res = null;
+ try {
+ res = HKTools.taskProgress(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse<TaskProgressResponse> >(){};
+ BaseResponse<TaskProgressResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍涓�鍗¢�氳澶囬�氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯呮�绘暟");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴蜂竴鍗¢�氳澶囬�氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯呮�绘暟銆�================澶辫触====锛歕n"+ e.getMessage());
+ }finally {
+ // saveInterfaceLog(param,res);
+ }
+ return null;
+ }
+ /**
+ *娴峰悍鏌ヨ鏉冮檺鏉$洰鍒楄〃
+ * @return
+ */
+ public static BaseResponse<AuthItemListResponse> authItemList(AuthItemListRequest param){
+ log.info("銆愭捣搴锋煡璇㈡潈闄愭潯鐩垪琛ㄣ��================寮�濮�===="+JSONObject.toJSONString(param));
+ String res = null;
+ try {
+ res = HKTools.authItemList(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse<AuthItemListResponse> >(){};
+ BaseResponse<AuthItemListResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鏌ヨ鏉冮檺鏉$洰鍒楄〃");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴锋煡璇㈡潈闄愭潯鐩垪琛ㄣ��================澶辫触====锛歕n"+ e.getMessage());
+ }finally {
+ // saveInterfaceLog(param,res);
+ }
+ return null;
+ }
+ /**
+ *娴峰悍涓�鍗¢�氫换鍔″紑濮嬫墽琛�
+ * @return
+ */
+ public static BaseResponse taskStart(TaskProgressRequest param){
+ log.info("銆愭捣搴蜂竴鍗¢�氫换鍔″紑濮嬫墽琛屻��================寮�濮�===="+JSONObject.toJSONString(param));
+ String res = null;
+ try {
+ res = HKTools.taskStart(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse >(){};
+ BaseResponse result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍涓�鍗¢�氫换鍔″紑濮嬫墽琛�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴蜂竴鍗¢�氫换鍔″紑濮嬫墽琛屻��================澶辫触====锛歕n"+ e.getMessage());
+ }finally {
+ // saveInterfaceLog(param,res);
+ }
+ return null;
+ }
private static void logResult(BaseResponse res,String name) {
if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){
--
Gitblit v1.9.3