From 9b276fecad68c5d5483bfb29a2eaf203f4bb371b Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 14 十月 2025 18:12:13 +0800
Subject: [PATCH] 定时自动叫号 与 WMS获取车辆是否在园接口开发

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java        |    9 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java        |   42 +++-
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DdNoticeConfigServiceImpl.java |  117 +++++++++++++
 server/db/business.dd_notice_config.permissions.sql                                                         |    6 
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/DdNoticeConfigMapper.java               |   13 +
 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/DdNoticeConfigCloudController.java         |  109 ++++++++++++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/DdNoticeConfigService.java          |  100 +++++++++++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/HiddenDangerServiceImpl.java   |   13 +
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/DdNoticeConfig.java               |   66 +++++++
 server/visits/dmvisit_service/src/main/java/com/doumee/core/dingTalk/DingTalk.java                          |   21 ++
 10 files changed, 481 insertions(+), 15 deletions(-)

diff --git a/server/db/business.dd_notice_config.permissions.sql b/server/db/business.dd_notice_config.permissions.sql
new file mode 100644
index 0000000..9cac7af
--- /dev/null
+++ b/server/db/business.dd_notice_config.permissions.sql
@@ -0,0 +1,6 @@
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:create', '鏂板缓閽夐拤鍏紬鍙烽�氱煡閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:delete', '鍒犻櫎閽夐拤鍏紬鍙烽�氱煡閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:update', '淇敼閽夐拤鍏紬鍙烽�氱煡閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:query', '鏌ヨ閽夐拤鍏紬鍙烽�氱煡閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:exportExcel', '瀵煎嚭閽夐拤鍏紬鍙烽�氱煡閰嶇疆(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/DdNoticeConfigCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/DdNoticeConfigCloudController.java
new file mode 100644
index 0000000..2e735d5
--- /dev/null
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/DdNoticeConfigCloudController.java
@@ -0,0 +1,109 @@
+package com.doumee.cloud.admin;
+
+import com.doumee.api.BaseController;
+import com.doumee.config.annotation.CloudRequiredPermission;
+import com.doumee.core.annotation.excel.ExcelExporter;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.utils.Constants;
+import com.doumee.dao.business.model.DdNoticeConfig;
+import com.doumee.service.business.DdNoticeConfigService;
+import com.doumee.service.business.third.model.ApiResponse;
+import com.doumee.service.business.third.model.PageData;
+import com.doumee.service.business.third.model.PageWrap;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.authz.annotation.RequiresPermissions;    
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2025/10/14 15:11
+ */
+@Api(tags = "閽夐拤鍏紬鍙烽�氱煡閰嶇疆")
+@RestController
+@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ddNoticeConfig")
+public class DdNoticeConfigCloudController extends BaseController {
+
+    @Autowired
+    private DdNoticeConfigService ddNoticeConfigService;
+
+    @PreventRepeat
+    @ApiOperation("鏂板缓")
+    @PostMapping("/create")
+    @CloudRequiredPermission("business:ddnoticeconfig:create")
+    public ApiResponse create(@RequestBody DdNoticeConfig ddNoticeConfig) {
+        return ApiResponse.success(ddNoticeConfigService.create(ddNoticeConfig));
+    }
+
+    @ApiOperation("鏍规嵁ID鍒犻櫎")
+    @GetMapping("/delete/{id}")
+    @CloudRequiredPermission("business:ddnoticeconfig:delete")
+    public ApiResponse deleteById(@PathVariable Integer id) {
+        ddNoticeConfigService.deleteById(id);
+        return ApiResponse.success(null);
+    }
+
+    @ApiOperation("鎵归噺鍒犻櫎")
+    @GetMapping("/delete/batch")
+    @CloudRequiredPermission("business:ddnoticeconfig:delete")
+    public ApiResponse deleteByIdInBatch(@RequestParam String ids) {
+        String [] idArray = ids.split(",");
+        List<Integer> idList = new ArrayList<>();
+        for (String id : idArray) {
+            idList.add(Integer.valueOf(id));
+        }
+        ddNoticeConfigService.deleteByIdInBatch(idList);
+        return ApiResponse.success(null);
+    }
+
+    @ApiOperation("鏍规嵁ID淇敼")
+    @PostMapping("/updateById")
+    @CloudRequiredPermission("business:ddnoticeconfig:update")
+    public ApiResponse updateById(@RequestBody DdNoticeConfig ddNoticeConfig) {
+        ddNoticeConfigService.updateById(ddNoticeConfig);
+        return ApiResponse.success(null);
+    }
+
+    @ApiOperation("鍒嗛〉鏌ヨ")
+    @PostMapping("/page")
+    @CloudRequiredPermission("business:ddnoticeconfig:query")
+    public ApiResponse<PageData<DdNoticeConfig>> findPage (@RequestBody PageWrap<DdNoticeConfig> pageWrap) {
+        return ApiResponse.success(ddNoticeConfigService.findPage(pageWrap));
+    }
+
+    @ApiOperation("瀵煎嚭Excel")
+    @PostMapping("/exportExcel")
+    @CloudRequiredPermission("business:ddnoticeconfig:exportExcel")
+    public void exportExcel (@RequestBody PageWrap<DdNoticeConfig> pageWrap, HttpServletResponse response) {
+        ExcelExporter.build(DdNoticeConfig.class).export(ddNoticeConfigService.findPage(pageWrap).getRecords(), "閽夐拤鍏紬鍙烽�氱煡閰嶇疆", response);
+    }
+
+    @ApiOperation("鏍规嵁ID鏌ヨ")
+    @GetMapping("/{id}")
+    @CloudRequiredPermission("business:ddnoticeconfig:query")
+    public ApiResponse findById(@PathVariable Integer id) {
+        return ApiResponse.success(ddNoticeConfigService.findById(id));
+    }
+
+
+
+    @ApiOperation("鎵归噺绂佸惎鐢�")
+    @GetMapping("/updateStatus/batch")
+    @CloudRequiredPermission("business:ddnoticeconfig:update")
+    public ApiResponse updateStatusBatch(@RequestParam String ids,@RequestParam Integer status) {
+        String [] idArray = ids.split(",");
+        List<Integer> idList = new ArrayList<>();
+        for (String id : idArray) {
+            idList.add(Integer.valueOf(id));
+        }
+        ddNoticeConfigService.updateStatusByIdInBatch(idList,status);
+        return ApiResponse.success(null);
+    }
+
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/dingTalk/DingTalk.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/dingTalk/DingTalk.java
index 84273d6..7b2356e 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/dingTalk/DingTalk.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/dingTalk/DingTalk.java
@@ -375,6 +375,9 @@
      */
     public Boolean workInfoOANotice(Long agentId,String userIds,OapiMessageCorpconversationAsyncsendV2Request.Msg msg){
         try{
+            if(CollectionUtils.isEmpty(msg)){
+                return null;
+            }
             DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2");
             OapiMessageCorpconversationAsyncsendV2Request request = new OapiMessageCorpconversationAsyncsendV2Request();
             request.setAgentId(agentId);
@@ -382,7 +385,7 @@
             request.setToAllUser(false);
 
             request.setMsg(msg);
-            OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(request, "60c2df248ca93d4eafb4a04a2330d3d3");//getToken());
+            OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(request, getToken());
             if(rsp.getErrcode().equals(Constants.DD_ERR_CODE)){
                 return true;
             }else{
@@ -540,6 +543,9 @@
      */
     public String toDoNotice(String title,List<String> unionIdList,List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> fieldList,String url) {
         try{
+            if(CollectionUtils.isEmpty(fieldList)){
+                return null;
+            }
             com.aliyun.dingtalktodo_1_0.Client client = DingTalk.createV1Client();
             CreateTodoTaskHeaders createTodoTaskHeaders = new CreateTodoTaskHeaders();
             createTodoTaskHeaders.xAcsDingtalkAccessToken = getToken();
@@ -559,7 +565,7 @@
                     .setTitle("鍘诲鐞�")
                     .setActionType(2)
                     .setParam(actionList0Param)
-                    .setUrl("https://www.baidu.com") //TODO 璇︽儏鍦板潃
+                    .setUrl(url) //TODO 璇︽儏鍦板潃
                     .setActionKey("ak-1-1");
             //璇︽儏椤祏rl璺宠浆鍦板潃
             CreateTodoTaskRequest.CreateTodoTaskRequestDetailUrl detailUrl = new CreateTodoTaskRequest.CreateTodoTaskRequestDetailUrl()
@@ -670,6 +676,11 @@
     }
 
 
+    /**
+     * 璁垮鎶ュ涓庤瀹㈢敵璇� 閽夐拤寰呭姙
+     * @param visits
+     * @return
+     */
     public List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> getToDoVisitFiledInfo(Visits visits){
         List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> list = new ArrayList<>();
         CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList contentFieldList0 = new CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList()
@@ -698,7 +709,11 @@
     }
 
 
-
+    /**
+     * 鐢ㄨ溅鐢宠鐨� 閽夐拤寰呭姙
+     * @param carUseBook
+     * @return
+     */
     public List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> getToDoCarUseBookFiledInfo(CarUseBook carUseBook){
         List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> list = new ArrayList<>();
         CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList contentFieldList1 = new CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList()
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/DdNoticeConfigMapper.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/DdNoticeConfigMapper.java
new file mode 100644
index 0000000..8cab6d0
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/DdNoticeConfigMapper.java
@@ -0,0 +1,13 @@
+package com.doumee.dao.business;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.doumee.dao.business.model.DdNoticeConfig;
+import com.github.yulichang.base.MPJBaseMapper;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2025/10/14 15:11
+ */
+public interface DdNoticeConfigMapper extends MPJBaseMapper<DdNoticeConfig> {
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/DdNoticeConfig.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/DdNoticeConfig.java
new file mode 100644
index 0000000..190fd58
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/DdNoticeConfig.java
@@ -0,0 +1,66 @@
+package com.doumee.dao.business.model;
+
+import com.doumee.core.annotation.excel.ExcelColumn;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.Date;
+
+/**
+ * 閽夐拤鍏紬鍙烽�氱煡閰嶇疆
+ * @author 姹熻箘韫�
+ * @date 2025/10/14 15:11
+ */
+@Data
+@ApiModel("閽夐拤鍏紬鍙烽�氱煡閰嶇疆")
+@TableName("`dd_notice_config`")
+public class DdNoticeConfig {
+
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "涓婚敭", example = "1")
+    @ExcelColumn(name="涓婚敭")
+    private Integer id;
+
+    @ApiModelProperty(value = "鍒涘缓浜虹紪鐮�")
+    @ExcelColumn(name="鍒涘缓浜虹紪鐮�")
+    private String creator;
+
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @ExcelColumn(name="鍒涘缓鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createDate;
+
+    @ApiModelProperty(value = "鏇存柊浜虹紪鐮�")
+    @ExcelColumn(name="鏇存柊浜虹紪鐮�")
+    private String edirot;
+
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @ExcelColumn(name="鏇存柊鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date editDate;
+
+    @ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
+    @ExcelColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
+    private Integer isdeleted;
+
+    @ApiModelProperty(value = "澶囨敞")
+    @ExcelColumn(name="澶囨敞")
+    private String remark;
+
+    @ApiModelProperty(value = "寮�鍚姸鎬侊細0寮�鍚紱1鍏抽棴", example = "1")
+    @ExcelColumn(name="寮�鍚姸鎬侊細0寮�鍚紱1鍏抽棴")
+    private Integer status;
+
+    @ApiModelProperty(value = "鏍囬")
+    @ExcelColumn(name="鏍囬")
+    private String titile;
+
+    @ApiModelProperty(value = "涓氬姟绫诲瀷 1=璁垮鎻愪氦璁垮鐢宠寰呭鎵逛汉杩涜瀹℃壒锛�2=璁垮鎻愪氦璁垮鐢宠瀹℃壒閫氳繃锛岄�氱煡琚浜猴紱3=璁垮鎻愪氦璁垮鐢宠瀹℃壒鎷掔粷锛岄�氱煡琚浜猴紱4=璁垮鐢宠瀹℃壒閫氳繃锛岄�氱煡鎶勯�佷汉锛�5=璁垮鎶ュ寰呭鎵逛汉杩涜瀹℃壒锛�6=璁垮鎶ュ瀹℃壒閫氳繃锛岄�氱煡鍙戣捣浜猴紱7=璁垮鎶ュ瀹℃壒鎷掔粷锛岄�氱煡鍙戣捣浜猴紱8=璁垮鎶ュ瀹℃壒閫氳繃锛岄�氱煡鎶勯�佷汉锛�9=鍏姟杞︾敵璇凤紝閫氱煡瀹℃壒浜猴紱10=鍏姟杞︾敵璇峰鎵归�氳繃,閫氱煡鍙戣捣浜猴紱11=鍏姟杞︾敵璇峰鎵归┏鍥�,閫氱煡鍙戣捣浜猴紱12=鍏姟杞︾敵璇峰鎵归�氳繃,閫氱煡鎶勯�佷汉锛�13=澶╂皵棰勮锛�14=鍖哄煙浜嬩欢閫氱煡锛�", example = "1")
+    @ExcelColumn(name="涓氬姟绫诲瀷 1=璁垮鎻愪氦璁垮鐢宠寰呭鎵逛汉杩涜瀹℃壒锛�2=璁垮鎻愪氦璁垮鐢宠瀹℃壒閫氳繃锛岄�氱煡琚浜猴紱3=璁垮鎻愪氦璁垮鐢宠瀹℃壒鎷掔粷锛岄�氱煡琚浜猴紱4=璁垮鐢宠瀹℃壒閫氳繃锛岄�氱煡鎶勯�佷汉锛�5=璁垮鎶ュ寰呭鎵逛汉杩涜瀹℃壒锛�6=璁垮鎶ュ瀹℃壒閫氳繃锛岄�氱煡鍙戣捣浜猴紱7=璁垮鎶ュ瀹℃壒鎷掔粷锛岄�氱煡鍙戣捣浜猴紱8=璁垮鎶ュ瀹℃壒閫氳繃锛岄�氱煡鎶勯�佷汉锛�9=鍏姟杞︾敵璇凤紝閫氱煡瀹℃壒浜猴紱10=鍏姟杞︾敵璇峰鎵归�氳繃,閫氱煡鍙戣捣浜猴紱11=鍏姟杞︾敵璇峰鎵归┏鍥�,閫氱煡鍙戣捣浜猴紱12=鍏姟杞︾敵璇峰鎵归�氳繃,閫氱煡鎶勯�佷汉锛�13=澶╂皵棰勮锛�14=鍖哄煙浜嬩欢閫氱煡锛�")
+    private Integer objType;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/DdNoticeConfigService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/DdNoticeConfigService.java
new file mode 100644
index 0000000..5f7ba65
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/DdNoticeConfigService.java
@@ -0,0 +1,100 @@
+package com.doumee.service.business;
+
+import com.doumee.dao.business.model.DdNoticeConfig;
+import com.doumee.service.business.third.model.PageData;
+import com.doumee.service.business.third.model.PageWrap;
+
+import java.util.List;
+
+/**
+ * 閽夐拤鍏紬鍙烽�氱煡閰嶇疆Service瀹氫箟
+ * @author 姹熻箘韫�
+ * @date 2025/10/14 15:11
+ */
+public interface DdNoticeConfigService {
+
+    /**
+     * 鍒涘缓
+     * 
+     * @param ddNoticeConfig 瀹炰綋瀵硅薄
+     * @return Integer
+     */
+    Integer create(DdNoticeConfig ddNoticeConfig);
+
+    /**
+     * 涓婚敭鍒犻櫎
+     *
+     * @param id 涓婚敭
+     */
+    void deleteById(Integer id);
+
+    /**
+     * 鍒犻櫎
+     *
+     * @param ddNoticeConfig 瀹炰綋瀵硅薄
+     */
+    void delete(DdNoticeConfig ddNoticeConfig);
+
+    /**
+     * 鎵归噺涓婚敭鍒犻櫎
+     *
+     * @param ids 涓婚敭闆�
+     */
+    void deleteByIdInBatch(List<Integer> ids);
+
+    /**
+     * 涓婚敭鏇存柊
+     *
+     * @param ddNoticeConfig 瀹炰綋瀵硅薄
+     */
+    void updateById(DdNoticeConfig ddNoticeConfig);
+
+    /**
+     * 鎵归噺涓婚敭鏇存柊
+     *
+     * @param ddNoticeConfigs 瀹炰綋闆�
+     */
+    void updateByIdInBatch(List<DdNoticeConfig> ddNoticeConfigs);
+
+    /**
+     * 涓婚敭鏌ヨ
+     *
+     * @param id 涓婚敭
+     * @return DdNoticeConfig
+     */
+    DdNoticeConfig findById(Integer id);
+
+    /**
+     * 鏉′欢鏌ヨ鍗曟潯璁板綍
+     *
+     * @param ddNoticeConfig 瀹炰綋瀵硅薄
+     * @return DdNoticeConfig
+     */
+    DdNoticeConfig findOne(DdNoticeConfig ddNoticeConfig);
+
+    /**
+     * 鏉′欢鏌ヨ
+     *
+     * @param ddNoticeConfig 瀹炰綋瀵硅薄
+     * @return List<DdNoticeConfig>
+     */
+    List<DdNoticeConfig> findList(DdNoticeConfig ddNoticeConfig);
+  
+    /**
+     * 鍒嗛〉鏌ヨ
+     *
+     * @param pageWrap 鍒嗛〉瀵硅薄
+     * @return PageData<DdNoticeConfig>
+     */
+    PageData<DdNoticeConfig> findPage(PageWrap<DdNoticeConfig> pageWrap);
+
+    /**
+     * 鏉′欢缁熻
+     *
+     * @param ddNoticeConfig 瀹炰綋瀵硅薄
+     * @return long
+     */
+    long count(DdNoticeConfig ddNoticeConfig);
+
+    void updateStatusByIdInBatch(List<Integer> ids,Integer status);
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
index fe94066..5f3fdf0 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -95,6 +95,8 @@
     @Autowired
     private CarDriverMapper carDriverMapper;
 
+    @Autowired
+    private DdNoticeConfigMapper ddNoticeConfigMapper;
 
     @Autowired
     private VisitsJoinMapper visitsMapper;
@@ -682,7 +684,10 @@
                             if(CollectionUtils.isNotEmpty(erpId)){
                                 String ddTalkId = dingTalk.toDoNotice(StringUtils.isNotBlank(carUseBook.getMemberName())?(carUseBook.getMemberName()+"鎻愪氦鐨勫叕鍔$敤杞︾敵璇�"):"鍏姟杞︾敤杞︾敵璇�",
                                         erpId ,
-                                        dingTalk.getToDoCarUseBookFiledInfo(carUseBook),"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId());
+                                        ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                                                .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                                                .eq(DdNoticeConfig::getObjType,9))>Constants.ZERO?
+                                        dingTalk.getToDoCarUseBookFiledInfo(carUseBook):null,"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId());
                                 carUseBookMapper.update(new UpdateWrapper<CarUseBook>().lambda()
                                         .set(CarUseBook::getDdBelongToUnionId,erpId.get(Constants.ZERO))
                                         .set(CarUseBook::getDdToDoId,ddTalkId).eq(CarUseBook::getId,carUseBook.getId()));
@@ -692,9 +697,13 @@
                         Visits visits = visitsMapper.selectById(businessId);
                         if (Objects.nonNull(visits)) {
                             //TODO 缂哄皯鍩熷悕鍓嶇紑鍐呭
-                            String ddTalkId = dingTalk.toDoNotice(visits.getName() + "鐨勮瀹㈢敵璇�",
+                            String ddTalkId = dingTalk.toDoNotice(visits.getName() + (Constants.equalsInteger(visits.getType(),Constants.TWO)?"鐨勮瀹㈡姤澶�":"鐨勮瀹㈢敵璇�"),
                                     erpId,
-                                    dingTalk.getToDoVisitFiledInfo(visits), "pages/appointmentDetails/appointmentDetails?id=" + visits.getId());
+                                    ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                                            .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                                            .eq(DdNoticeConfig::getObjType,Constants.equalsInteger(visits.getType(),Constants.TWO)?5:1))>Constants.ZERO?
+                                    dingTalk.getToDoVisitFiledInfo(visits):null,
+                                    "pages/appointmentDetails/appointmentDetails?id=" + visits.getId());
                             visitsMapper.update(new UpdateWrapper<Visits>().lambda()
                                             .set(Visits::getDdBelongToUnionId,erpId.get(Constants.ZERO))
                                     .set(Visits::getDdToDoId, ddTalkId).eq(Visits::getId, visits.getId()));
@@ -1544,7 +1553,10 @@
                 //TODO 缂哄皯鍩熷悕鍓嶇紑鍐呭
                 String ddTalkId = dingTalk.toDoNotice(StringUtils.isNotBlank(carUseBook.getMemberName())?(carUseBook.getMemberName()+"鎻愪氦鐨勫叕鍔$敤杞︾敵璇�"):"鍏姟杞︾敤杞︾敵璇�",
                         memberList.stream().map(i->i.getErpId()).collect(Collectors.toList()) ,
-                        dingTalk.getToDoCarUseBookFiledInfo(carUseBook),"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId());
+                        ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                                .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                                .eq(DdNoticeConfig::getObjType,9))>Constants.ZERO?
+                        dingTalk.getToDoCarUseBookFiledInfo(carUseBook):null,"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId());
                 carUseBookMapper.update(new UpdateWrapper<CarUseBook>().lambda()
                         .set(CarUseBook::getDdToDoId,ddTalkId).eq(CarUseBook::getId,carUseBook.getId()));
             } 
@@ -1869,8 +1881,11 @@
                 if(Objects.nonNull(beVisitMember)&&StringUtils.isNotBlank(beVisitMember.getDdId())){
                     dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
                             beVisitMember.getDdId(),
+                            ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                                    .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                                    .eq(DdNoticeConfig::getObjType, Constants.equalsInteger(visits.getType(),Constants.TWO)?(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?6:7):(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?2:3)))>Constants.ZERO?
                             dingTalk.getVisitNoticeMsg(visits,visits.getName()+"鐨�"+(Constants.equalsInteger(visits.getType(),Constants.TWO)?"璁垮鎶ュ":"璁垮鐢宠")+"锛�"+
-                                    (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "宸插鎵归�氳繃":"宸插鎵归┏鍥�"))
+                                    (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "宸插鎵归�氳繃":"宸插鎵归┏鍥�")):null
                     );
                 }
             }
@@ -1908,8 +1923,11 @@
             if(Objects.nonNull(creatMember)&&StringUtils.isNotBlank(creatMember.getDdId())){
                 dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
                         creatMember.getErpId(),
+                        ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                                .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                                .eq(DdNoticeConfig::getObjType,Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?10:11))>Constants.ZERO?
                                 dingTalk.getCarUseNoticeMsg(carUseBook,carUseBook.getMemberName() + "鎻愪氦鐨勫叕鍔$敤杞︼紝"+
-                                        (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "宸插鎵归�氳繃":"宸插鎵归┏鍥�"))
+                                        (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "宸插鎵归�氳繃":"宸插鎵归┏鍥�")):null
                 );
             }
             if(StringUtils.isNotBlank(carUseBook.getDdBelongToUnionId())
@@ -2011,9 +2029,15 @@
                     if(Objects.nonNull(visits)||Objects.nonNull(carUseBook)){
                         dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
                                 StringUtils.join(memberList.stream().map(i->i.getDdId()).collect(Collectors.toList()),","),
-                                Objects.nonNull(visits)?
-                                        dingTalk.getVisitNoticeMsg(visits,visits.getName()+"鐨�"+(Constants.equalsInteger(visits.getType(),Constants.TWO)?"璁垮鎶ュ":"璁垮鐢宠")+"锛屾妱閫佺粰鎮紝璇风煡鏅�"):
-                                        dingTalk.getCarUseNoticeMsg(carUseBook,carUseBook.getMemberName() + "鎻愪氦鐨勫叕鍔$敤杞︼紝鎶勯�佺粰鎮紝璇风煡鏅�")
+                                ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                                                .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                                                .eq(DdNoticeConfig::getObjType, Objects.nonNull(visits)?(Constants.equalsInteger(visits.getType(),Constants.TWO)?8:4):12))>Constants.ZERO?
+                                        Objects.nonNull(visits)?
+                                                dingTalk.getVisitNoticeMsg(visits,visits.getName()+"鐨�"+(Constants.equalsInteger(visits.getType(),Constants.TWO)?"璁垮鎶ュ":"璁垮鐢宠")+"锛屾妱閫佺粰鎮紝璇风煡鏅�"):
+                                                dingTalk.getCarUseNoticeMsg(carUseBook,carUseBook.getMemberName() + "鎻愪氦鐨勫叕鍔$敤杞︼紝鎶勯�佺粰鎮紝璇风煡鏅�"):null
+
+
+
                         );
                     }
                 }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DdNoticeConfigServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DdNoticeConfigServiceImpl.java
new file mode 100644
index 0000000..52782f4
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DdNoticeConfigServiceImpl.java
@@ -0,0 +1,117 @@
+package com.doumee.service.business.impl;
+
+import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.DdNoticeConfigMapper;
+import com.doumee.dao.business.model.DdNoticeConfig;
+import com.doumee.dao.business.model.SmsConfig;
+import com.doumee.service.business.DdNoticeConfigService;
+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.service.business.third.model.PageData;
+import com.doumee.service.business.third.model.PageWrap;
+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瀹炵幇
+ * @author 姹熻箘韫�
+ * @date 2025/10/14 15:11
+ */
+@Service
+public class DdNoticeConfigServiceImpl implements DdNoticeConfigService {
+
+    @Autowired
+    private DdNoticeConfigMapper ddNoticeConfigMapper;
+
+    @Override
+    public Integer create(DdNoticeConfig ddNoticeConfig) {
+        ddNoticeConfigMapper.insert(ddNoticeConfig);
+        return ddNoticeConfig.getId();
+    }
+
+    @Override
+    public void deleteById(Integer id) {
+        ddNoticeConfigMapper.deleteById(id);
+    }
+
+    @Override
+    public void delete(DdNoticeConfig ddNoticeConfig) {
+        UpdateWrapper<DdNoticeConfig> deleteWrapper = new UpdateWrapper<>(ddNoticeConfig);
+        ddNoticeConfigMapper.delete(deleteWrapper);
+    }
+
+    @Override
+    public void deleteByIdInBatch(List<Integer> ids) {
+        if (CollectionUtils.isEmpty(ids)) {
+            return;
+        }
+        ddNoticeConfigMapper.deleteBatchIds(ids);
+    }
+
+    @Override
+    public void updateById(DdNoticeConfig ddNoticeConfig) {
+        ddNoticeConfigMapper.updateById(ddNoticeConfig);
+    }
+
+    @Override
+    public void updateByIdInBatch(List<DdNoticeConfig> ddNoticeConfigs) {
+        if (CollectionUtils.isEmpty(ddNoticeConfigs)) {
+            return;
+        }
+        for (DdNoticeConfig ddNoticeConfig: ddNoticeConfigs) {
+            this.updateById(ddNoticeConfig);
+        }
+    }
+
+    @Override
+    public DdNoticeConfig findById(Integer id) {
+        return ddNoticeConfigMapper.selectById(id);
+    }
+
+    @Override
+    public DdNoticeConfig findOne(DdNoticeConfig ddNoticeConfig) {
+        QueryWrapper<DdNoticeConfig> wrapper = new QueryWrapper<>(ddNoticeConfig);
+        return ddNoticeConfigMapper.selectOne(wrapper);
+    }
+
+    @Override
+    public List<DdNoticeConfig> findList(DdNoticeConfig ddNoticeConfig) {
+        QueryWrapper<DdNoticeConfig> wrapper = new QueryWrapper<>(ddNoticeConfig);
+        return ddNoticeConfigMapper.selectList(wrapper);
+    }
+  
+    @Override
+    public PageData<DdNoticeConfig> findPage(PageWrap<DdNoticeConfig> pageWrap) {
+        IPage<DdNoticeConfig> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
+        QueryWrapper<DdNoticeConfig> queryWrapper = new QueryWrapper<>();
+        Utils.MP.blankToNull(pageWrap.getModel());
+        queryWrapper.lambda().eq(DdNoticeConfig::getIsdeleted, Constants.ZERO);
+        return PageData.from(ddNoticeConfigMapper.selectPage(page, queryWrapper));
+    }
+
+    @Override
+    public long count(DdNoticeConfig ddNoticeConfig) {
+        QueryWrapper<DdNoticeConfig> wrapper = new QueryWrapper<>(ddNoticeConfig);
+        return ddNoticeConfigMapper.selectCount(wrapper);
+    }
+
+    @Override
+    public void updateStatusByIdInBatch(List<Integer> ids,Integer status) {
+        if (CollectionUtils.isEmpty(ids) || Objects.isNull(status)) {
+            return;
+        }
+        ddNoticeConfigMapper.update(new UpdateWrapper<DdNoticeConfig>()
+                .set("status",status)
+                .in("id",ids)
+        );
+    }
+
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/HiddenDangerServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/HiddenDangerServiceImpl.java
index bc8fae7..10fc09b 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/HiddenDangerServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/HiddenDangerServiceImpl.java
@@ -102,6 +102,9 @@
 
     @Autowired
     private DingTalk dingTalk;
+    
+    @Autowired
+    private DdNoticeConfigMapper ddNoticeConfigMapper;
 
 
     @Override
@@ -255,7 +258,10 @@
         if(StringUtils.isNotBlank(member.getDdId())){
             dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
                     member.getDdId(),
-                    dingTalk.getHiddenDangerNoticeMsg(hiddenDanger));
+                    ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                            .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                            .eq(DdNoticeConfig::getObjType,14))>Constants.ZERO?
+                    dingTalk.getHiddenDangerNoticeMsg(hiddenDanger):null);
         }
 
         return hiddenDanger.getId();
@@ -809,7 +815,10 @@
         if(StringUtils.isNotBlank(member.getDdId())){
             dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
                     member.getDdId(),
-                    dingTalk.getHiddenDangerNoticeMsg(hiddenDanger));
+                    ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                            .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                            .eq(DdNoticeConfig::getObjType,14))>Constants.ZERO?
+                            dingTalk.getHiddenDangerNoticeMsg(hiddenDanger):null);
         }
 
     }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
index 1ea06ee..0b6d126 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
@@ -64,6 +64,9 @@
     @Autowired
     private SystemDictDataBiz systemDictDataBiz;
 
+    @Autowired
+    private DdNoticeConfigMapper ddNoticeConfigMapper;
+
 
     @Override
     public Integer create(Warning warning) {
@@ -315,9 +318,13 @@
                         if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)&&memberList.size()>Constants.ZERO){
                             List<String> ddUserIdList = memberList.stream().map(j->j.getErpId()).collect(Collectors.toList());
                             //鍙戦�佹帹閫侀拤閽夋秷鎭�
+
                             Boolean isSuccess = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
                                     String.join(",",ddUserIdList),
-                                    dingTalk.getWeatherNoticeMsg(title,text));
+                                    ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
+                                            .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO)
+                                            .eq(DdNoticeConfig::getObjType,13))>Constants.ZERO?
+                                    dingTalk.getWeatherNoticeMsg(title,text):null);
                             for (Member member:memberList) {
                                 WarningPush warningPush = new WarningPush();
                                 warningPush.setCreateDate(new Date());

--
Gitblit v1.9.3