From 9ffa4aac7e3ae6b268dbc3567a0749a9898c3708 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期四, 11 一月 2024 18:09:09 +0800 Subject: [PATCH] ERP接口 --- server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 156 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 149 insertions(+), 7 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 c7af861..796dcde 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 @@ -85,7 +85,7 @@ String res = HKTools.delOrg(JSONObject.toJSONString(param)); TypeReference typeReference = new TypeReference< BaseResponse >(){}; - BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); + BaseResponse<List<OrgUpdateFailureResponse>> result = JSONObject.parseObject(res, typeReference.getType()); logResult(result,"娴峰悍鍒犻櫎缁勭粐"); return result; }catch (Exception e){ @@ -156,7 +156,7 @@ try { String res = HKTools.delBatchUser(JSONObject.toJSONString(param)); TypeReference typeReference = - new TypeReference< BaseResponse<OrgOrUserAddFailureResponse>>(){}; + new TypeReference< BaseResponse<List<UserDelResponse>>>(){}; BaseResponse<List<UserDelResponse >> result = JSONObject.parseObject(res, typeReference.getType()); logResult(result,"娴峰悍鎵归噺鏂板浜哄憳"); return result; @@ -169,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)); @@ -187,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)); @@ -602,18 +602,60 @@ *娴峰悍涓�鍗¢�氫换鍔¤繘搴︽煡璇� * @return */ - public static BaseResponse<TaskProgressResponse> taskDataAddition(TaskProgressRequest param){ + 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,"娴峰悍涓�鍗¢�氫换鍔¤繘搴︽煡璇�"); + logResult(result,"娴峰悍涓�鍗¢�氳澶囬�氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯呮�绘暟"); return result; }catch (Exception e){ - log.error("銆愭捣搴蜂竴鍗¢�氫换鍔¤繘搴︽煡璇€��================澶辫触====锛歕n"+ e.getMessage()); + 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); } @@ -640,6 +682,106 @@ } return null; } + /** + *娴峰悍鎵归噺寮�鍗� + * @return + */ + public static BaseResponse<List<CardInfoResponse>> cardBingding(CardBingdingRequest param){ + log.info("銆愭捣搴锋壒閲忓紑鍗°��================寮�濮�===="+JSONObject.toJSONString(param)); + String res = null; + try { + res = HKTools.cardBingding(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse <List<CardInfoResponse>> >(){}; + BaseResponse<List<CardInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍鎵归噺寮�鍗�"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴锋壒閲忓紑鍗°��================澶辫触====锛歕n"+ e.getMessage()); + }finally { + } + return null; + } + /** + *娴峰悍閫�鍗� + * @return + */ + public static BaseResponse cardDeletion(CardDeletionRequest param){ + log.info("銆愭捣搴烽��鍗°��================寮�濮�===="+JSONObject.toJSONString(param)); + String res = null; + try { + res = HKTools.cardDeletion(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 { + } + return null; + } + /** + *娴峰悍鎵归噺鎸傚け + * @return + */ + public static BaseResponse cardLoss(CardLossRequest param){ + log.info("銆愭捣搴锋壒閲忔寕澶便��================寮�濮�===="+JSONObject.toJSONString(param)); + String res = null; + try { + res = HKTools.cardLoss(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 { + } + return null; + } + /** + *娴峰悍鎵归噺瑙f寕 + * @return + */ + public static BaseResponse cardUnLoss(CardLossRequest param){ + log.info("銆愭捣搴锋壒閲忚В鎸傘��================寮�濮�===="+JSONObject.toJSONString(param)); + String res = null; + try { + res = HKTools.cardUnloss(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse >(){}; + BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍鎵归噺瑙f寕"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴锋壒閲忚В鎸傘��================澶辫触====锛歕n"+ e.getMessage()); + }finally { + } + return null; + } + /** + *娴峰悍鏌ヨ璁惧閫氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯� + * @return + */ + public static BaseResponse<TaskPersonDetailListResponse> taskPersoDetail(TaskPersonDetailRequest param){ + log.info("銆愭捣搴锋煡璇㈣澶囬�氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯呫��================寮�濮�===="+JSONObject.toJSONString(param)); + String res = null; + try { + res = HKTools.taskPersoDetail(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse <TaskPersonDetailListResponse>>(){}; + BaseResponse<TaskPersonDetailListResponse> result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍鏌ヨ璁惧閫氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯�"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴锋煡璇㈣澶囬�氶亾鐨勪汉鍛樻潈闄愪笅杞借鎯呫��================澶辫触====锛歕n"+ e.getMessage()); + }finally { + } + return null; + } private static void logResult(BaseResponse res,String name) { if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){ -- Gitblit v1.9.3