From eb53aef53bdab3eb452b95276b575bb45e616316 Mon Sep 17 00:00:00 2001
From: lishuai <260038442@qq.com>
Date: 星期五, 15 十二月 2023 14:17:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 server/dmvisit_admin/src/main/java/com/doumee/api/business/CarsController.java                             |    2 
 server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/erp/MemberFailRequest.java      |   25 +
 server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java                        |   61 ++
 server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Parks.java                              |    5 
 server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java                        |    8 
 server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncImgServiceImpl.java     |  184 +++++++--
 server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/CarPictureRequest.java    |   10 
 server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java                 |   94 +---
 server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Cars.java                               |   26 +
 server/dmvisit_service/src/main/java/com/doumee/service/business/impl/erp/ErpSyncServiceImpl.java          |   82 +++
 server/dmvisit_service/src/main/java/com/doumee/dao/business/model/ParkBook.java                           |   27 +
 server/openapi/src/main/java/com/doumee/api/web/ErpResourceController.java                                 |   17 
 server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/ApproveNoticeRequest.java       |    5 
 server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParksServiceImpl.java                |  101 +----
 server/dmvisit_service/src/main/java/com/doumee/dao/business/join/ParksJoinMapper.java                     |   15 
 server/dmvisit_admin/src/main/java/com/doumee/api/business/ParksController.java                            |    7 
 server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java                                       |   73 ---
 server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/DevicePictureRequest.java |   10 
 server/dmvisit_service/src/main/java/com/doumee/service/business/ERPSyncService.java                       |    2 
 server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParkBookServiceImpl.java             |  108 +----
 server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java                            |   54 +++
 server/dmvisit_service/src/main/java/com/doumee/core/utils/FtpUtil.java                                    |   83 +++-
 server/openapi/src/main/java/com/doumee/api/web/BizResourceController.java                                 |    4 
 server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/VisitPictureRequest.java  |   11 
 server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java                                  |    7 
 server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberRoleMapper.java                         |    5 
 server/dmvisit_admin/src/main/java/com/doumee/api/business/ParkBookController.java                         |    2 
 server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberCardMapper.java                         |    4 
 28 files changed, 626 insertions(+), 406 deletions(-)

diff --git a/server/dmvisit_admin/src/main/java/com/doumee/api/business/CarsController.java b/server/dmvisit_admin/src/main/java/com/doumee/api/business/CarsController.java
index 3ea4554..5c38b14 100644
--- a/server/dmvisit_admin/src/main/java/com/doumee/api/business/CarsController.java
+++ b/server/dmvisit_admin/src/main/java/com/doumee/api/business/CarsController.java
@@ -69,7 +69,7 @@
 
     @ApiOperation("鍒嗛〉鏌ヨ")
     @PostMapping("/page")
-    @RequiresPermissions("business:cars:query")
+   // @RequiresPermissions("business:cars:query")
     public ApiResponse<PageData<Cars>> findPage (@RequestBody PageWrap<Cars> pageWrap) {
         return ApiResponse.success(carsService.findPage(pageWrap));
     }
diff --git a/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParkBookController.java b/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParkBookController.java
index 28b9742..aa3a4ac 100644
--- a/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParkBookController.java
+++ b/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParkBookController.java
@@ -69,7 +69,7 @@
 
     @ApiOperation("鍒嗛〉鏌ヨ")
     @PostMapping("/page")
-    @RequiresPermissions("business:parkbook:query")
+   // @RequiresPermissions("business:parkbook:query")
     public ApiResponse<PageData<ParkBook>> findPage (@RequestBody PageWrap<ParkBook> pageWrap) {
         return ApiResponse.success(parkBookService.findPage(pageWrap));
     }
diff --git a/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParksController.java b/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParksController.java
index ebd49c7..29360e2 100644
--- a/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParksController.java
+++ b/server/dmvisit_admin/src/main/java/com/doumee/api/business/ParksController.java
@@ -74,6 +74,13 @@
         return ApiResponse.success(parksService.findPage(pageWrap));
     }
 
+    @ApiOperation("鎵�灞炲仠杞﹀満鍒楄〃")
+    @PostMapping("/findList")
+    @RequiresPermissions("business:parks:query")
+    public ApiResponse<List<Parks>> findList (@RequestBody Parks parks) {
+        return ApiResponse.success(parksService.findList(parks));
+    }
+
     @ApiOperation("瀵煎嚭Excel")
     @PostMapping("/exportExcel")
     @RequiresPermissions("business:parks:exportExcel")
diff --git a/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java b/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
index 9369302..4955c56 100644
--- a/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
+++ b/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
@@ -1,23 +1,12 @@
 package com.doumee.task;
 
 
-import com.doumee.biz.system.SystemDictDataBiz;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
+import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Date;
-import java.util.Map;
 
 /**
  * 瀹氭椂浠诲姟
@@ -29,9 +18,8 @@
 @EnableScheduling
 public class ScheduleTool {
 
-
     @Autowired
-    private SystemDictDataBiz systemDictDataBiz;
+    private HkSyncImgServiceImpl hkSyncImgService;
     /**
      * 鏄惁寮�鍙戣��
      */
@@ -43,60 +31,9 @@
      * 缂撳瓨鐪佸競鍖�
      * @throws Exception
      */
-    @Scheduled(fixedDelay=24*60*60*1000)
-    public void cacheCampus() throws Exception {
-    }
-     /**
-     * 姣忓ぉ鍑屾櫒閲嶇疆鎵�鏈夎鍗昪ode绫诲垵濮嬪��
-     * @throws Exception
-     */
-    @Scheduled(cron="0 0 0 * * ?")
-    public void resetOrderCodes() throws Exception {
-    }
-
-
-
-    /**
-     * 鍙戦�乬et璇锋眰
-     * @param url 璇锋眰URL
-     * @param param 璇锋眰鍙傛暟 key:value url鎼哄甫鍙傛暟 鎴栬�呮棤鍙傚彲涓嶅~
-     * @return
-     */
-    public  String doGet(String url, Map<String, String> param) {
-        // 鍒涘缓Httpclient瀵硅薄
-        CloseableHttpClient httpclient = HttpClients.createDefault();
-        String resultString = "";
-        CloseableHttpResponse response = null;
-        try {
-            // 鍒涘缓uri
-            URIBuilder builder = new URIBuilder(url);
-            if (param != null) {
-                for (String key : param.keySet()) {
-                    builder.addParameter(key, param.get(key));
-                }
-            }
-            URI uri = builder.build();
-            // 鍒涘缓http GET璇锋眰
-            HttpGet httpGet = new HttpGet(uri);
-            // 鎵ц璇锋眰
-            response = httpclient.execute(httpGet);
-            // 鍒ゆ柇杩斿洖鐘舵�佹槸鍚︿负200
-            if (response.getStatusLine().getStatusCode() == 200) {
-                resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                if (response != null) {
-                    response.close();
-                }
-                httpclient.close();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-        return resultString;
+    @Scheduled(fixedDelay= 60*1000)
+    public void downloadHkImg() throws Exception {
+        hkSyncImgService.downHKImgs(0);
     }
 
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
index bd896ca..a7db94a 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
@@ -7,8 +7,8 @@
 
 @Data
 public class HKConstants {
-    public static final String IMG_INDEX ="HKIMG_" ;
-    public static final String IMG_INDEX_ERROR ="HKIMG_ERROR=" ;
+    public static final String IMG_INDEX ="HKIMG=" ;
+    public static final String IMG_INDEX_ERROR ="HKIMG=ERROR=" ;
     private Logger logger = LoggerFactory.getLogger(HKConstants.class);
     //娴峰悍骞冲彴鏍规嵁鐜板満鐜閰嶇疆http杩樻槸https
     public static final String RESPONSE_SUCCEE = "0";
@@ -53,6 +53,9 @@
         String eventSub= "/api/eventService/v1/eventSubscriptionByEventTypes";//浜嬩欢璁㈤槄
         String doorSearch= "/api/resource/v2/door/search";//鏌ヨ闂ㄧ鐐瑰垪琛╲2
         String cancelEventSub= "/api/eventService/v1/eventUnSubscriptionByEventTypes";//鍙栨秷浜嬩欢璁㈤槄
+        String visitPicture= "/api/visitor/v1/record/pictures";//鑾峰彇璁垮璁板綍涓殑鍥剧墖
+        String devicePicture= "/api/acs/v1/event/pictures";//鑾峰彇闂ㄧ浜嬩欢鐨勫浘鐗�
+        String carPicture= "/api/pms/v1/image";//鏌ヨ杞﹁締鎶撴媿鍥剧墖
     }
 
     /**
@@ -78,7 +81,6 @@
             this.name = name;
             this.key = key;
         }
-
 
 
         // get set 鏂规硶
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
index c179655..c639633 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
@@ -291,6 +291,60 @@
 		}
 	}
 	/**
+	 * 鑾峰彇璁垮璁板綍涓殑鍥剧墖
+	 * @param body
+	 * @return
+	 */
+	public static InputStream getVisitPicture(String body)  throws  Exception{
+
+		Map<String, String> path = getPath(HKConstants.InterfacePath.visitPicture);
+		//鍙傛暟鏍规嵁鎺ュ彛瀹為檯鎯呭喌璁剧疆
+		HttpResponse resp = ArtemisHttpUtil.doPostStringImgArtemis( path, body, null, null,"application/json",null);
+		if (200==resp.getStatusLine().getStatusCode()) {
+			HttpEntity entity = resp.getEntity();
+			InputStream in = entity.getContent();
+			return  in;
+		}else{
+			throw  new Exception("鑾峰彇璁垮璁板綍涓殑鍥剧墖涓嬭浇鍑洪敊");
+		}
+	}
+	/**
+	 * 鑾峰彇闂ㄧ浜嬩欢鐨勫浘鐗�
+	 * @param body
+	 * @return
+	 */
+	public static InputStream getDevicePicture(String body)  throws  Exception{
+
+		Map<String, String> path = getPath(HKConstants.InterfacePath.devicePicture);
+		//鍙傛暟鏍规嵁鎺ュ彛瀹為檯鎯呭喌璁剧疆
+		HttpResponse resp = ArtemisHttpUtil.doPostStringImgArtemis( path, body, null, null,"application/json",null);
+		if (200==resp.getStatusLine().getStatusCode()) {
+			HttpEntity entity = resp.getEntity();
+			InputStream in = entity.getContent();
+			return  in;
+		}else{
+			throw  new Exception("鑾峰彇闂ㄧ浜嬩欢鐨勫浘鐗囦笅杞藉嚭閿�");
+		}
+	}
+	/**
+	 * 鏌ヨ杞﹁締鎶撴媿鍥剧墖
+	 * @param body
+	 * @return
+	 */
+	public static InputStream getCarPicture(String body)  throws  Exception{
+
+		Map<String, String> path = getPath(HKConstants.InterfacePath.carPicture);
+		//鍙傛暟鏍规嵁鎺ュ彛瀹為檯鎯呭喌璁剧疆
+		HttpResponse resp = ArtemisHttpUtil.doPostStringImgArtemis( path, body, null, null,"application/json",null);
+		if (200==resp.getStatusLine().getStatusCode()) {
+			HttpEntity entity = resp.getEntity();
+			InputStream in = entity.getContent();
+			return  in;
+		}else{
+			throw  new Exception("鏌ヨ杞﹁締鎶撴媿鍥剧墖涓嬭浇鍑洪敊");
+		}
+	}
+	/**
 	 *	鑾峰彇闂ㄧ鐐瑰垪琛�
 	 * @param body
 	 * @return
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/CarPictureRequest.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/CarPictureRequest.java
new file mode 100644
index 0000000..0cd18a8
--- /dev/null
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/CarPictureRequest.java
@@ -0,0 +1,10 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+@Data
+public class CarPictureRequest {
+
+    private String  aswSyscode;//	string	True	鍥剧墖鏈嶅姟鍞竴鏍囪瘑鐮侊紙鏈�澶ч暱搴�64锛�  浠庡叾浠栬繑鍥炲浘鐗嘦ri鎺ュ彛澶勮幏鍙�
+    private String  picUri	;//string	True	鍥剧墖Uri锛堟渶澶ч暱搴�256锛�
+}
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/DevicePictureRequest.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/DevicePictureRequest.java
new file mode 100644
index 0000000..0c2112d
--- /dev/null
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/DevicePictureRequest.java
@@ -0,0 +1,10 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+@Data
+public class DevicePictureRequest {
+
+    private String  svrIndexCode	;//	string	True	鎻愪緵picUri澶勪細鎻愪緵姝ゅ瓧娈�
+    private String  picUri	;//	string	True	鍥剧墖鐩稿鍦板潃
+}
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/VisitPictureRequest.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/VisitPictureRequest.java
new file mode 100644
index 0000000..5387f03
--- /dev/null
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/VisitPictureRequest.java
@@ -0,0 +1,11 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+@Data
+public class VisitPictureRequest {
+
+    private String  svrIndexCode	;//	string	True	鎻愪緵picUri澶勪細鎻愪緵姝ゅ瓧娈�
+    private String  picUri	;//	string	True	鍥剧墖鐩稿鍦板潃
+
+}
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..c53ce61 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
@@ -244,6 +234,51 @@
         }
         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;
+    }
 
     /**
      *鑾峰彇杞﹀簱鍒楄〃鏁版嵁锛堝叏閲忥級
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/ApproveNoticeRequest.java b/server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/ApproveNoticeRequest.java
index 093374c..881e16f 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/ApproveNoticeRequest.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/ApproveNoticeRequest.java
@@ -1,5 +1,6 @@
 package com.doumee.core.model.openapi.request;
 
+import com.doumee.core.haikang.model.param.BaseRequst;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -11,11 +12,11 @@
  */
 @Data
 @ApiModel("璁垮鐢宠瀹℃壒缁撴灉閫氱煡璇锋眰淇℃伅")
-public class ApproveNoticeRequest {
+public class ApproveNoticeRequest extends BaseRequst {
     @ApiModelProperty(value = "瀹℃壒璁板綍鍞竴鏍囪瘑锛圗RP绔疘D锛�" ,example = "1")
     private Integer id;
     @ApiModelProperty(value = "瀹℃壒缁撴灉 0-涓嶉�氳繃 1-閫氳繃,榛樿 0" ,example = "1")
     private Integer status;
-    @ApiModelProperty(value = "瀹℃牳鏃堕棿" )
+    @ApiModelProperty(value = "瀹℃牳鏃堕棿 yyyy-MM-dd HH:mm:ss" )
     private String approveDate ;
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/erp/MemberFailRequest.java b/server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/erp/MemberFailRequest.java
new file mode 100644
index 0000000..c6c52f2
--- /dev/null
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/model/openapi/request/erp/MemberFailRequest.java
@@ -0,0 +1,25 @@
+package com.doumee.core.model.openapi.request.erp;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/23 14:03
+ */
+@Data
+@ApiModel(value = "鍛樺伐鍚屾澶辫触鎺ㄩ�佽姹傚弬鏁�" )
+public class MemberFailRequest {
+
+    @ApiModelProperty(value = "鍛樺伐id"  )
+    private  String userId;
+    @ApiModelProperty(value = "澶辫触绫诲瀷 0浜哄憳鍚屾澶辫触 1鏉冮檺涓嬪彂澶辫触 "  )
+    private  Integer type;
+
+    @ApiModelProperty(value = "澶囨敞淇℃伅锛屾弿杩板け璐ュ師鍥�")
+    private String info;
+
+}
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java b/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
index abdc922..d38a3a2 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -44,11 +44,18 @@
     public static final String FILE_DIR = "";
     // 璁垮鏉ヨ閰嶇疆
     public static final String VISIT_CONFIG = "VISIT_CONFIG";
+    public static final String MEMBER_IMG = "MEMBER_IMG";
     // 鍔冲姟鏉ヨ閰嶇疆
     public static final String LABOR_CONFIG = "LABOR_CONFIG";
     public static final String VISIT_EVENT_IMG = "VISIT_EVENT_IMG";
     public static final String CAR_EVENT_IMG = "CAR_EVENT_IMG";
     public static final String DEVICE_EVENT_IMG = "DEVICE_EVENT_IMG";
+    public static final String FTP ="FTP" ;
+    public static final String FTP_HOST ="FTP_HOST" ;
+    public static final String FTP_PORT ="FTP_PORT" ;
+    public static final String FTP_USERNAME ="FTP_USERNAME" ;
+    public static final String FTP_PWD ="FTP_PWD" ;
+    public static final String FTP_RESOURCE_PATH ="FTP_RESOURCE_PATH" ;
     public static  boolean DEALING_HK_IMG = false;
     // ERP鎺ュ彛閰嶇疆
     public static final String ERP_CONFIG = "ERP_CONFIG";
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/utils/FtpUtil.java b/server/dmvisit_service/src/main/java/com/doumee/core/utils/FtpUtil.java
index f158543..a62bf46 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/utils/FtpUtil.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/utils/FtpUtil.java
@@ -29,6 +29,10 @@
 @Slf4j
 public class FtpUtil {
 	public FTPClient ftpClient = new FTPClient();
+	public static String hostname;
+	public static int port;
+	public static String username;
+	public static  String password;
 
 	public FtpUtil() {
 		// 璁剧疆灏嗚繃绋嬩腑浣跨敤鍒扮殑鍛戒护杈撳嚭鍒版帶鍒跺彴
@@ -39,26 +43,22 @@
 	public FtpUtil(String hostname, int port, String username, String password)
 			throws IOException {
 		// 璁剧疆灏嗚繃绋嬩腑浣跨敤鍒扮殑鍛戒护杈撳嚭鍒版帶鍒跺彴
-		connect(hostname, port, username, password);
+		FtpUtil.hostname =hostname;
+		FtpUtil.port =port;
+		FtpUtil.username =username;
+		FtpUtil.password =password;
+		connect();
 	}
 
 	/** */
 	/**
 	 * 杩炴帴鍒癋TP鏈嶅姟鍣�
 	 *
-	 * @param hostname
-	 *            涓绘満鍚�
-	 * @param port
-	 *            绔彛
-	 * @param username
-	 *            鐢ㄦ埛鍚�
-	 * @param password
 	 *            瀵嗙爜
 	 * @return 鏄惁杩炴帴鎴愬姛
 	 * @throws IOException
 	 */
-	public boolean connect(String hostname, int port, String username,
-			String password) throws IOException {
+	public boolean connect() throws IOException {
 		ftpClient.connect(hostname, port);
 		ftpClient.setControlEncoding("GBK");
 		if (FTPReply.isPositiveCompletion(ftpClient.getReplyCode())) {
@@ -233,6 +233,39 @@
 		}
 		return result;
 	}
+	public boolean uploadInputstream(InputStream inputStream, String remote)  {
+		// 璁剧疆PassiveMode浼犺緭
+		try {
+			ftpClient.enterLocalPassiveMode();
+
+			// 璁剧疆浠ヤ簩杩涘埗娴佺殑鏂瑰紡浼犺緭
+			ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
+			ftpClient.setControlEncoding("GBK");
+			// 瀵硅繙绋嬬洰褰曠殑澶勭悊
+			String remoteFileName = remote;
+			if (remote.contains("/")) {
+				remoteFileName = remote.substring(remote.lastIndexOf("/") + 1);
+				// 鍒涘缓鏈嶅姟鍣ㄨ繙绋嬬洰褰曠粨鏋勶紝鍒涘缓澶辫触鐩存帴杩斿洖
+				if (StringUtils.equals(CreateDirecroty(remote, ftpClient), "2")) {
+					log.error("鍒涘缓ftp鐩綍澶辫触======================="+remote);
+					return false;
+				}
+			}
+			boolean result = ftpClient.storeFile(remoteFileName, inputStream);
+			inputStream.close();
+			ftpClient.logout();
+			if(result){
+				log.info("涓婁紶鏂囦欢鎴愬姛======================"+remote);
+			}else{
+				log.error("涓婁紶鏂囦欢澶辫触======================="+remote);
+			}
+			return result;
+		}catch (Exception e){
+			e.printStackTrace();
+			log.error("涓婁紶鏂囦欢澶辫触======================="+remote);
+		}
+		return false;
+	}
 	public int getNumFromStr(String str,char searchstr) {
 		int count = 0;
 		char[] charArray = str.toCharArray();
@@ -265,8 +298,8 @@
 		String result;
 		// 瀵硅繙绋嬬洰褰曠殑澶勭悊
 		String remoteFileName = remote ;
-		 if (remote.contains(File.separator)) {
-			remoteFileName = remote.substring(remote.lastIndexOf(File.separator) + 1);
+		 if (remote.contains("/")) {
+			remoteFileName = remote.substring(remote.lastIndexOf("/") + 1);
 			// 鍒涘缓鏈嶅姟鍣ㄨ繙绋嬬洰褰曠粨鏋勶紝鍒涘缓澶辫触鐩存帴杩斿洖
 			if (StringUtils.equals(CreateDirecroty(remote, ftpClient), "2")) {
 				return "2";
@@ -339,20 +372,20 @@
 			throws IOException {
 		String status = "1";
 		// UploadStatus status = UploadStatus.Create_Directory_Success;
-		String directory = remote.substring(0, remote.lastIndexOf(File.separator) + 1);
-		if (!directory.equalsIgnoreCase(File.separator)
+		String directory = remote.substring(0, remote.lastIndexOf("/") + 1);
+		if (!directory.equalsIgnoreCase("/")
 				&& !ftpClient.changeWorkingDirectory(new String(directory
 				.getBytes("GBK"), "iso-8859-1"))) {
 			// 濡傛灉杩滅▼鐩綍涓嶅瓨鍦紝鍒欓�掑綊鍒涘缓杩滅▼鏈嶅姟鍣ㄧ洰褰�
 			int start = 0;
 			int end = 0;
-			if (directory.startsWith(File.separator)) {
+			if (directory.startsWith("/")) {
 				start = 1;
 			} else {
 				start = 0;
 			}
 			end = directory
-					.indexOf(File.separator, start);
+					.indexOf("/", start);
 			while (true) {
 				String subDirectory = new String(remote.substring(start, end)
 						.getBytes("GBK"), "iso-8859-1");
@@ -367,7 +400,7 @@
 				}
 
 				start = end + 1;
-				end = directory.indexOf(File.separator,
+				end = directory.indexOf("/",
 						start);
 
 				// 妫�鏌ユ墍鏈夌洰褰曟槸鍚﹀垱寤哄畬姣�
@@ -508,7 +541,7 @@
 	public static void main(String[] args) throws Exception {
 		try {
 			FtpUtil ftpUtil = new FtpUtil("175.27.187.84", 21, "ftpuser","doumee168" );
-			ftpUtil.uploadOnlineFile("https://profile-avatar.csdnimg.cn/default.jpg!1", "test"+File.separator, UUID.randomUUID().toString()+"test.jpg");
+			ftpUtil.uploadOnlineFile("https://profile-avatar.csdnimg.cn/default.jpg!1", "test"+"/", UUID.randomUUID().toString()+"test.jpg");
 			/*FtpUtil myFtp = new FtpUtil("106.15.54.228", 21, "ftptlg",
 					"tlg168.com");
 			System.out.println(myFtp.upload("D:\\devices.sql", "/1111/devices.sql"));
@@ -598,9 +631,7 @@
 			String remoteDirectoryPath) throws Exception {
 		File src = new File(localDirectory);
 		try {
-			remoteDirectoryPath =  remoteDirectoryPath  + File.separator;
-
-//			System.out.println(remoteDirectoryPath+":===============鍒涘缓鐩綍=================");
+			remoteDirectoryPath =  remoteDirectoryPath  + "/";
 			boolean makeDirFlag = this.ftpClient.makeDirectory(remoteDirectoryPath);
 		}catch (IOException e) {
 			e.printStackTrace();
@@ -611,12 +642,10 @@
 		for (int currentFile = 0;currentFile < allFile.length;currentFile++) {
 			File f =allFile[currentFile];
 			String srcName=	f.getPath().toString();
-//			System.out.println(srcName+":====================璇诲彇鏂囦欢======================");
 			String tPath = remoteDirectoryPath+f.getName();
 			if (!f.isDirectory()) {
 
-//				System.out.println(srcName+":====================寮�濮嬩紶杈撴枃浠�======================");
-				int dNum = getNumFromStr(tPath,File.separator.toCharArray()[0]);
+				int dNum = getNumFromStr(tPath,"/".toCharArray()[0]);
 				uploadFile(f, tPath);
 				if(dNum -2>=0){
 					for (int i = 0; i < dNum-1; i++) {
@@ -624,11 +653,9 @@
 					}
 				}
 			}else{
-//				System.out.println(srcName+":====================鍒涘缓瀛愮洰褰�======================");
 				uploadDirectory(srcName,
-						tPath+File.separator);
+						tPath+"/");
 			}
-//			System.out.println(srcName+":====================涓婁紶瀹屾瘯======================");
 		}
 		return true;
 	}
@@ -639,7 +666,7 @@
 	 * */
 	public boolean delDirectory(String pathName ) throws Exception {
 		try {
-			this.ftpClient.changeWorkingDirectory( pathName.substring(0, pathName.lastIndexOf(File.separator)) );
+			this.ftpClient.changeWorkingDirectory( pathName.substring(0, pathName.lastIndexOf("/")) );
 			ftpClient.removeDirectory(pathName);
 		}catch (IOException e) {
 			e.printStackTrace();
diff --git a/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberCardMapper.java b/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberCardMapper.java
index 4d14eed..0032769 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberCardMapper.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberCardMapper.java
@@ -2,6 +2,9 @@
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.doumee.dao.business.model.MemberCard;
+import com.doumee.dao.business.model.MemberRole;
+
+import java.util.List;
 
 /**
  * @author 姹熻箘韫�
@@ -9,4 +12,5 @@
  */
 public interface MemberCardMapper extends BaseMapper<MemberCard> {
 
+    void insertBatchSomeColumn(List<MemberCard> list);
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberRoleMapper.java b/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberRoleMapper.java
index 96b1eb9..cff3a2e 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberRoleMapper.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/dao/business/MemberRoleMapper.java
@@ -2,6 +2,9 @@
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.doumee.dao.business.model.MemberRole;
+import com.doumee.dao.business.model.VisitEvent;
+
+import java.util.List;
 
 /**
  * @author 姹熻箘韫�
@@ -9,4 +12,6 @@
  */
 public interface MemberRoleMapper extends BaseMapper<MemberRole> {
 
+    void insertBatchSomeColumn(List<MemberRole> list);
+
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/dao/business/join/ParksJoinMapper.java b/server/dmvisit_service/src/main/java/com/doumee/dao/business/join/ParksJoinMapper.java
new file mode 100644
index 0000000..54e509c
--- /dev/null
+++ b/server/dmvisit_service/src/main/java/com/doumee/dao/business/join/ParksJoinMapper.java
@@ -0,0 +1,15 @@
+package com.doumee.dao.business.join;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.doumee.dao.business.model.Parks;
+import com.github.yulichang.base.mapper.MPJJoinMapper;
+
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+public interface ParksJoinMapper extends MPJJoinMapper<Parks> {
+
+}
diff --git a/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Cars.java b/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Cars.java
index d55e19a..9d0986c 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Cars.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Cars.java
@@ -1,5 +1,6 @@
 package com.doumee.dao.business.model;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.doumee.core.annotation.excel.ExcelColumn;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -96,4 +97,29 @@
     @ExcelColumn(name="鐘舵�� 0绂佺敤 1鍚敤")
     private Integer status;
 
+    @ApiModelProperty(value = "鍋滆溅鍦哄悕绉�", example = "1")
+    @ExcelColumn(name="鍋滆溅鍦哄悕绉�")
+    @TableField(exist = false)
+    private String parksName;
+
+    @ApiModelProperty(value = "鐢ㄦ埛绫诲瀷 0鍔冲姟璁垮 1鏅�氳瀹�  2鍐呴儴浜哄憳", example = "1")
+    @ExcelColumn(name="鐢ㄦ埛绫诲瀷 0鍔冲姟璁垮 1鏅�氳瀹�  2鍐呴儴浜哄憳")
+    @TableField(exist = false)
+    private Integer memberType;
+
+    @ApiModelProperty(value = "濮撳悕", example = "1")
+    @ExcelColumn(name="濮撳悕")
+    @TableField(exist = false)
+    private String memberName;
+
+    @ApiModelProperty(value = "鎵嬫満鍙�", example = "1")
+    @ExcelColumn(name="鎵嬫満鍙�")
+    @TableField(exist = false)
+    private String memberPhone;
+
+    @ApiModelProperty(value = "閮ㄩ棬", example = "1")
+    @ExcelColumn(name="閮ㄩ棬")
+    @TableField(exist = false)
+    private String companyName;
+
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/ParkBook.java b/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/ParkBook.java
index f904522..bc37b58 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/ParkBook.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/ParkBook.java
@@ -1,5 +1,6 @@
 package com.doumee.dao.business.model;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.doumee.core.annotation.excel.ExcelColumn;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -106,4 +107,30 @@
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date hkDate;
 
+
+    @ApiModelProperty(value = "鍋滆溅鍦哄悕绉�", example = "1")
+    @ExcelColumn(name="鍋滆溅鍦哄悕绉�")
+    @TableField(exist = false)
+    private String parksName;
+
+    @ApiModelProperty(value = "鐢ㄦ埛绫诲瀷 0鍔冲姟璁垮 1鏅�氳瀹�  2鍐呴儴浜哄憳", example = "1")
+    @ExcelColumn(name="鐢ㄦ埛绫诲瀷 0鍔冲姟璁垮 1鏅�氳瀹�  2鍐呴儴浜哄憳")
+    @TableField(exist = false)
+    private Integer memberType;
+
+    @ApiModelProperty(value = "濮撳悕", example = "1")
+    @ExcelColumn(name="濮撳悕")
+    @TableField(exist = false)
+    private String memberName;
+
+    @ApiModelProperty(value = "鎵嬫満鍙�", example = "1")
+    @ExcelColumn(name="鎵嬫満鍙�")
+    @TableField(exist = false)
+    private String memberPhone;
+
+    @ApiModelProperty(value = "閮ㄩ棬", example = "1")
+    @ExcelColumn(name="閮ㄩ棬")
+    @TableField(exist = false)
+    private String companyName;
+
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Parks.java b/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Parks.java
index e5143d5..ad8e9b2 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Parks.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Parks.java
@@ -1,5 +1,6 @@
 package com.doumee.dao.business.model;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.doumee.core.annotation.excel.ExcelColumn;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -99,4 +100,8 @@
     @ExcelColumn(name="鐘舵�� 0绂佺敤 1鍚敤")
     private Integer status;
 
+    @ApiModelProperty(value = "鎵�灞炲仠杞﹀簱", example = "1")
+    @TableField(exist = false)
+    private String parentName;
+
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/ERPSyncService.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/ERPSyncService.java
index 37bc20f..f2802b8 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/ERPSyncService.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/ERPSyncService.java
@@ -89,4 +89,6 @@
     void orgUpdate(OrgUpdateRequest param);
 
     void userUpdate(UserUpdateRequest param);
+
+    void approveApply(ApproveNoticeRequest param);
 }
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java
index dcb60df..182e214 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java
@@ -1,20 +1,21 @@
 package com.doumee.service.business.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
 import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.Utils;
 import com.doumee.dao.admin.request.CarsQuery;
 import com.doumee.dao.admin.response.CarsDTO;
+import com.doumee.dao.admin.response.MemberInfoDTO;
 import com.doumee.dao.business.CarsMapper;
 import com.doumee.dao.business.join.CarJoinMapper;
 import com.doumee.dao.business.join.ParkBookJoinMapper;
 import com.doumee.dao.business.model.*;
 import com.doumee.service.business.CarsService;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -101,73 +102,24 @@
 
 
         IPage<Cars> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
-        QueryWrapper<Cars> queryWrapper = new QueryWrapper<>();
-        Utils.MP.blankToNull(pageWrap.getModel());
-        if (pageWrap.getModel().getId() != null) {
-            queryWrapper.lambda().eq(Cars::getId, pageWrap.getModel().getId());
-        }
-        if (pageWrap.getModel().getCreator() != null) {
-            queryWrapper.lambda().eq(Cars::getCreator, pageWrap.getModel().getCreator());
-        }
-        if (pageWrap.getModel().getCreateDate() != null) {
-            queryWrapper.lambda().ge(Cars::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
-            queryWrapper.lambda().le(Cars::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
-        }
-        if (pageWrap.getModel().getEdirot() != null) {
-            queryWrapper.lambda().eq(Cars::getEdirot, pageWrap.getModel().getEdirot());
-        }
-        if (pageWrap.getModel().getEditDate() != null) {
-            queryWrapper.lambda().ge(Cars::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
-            queryWrapper.lambda().le(Cars::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
-        }
-        if (pageWrap.getModel().getIsdeleted() != null) {
-            queryWrapper.lambda().eq(Cars::getIsdeleted, pageWrap.getModel().getIsdeleted());
-        }
-        if (pageWrap.getModel().getRemark() != null) {
-            queryWrapper.lambda().eq(Cars::getRemark, pageWrap.getModel().getRemark());
-        }
-        if (pageWrap.getModel().getHkId() != null) {
-            queryWrapper.lambda().eq(Cars::getHkId, pageWrap.getModel().getHkId());
-        }
-        if (pageWrap.getModel().getSortnum() != null) {
-            queryWrapper.lambda().eq(Cars::getSortnum, pageWrap.getModel().getSortnum());
-        }
-        if (pageWrap.getModel().getCode() != null) {
-            queryWrapper.lambda().eq(Cars::getCode, pageWrap.getModel().getCode());
-        }
-        if (pageWrap.getModel().getParkId() != null) {
-            queryWrapper.lambda().eq(Cars::getParkId, pageWrap.getModel().getParkId());
-        }
-        if (pageWrap.getModel().getHkId2() != null) {
-            queryWrapper.lambda().eq(Cars::getHkId2, pageWrap.getModel().getHkId2());
-        }
-        if (pageWrap.getModel().getHkStatus() != null) {
-            queryWrapper.lambda().eq(Cars::getHkStatus, pageWrap.getModel().getHkStatus());
-        }
-        if (pageWrap.getModel().getHkDate() != null) {
-            queryWrapper.lambda().ge(Cars::getHkDate, Utils.Date.getStart(pageWrap.getModel().getHkDate()));
-            queryWrapper.lambda().le(Cars::getHkDate, Utils.Date.getEnd(pageWrap.getModel().getHkDate()));
-        }
-        if (pageWrap.getModel().getMemberId() != null) {
-            queryWrapper.lambda().eq(Cars::getMemberId, pageWrap.getModel().getMemberId());
-        }
-        if (pageWrap.getModel().getMemberUserId() != null) {
-            queryWrapper.lambda().eq(Cars::getMemberUserId, pageWrap.getModel().getMemberUserId());
-        }
-        if (pageWrap.getModel().getErpId() != null) {
-            queryWrapper.lambda().eq(Cars::getErpId, pageWrap.getModel().getErpId());
-        }
-        if (pageWrap.getModel().getStatus() != null) {
-            queryWrapper.lambda().eq(Cars::getStatus, pageWrap.getModel().getStatus());
-        }
-        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
-            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
-                queryWrapper.orderByDesc(sortData.getProperty());
-            } else {
-                queryWrapper.orderByAsc(sortData.getProperty());
-            }
-        }
-        return PageData.from(carsMapper.selectPage(page, queryWrapper));
+        MPJLambdaWrapper<Cars> queryWrapper = new MPJLambdaWrapper<>();
+
+        queryWrapper.selectAll(Cars.class);
+        queryWrapper.selectAs(Parks::getName,Cars::getParksName);
+        queryWrapper.selectAs(Member::getType,Cars::getMemberType);
+        queryWrapper.selectAs(Member::getName,Cars::getMemberName);
+        queryWrapper.selectAs(Member::getPhone,Cars::getMemberPhone);
+        queryWrapper.selectAs(Company::getName,Cars::getCompanyName);
+
+        queryWrapper.leftJoin(Parks.class,Parks::getId,Cars::getParkId);
+        queryWrapper.leftJoin(Member.class,Member::getId,Cars::getMemberId);
+        queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId);
+
+        queryWrapper.eq(Cars::getIsdeleted,Constants.ZERO);
+
+        queryWrapper.orderByDesc(Cars::getCreateDate);
+        IPage<Cars> result = carJoinMapper.selectJoinPage(page, Cars.class,queryWrapper);
+        return PageData.from(result);
     }
 
     @Override
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParkBookServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParkBookServiceImpl.java
index 691c146..c8ab1a8 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParkBookServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParkBookServiceImpl.java
@@ -2,14 +2,18 @@
 
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.Utils;
 import com.doumee.dao.business.ParkBookMapper;
-import com.doumee.dao.business.model.ParkBook;
+import com.doumee.dao.business.join.ParkBookJoinMapper;
+import com.doumee.dao.business.model.*;
 import com.doumee.service.business.ParkBookService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -26,6 +30,11 @@
 
     @Autowired
     private ParkBookMapper parkBookMapper;
+
+    @Autowired
+    private ParkBookJoinMapper parkBookJoinMapper;
+
+
 
     @Override
     public Integer create(ParkBook parkBook) {
@@ -87,81 +96,28 @@
     @Override
     public PageData<ParkBook> findPage(PageWrap<ParkBook> pageWrap) {
         IPage<ParkBook> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
-        QueryWrapper<ParkBook> queryWrapper = new QueryWrapper<>();
-        Utils.MP.blankToNull(pageWrap.getModel());
-        if (pageWrap.getModel().getId() != null) {
-            queryWrapper.lambda().eq(ParkBook::getId, pageWrap.getModel().getId());
-        }
-        if (pageWrap.getModel().getCreator() != null) {
-            queryWrapper.lambda().eq(ParkBook::getCreator, pageWrap.getModel().getCreator());
-        }
-        if (pageWrap.getModel().getCreateDate() != null) {
-            queryWrapper.lambda().ge(ParkBook::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
-            queryWrapper.lambda().le(ParkBook::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
-        }
-        if (pageWrap.getModel().getEdirot() != null) {
-            queryWrapper.lambda().eq(ParkBook::getEdirot, pageWrap.getModel().getEdirot());
-        }
-        if (pageWrap.getModel().getEditDate() != null) {
-            queryWrapper.lambda().ge(ParkBook::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
-            queryWrapper.lambda().le(ParkBook::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
-        }
-        if (pageWrap.getModel().getIsdeleted() != null) {
-            queryWrapper.lambda().eq(ParkBook::getIsdeleted, pageWrap.getModel().getIsdeleted());
-        }
-        if (pageWrap.getModel().getRemark() != null) {
-            queryWrapper.lambda().eq(ParkBook::getRemark, pageWrap.getModel().getRemark());
-        }
-        if (pageWrap.getModel().getHkId() != null) {
-            queryWrapper.lambda().eq(ParkBook::getHkId, pageWrap.getModel().getHkId());
-        }
-        if (pageWrap.getModel().getSortnum() != null) {
-            queryWrapper.lambda().eq(ParkBook::getSortnum, pageWrap.getModel().getSortnum());
-        }
-        if (pageWrap.getModel().getVisitId() != null) {
-            queryWrapper.lambda().eq(ParkBook::getVisitId, pageWrap.getModel().getVisitId());
-        }
-        if (pageWrap.getModel().getCarCode() != null) {
-            queryWrapper.lambda().eq(ParkBook::getCarCode, pageWrap.getModel().getCarCode());
-        }
-        if (pageWrap.getModel().getParkId() != null) {
-            queryWrapper.lambda().eq(ParkBook::getParkId, pageWrap.getModel().getParkId());
-        }
-        if (pageWrap.getModel().getOrigin() != null) {
-            queryWrapper.lambda().eq(ParkBook::getOrigin, pageWrap.getModel().getOrigin());
-        }
-        if (pageWrap.getModel().getStartTime() != null) {
-            queryWrapper.lambda().ge(ParkBook::getStartTime, Utils.Date.getStart(pageWrap.getModel().getStartTime()));
-            queryWrapper.lambda().le(ParkBook::getStartTime, Utils.Date.getEnd(pageWrap.getModel().getStartTime()));
-        }
-        if (pageWrap.getModel().getEndTime() != null) {
-            queryWrapper.lambda().ge(ParkBook::getEndTime, Utils.Date.getStart(pageWrap.getModel().getEndTime()));
-            queryWrapper.lambda().le(ParkBook::getEndTime, Utils.Date.getEnd(pageWrap.getModel().getEndTime()));
-        }
-        if (pageWrap.getModel().getMemberId() != null) {
-            queryWrapper.lambda().eq(ParkBook::getMemberId, pageWrap.getModel().getMemberId());
-        }
-        if (pageWrap.getModel().getTimeType() != null) {
-            queryWrapper.lambda().eq(ParkBook::getTimeType, pageWrap.getModel().getTimeType());
-        }
-        if (pageWrap.getModel().getHkId2() != null) {
-            queryWrapper.lambda().eq(ParkBook::getHkId2, pageWrap.getModel().getHkId2());
-        }
-        if (pageWrap.getModel().getHkStatus() != null) {
-            queryWrapper.lambda().eq(ParkBook::getHkStatus, pageWrap.getModel().getHkStatus());
-        }
-        if (pageWrap.getModel().getHkDate() != null) {
-            queryWrapper.lambda().ge(ParkBook::getHkDate, Utils.Date.getStart(pageWrap.getModel().getHkDate()));
-            queryWrapper.lambda().le(ParkBook::getHkDate, Utils.Date.getEnd(pageWrap.getModel().getHkDate()));
-        }
-        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
-            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
-                queryWrapper.orderByDesc(sortData.getProperty());
-            } else {
-                queryWrapper.orderByAsc(sortData.getProperty());
-            }
-        }
-        return PageData.from(parkBookMapper.selectPage(page, queryWrapper));
+        MPJLambdaWrapper<ParkBook> queryWrapper = new MPJLambdaWrapper<>();
+
+        queryWrapper.selectAll(Cars.class);
+        queryWrapper.selectAs(Parks::getName,Cars::getParksName);
+        queryWrapper.selectAs(Member::getType,Cars::getMemberType);
+        queryWrapper.selectAs(Member::getName,Cars::getMemberName);
+        queryWrapper.selectAs(Member::getPhone,Cars::getMemberPhone);
+        queryWrapper.selectAs(Company::getName,Cars::getCompanyName);
+
+        queryWrapper.leftJoin(Parks.class,Parks::getId,ParkBook::getParkId);
+        queryWrapper.leftJoin(Member.class,Member::getId,ParkBook::getMemberId);
+        queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId);
+
+        queryWrapper.eq(ParkBook::getIsdeleted, Constants.ZERO)
+          .and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getPhone,pageWrap.getModel().getMemberName())
+                .or().like(Member::getName,pageWrap.getModel().getMemberName()));
+        queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getCarCode()),ParkBook::getCarCode,pageWrap.getModel().getCarCode());
+        queryWrapper.orderByDesc(ParkBook::getCreateDate);
+
+        IPage<ParkBook> result = parkBookJoinMapper.selectJoinPage(page, ParkBook.class,queryWrapper);
+
+        return PageData.from(result);
     }
 
     @Override
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParksServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParksServiceImpl.java
index a49f837..95e889d 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParksServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ParksServiceImpl.java
@@ -2,19 +2,26 @@
 
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.Utils;
+import com.doumee.dao.admin.response.MemberInfoDTO;
 import com.doumee.dao.business.ParksMapper;
+import com.doumee.dao.business.join.ParksJoinMapper;
+import com.doumee.dao.business.model.Member;
 import com.doumee.dao.business.model.Parks;
 import com.doumee.service.business.ParksService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import java.util.List;
+import java.util.Objects;
 
 /**
  * 鍋滆溅搴撲俊鎭〃Service瀹炵幇
@@ -26,6 +33,10 @@
 
     @Autowired
     private ParksMapper parksMapper;
+
+    @Autowired
+    private ParksJoinMapper parksJoinMapper;
+
 
     @Override
     public Integer create(Parks parks) {
@@ -80,83 +91,29 @@
 
     @Override
     public List<Parks> findList(Parks parks) {
-        QueryWrapper<Parks> wrapper = new QueryWrapper<>(parks);
-        return parksMapper.selectList(wrapper);
+        MPJLambdaWrapper<Parks> queryWrapper = new MPJLambdaWrapper<>();
+        queryWrapper.isNull(Parks::getParentHkId);
+        queryWrapper.eq(Parks::getIsdeleted,Constants.ZERO);
+        queryWrapper.orderByDesc(Parks::getCreateDate);
+        return parksMapper.selectList(queryWrapper);
     }
   
     @Override
     public PageData<Parks> findPage(PageWrap<Parks> pageWrap) {
         IPage<Parks> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
-        QueryWrapper<Parks> queryWrapper = new QueryWrapper<>();
-        Utils.MP.blankToNull(pageWrap.getModel());
-        if (pageWrap.getModel().getId() != null) {
-            queryWrapper.lambda().eq(Parks::getId, pageWrap.getModel().getId());
-        }
-        if (pageWrap.getModel().getCreator() != null) {
-            queryWrapper.lambda().eq(Parks::getCreator, pageWrap.getModel().getCreator());
-        }
-        if (pageWrap.getModel().getCreateDate() != null) {
-            queryWrapper.lambda().ge(Parks::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
-            queryWrapper.lambda().le(Parks::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
-        }
-        if (pageWrap.getModel().getEdirot() != null) {
-            queryWrapper.lambda().eq(Parks::getEdirot, pageWrap.getModel().getEdirot());
-        }
-        if (pageWrap.getModel().getEditDate() != null) {
-            queryWrapper.lambda().ge(Parks::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
-            queryWrapper.lambda().le(Parks::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
-        }
-        if (pageWrap.getModel().getIsdeleted() != null) {
-            queryWrapper.lambda().eq(Parks::getIsdeleted, pageWrap.getModel().getIsdeleted());
-        }
-        if (pageWrap.getModel().getRemark() != null) {
-            queryWrapper.lambda().eq(Parks::getRemark, pageWrap.getModel().getRemark());
-        }
-        if (pageWrap.getModel().getName() != null) {
-            queryWrapper.lambda().eq(Parks::getName, pageWrap.getModel().getName());
-        }
-        if (pageWrap.getModel().getHkId() != null) {
-            queryWrapper.lambda().eq(Parks::getHkId, pageWrap.getModel().getHkId());
-        }
-        if (pageWrap.getModel().getHkStatus() != null) {
-            queryWrapper.lambda().eq(Parks::getHkStatus, pageWrap.getModel().getHkStatus());
-        }
-        if (pageWrap.getModel().getHkDate() != null) {
-            queryWrapper.lambda().ge(Parks::getHkDate, Utils.Date.getStart(pageWrap.getModel().getHkDate()));
-            queryWrapper.lambda().le(Parks::getHkDate, Utils.Date.getEnd(pageWrap.getModel().getHkDate()));
-        }
-        if (pageWrap.getModel().getSortnum() != null) {
-            queryWrapper.lambda().eq(Parks::getSortnum, pageWrap.getModel().getSortnum());
-        }
-        if (pageWrap.getModel().getParkCreateDate() != null) {
-            queryWrapper.lambda().ge(Parks::getParkCreateDate, Utils.Date.getStart(pageWrap.getModel().getParkCreateDate()));
-            queryWrapper.lambda().le(Parks::getParkCreateDate, Utils.Date.getEnd(pageWrap.getModel().getParkCreateDate()));
-        }
-        if (pageWrap.getModel().getParentHkId() != null) {
-            queryWrapper.lambda().eq(Parks::getParentHkId, pageWrap.getModel().getParentHkId());
-        }
-        if (pageWrap.getModel().getParkEditDate() != null) {
-            queryWrapper.lambda().ge(Parks::getParkEditDate, Utils.Date.getStart(pageWrap.getModel().getParkEditDate()));
-            queryWrapper.lambda().le(Parks::getParkEditDate, Utils.Date.getEnd(pageWrap.getModel().getParkEditDate()));
-        }
-        if (pageWrap.getModel().getErpStatus() != null) {
-            queryWrapper.lambda().eq(Parks::getErpStatus, pageWrap.getModel().getErpStatus());
-        }
-        if (pageWrap.getModel().getErpDate() != null) {
-            queryWrapper.lambda().ge(Parks::getErpDate, Utils.Date.getStart(pageWrap.getModel().getErpDate()));
-            queryWrapper.lambda().le(Parks::getErpDate, Utils.Date.getEnd(pageWrap.getModel().getErpDate()));
-        }
-        if (pageWrap.getModel().getStatus() != null) {
-            queryWrapper.lambda().eq(Parks::getStatus, pageWrap.getModel().getStatus());
-        }
-        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
-            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
-                queryWrapper.orderByDesc(sortData.getProperty());
-            } else {
-                queryWrapper.orderByAsc(sortData.getProperty());
-            }
-        }
-        return PageData.from(parksMapper.selectPage(page, queryWrapper));
+        MPJLambdaWrapper<Parks> queryWrapper = new MPJLambdaWrapper<>();
+        queryWrapper.selectAll(Parks.class);
+        queryWrapper.select(" p.name as parentName");
+
+        queryWrapper.leftJoin(" parks p on p.id=t.PARENT_HK_ID");
+
+        queryWrapper.isNotNull(Parks::getParentHkId);
+        queryWrapper.eq(Parks::getIsdeleted, Constants.ZERO);
+        queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Parks::getName,pageWrap.getModel().getName());
+        queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getParentHkId()),Parks::getName,pageWrap.getModel().getParentHkId());
+        queryWrapper.orderByDesc(Parks::getCreateDate);
+        IPage<Parks> result = parksJoinMapper.selectJoinPage(page, Parks.class,queryWrapper);
+        return PageData.from(result);
     }
 
     @Override
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/erp/ErpSyncServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/erp/ErpSyncServiceImpl.java
index 9429df2..7886100 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/erp/ErpSyncServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/erp/ErpSyncServiceImpl.java
@@ -26,6 +26,7 @@
 import com.doumee.core.model.openapi.response.erp.OrgListRespone;
 import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.DESUtil;
+import com.doumee.core.utils.DateUtil;
 import com.doumee.core.utils.Utils;
 import com.doumee.core.utils.redis.RedisUtil;
 import com.doumee.dao.admin.response.MemberInfoDTO;
@@ -99,6 +100,9 @@
 
     @Autowired
     private MemberCardMapper memberCardMapper;
+
+    @Autowired
+    private VisitsMapper visitsMapper;
 
     @Autowired
     private InterfaceLogService interfaceLogService;
@@ -506,26 +510,40 @@
                 memberRoleMapper.delete(new QueryWrapper<MemberRole>().lambda().eq(MemberRole::getMemberId,member.getId()));
                 //TODO 娴峰悍鏁版嵁鏇存柊
             }
-            //娣诲姞浜哄憳瑙掑叧鑱旀暟鎹�
+            //娣诲姞浜哄憳瑙掕壊鍏宠仈鏁版嵁
             if(!Objects.isNull(param.getRoleIds())&&param.getRoleIds().length>Constants.ZERO){
                 //鏌ヨ鏁版嵁搴撳瓨鍦ㄧ殑鏉冮檺
-                List<MemberRole> memberRoleList = memberRoleMapper.selectList(new QueryWrapper<MemberRole>().lambda().eq(MemberRole::getId,param.getRoleIds()));
-                List<Integer> roleIds = Arrays.asList(param.getRoleIds());
-
-//                List<MemberRole> memberRoleList = new ArrayList<>();
-//
-//                for (Integer id:roleIds) {
-//
-//                }
-
-
-
-
+                List<DeviceRole> deviceRoleList
+                        = deviceRoleMapper.selectList(new QueryWrapper<DeviceRole>().lambda().eq(DeviceRole::getId,param.getRoleIds()));
+                if(CollectionUtils.isNotEmpty(deviceRoleList)){
+                    List<MemberRole> memberRoleList = new ArrayList<>();
+                    for (DeviceRole deviceRole:deviceRoleList) {
+                        MemberRole memberRole = new MemberRole();
+                        memberRole.setCreateDate(new Date());
+                        memberRole.setMemberId(member.getId());
+                        memberRole.setIsdeleted(Constants.ZERO);
+                        memberRole.setRoleId(deviceRole.getId().toString());
+                        memberRoleList.add(memberRole);
+                    }
+                    memberRoleMapper.insertBatchSomeColumn(memberRoleList);
+                }
             }
-            
-            
-            
-            
+
+            //娣诲姞浜哄憳鍗$墖鏁版嵁
+            if(!Objects.isNull(param.getCardList())&&param.getCardList().size()>Constants.ZERO){
+                if(CollectionUtils.isNotEmpty(param.getCardList())){
+                    List<MemberCard> memberCardList = new ArrayList<>();
+                    for (String id:param.getCardList()) {
+                        MemberCard memberCard = new MemberCard();
+                        memberCard.setCreateDate(new Date());
+                        memberCard.setMemberId(member.getId());
+                        memberCard.setIsdeleted(Constants.ZERO);
+                        memberCard.setCode(id);
+                        memberCardList.add(memberCard);
+                    }
+                    memberCardMapper.insertBatchSomeColumn(memberCardList);
+                }
+            }
         }catch (Exception e){
             e.printStackTrace();
         }finally {
@@ -534,6 +552,36 @@
     }
 
 
+    @Override
+    public void approveApply(ApproveNoticeRequest param){
+        try{
+            if(Objects.isNull(param)
+                    ||Objects.isNull(param.getId())
+                    ||Objects.isNull(param.getStatus())
+            ){
+                throw new BusinessException(ResponseStatus.BAD_REQUEST);
+            }
+            if(!(param.getStatus()==Constants.ZERO||param.getStatus()==Constants.ONE)){
+                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鐘舵�佺爜閿欒");
+            }
+            if(visitsMapper.selectCount(new QueryWrapper<Visits>().lambda().eq(Visits::getErpId,param.getId())
+                    .ne(Visits::getStatus,Constants.VisitStatus.submitCheck))>Constants.ZERO){
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�佺爜閿欒");
+            }
+            List<Visits> visitsList = visitsMapper.selectList(new QueryWrapper<Visits>().lambda().eq(Visits::getErpId,param.getId()));
+            if(CollectionUtils.isNotEmpty(visitsList)){
+                visitsList.forEach(i->{
+                    i.setStatus(param.getStatus().equals(Constants.ZERO)?Constants.VisitStatus.pass:Constants.VisitStatus.noPass);
+                    i.setEndCheckDate(DateUtil.StringToDate(param.getApproveDate(),"yyyy-MM-dd HH:mm:ss"));
+                    visitsMapper.updateById(i);
+                });
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }finally {
+            saveInterfaceLog(param,"/visitBiz/resource/approveApply",null,Constants.ZERO);
+        }
+    }
 
 
 
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncImgServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncImgServiceImpl.java
index f4562f5..ba0a311 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncImgServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncImgServiceImpl.java
@@ -2,28 +2,36 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.doumee.biz.system.SystemDictDataBiz;
 import com.doumee.core.constants.ResponseStatus;
 import com.doumee.core.exception.BusinessException;
 import com.doumee.core.haikang.model.HKConstants;
 import com.doumee.core.haikang.model.param.BaseResponse;
-import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest;
+import com.doumee.core.haikang.model.param.request.*;
 import com.doumee.core.haikang.model.param.respose.AcsDeviceInfoResponse;
 import com.doumee.core.haikang.model.param.respose.AcsDeviceListResponse;
 import com.doumee.core.haikang.service.HKService;
 import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.DateUtil;
+import com.doumee.core.utils.FtpUtil;
 import com.doumee.dao.business.*;
 import com.doumee.dao.business.model.CarEvent;
 import com.doumee.dao.business.model.Device;
 import com.doumee.dao.business.model.DeviceEvent;
 import com.doumee.dao.business.model.VisitEvent;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.UUID;
 
 /**
  * 璁惧淇℃伅琛⊿ervice瀹炵幇
@@ -31,6 +39,7 @@
  * @date 2023/11/30 15:33
  */
 @Service
+@Slf4j
 public class HkSyncImgServiceImpl extends HkSyncBaseServiceImpl {
 
     @Autowired
@@ -39,6 +48,8 @@
     private DeviceEventMapper deviceEventMapper;
     @Autowired
     private VisitEventMapper visitEventMapper;
+    @Autowired
+    private SystemDictDataBiz systemDictDataBiz;
     @Override
     public  String downHKImgs(int type){
         if(Constants.DEALING_HK_IMG){
@@ -48,13 +59,12 @@
         try {
             //鏌ヨ鎵�鏈夎瀹簨浠惰褰曚腑鎵�鏈変笅杞界殑娴峰悍绔� 鎶撴媿鐓х墖 鍜� 鐓х墖
             startDealVisitImg();
-
             //鏌ヨ鎵�鏈夊仠杞﹀満浜嬩欢璁板綍涓墍鏈変笅杞界殑娴峰悍绔� 杞︾墝鍥剧墖 鍜�   杞﹁締鍥剧墖
             startDealCarImg();
             //鏌ヨ鎵�鏈夐棬绂佷簨浠惰褰曚腑鎵�鏈変笅杞界殑娴峰悍绔� 鎶撴媿鐓х墖 鍜�   韬唤璇佸浘鐗嘦RL
             startDealDeviceImg();
         }catch (Exception e){
-
+            e.printStackTrace();
         }finally {
             Constants.DEALING_HK_IMG =false;
         }
@@ -64,29 +74,40 @@
     private void startDealDeviceImg() {
         List<DeviceEvent> deviceEventList = deviceEventMapper.selectList(new QueryWrapper<DeviceEvent>().lambda()
                 .eq(DeviceEvent::getIsdeleted,Constants.ZERO)
-                .and(wrapper ->{wrapper.likeLeft(DeviceEvent::getExtEventPictureURL,HKConstants.IMG_INDEX)
+                .and(wrapper ->{wrapper.likeRight(DeviceEvent::getExtEventPictureURL,HKConstants.IMG_INDEX)
                         .or()
-                        .likeLeft(DeviceEvent::getExtEventIDCardPictureURL,HKConstants.IMG_INDEX) ;}));
+                        .likeRight(DeviceEvent::getExtEventIDCardPictureURL,HKConstants.IMG_INDEX) ;}));
         Date date= new Date();
         if(deviceEventList !=null && deviceEventList.size()>0){
             for(DeviceEvent model:deviceEventList){
-                String img1 = model.getExtEventPictureURL();
-                String img2 = model.getExtEventIDCardPictureURL();
                 String serverIndex = model.getSvrIndexCode();//鏈嶅姟鍣ㄧ紪鐮�
-                String rs1 = downHkImgToFtp(img1,serverIndex,Constants.DEVICE_EVENT_IMG);
-                String rs2 = downHkImgToFtp(img2,serverIndex,Constants.DEVICE_EVENT_IMG);
+                if(StringUtils.isBlank(serverIndex)){
+                    continue;
+                }
+                String rs1 = null;
+                String rs2 = null;
                 DeviceEvent event = new DeviceEvent();
                 event.setId(model.getId());
                 event.setEditDate(date);
-                if(StringUtils.isNotBlank(rs1)){
-                    event.setExtEventPictureURL(rs1);
-                }else{
-                    event.setExtEventPictureURL(img1.replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+
+                if(StringUtils.isNotBlank(model.getExtEventPictureURL())){
+                    String img1 = model.getExtEventPictureURL().replace(HKConstants.IMG_INDEX_ERROR, "").replace(HKConstants.IMG_INDEX, "");
+                    rs1 = downHkImgToFtp(img1,serverIndex,Constants.DEVICE_EVENT_IMG);
+                    if(StringUtils.isNotBlank(rs1)){
+                        event.setExtEventPictureURL(rs1);
+                    }else{
+                        event.setExtEventPictureURL(model.getExtEventPictureURL().replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                    }
                 }
-                if(StringUtils.isNotBlank(rs2)){
-                    event.setExtEventIDCardPictureURL(rs2);
-                }else{
-                    event.setExtEventIDCardPictureURL(img2.replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                if(StringUtils.isNotBlank(model.getExtEventIDCardPictureURL())){
+                    String img2 = model.getExtEventIDCardPictureURL().replace(HKConstants.IMG_INDEX_ERROR, "").replace(HKConstants.IMG_INDEX, "");
+                    rs2 = downHkImgToFtp(img2,serverIndex,Constants.DEVICE_EVENT_IMG);
+
+                    if(StringUtils.isNotBlank(rs2)){
+                        event.setExtEventIDCardPictureURL(rs2);
+                    }else{
+                        event.setExtEventIDCardPictureURL(model.getExtEventIDCardPictureURL().replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                    }
                 }
                 deviceEventMapper.updateById(event);
             }
@@ -97,30 +118,41 @@
     private void startDealCarImg() {
         List<CarEvent> carEventList = carEventMapper.selectList(new QueryWrapper<CarEvent>().lambda()
                 .eq(CarEvent::getIsdeleted,Constants.ZERO)
-                .and(wrapper ->{wrapper.likeLeft(CarEvent::getPlatePicUrl,HKConstants.IMG_INDEX)
+                .and(wrapper ->{wrapper.likeRight(CarEvent::getPlatePicUrl,HKConstants.IMG_INDEX)
                         .or()
-                        .likeLeft(CarEvent::getVehiclePicUrl,HKConstants.IMG_INDEX) ;}));
+                        .likeRight(CarEvent::getVehiclePicUrl,HKConstants.IMG_INDEX) ;}));
         Date date= new Date();
         if(carEventList !=null && carEventList.size()>0){
             for(CarEvent model:carEventList){
-                String img1 = model.getPlatePicUrl();
-                String img2 = model.getVehiclePicUrl();
                 String serverIndex = model.getSvrIndex();//鏈嶅姟鍣ㄧ紪鐮�
-                String rs1 = downHkImgToFtp(img1,serverIndex,Constants.CAR_EVENT_IMG);
-                String rs2 = downHkImgToFtp(img2,serverIndex,Constants.CAR_EVENT_IMG);
+                if(StringUtils.isBlank(serverIndex)){
+                    continue;
+                }
                 CarEvent event = new CarEvent();
                 event.setId(model.getId());
                 event.setEditDate(date);
-                if(StringUtils.isNotBlank(rs1)){
-                    event.setPlatePicUrl(rs1);
-                }else{
-                    event.setPlatePicUrl(img1.replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                String rs1 = null;
+                String rs2 = null;
+
+                if(StringUtils.isNotBlank(model.getPlatePicUrl())){
+                    String img1 = model.getPlatePicUrl().replace(HKConstants.IMG_INDEX_ERROR, "").replace(HKConstants.IMG_INDEX, "");
+                    rs1 = downHkImgToFtp(img1,serverIndex,Constants.CAR_EVENT_IMG);
+                    if(StringUtils.isNotBlank(rs1)){
+                        event.setPlatePicUrl(rs1);
+                    }else{
+                        event.setPlatePicUrl(model.getPlatePicUrl().replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                    }
                 }
-                if(StringUtils.isNotBlank(rs2)){
-                    event.setVehiclePicUrl(rs2);
-                }else{
-                    event.setVehiclePicUrl(img2.replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                if(StringUtils.isNotBlank(model.getVehiclePicUrl())){
+                    String img2 = model.getVehiclePicUrl().replace(HKConstants.IMG_INDEX_ERROR, "").replace(HKConstants.IMG_INDEX, "");
+                    rs2 = downHkImgToFtp(img2,serverIndex,Constants.CAR_EVENT_IMG);
+                    if(StringUtils.isNotBlank(rs2)){
+                        event.setVehiclePicUrl(rs2);
+                    }else{
+                        event.setVehiclePicUrl(model.getVehiclePicUrl().replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                    }
                 }
+
                 carEventMapper.updateById(event);
             }
         }
@@ -130,40 +162,96 @@
     private void startDealVisitImg() {
         List<VisitEvent> visitEventList = visitEventMapper.selectList(new QueryWrapper<VisitEvent>().lambda()
                 .eq(VisitEvent::getIsdeleted,Constants.ZERO)
-                .and(wrapper ->{wrapper.likeLeft(VisitEvent::getCaptureUrl,HKConstants.IMG_INDEX)
+                .and(wrapper ->{wrapper.likeRight(VisitEvent::getCaptureUrl,HKConstants.IMG_INDEX)
                         .or()
-                        .likeLeft(VisitEvent::getPhotoUrl,HKConstants.IMG_INDEX) ;}));
+                        .likeRight(VisitEvent::getPhotoUrl,HKConstants.IMG_INDEX) ;}));
 
         Date date= new Date();
         if(visitEventList !=null && visitEventList.size()>0){
             for(VisitEvent model:visitEventList){
-                String img1 = model.getCaptureUrl();
-                String img2 = model.getPhotoUrl();
                 String serverIndex = model.getSvrIndexCode();//鏈嶅姟鍣ㄧ紪鐮�
-                String rs1 = downHkImgToFtp(img1,serverIndex,Constants.VISIT_EVENT_IMG);
-                String rs2 = downHkImgToFtp(img2,serverIndex,Constants.VISIT_EVENT_IMG);
+                if(StringUtils.isBlank(serverIndex)){
+                    continue;
+                }
                 VisitEvent event = new VisitEvent();
                 event.setId(model.getId());
                 event.setEditDate(date);
-                if(StringUtils.isNotBlank(rs1)){
-                    event.setCaptureUrl(rs1);
-                }else{
-                    event.setCaptureUrl(img1.replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                String rs1 = null;
+                String rs2 = null;
+                if(StringUtils.isNotBlank(model.getCaptureUrl())){
+                    String img1 = model.getCaptureUrl().replace(HKConstants.IMG_INDEX_ERROR, "").replace(HKConstants.IMG_INDEX, "");
+                    rs1 = downHkImgToFtp(img1,serverIndex,Constants.VISIT_EVENT_IMG);
+                    if(StringUtils.isNotBlank(rs1)){
+                        event.setCaptureUrl(rs1);
+                    }else{
+                        event.setCaptureUrl(model.getCaptureUrl().replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                    }
                 }
-                if(StringUtils.isNotBlank(rs2)){
-                    event.setPhotoUrl(rs2);
-                }else{
-                    event.setPhotoUrl(img2.replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                if(StringUtils.isNotBlank(model.getPhotoUrl())){
+                    String img2 = model.getPhotoUrl().replace(HKConstants.IMG_INDEX_ERROR, "").replace(HKConstants.IMG_INDEX, "");
+                    rs2 = downHkImgToFtp(img2,serverIndex,Constants.VISIT_EVENT_IMG);
+                    if(StringUtils.isNotBlank(rs2)){
+                        event.setPhotoUrl(rs2);
+                    }else{
+                        event.setPhotoUrl(model.getPhotoUrl().replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR));
+                    }
                 }
+
                 visitEventMapper.updateById(event);
             }
         }
 
     }
 
-    private String downHkImgToFtp(String img1, String serverIndex, String visitEventImg) {
-        //
-
+    public static  FtpUtil ftp  = null;
+    private String downHkImgToFtp(String img1, String serverIndex, String folder_code) {
+        String folder = systemDictDataBiz.queryByCode(Constants.FTP,folder_code).getCode();
+        InputStream is = null;
+        if(StringUtils.equals(folder_code,Constants.CAR_EVENT_IMG)){
+            //鍋滆溅鍦烘姄鎷嶅浘
+            CarPictureRequest param = new CarPictureRequest();
+            param.setPicUri(img1.replace(HKConstants.IMG_INDEX_ERROR,"").replace(HKConstants.IMG_INDEX,""));
+            param.setAswSyscode(serverIndex);
+            is = HKService.getCarPicture(param);
+        }else if(StringUtils.equals(folder_code,Constants.DEVICE_EVENT_IMG)){
+            //闂ㄧ浜嬩欢鍥剧墖
+            DevicePictureRequest param = new DevicePictureRequest();
+            param.setPicUri(img1.replace(HKConstants.IMG_INDEX_ERROR,"").replace(HKConstants.IMG_INDEX,""));
+            param.setSvrIndexCode(serverIndex);
+            is = HKService.getDevicePicture(param);
+        }else if(StringUtils.equals(folder_code,Constants.VISIT_EVENT_IMG)){
+            //璁垮浜嬩欢鍥剧墖
+            VisitPictureRequest param = new VisitPictureRequest();
+            param.setPicUri(img1.replace(HKConstants.IMG_INDEX_ERROR,"").replace(HKConstants.IMG_INDEX,""));
+            param.setSvrIndexCode(serverIndex);
+            is = HKService.getVisitPicture(param);
+        }
+        if(is ==null){
+            return  null;
+        }
+        //TODO------jiangping---------
+        try {
+            if(ftp == null){
+                 ftp = new FtpUtil(systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_HOST).getCode(),
+                        Integer.parseInt(systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_PORT).getCode()),
+                        systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_USERNAME).getCode(),
+                        systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_PWD).getCode());
+            }else{
+                ftp.connect();
+            }
+            String date = DateUtil.getNowShortDate();
+            String fName =  date+"/"+ UUID.randomUUID().toString()+".jpg";
+            String fileName = folder+fName;
+            boolean r = ftp.uploadInputstream(is,fileName);//涓婁紶
+            if(r){
+                log.info("銆愭捣搴峰浘鐗囦笅杞戒笂浼燜TP鎴愬姛銆�======================" );
+                return  fName;
+            }else{
+                log.error("銆愭捣搴峰浘鐗囦笅杞戒笂浼燜TP澶辫触銆�======================" );
+            }
+        } catch (Exception e) {
+            log.error("銆愭捣搴峰浘鐗囦笅杞戒笂浼燜TP澶辫触銆�======================"+e.getMessage());
+        }
         return  null;
     }
 }
diff --git a/server/openapi/src/main/java/com/doumee/api/web/BizResourceController.java b/server/openapi/src/main/java/com/doumee/api/web/BizResourceController.java
index c0c9384..17abf6a 100644
--- a/server/openapi/src/main/java/com/doumee/api/web/BizResourceController.java
+++ b/server/openapi/src/main/java/com/doumee/api/web/BizResourceController.java
@@ -151,7 +151,9 @@
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鎺堟潈token鍊�", required = true)
     })
-    public ApiResponse approveApply(@RequestBody ApproveNoticeRequest account ) {
+    public ApiResponse approveApply(@RequestBody ApproveNoticeRequest param) {
+        param.setToken(this.getToken());
+        erpSyncService.approveApply(param);
         return  ApiResponse.success(null);
     }
 }
diff --git a/server/openapi/src/main/java/com/doumee/api/web/ErpResourceController.java b/server/openapi/src/main/java/com/doumee/api/web/ErpResourceController.java
index 6864bcf..a89ee60 100644
--- a/server/openapi/src/main/java/com/doumee/api/web/ErpResourceController.java
+++ b/server/openapi/src/main/java/com/doumee/api/web/ErpResourceController.java
@@ -5,6 +5,7 @@
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
 import com.doumee.core.model.openapi.request.erp.ApproveAddRequest;
+import com.doumee.core.model.openapi.request.erp.MemberFailRequest;
 import com.doumee.core.model.openapi.request.erp.OrgListRequest;
 import com.doumee.core.model.openapi.request.erp.UserListRequest;
 import com.doumee.core.model.openapi.response.erp.ApproveInfoResponse;
@@ -16,6 +17,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
 import java.util.UUID;
 
 /**
@@ -27,32 +29,37 @@
 
 @Api(tags = "2銆併�怑RP銆戠鎻愪緵鎺ュ彛锛堝悜璁垮绔彁渚涙垨鎻愪氦鏁版嵁淇℃伅锛�")
 @RestController
-@RequestMapping("/erp")
+@RequestMapping("/erp/resource")
 @Slf4j
 public class ErpResourceController extends ApiController{
     @ApiOperation(value = "鍏ㄩ噺缁勭粐淇℃伅鎺ュ彛", notes = "ERP绔彁渚涳紝渚涜瀹㈢鎷夊彇鍏ㄩ儴缁勭粐淇℃伅锛岀敤浜庡垵濮嬪寲鍙婂懆鏈熸�ф暟鎹牳鏌�")
-    @PostMapping("/resource/org/list")
+    @PostMapping("/org/list")
     public ApiResponse<PageData<OrgListResponse>> orgList (@RequestBody PageWrap<OrgListRequest> pageWrap) {
         return ApiResponse.success(null);
     }
     @ApiOperation(value = "鍏ㄩ噺浜哄憳淇℃伅鎺ュ彛", notes = "ERP绔彁渚涳紝渚涜瀹㈢鎷夊彇鍏ㄩ儴浜哄憳淇℃伅锛岀敤浜庡垵濮嬪寲鍙婂懆鏈熸�ф暟鎹牳鏌�")
-    @PostMapping("/resource/user/list")
+    @PostMapping("/user/list")
     public ApiResponse<PageData<UserListRespone>> userList (@RequestBody PageWrap<UserListRequest> pageWrap) {
         return ApiResponse.success(null);
     }
     @ApiOperation(value = "璁垮鐢宠鎻愪氦瀹℃壒鎺ュ彛", notes = "ERP绔彁渚涳紝渚涜瀹㈢璋冪敤锛屾彁浜よ瀹㈢敵璇蜂俊鎭�,鎺ュ彛鎻愪氦鎴愬姛锛孍RP绔繑鍥炲鎵硅褰曠紪鐮�")
     @PostMapping("/event/approve/apply")
-    public ApiResponse<String> approveApply(@RequestBody ApproveAddRequest account ) {
+    public ApiResponse<String> approveApply(@RequestBody ApproveAddRequest param ) {
         return  ApiResponse.success(UUID.randomUUID().toString());
     }
     @ApiOperation(value = "璁垮鐢宠瀹℃壒缁撴灉鏌ヨ鎺ュ彛", notes = "ERP绔彁渚涳紝渚涜瀹㈢璋冪敤锛屾煡璇㈣瀹㈢敵璇峰鎵圭粨鏋�")
-    @GetMapping("/resource/approve/info")
+    @GetMapping("/approve/info")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "瀹℃壒璁板綍鍞竴鏍囪瘑", required = true)
     })
     public ApiResponse<ApproveInfoResponse> approveInfo(@RequestParam String id ) {
         return  ApiResponse.success(null );
     }
+    @ApiOperation(value = "鍛樺伐鍚屾澶辫触鎺ㄩ�佹帴鍙�", notes = "ERP绔彁渚涳紝渚涜瀹㈢璋冪敤锛屽憡鐭rp鍛樺伐淇℃伅鍚屾澶辫触鐨勬暟鎹�")
+    @PostMapping("/member/fail")
+    public ApiResponse<ApproveInfoResponse> memberFail(@RequestBody List<MemberFailRequest> param) {
+        return  ApiResponse.success(null );
+    }
 
 }
 

--
Gitblit v1.9.3