From 1dd0a2bb164658031c5e2db4f215424b86dcd0b5 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 13 十一月 2025 14:49:02 +0800
Subject: [PATCH] 最新版本541200007
---
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java | 13 +--
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/AuthResultPageRequest.java | 14 ++++
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageDetailResponse.java | 24 ++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 27 +++++++-
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java | 8 ++
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageResponse.java | 15 +++++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java | 53 ++++++++++++++---
7 files changed, 133 insertions(+), 21 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
index 5a9b09b..5382dfa 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
@@ -288,11 +288,9 @@
* 3銆佽兘绠′腑蹇冿細ngzx
*/
public interface MenuPageId{
- String[] componentIds = new String[]{"vms","fem","cems"};
-// String[] componentIds = new String[]{"Infovision iPark Platform","dfe","cems"};
- String afzx = "010100";//瀹夐槻涓績
- String xkzx = "010100";//娑堟帶涓績
-
+ String[] componentIds = new String[]{"Infovision iPark Platform","dfe","cems"};
+ String afzx = "afzx";//瀹夐槻涓績
+ String xkzx = "xkzx";//娑堟帶涓績
String ngzx = "ngzx";//鑳界涓績
String jsc = "jsc";//鐗╀笟鍚庡嫟
String kqgzt = "attendance_workstand";//鑰冨嫟绠$悊
@@ -432,6 +430,7 @@
String[] findDeviceStatistics= new String[]{"/api/v1/device/findDeviceStatistics","鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁�"};// 鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁�
String[] resourcesByParams= new String[]{"/api/irds/v2/resource/resourcesByParams","銆愭捣搴锋秷闃茬湅鏉裤�戞牴鎹潯浠舵煡璇㈢洰褰曚笅鏈夋潈闄愮殑璧勬簮鍒楄〃"};// 銆愭捣搴锋秷闃茬湅鏉裤�戞牴鎹潯浠舵煡璇㈢洰褰曚笅鏈夋潈闄愮殑璧勬簮鍒楄〃
String[] iccmSignoff= new String[]{"/api/iccm/v1/signoff","iccm璁垮绛剧"};// iccm璁垮绛剧
+ String[] authResultPage= new String[]{"/open/v1/auth/result/businessNo/page","鎸変笟鍔$紪鍙锋煡璇笅鍙戣褰�"};// 1.4.7.3鎸変笟鍔$紪鍙锋煡璇笅鍙戣褰�
String[] wxAuthUrl= new String[]{"dps/web/wxAuth/loginV2?oaId=atwl&redirectUrl=","寰呭姙鑰冨嫟璺宠浆鍦板潃"};// 寰呭姙鑰冨嫟璺宠浆鍦板潃
}
/**
@@ -613,9 +612,7 @@
DOOR_FACE_AUTH_FAIL(197163, "浜鸿劯璁よ瘉澶辫触" ),
DOOR_FACE_AUTH_SUCCESS(196893, "浜鸿劯璁よ瘉閫氳繃" ),
PLATFORM_WORKSTATUS(483329, "鏈堝彴宸ヤ綔鐘舵�佷簨浠�" ),
- PLATFORM_CAR_STATUS(487425, "鏈堝彴杞﹁締鐘舵�佷簨浠�" ),
- //todo 鏆傛湭鎻愪緵
- SECURITY_STATUS(111111, "瀹夐槻浜嬩欢" )
+ PLATFORM_CAR_STATUS(487425, "鏈堝彴杞﹁締鐘舵�佷簨浠�" )
;
// 鎴愬憳鍙橀噺
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
index d305617..20ee209 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
@@ -575,6 +575,14 @@
return startDoPostStringArtemis(HKConstants.InterfacePath.authItemList,body);
}
/**
+ * 鎸変笟鍔$紪鍙锋煡璇笅鍙戣褰�
+ * @param body
+ * @return
+ */
+ public static String authResultPage(String body) {
+ return startDoPostStringArtemis(HKConstants.InterfacePath.authResultPage,body);
+ }
+ /**
* 鎵归噺寮�鍗�
* @param body
* @return
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/AuthResultPageRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/AuthResultPageRequest.java
new file mode 100644
index 0000000..da8218d
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/AuthResultPageRequest.java
@@ -0,0 +1,14 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AuthResultPageRequest {
+
+ private String businessNo ;//Body String 32 true 涓氬姟缂栧彿锛岀敤浜庝覆鑱斾笁鏂逛笌娴峰悍鐨勪笟鍔℃暟鎹紝姣斿闂ㄧ鎺堟潈鍗曞彿銆佽鍋囧崟鍙枫�佽瀹㈤绾﹀崟鍙凤紝褰撲竴娆′笟鍔¢渶瑕佽皟鐢ㄥ涓帴鍙f椂锛屽彲浠ョ敤鍚屼竴涓笟鍔$紪鍙疯繘琛屼覆鑱斻��
+ private Integer pageNo ;//number True 椤电爜,pageNo>0
+ private Integer pageSize ;//number True 椤靛ぇ灏�,0<pageSize<=1000
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageDetailResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageDetailResponse.java
new file mode 100644
index 0000000..eb1e9a7
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageDetailResponse.java
@@ -0,0 +1,24 @@
+package com.doumee.core.haikang.model.param.respose;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AuthResultPageDetailResponse {
+
+
+ private String dataId;// long true 涓嬪彂鍞竴鏍囪瘑
+ private String businessNo ;//String true 涓氬姟缂栧彿
+ private String personId;// String true 浜哄憳缂栧彿
+ private String deviceIndexCode;// String true 璁惧缂栧彿
+ private String deviceType ;//String true 璁惧绫诲瀷
+ private String downloadBeginTime;// String false 涓嬪彂寮�濮嬫椂闂�
+ private String downloadEndTime ;//String false 涓嬪彂缁撴潫鏃堕棿
+ private Integer downPersonStatus;// Integer true 浜哄憳涓嬪彂鐘舵�� 1鎴愬姛锛�3澶辫触锛�0鏈彉鏇�
+ private String downPersonDetail;// String false 浜哄憳涓嬪彂缁撴灉鏄庣粏瀵硅薄銆愯繑鍥炵殑鏄痡son瀛楃涓层�� 鍙傝�冮檮褰�2.3
+ private Integer downCardStatus ;//Integer false 鍗$墖涓嬪彂鐘舵�� 1鎴愬姛锛�3澶辫触锛�0鏈彉鏇� 鏈彉鏇存寚鏃犻渶涓嬭浇瀵瑰簲浠嬭川锛屾瘮濡備汉鍛樻崲鐓х墖鍙渶涓嬪彂浜鸿劯锛岄偅涔堝崱鐗囩殑鐘舵�佸氨鏄湭鍙樻洿
+ private String downCardDetail ;//String false 鍗$墖涓嬪彂缁撴灉鏄庣粏瀵硅薄銆愯繑鍥炵殑鏄痡son瀛楃涓层�� 鍙傝�冮檮褰�2.3
+ private Integer downFaceStatus ;//Integer false 浜鸿劯涓嬪彂鐘舵��1鎴愬姛锛�3澶辫触锛�0鏈彉鏇�
+ private String downFaceDetail;// String false 浜鸿劯涓嬪彂缁撴灉鏄庣粏瀵硅薄銆愯繑鍥炵殑鏄痡son瀛楃涓层�� 鍙傝�冮檮褰�2.3
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageResponse.java
new file mode 100644
index 0000000..fbd8681
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/AuthResultPageResponse.java
@@ -0,0 +1,15 @@
+package com.doumee.core.haikang.model.param.respose;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AuthResultPageResponse {
+
+ private Integer total;// number False 鎬绘潯鏁�
+ private Integer pageSize;// number False 褰撳墠椤电爜
+ private Integer pageNo;// number False 鍗曢〉灞曠ず鏁版嵁鏁扮洰
+ private List<AuthResultPageDetailResponse> list;//object[] False 璁惧閫氶亾鐨勪笅杞借褰�
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
index 8015ae7..5cb7b07 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -764,6 +764,27 @@
return null;
}
/**
+ *娴峰悍1.4.7.3鎸変笟鍔$紪鍙锋煡璇笅鍙戣褰�
+ * @return
+ */
+ public static BaseResponse<AuthResultPageResponse> authResultPage(AuthResultPageRequest param){
+ log.info("銆愭捣搴锋寜涓氬姟缂栧彿鏌ヨ涓嬪彂璁板綍銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ String res = null;
+ try {
+ res = HKTools.authResultPage(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse<AuthResultPageResponse> >(){};
+ BaseResponse<AuthResultPageResponse> 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
*/
@@ -1190,9 +1211,8 @@
String componentId = HKConstants.MenuPageId.componentIds[0];
String menuId = HKConstants.MenuPageId.afzx;
if(Constants.equalsInteger(type,Constants.ONE)){
- componentId = HKConstants.MenuPageId.componentIds[1];
menuId = HKConstants.MenuPageId.xkzx;
- }/*else if(Constants.equalsInteger(type,Constants.TWO)){
+ }else if(Constants.equalsInteger(type,Constants.TWO)){
menuId = HKConstants.MenuPageId.ngzx;
}else if(Constants.equalsInteger(type,Constants.THREE)){
menuId = HKConstants.MenuPageId.jsc;
@@ -1207,11 +1227,10 @@
// return "https://10.50.250.253:443/xauthplus-plugin/thirdLogin?type=third&service=https://10.50.250.253:443/cems/config/generalCard&token="+token;
}else if(Constants.equalsInteger(type,7)){
menuId = HKConstants.MenuPageId.hqzx;
- }*/
+ }
log.info("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================寮�濮�====menuId:"+menuId+"==token:"+token);
try {
///xauthplus-plugin/thirdLogin?type=third&componentId=${componentId}&componentMenuId=${menuId}&token=${token}
- ///xauthplus-plugin/thirdLogin?type=third&componentld=vms&componentMenuld=010100
String res = HKTools.getMenuUrl(componentId,menuId,token);
return res;
}catch (Exception e){
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
index 550868e..267814e 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
@@ -70,7 +70,13 @@
public void run() {
try {
for(Empower c : list){
- TaskPersonDetailRequest param = new TaskPersonDetailRequest();
+ AuthResultPageRequest param = new AuthResultPageRequest();
+ param.setPageNo(1);
+ param.setPageSize(999);
+ param.setBusinessNo(c.getHkId());
+ BaseResponse<AuthResultPageResponse> response =HKService.authResultPage(param);
+
+ /* TaskPersonDetailRequest param = new TaskPersonDetailRequest();
param.setPageNo(1);
param.setPageSize(10);
param.setPersonIds(new String[]{c.getMemberHkId()});
@@ -80,22 +86,24 @@
rec.setResourceType(c.getDeviceType());
param.setResourceInfo(rec);
//鏌ヨ涓嬪彂鐘舵��
- BaseResponse<TaskPersonDetailListResponse> response = HKService.taskPersoDetail(param);
+ BaseResponse<TaskPersonDetailListResponse> response = HKService.taskPersoDetail(param);*/
if(response!=null
&& StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)
&& response.getData()!=null
&& response.getData().getList() != null
&& response.getData().getList().size() > 0
&&response.getData().getList().get(0) !=null){
- TaskPersonDetailResponse model = response.getData().getList().get(0);
- if (model.getPersonDownloadDetail()!=null ) {
+// TaskPersonDetailResponse model = response.getData().getList().get(0);
+
+ AuthResultPageDetailResponse model = getAuthDetailByUserAndDevice(c,response.getData().getList());
+// if (model.getPersonDownloadDetail()!=null ) {
+ if (model!=null ) {
boolean isface = false;//鏄惁浜鸿劯涓嬪彂鎴愬姛
boolean iscard = false;//鏄惁鏈夊崱鐗囦笅鍙戞垚鍔�
//鏇存柊宸插畬鎴愪笅杞戒换鍔�
String remark = "";
String cardInfo ="";
- TaskPersonDetailCardFaceResponse d = model.getPersonDownloadDetail();
- if (d.getCards() != null && d.getCards().size() > 0) {
+ /* if (d.getCards() != null && d.getCards().size() > 0) {
for (TaskPersonDetailCardInfoResponse card : d.getCards()) {
if(StringUtils.equals(card.getErrorCode(),HKResponseCode.ReturnCode.RESPONSE_SUCCEE.getKey())){
cardInfo += card.getId() + " ";
@@ -138,13 +146,31 @@
}
}
//濡傛灉杩斿洖涓嬪彂鎴愬姛 鎴栬�� 浜鸿劯涓嬪彂鎴愬姛骞朵笖鍗$墖涓嬪彂鎴愬姛
- boolean isSuccess =StringUtils.equals(model.getPersondownloadResult(), "0") || (iscard&&isface);
+ boolean isSuccess =StringUtils.equals(model.getPersondownloadResult(), "0") || (iscard&&isface);*/
+
+ if (Constants.equalsInteger(model.getDownCardStatus(),0)) {
+ cardInfo = "鍗$墖涓嬪彂鏈彉鏇�";
+ }else if (!Constants.equalsInteger(model.getDownCardStatus(),1)) {
+ cardInfo = "鍗$墖涓嬪彂鎴愬姛";
+ }else {
+ cardInfo = "鍗$墖涓嬪彂澶辫触";
+ }
+
+ if ( Constants.equalsInteger(model.getDownFaceStatus(),0)) {
+ remark = "浜鸿劯涓哄彉鏇达紒";
+ } else if (!Constants.equalsInteger(model.getDownFaceStatus(),1)) {
+ remark = "浜鸿劯涓嬪彂鎴愬姛锛�";
+ }else{
+ remark = "浜鸿劯涓嬪彂澶辫触锛�";
+ }
+ //涓嬪彂鎴愬姛鎴栬�呮湭鍙樻洿
+ boolean isSuccess = Constants.equalsInteger(model.getDownPersonStatus(),1)|| Constants.equalsInteger(model.getDownPersonStatus(),0) ;
empowerMapper.update(null, new UpdateWrapper<Empower>()
.lambda()
.eq(Empower::getId, c.getId())
- .set(Empower::getRemark, remark)
+ .set(Empower::getRemark,cardInfo+ remark)
.set(Empower::getEditDate,new Date())
- .set(Empower::getSendInfo, remark)
+ .set(Empower::getSendInfo,cardInfo+remark)
.set(Empower::getSendStatus, isSuccess?Constants.EmpowerStatus.pass:Constants.EmpowerStatus.fail));
if(isSuccess && Constants.equalsInteger(c.getMemberDeleted(), Constants.ONE)&& Constants.equalsInteger(c.getIsdeleted(), Constants.ONE) ){
//濡傛灉鏄垹闄ゆ潈闄愭垚鍔燂紝妫�鏌ユ槸鍚﹀垹闄や汉鍛�
@@ -184,6 +210,15 @@
}
+ private AuthResultPageDetailResponse getAuthDetailByUserAndDevice(Empower c, List<AuthResultPageDetailResponse> list) {
+ for(AuthResultPageDetailResponse t : list){
+ if(StringUtils.equals(t.getPersonId(),c.getMemberHkId()) && StringUtils.equals(t.getDeviceIndexCode(),c.getDeviceIndexCode())){
+ return t;
+ }
+ }
+ return null;
+ }
+
/**
* 瀵规捣搴峰垹闄ょ粍缁囦俊鎭�
--
Gitblit v1.9.3