From 38d08149937d5688934eec69884b337cec5d7402 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期六, 08 二月 2025 18:13:39 +0800
Subject: [PATCH] 最新版本541200007

---
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java                                    |    1 
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/FindDeviceStatisticsRequest.java      |   14 +++++++
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsInfoResponse.java |   16 ++++++++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java                           |   12 ++++--
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java                      |   35 ++++++++++++++++-
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java                                    |   18 +++++++++
 admin/public/template/member.xlsx                                                                                             |    0 
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java                                        |    9 ++++
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsResponse.java     |   12 ++++++
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/PlatformJobExportVo.java                               |    1 
 10 files changed, 111 insertions(+), 7 deletions(-)

diff --git a/admin/public/template/member.xlsx b/admin/public/template/member.xlsx
index 41dbeac3..1e0a152 100644
--- a/admin/public/template/member.xlsx
+++ b/admin/public/template/member.xlsx
Binary files differ
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 2769141..268cc3f 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
@@ -624,6 +624,7 @@
         String[] temperatureHumidityDataStatistic= new String[]{"/api/v2/public/monitor/sensor/list","娑堥槻鐪嬫澘-4娓╂箍搴︾粺璁�"};//娑堥槻鐪嬫澘-娓╂箍搴�
         String[] regionDataRanking= new String[]{"/api/ecm/v1/energy/regionDataRanking","娑堥槻鐪嬫澘-4鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕-鑳借�楃湅鏉�"};//娑堥槻鐪嬫澘-鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕 - 鑳借�楃湅鏉�
         String[] energyTotal= new String[]{"/api/ecm/v1/energy/energyTotal","娑堥槻鐪嬫澘-4鏍规嵁鏃堕棿鍜屾椂闂寸淮搴﹁幏鍙栧洯鍖鸿兘鑰楁暟鎹�"};//娑堥槻鐪嬫澘-鏍规嵁鏃堕棿鍜屾椂闂寸淮搴﹁幏鍙栧洯鍖鸿兘鑰楁暟鎹�
+        String[] findDeviceStatistics= new String[]{"/api/v1/device/findDeviceStatistics","鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁�"};// 鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁�
     }
     /**
      * 闄勫綍A.55娑堥槻璁惧绫诲瀷
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 fcc9683..60a4c3b 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
@@ -871,6 +871,15 @@
 	public static String getFireDevStatusList(String body) {
 		return startDoPostStringArtemis(HKConstants.InterfacePath.getFireDevStatusList,body);
 	}
+
+	/**
+	 * 鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁�
+	 * @param body
+	 * @return
+	 */
+	public static String findDeviceStatistics(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.findDeviceStatistics,body);
+	}
 	/**
 	 *娑堥槻鐪嬫澘-4鎶ヨ淇℃伅缁熻
 	 * @param body
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/FindDeviceStatisticsRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/FindDeviceStatisticsRequest.java
new file mode 100644
index 0000000..b71526f
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/FindDeviceStatisticsRequest.java
@@ -0,0 +1,14 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+@Data
+public class FindDeviceStatisticsRequest {
+    /**
+     *
+     {
+     "regionIndexCode": "root000000"
+     }
+     */
+    private String   regionIndexCode;//	Array	true	鍖哄煙IndexCode
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsInfoResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsInfoResponse.java
new file mode 100644
index 0000000..01faa01
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsInfoResponse.java
@@ -0,0 +1,16 @@
+package com.doumee.core.haikang.model.param.respose;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class FindDeviceStatisticsInfoResponse {
+    private String deviceName	;//String	false	璁惧鍚嶇О
+    private String deviceIndexCode;//	String	false	璁惧indexCode
+    private Integer totalSensorCount;//	Number	false	浼犳劅鍣ㄦ�绘暟
+    private Integer alarmSensorCount	;//Number	false	鎶ヨ浼犳劅鍣ㄦ�绘暟
+    private Integer shieldSensorCount	;//Number	false	灞忚斀浼犳劅鍣ㄦ�绘暟
+    private Integer normalSensorCount	;//Number	false	姝e父浼犳劅鍣ㄦ�绘暟
+    private Integer faultSensorCount;//	Number	false	鏁呴殰浼犳劅鍣ㄦ�绘暟
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsResponse.java
new file mode 100644
index 0000000..d215bcd
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/FindDeviceStatisticsResponse.java
@@ -0,0 +1,12 @@
+package com.doumee.core.haikang.model.param.respose;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class FindDeviceStatisticsResponse {
+private String  deviceTypeName;//	String	false	璁惧绫诲瀷
+private Integer totalDeviceCount	;//Number	false	璁惧鎬绘暟;
+private List<FindDeviceStatisticsInfoResponse> devices;//	Array	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 e69d2c0..4144bd6 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
@@ -1926,6 +1926,24 @@
         return  null;
     }
     /**
+     *鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁�
+     * @return
+     */
+    public  static  BaseResponse<List<FindDeviceStatisticsResponse> >  findDeviceStatistics(FindDeviceStatisticsRequest param){
+        log.info("銆愬垎椤垫煡璇㈣澶囩殑浠ュ強涓嬪睘浼犳劅鍣ㄦ暟鎹殑鐘舵�佺粺璁°��================寮�濮�===="+JSONObject.toJSONString(param));
+        try {
+            String res = HKTools.findDeviceStatistics(JSONObject.toJSONString(param));
+            TypeReference typeReference =
+                    new TypeReference< BaseResponse<List<FindDeviceStatisticsResponse> >>(){};
+            BaseResponse<List<FindDeviceStatisticsResponse> >   result = JSONObject.parseObject(res, typeReference.getType());
+            logResult(result,"鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁�");
+            return  result;
+        }catch (Exception e){
+            log.error("銆愬垎椤垫煡璇㈣澶囩殑浠ュ強涓嬪睘浼犳劅鍣ㄦ暟鎹殑鐘舵�佺粺璁°��================澶辫触====锛歕n"+ e.getMessage());
+        }
+        return  null;
+    }
+    /**
      *娑堥槻鐪嬫澘-4鎶ヨ淇℃伅缁熻
      * @return
      */
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/PlatformJobExportVo.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/PlatformJobExportVo.java
index fe4cb50..b867f8b 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/PlatformJobExportVo.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/PlatformJobExportVo.java
@@ -43,7 +43,6 @@
     @ExcelColumn(name="鍙告満濮撳悕",index = 4,width = 6)
     private String driverName;
 
-
     @ApiModelProperty(value = "鍙告満鎵嬫満鍙�")
     @ExcelColumn(name="鍙告満鐢佃瘽",index = 5,width = 8)
     private String drivierPhone;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
index 811936b..55d3f76 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -929,11 +929,11 @@
                     .set(StringUtils.isNotBlank(updateMember.getFaceImg()),Member::getFaceImg,updateMember.getFaceImg())
                     .set(updateMember.getFaceId()!=null,Member::getFaceId,updateMember.getFaceId())
                     .set(updateMember.getCompanyId()!=null,Member::getCompanyId,updateMember.getCompanyId())
-                    .set(StringUtils.isNotBlank(updateMember.getCode()),Member::getCode,updateMember.getCode())
+                    .set(Member::getCode,updateMember.getCode())
+//                    .set(StringUtils.isNotBlank(updateMember.getCode()),Member::getCode,updateMember.getCode())
                     .set( updateMember.getPositionId()!=null,Member::getPositionId,updateMember.getPositionId())
                     .set( updateMember.getIsDangyuan()!=null,Member::getIsDangyuan,updateMember.getIsDangyuan())
                     .set( updateMember.getJobDate()!=null,Member::getJobDate,updateMember.getJobDate())
-                    .set(StringUtils.isNotBlank(updateMember.getCode()),Member::getCode,updateMember.getCode())
                     .eq(Member::getId,updateMember.getId()));
             dealTrainTIme(updateMember,1,loginUserInfo);
             cancelAllMemberEmpower(updateMember,memberRoleMapper,empowerMapper);
@@ -2048,7 +2048,7 @@
             ExcelImporter ie = null;
             List<MemberImport> dataList =null;
             try {
-                ie = new ExcelImporter(file,2,0);
+                ie = new ExcelImporter(file,1,0);
                 dataList = ie.getDataList(MemberImport.class,null);
             }  catch (Exception e) {
                 e.printStackTrace();
@@ -2118,6 +2118,10 @@
             throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"瀵逛笉璧凤紝鍛樺伐淇℃伅瀵煎叆澶辫触锛岃绋嶅悗閲嶈瘯锛�");
         }
     }
+
+    public static void main(String[] args) {
+        System.out.println(PhoneUtil.isPhone("18156047603"));
+    }
     private Member checkModelParam(MemberImport model, List<Member> newList
             ,int index
             ,LoginUserInfo loginUserInfo
@@ -2185,7 +2189,7 @@
     private Company findCompanyFromList(String companyName, List<Company> companyList) {
         if(companyList !=null){
             for(Company company : companyList){
-                if(StringUtils.equals(companyName,company.getName())){
+                if(StringUtils.equals(companyName,company.getCompanyNamePath())){
                     return  company;
                 }
             }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index 4a08183..3a9c1b4 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -1264,7 +1264,38 @@
     public  FightingAdminCenterDataVO centerFightingAdminData(){
         FightingAdminCenterDataVO data = new FightingAdminCenterDataVO();
         List<DeviceNumByTypeVO> list = new ArrayList<>();
-        FireDevStatusTotalRequest param = new FireDevStatusTotalRequest();
+        FindDeviceStatisticsRequest param1 = new FindDeviceStatisticsRequest();
+        param1.setRegionIndexCode("root000000");
+        BaseResponse<List<FindDeviceStatisticsResponse>> response = HKService.findDeviceStatistics(param1);
+        if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ){
+            for(FindDeviceStatisticsResponse r :response.getData()){
+                DeviceNumByTypeVO t = new DeviceNumByTypeVO();
+                t.setTypeName(r.getDeviceTypeName());
+                t.setTotalDeviceNum(Constants.formatIntegerNum(r.getTotalDeviceCount()));
+                if(r.getDevices()!=null){
+                    for(FindDeviceStatisticsInfoResponse td : r.getDevices()){
+                        //灞忚斀鏁�
+                        t.setShieldDeviceNum(Constants.formatIntegerNum(t.getShieldDeviceNum() )+ Constants.formatIntegerNum(td.getShieldSensorCount()));
+                        //鎶ヨ鏁�
+                        t.setAlarmDeviceNum(Constants.formatIntegerNum(t.getAlarmDeviceNum())+ Constants.formatIntegerNum(td.getAlarmSensorCount()));
+                        //姝e父鏁�
+                        t.setOnlineDeviceNum(Constants.formatIntegerNum(t.getOnlineDeviceNum())+Constants.formatIntegerNum(td.getNormalSensorCount()));
+                        //鏁呴殰鏁�
+                        t.setErrDeviceNum(Constants.formatIntegerNum(t.getErrDeviceNum())+ Constants.formatIntegerNum(td.getFaultSensorCount()));
+                        //鎬昏澶囨暟
+                        t.setTotalDeviceNum(Constants.formatIntegerNum(t.getTotalDeviceNum())+ Constants.formatIntegerNum(td.getTotalSensorCount()));
+                    }
+                }
+                list.add(t);
+                data.setOfflineDeviceNum(Constants.formatIntegerNum( data.getOfflineDeviceNum())+Constants.formatIntegerNum(t.getOfflineDeviceNum()));
+                data.setShieldDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getShieldDeviceNum()));
+                data.setAlarmDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getAlarmDeviceNum()));
+                data.setOnlineDeviceNum(Constants.formatIntegerNum( data.getOnlineDeviceNum())+Constants.formatIntegerNum(t.getOnlineDeviceNum()));
+                data.setErrDeviceNum(Constants.formatIntegerNum( data.getErrDeviceNum())+Constants.formatIntegerNum(t.getErrDeviceNum()));
+                data.setTotalDeviceNum(Constants.formatIntegerNum( data.getTotalDeviceNum())+Constants.formatIntegerNum(t.getTotalDeviceNum()));
+            }
+        }
+       /* FireDevStatusTotalRequest param = new FireDevStatusTotalRequest();
         param.setIncludeBool(1);
         param.setRegionIds(new String[]{"root000000"});
         BaseResponse<List<FireDevStatusListResponse>> response = HKService.getFireDevStatusList(param);
@@ -1284,7 +1315,7 @@
                 data.setErrDeviceNum(Constants.formatIntegerNum( data.getErrDeviceNum())+Constants.formatIntegerNum(r.getFaultFireDevCount()));
                 data.setTotalDeviceNum(Constants.formatIntegerNum( data.getTotalDeviceNum())+Constants.formatIntegerNum(r.getTotalFireDevCount()));
             }
-        }
+        }*/
         data.setDeviceTypeList(list);
         Long totalNum =hiddenDangerMapper.selectCount(new QueryWrapper<HiddenDanger>().lambda()
                 .eq(HiddenDanger::getIsdeleted,Constants.ZERO )

--
Gitblit v1.9.3