From 3eb37463a952fb69d586769ca660886b956cb016 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 30 十二月 2025 12:24:40 +0800
Subject: [PATCH] 人物搜索 新加所有家族模块

---
 zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java                            |   26 +
 zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java                            |   14 
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java             |  103 ++++++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java           |  102 ++++++
 zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java                           |    5 
 zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java                          |    6 
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java       |  105 ++++++
 zhang-content/src/main/java/com/ruoyi/domain/TravelCount.java                        |   30 +
 zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java       |  101 +++++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java         |   14 
 zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java                        |   29 +
 zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java       |  111 ++++++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java      |   98 +++++
 zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java                       |   29 +
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/peopleSearchController.java |    5 
 zhang-content/src/main/java/com/ruoyi/service/impl/InterfaceBasedSearchRouter.java   |    7 
 zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java                         |   27 +
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java          |    9 
 zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java                              |   26 +
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java           |  106 ++++++
 20 files changed, 908 insertions(+), 45 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/peopleSearchController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/peopleSearchController.java
index 826d0dd..e279af4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/peopleSearchController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/peopleSearchController.java
@@ -8,8 +8,11 @@
 import com.ruoyi.service.PeopleSearchService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
 
 import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
 import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
@@ -23,7 +26,7 @@
 
 
     @GetMapping("/all")
-    public AjaxResult listAll(PeopleSea peopleSea){
+    public AjaxResult listAll(@RequestBody PeopleSea peopleSea){
         Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
         Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
         System.out.println(peopleSearchService);
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/TravelCount.java b/zhang-content/src/main/java/com/ruoyi/domain/TravelCount.java
index f340cd3..c523aa4 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/TravelCount.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/TravelCount.java
@@ -1,11 +1,13 @@
 package com.ruoyi.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import java.time.LocalDateTime;
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
@@ -14,7 +16,7 @@
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author ojq
@@ -120,4 +122,30 @@
      */
     private Integer shareId;
 
+    /**
+     * 鍙備笌鑰�
+     */
+    private String companion;
+
+    /**
+     * 鍙備笌鑰呭垪琛�
+     */
+    @TableField(exist = false)
+    private List<String> companionList;
+
+//    @TableField(exist = false)
+//    private Integer year;
+
+    /**
+     * 鏄惁鏈夐檮浠�
+     */
+    @TableField(exist = false)
+    private String hasAttachment;
+
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
index ebdce65..69ab90e 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
@@ -10,6 +10,7 @@
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -117,4 +118,29 @@
      */
     private Integer shareId;
 
+    /**
+     * 鍙備笌鑰�
+     */
+    private String companion;
+
+    /**
+     * 鍙備笌鑰呭垪琛�
+     */
+    @TableField(exist = false)
+    private List<String> companionList;
+
+//    @TableField(exist = false)
+//    private Integer year;
+
+    /**
+     * 鏄惁鏈夐檮浠�
+     */
+    @TableField(exist = false)
+    private String hasAttachment;
+
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
index 84dff3f..561a0bf 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
@@ -12,10 +12,11 @@
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author ojq
@@ -121,4 +122,30 @@
      */
     private Integer shareId;
 
+    /**
+     * 鍙備笌鑰�
+     */
+    private String companion;
+
+    /**
+     * 鍙備笌鑰呭垪琛�
+     */
+    @TableField(exist = false)
+    private List<String> companionList;
+
+//    @TableField(exist = false)
+//    private Integer year;
+
+    /**
+     * 鏄惁鏈夐檮浠�
+     */
+    @TableField(exist = false)
+    private String hasAttachment;
+
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
index 895c563..917cc40 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
@@ -127,4 +127,9 @@
      */
     @TableField(exist = false)
     private String hasAttachment;
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
index 297675c..57b2d09 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
@@ -139,4 +139,10 @@
      */
     @TableField(exist = false)
     private String hasAttachment;
+
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
index 29ec656..e471183 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
@@ -11,10 +11,11 @@
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author ojq
@@ -115,5 +116,31 @@
      */
     private Integer shareId;
 
+    /**
+     * 鍙備笌鑰�
+     */
+    private String companion;
+
+    /**
+     * 鍙備笌鑰呭垪琛�
+     */
+    @TableField(exist = false)
+    private List<String> companionList;
+
+//    @TableField(exist = false)
+//    private Integer year;
+
+    /**
+     * 鏄惁鏈夐檮浠�
+     */
+    @TableField(exist = false)
+    private String hasAttachment;
+
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
+
 
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java
index afbc75c..d4286cc 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java
@@ -12,6 +12,7 @@
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -103,4 +104,17 @@
      */
     private Integer shareId;
 
+    /**
+     * 鏄惁鏈夐檮浠�
+     */
+    @TableField(exist = false)
+    private String hasAttachment;
+
+
+    /**
+     * 鍙備笌鑰呭垪琛�
+     */
+    @TableField(exist = false)
+    private List<String> companionList;
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
index bce44bb..77f4d31 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
@@ -12,6 +12,7 @@
 import java.io.Serializable;
 import java.time.LocalDate;
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -160,5 +161,30 @@
      */
     private Integer shareId;
 
+    /**
+     * 鍙備笌鑰�
+     */
+    private String companion;
+
+    /**
+     * 鍙備笌鑰呭垪琛�
+     */
+    @TableField(exist = false)
+    private List<String> companionList;
+
+//    @TableField(exist = false)
+//    private Integer year;
+
+    /**
+     * 鏄惁鏈夐檮浠�
+     */
+    @TableField(exist = false)
+    private String hasAttachment;
+
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
 
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java
index 90f1719..d81829f 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java
@@ -12,6 +12,7 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.Date;
+import java.util.List;
 
 
 /**
@@ -104,4 +105,30 @@
 
     private Integer shareId;
 
+    /**
+     * 鍙備笌鑰�
+     */
+    private String companion;
+
+    /**
+     * 鍙備笌鑰呭垪琛�
+     */
+    @TableField(exist = false)
+    private List<String> companionList;
+
+//    @TableField(exist = false)
+//    private Integer year;
+
+    /**
+     * 鏄惁鏈夐檮浠�
+     */
+    @TableField(exist = false)
+    private String hasAttachment;
+
+
+    /**
+     * 鏄惁闅愯棌
+     */
+    private String isHide;
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
index 9fffd7f..29c4ca9 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -11,6 +12,7 @@
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.*;
+import com.ruoyi.domain.dto.zfEventdto;
 import com.ruoyi.mapper.ZfPropertyMapper;
 import com.ruoyi.service.*;
 import lombok.extern.slf4j.Slf4j;
@@ -38,7 +40,7 @@
  */
 @Slf4j
 @Service
-public class IZfPropertyServiceImpl extends ServiceImpl<ZfPropertyMapper, ZfProperty> implements IZfPropertyService {
+public class IZfPropertyServiceImpl extends ServiceImpl<ZfPropertyMapper, ZfProperty> implements IZfPropertyService,ModuleSearchable  {
 
     @Resource
     IZfPropertyService zfPropertyService;
@@ -51,10 +53,10 @@
 
     @Resource
     ZfPropertyMapper zfPropertyMapper;
-    
+
     @Resource
     EsService esService;
-    
+
     @Resource
     RestHighLevelClient restHighLevelClient;
 
@@ -92,10 +94,48 @@
                 .like(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress())
                 .like(!StringUtils.isEmpty(zfProperty.getRemark()), ZfProperty::getRemark, zfProperty.getRemark())
                 .eq(zfProperty.getFamilyId()!=null,ZfProperty::getFamilyId,zfProperty.getFamilyId())
-                .in(ZfProperty::getFamilyId,familyIdList)
+                .in(familyIdList!=null,ZfProperty::getFamilyId,familyIdList)
                 .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime())
                 .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime());
         lqw.orderByDesc(ZfProperty::getCreateTime);
+
+
+        if (StringUtils.isNotEmpty(zfProperty.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(ZfProperty::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfProperty::getIsHide)
+            );
+        }
+        if (zfProperty.getHasAttachment() != null && zfProperty.getHasAttachment().equals("鏄�")) {
+            lqw.apply("url IS NOT NULL AND url != ''");
+        }
+//        lqw.in(StringUtils.isNotEmpty(zfEconomy.getCompanionList()),ZfEconomy::getCompanion,zfEconomy.getCompanionList());
+//        if (zfEconomy.getYear() != 0) {
+//            System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfEconomy.getYear());
+//            lqw.apply("YEAR(happen_time) = {0}", zfEconomy.getYear());
+//        }
+
+        if (CollectionUtils.isNotEmpty(zfProperty.getCompanionList())) {
+            List<String> companionList = zfProperty.getCompanionList();
+
+            // 娓呯悊鍜屽幓閲�
+            companionList = companionList.stream()
+                .map(String::trim)
+                .filter(s -> !s.isEmpty())
+                .distinct()
+                .collect(Collectors.toList());
+
+            if (!companionList.isEmpty()) {
+                // 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
+                for (String companion : companionList) {
+                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+                        companion);
+                }
+            }
+        }
+        System.out.println("鏌ヨ鏉′欢: " + lqw.getCustomSqlSegment());
         return lqw;
 
     }
@@ -454,7 +494,7 @@
             esModel.setRemark(zfProperty.getRemark());
             //杩欓噷瀛樺偍鏌ヨ璇︽儏鐨勮矾寰�
             esService.insertTable(esModel);
-            
+
             return AjaxResult.success();
         } else {
             return AjaxResult.error();
@@ -530,7 +570,7 @@
             }else {
                 newModel.setBy6(dataById.getAddress());
             }
-            
+
             if(zfProperty.getRemark()!=null){
                 newModel.setRemark(zfProperty.getRemark());
             }else {
@@ -684,6 +724,55 @@
         return AjaxResult.success(result);
     }
 
+    @Override
+    public String getModuleCode() {
+        return "瀹朵骇";
+    }
+
+    @Override
+//    @Cacheable(value = "economy_search", key = "T(String).format('2045_%s_%s_%s_%s',#companion != null ? #companion : 'null',#happenStartTime != null ? #happenStartTime.getTime() : 0,#happenEndTime != null ? #happenEndTime.getTime() : 0,#hasAttachment != null ? #hasAttachment : 'null')")
+    public List<?>  search(String companion, Date happenStartTime,Date happenEndTime,String hasAttachment) {
+        ZfProperty zfProperty = new ZfProperty();
+        zfProperty.setCompanion(companion);
+        zfProperty.setHappenStartTime(happenStartTime);
+        zfProperty.setHappenEndTime(happenEndTime);
+
+        String[] split = companion.trim().replace(" ", "").replace("锛�", ",").split(",");
+        List<String> list = Arrays.asList(split);
+
+        zfProperty.setCompanionList(list);
+        zfProperty.setHasAttachment(hasAttachment);
+        zfProperty.setIsHide("鍚�");
+
+
+        return dataList(zfProperty);
+    }
+
+    public List<zfEventdto> dataList(ZfProperty zfProperty) {
+
+        LambdaQueryWrapper<ZfProperty> lqw = buildCondition(zfProperty, null);
+
+        List<ZfProperty> beanRecords = list(lqw);
+
+
+
+        return encapData(beanRecords);
+    }
+
+    public List<zfEventdto> encapData(List<ZfProperty> lis)
+    {
+        List<zfEventdto> daoRes = new ArrayList<>() ;
+        for(ZfProperty obj : lis)
+        {
+            zfEventdto atd = new zfEventdto();
+            atd.setId(Math.toIntExact(obj.getId()));
+            atd.setModule("瀹朵骇");
+            atd.setName(obj.getCompanion());
+            atd.setCreateTime(obj.getCreateTime());
+            daoRes.add(atd);
+        }
+        return daoRes;
+    }
 }
 
 
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/InterfaceBasedSearchRouter.java b/zhang-content/src/main/java/com/ruoyi/service/impl/InterfaceBasedSearchRouter.java
index 9debc0b..e47aa94 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/InterfaceBasedSearchRouter.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/InterfaceBasedSearchRouter.java
@@ -49,7 +49,7 @@
     @Async
     public CompletableFuture<ModuleSearchResult> searchModuleAsync(String moduleCode, ModuleSearchable service,
                                                                    String companion, Date startTime, Date endTime,
-                                                                   String hasAttachment, Integer pageNum, Integer pageSize) {
+                                                                   String hasAttachment) {
         long start = System.currentTimeMillis();
         try {
             // 璋冪敤鎼滅储鏂规硶锛岃繑鍥� List<?>
@@ -150,11 +150,10 @@
         }
 
         // 骞跺彂鎼滅储
-        Integer finalPageNum = pageNum;
-        Integer finalPageSize = pageSize;
+
         List<CompletableFuture<ModuleSearchResult>> futures = moduleCodes.stream()
             .map(code -> searchModuleAsync(code, moduleSearchMap.get(code),
-                companion, startTime, endTime, hasAttachment, finalPageNum, finalPageSize))
+                companion, startTime, endTime, hasAttachment))
             .collect(Collectors.toList());
 
         // 绛夊緟瀹屾垚
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
index 046f112..4a34a1e 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
@@ -2,15 +2,16 @@
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.MapUtils;
-import com.ruoyi.domain.TravelCount;
-import com.ruoyi.domain.TravelDetail;
-import com.ruoyi.domain.ZInfoUser;
-import com.ruoyi.domain.ZProperty;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.domain.*;
+import com.ruoyi.domain.dto.zfEventdto;
 import com.ruoyi.mapper.TravelCountMapper;
+import com.ruoyi.service.ModuleSearchable;
 import com.ruoyi.service.TravelCountService;
 import com.ruoyi.service.TravelDetailService;
 import com.ruoyi.service.ZInfoUserService;
@@ -19,6 +20,9 @@
 import org.springframework.transaction.annotation.Transactional;
 
 import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -31,7 +35,7 @@
  * @since 2023-10-06
  */
 @Service
-public class TravelCountServiceImpl extends ServiceImpl<TravelCountMapper, TravelCount> implements TravelCountService {
+public class TravelCountServiceImpl extends ServiceImpl<TravelCountMapper, TravelCount> implements TravelCountService, ModuleSearchable {
 
     @Autowired
     private TravelDetailService travelDetailService;
@@ -129,4 +133,101 @@
         DecimalFormat df = new DecimalFormat("0.00");
         travelCount.setTotalPrice(Double.parseDouble(df.format(entranceTotal+eatTotal+travelCount.getGroupTotal()+stayTotal+travelTotal)));
     }
+
+
+    private LambdaQueryWrapper<TravelCount> buildCondition(TravelCount travelCount, List<Long> familyIdList) {
+        LambdaQueryWrapper<TravelCount> lqw = new LambdaQueryWrapper<>();
+        lqw.orderByDesc(TravelCount::getCreateTime);
+
+        if (StringUtils.isNotEmpty(travelCount.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(TravelCount::getIsHide, "鏄�")
+                .or()
+                .isNull(TravelCount::getIsHide)
+            );
+        }
+        if (travelCount.getHasAttachment() != null && travelCount.getHasAttachment().equals("鏄�")) {
+            lqw.apply("url IS NOT NULL AND url != ''");
+        }
+//        lqw.in(StringUtils.isNotEmpty(travelCount.getCompanionList()),travelCount::getCompanion,travelCount.getCompanionList());
+//        if (travelCount.getYear() != 0) {
+//            System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+travelCount.getYear());
+//            lqw.apply("YEAR(happen_time) = {0}", travelCount.getYear());
+//        }
+
+        if (CollectionUtils.isNotEmpty(travelCount.getCompanionList())) {
+            List<String> companionList = travelCount.getCompanionList();
+
+            // 娓呯悊鍜屽幓閲�
+            companionList = companionList.stream()
+                .map(String::trim)
+                .filter(s -> !s.isEmpty())
+                .distinct()
+                .collect(Collectors.toList());
+
+            if (!companionList.isEmpty()) {
+                // 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
+                for (String companion : companionList) {
+                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+                        companion);
+                }
+            }
+        }
+
+        System.out.println("鏌ヨ鏉′欢: " + lqw.getCustomSqlSegment());
+
+        return lqw;
+    }
+
+    @Override
+    public String getModuleCode() {
+        return "鏃呮父";
+    }
+
+    @Override
+//    @Cacheable(value = "economy_search", key = "T(String).format('2045_%s_%s_%s_%s',#companion != null ? #companion : 'null',#happenStartTime != null ? #happenStartTime.getTime() : 0,#happenEndTime != null ? #happenEndTime.getTime() : 0,#hasAttachment != null ? #hasAttachment : 'null')")
+    public List<?>  search(String companion, Date happenStartTime, Date happenEndTime, String hasAttachment) {
+        TravelCount travelCount = new TravelCount();
+        travelCount.setCompanion(companion);
+
+
+        String[] split = companion.split(",");
+        List<String> list = Arrays.asList(split);
+
+        travelCount.setCompanionList(list);
+        travelCount.setHasAttachment(hasAttachment);
+        travelCount.setIsHide("鍚�");
+
+        System.out.println("[[[[[[[["+travelCount);
+
+        return dataList(travelCount);
+    }
+
+    public List<zfEventdto> dataList(TravelCount travelCount) {
+
+        LambdaQueryWrapper<TravelCount> lqw = buildCondition(travelCount, null);
+
+        List<TravelCount> beanRecords = list(lqw);
+
+
+
+        return encapData(beanRecords);
+    }
+
+    public List<zfEventdto> encapData(List<TravelCount> lis)
+    {
+        List<zfEventdto> daoRes = new ArrayList<>() ;
+        for(TravelCount obj : lis)
+        {
+            zfEventdto atd = new zfEventdto();
+            atd.setId(Math.toIntExact(obj.getId()));
+            atd.setModule("鏃呮父");
+            atd.setName(obj.getCompanion());
+            atd.setCreateTime(obj.getCreateTime());
+            daoRes.add(atd);
+        }
+        return daoRes;
+    }
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
index e5c421d..080b075 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
@@ -2,6 +2,7 @@
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -12,6 +13,7 @@
 import com.ruoyi.domain.*;
 
 import com.ruoyi.domain.ZfClean;
+import com.ruoyi.domain.dto.zfEventdto;
 import com.ruoyi.mapper.ZfCleanMapper;
 import com.ruoyi.service.*;
 
@@ -42,7 +44,7 @@
  */
 @Service
 @Slf4j
-public class ZfCleanServiceImpl extends ServiceImpl<ZfCleanMapper, ZfClean> implements ZfCleanService {
+public class ZfCleanServiceImpl extends ServiceImpl<ZfCleanMapper, ZfClean> implements ZfCleanService,ModuleSearchable {
 
     @Resource
     ZInfoUserService zInfoUserService;
@@ -55,10 +57,10 @@
 
     @Resource
     ZfLogService zfLogService;
-    
+
     @Resource
     EsService esService;
-    
+
     @Resource
     RestHighLevelClient restHighLevelClient;
 
@@ -80,8 +82,49 @@
                 .like(StringUtils.isNotEmpty(zfClean.getLocation()), ZfClean::getLocation, zfClean.getLocation())
                 .like(StringUtils.isNotEmpty(zfClean.getRemark()), ZfClean::getRemark, zfClean.getRemark())
                 .eq(zfClean.getHappenTime() != null, ZfClean::getHappenTime, zfClean.getHappenTime())
-                .in(ZfClean::getFamilyId,familyIdList)
+                .in(familyIdList != null,ZfClean::getFamilyId,familyIdList)
                 .between(zfClean.getHappenStartTime() != null && zfClean.getHappenEndTime() != null, ZfClean::getHappenTime, zfClean.getHappenStartTime(), zfClean.getHappenEndTime());
+        if (StringUtils.isNotEmpty(zfClean.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(ZfClean::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfClean::getIsHide)
+            );
+        }
+        if (zfClean.getHasAttachment() != null && zfClean.getHasAttachment().equals("鏄�")) {
+            lqw.apply("url IS NOT NULL AND url != ''");
+        }
+//        lqw.in(StringUtils.isNotEmpty(zfClean.getCompanionList()),zfClean::getCompanion,zfClean.getCompanionList());
+//        if (zfClean.getYear() != 0) {
+//            System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfClean.getYear());
+//            lqw.apply("YEAR(happen_time) = {0}", zfClean.getYear());
+//        }
+
+        if (CollectionUtils.isNotEmpty(zfClean.getCompanionList())) {
+            List<String> companionList = zfClean.getCompanionList();
+
+            // 娓呯悊鍜屽幓閲�
+            companionList = companionList.stream()
+                .map(String::trim)
+                .filter(s -> !s.isEmpty())
+                .distinct()
+                .collect(Collectors.toList());
+
+            if (!companionList.isEmpty()) {
+                // 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
+                for (String companion : companionList) {
+                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+                        companion);
+                }
+            }
+        }
+
+
+
+
+        lqw.eq(zfClean.getHappenTime() != null, ZfClean::getHappenTime, zfClean.getHappenTime());
+
         return lqw;
     }
 
@@ -441,8 +484,8 @@
             esModel.setFid(familyId);
             //杩欓噷瀛樺偍鏌ヨ璇︽儏鐨勮矾寰�
             esService.insertTable(esModel);
-            
-            
+
+
             return AjaxResult.success();
         } else {
             return AjaxResult.error();
@@ -646,4 +689,55 @@
     }
 
 
+    @Override
+    public String getModuleCode() {
+        return "淇濇磥";
+    }
+
+    @Override
+//    @Cacheable(value = "economy_search", key = "T(String).format('2045_%s_%s_%s_%s',#companion != null ? #companion : 'null',#happenStartTime != null ? #happenStartTime.getTime() : 0,#happenEndTime != null ? #happenEndTime.getTime() : 0,#hasAttachment != null ? #hasAttachment : 'null')")
+    public List<?>  search(String companion, Date happenStartTime,Date happenEndTime,String hasAttachment) {
+        ZfClean zfClean = new ZfClean();
+        zfClean.setCompanion(companion);
+        zfClean.setHappenStartTime(happenStartTime);
+        zfClean.setHappenEndTime(happenEndTime);
+
+        String[] split = companion.split(",");
+        List<String> list = Arrays.asList(split);
+
+        zfClean.setCompanionList(list);
+        zfClean.setHasAttachment(hasAttachment);
+        zfClean.setIsHide("鍚�");
+
+        System.out.println("[[[[[[[["+zfClean);
+
+        return dataList(zfClean);
+    }
+
+    public List<zfEventdto> dataList(ZfClean zfClean) {
+
+        LambdaQueryWrapper<ZfClean> lqw = buildCondition(zfClean, null);
+
+        List<ZfClean> beanRecords = list(lqw);
+
+
+
+        return encapData(beanRecords);
+    }
+
+    public List<zfEventdto> encapData(List<ZfClean> lis)
+    {
+        List<zfEventdto> daoRes = new ArrayList<>() ;
+        for(ZfClean obj : lis)
+        {
+            zfEventdto atd = new zfEventdto();
+            atd.setId(Math.toIntExact(obj.getId()));
+            atd.setModule("淇濇磥");
+            atd.setName(obj.getCompanion());
+            atd.setCreateTime(obj.getCreateTime());
+            daoRes.add(atd);
+        }
+        return daoRes;
+    }
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
index a53bada..fef4e6b 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
@@ -2,6 +2,7 @@
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -11,6 +12,7 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.*;
 import com.ruoyi.domain.ZfCollection;
+import com.ruoyi.domain.dto.zfEventdto;
 import com.ruoyi.mapper.ZfCollectionMapper;
 import com.ruoyi.service.*;
 import lombok.extern.slf4j.Slf4j;
@@ -40,11 +42,11 @@
  */
 @Service
 @Slf4j
-public class ZfCollectionServiceImpl extends ServiceImpl<ZfCollectionMapper, ZfCollection> implements ZfCollectionService {
+public class ZfCollectionServiceImpl extends ServiceImpl<ZfCollectionMapper, ZfCollection> implements ZfCollectionService,ModuleSearchable {
 
     @Resource
     ZfCollectionService zfCollectionService;
-    
+
     @Resource
     ZInfoUserService zInfoUserService;
 
@@ -79,9 +81,47 @@
         lqw.like(StringUtils.isNotEmpty(zfCollection.getPrice()),ZfCollection::getPrice,zfCollection.getPrice());
         lqw.like(StringUtils.isNotEmpty(zfCollection.getLocation()),ZfCollection::getLocation,zfCollection.getLocation());
         lqw.like(StringUtils.isNotEmpty(zfCollection.getRemark()),ZfCollection::getRemark,zfCollection.getRemark());
-        lqw.in(ZfCollection::getFamilyId,familyIdList);
+        lqw.in(familyIdList != null,ZfCollection::getFamilyId,familyIdList);
         lqw.eq(zfCollection.getHappenTime() != null, ZfCollection::getHappenTime, zfCollection.getHappenTime());
         lqw.between(zfCollection.getHappenStartTime() != null && zfCollection.getHappenEndTime() != null, ZfCollection::getHappenTime, zfCollection.getHappenStartTime(), zfCollection.getHappenEndTime());
+
+        if (StringUtils.isNotEmpty(zfCollection.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(ZfCollection::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfCollection::getIsHide)
+            );
+        }
+        if (zfCollection.getHasAttachment() != null && zfCollection.getHasAttachment().equals("鏄�")) {
+            lqw.apply("url IS NOT NULL AND url != ''");
+        }
+//        lqw.in(StringUtils.isNotEmpty(zfCollection.getCompanionList()),zfCollection::getCompanion,zfCollection.getCompanionList());
+//        if (zfCollection.getYear() != 0) {
+//            System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfCollection.getYear());
+//            lqw.apply("YEAR(happen_time) = {0}", zfCollection.getYear());
+//        }
+
+        if (CollectionUtils.isNotEmpty(zfCollection.getCompanionList())) {
+            List<String> companionList = zfCollection.getCompanionList();
+
+            // 娓呯悊鍜屽幓閲�
+            companionList = companionList.stream()
+                .map(String::trim)
+                .filter(s -> !s.isEmpty())
+                .distinct()
+                .collect(Collectors.toList());
+
+            if (!companionList.isEmpty()) {
+                // 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
+                for (String companion : companionList) {
+                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+                        companion);
+                }
+            }
+        }
+
+
         return lqw;
     }
 
@@ -364,7 +404,7 @@
         return AjaxResult.success(data);
     }
 
-    
+
 //    @Override
 //    public AjaxResult addData2(ZfCollection zfCollection){
 //        ZInfoUser mySelf = getMySelf();
@@ -645,4 +685,54 @@
 
     }
 
+    @Override
+    public String getModuleCode() {
+        return "鏀惰棌";
+    }
+
+    @Override
+//    @Cacheable(value = "economy_search", key = "T(String).format('2045_%s_%s_%s_%s',#companion != null ? #companion : 'null',#happenStartTime != null ? #happenStartTime.getTime() : 0,#happenEndTime != null ? #happenEndTime.getTime() : 0,#hasAttachment != null ? #hasAttachment : 'null')")
+    public List<?>  search(String companion, Date happenStartTime,Date happenEndTime,String hasAttachment) {
+        ZfCollection zfCollection = new ZfCollection();
+        zfCollection.setCompanion(companion);
+        zfCollection.setHappenStartTime(happenStartTime);
+        zfCollection.setHappenEndTime(happenEndTime);
+
+        String[] split = companion.split(",");
+        List<String> list = Arrays.asList(split);
+
+        zfCollection.setCompanionList(list);
+        zfCollection.setHasAttachment(hasAttachment);
+        zfCollection.setIsHide("鍚�");
+
+        System.out.println("[[[[[[[["+zfCollection);
+
+        return dataList(zfCollection);
+    }
+
+    public List<zfEventdto> dataList(ZfCollection zfCollection) {
+
+        LambdaQueryWrapper<ZfCollection> lqw = buildCondition(zfCollection, null);
+
+        List<ZfCollection> beanRecords = list(lqw);
+
+
+
+        return encapData(beanRecords);
+    }
+
+    public List<zfEventdto> encapData(List<ZfCollection> lis)
+    {
+        List<zfEventdto> daoRes = new ArrayList<>() ;
+        for(ZfCollection obj : lis)
+        {
+            zfEventdto atd = new zfEventdto();
+            atd.setId(Math.toIntExact(obj.getId()));
+            atd.setModule("鏀惰棌");
+            atd.setName(obj.getCompanion());
+            atd.setCreateTime(obj.getCreateTime());
+            daoRes.add(atd);
+        }
+        return daoRes;
+    }
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
index 1d27f36..b03f125 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -467,6 +467,14 @@
             .like(StringUtils.isNotEmpty(zfDoctor.getWmedical()), ZfDoctor::getWmedical, zfDoctor.getWmedical())
             .like(StringUtils.isNotEmpty(zfDoctor.getCmedical()), ZfDoctor::getCmedical, zfDoctor.getCmedical())
             .like(StringUtils.isNotEmpty(zfDoctor.getRemark()), ZfDoctor::getRemark, zfDoctor.getRemark());
+
+        if (StringUtils.isNotEmpty(zfDoctor.getIsHide())) {
+            lqw.and(wrapper -> wrapper
+                .ne(ZfDoctor::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfDoctor::getIsHide)
+            );
+        }
         if (zfDoctor.getHasAttachment() != null && zfDoctor.getHasAttachment().equals("鏄�")) {
             lqw.apply("url IS NOT NULL AND url != ''");
         }//        lqw.like(StringUtils.isNotEmpty(zfDoctor.getCompanion()),ZfDoctor::getCompanion,zfDoctor.getCompanion());
@@ -517,6 +525,7 @@
         zfDoctor.setCompanionList(list);        zfDoctor.setHappenStartTime(happenStartTime);
         zfDoctor.setHappenEndTime(happenEndTime);
         zfDoctor.setHasAttachment(hasAttachment);
+        zfDoctor.setIsHide("鍚�");
         return doctorList(zfDoctor);
     }
 
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
index 35bdb22..0e63b93 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
@@ -81,6 +81,15 @@
         lqw.like(StringUtils.isNotEmpty(zfEconomy.getUsePeople()),ZfEconomy::getUsePeople,zfEconomy.getUsePeople());
         lqw.like(StringUtils.isNotEmpty(zfEconomy.getBalance()),ZfEconomy::getBalance,zfEconomy.getBalance());
         lqw.like(StringUtils.isNotEmpty(zfEconomy.getRemark()),ZfEconomy::getRemark,zfEconomy.getRemark());
+
+        if (StringUtils.isNotEmpty(zfEconomy.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(ZfEconomy::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfEconomy::getIsHide)
+            );
+        }
         if (zfEconomy.getHasAttachment() != null && zfEconomy.getHasAttachment().equals("鏄�")) {
             lqw.apply("url IS NOT NULL AND url != ''");
         }
@@ -661,9 +670,12 @@
         String[] split = companion.split(",");
         List<String> list = Arrays.asList(split);
 
-        System.out.println("[[[[[[[["+hasAttachment);
         zfEconomy.setCompanionList(list);
         zfEconomy.setHasAttachment(hasAttachment);
+        zfEconomy.setIsHide("鍚�");
+
+        System.out.println("[[[[[[[["+zfEconomy);
+
         return dataList(zfEconomy);
     }
 
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
index d0452ab..34b6632 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
@@ -2,6 +2,7 @@
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -11,6 +12,7 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.*;
 import com.ruoyi.domain.ZfEquipment;
+import com.ruoyi.domain.dto.zfEventdto;
 import com.ruoyi.mapper.ZfEquipmentMapper;
 import com.ruoyi.service.*;
 import lombok.extern.slf4j.Slf4j;
@@ -40,7 +42,7 @@
  */
 @Service
 @Slf4j
-public class ZfEquipmentServiceImpl extends ServiceImpl<ZfEquipmentMapper, ZfEquipment> implements ZfEquipmentService {
+public class ZfEquipmentServiceImpl extends ServiceImpl<ZfEquipmentMapper, ZfEquipment> implements ZfEquipmentService ,ModuleSearchable{
     @Resource
     ZInfoUserService zInfoUserService;
 
@@ -74,8 +76,51 @@
         lqw.like(StringUtils.isNotEmpty(zfEquipment.getLocation()), ZfEquipment::getLocation, zfEquipment.getLocation());
         lqw.like(StringUtils.isNotEmpty(zfEquipment.getRemark()), ZfEquipment::getRemark, zfEquipment.getRemark());
         lqw.eq(zfEquipment.getHappenTime() != null, ZfEquipment::getHappenTime, zfEquipment.getHappenTime());
-        lqw.in(ZfEquipment::getFamilyId,familyIdList);
+        lqw.in(familyIdList != null,ZfEquipment::getFamilyId,familyIdList);
         lqw.between(zfEquipment.getHappenStartTime() != null && zfEquipment.getHappenEndTime() != null, ZfEquipment::getHappenTime, zfEquipment.getHappenStartTime(), zfEquipment.getHappenEndTime());
+
+        if (StringUtils.isNotEmpty(zfEquipment.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(ZfEquipment::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfEquipment::getIsHide)
+            );
+        }
+        if (zfEquipment.getHasAttachment() != null && zfEquipment.getHasAttachment().equals("鏄�")) {
+            lqw.apply("url IS NOT NULL AND url != ''");
+        }
+//        lqw.in(StringUtils.isNotEmpty(zfEquipment.getCompanionList()),zfEquipment::getCompanion,zfEquipment.getCompanionList());
+//        if (zfEquipment.getYear() != 0) {
+//            System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfEquipment.getYear());
+//            lqw.apply("YEAR(happen_time) = {0}", zfEquipment.getYear());
+//        }
+
+        if (CollectionUtils.isNotEmpty(zfEquipment.getCompanionList())) {
+            List<String> companionList = zfEquipment.getCompanionList();
+
+            // 娓呯悊鍜屽幓閲�
+            companionList = companionList.stream()
+                .map(String::trim)
+                .filter(s -> !s.isEmpty())
+                .distinct()
+                .collect(Collectors.toList());
+
+            if (!companionList.isEmpty()) {
+                // 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
+                for (String companion : companionList) {
+                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+                        companion);
+                }
+            }
+        }
+
+
+
+
+        lqw.eq(zfEquipment.getHappenTime() != null, ZfEquipment::getHappenTime, zfEquipment.getHappenTime());
+
+
         return lqw;
     }
 
@@ -91,7 +136,7 @@
     }
 
 
-    
+
 //    //------------------------------------------------------------------------------------------
 //    private LambdaQueryWrapper<ZfEquipment> buildCondition(ZfEquipment zfEquipment, String familyIds, String secondFamilyAuthority) {
 //        //妯$硦鏌ヨ鐨勬潯浠�
@@ -399,7 +444,7 @@
             esModel.setFid(familyId);
             //杩欓噷瀛樺偍鏌ヨ璇︽儏鐨勮矾寰�
             esService.insertTable(esModel);
-            
+
             return AjaxResult.success();
         } else {
             return AjaxResult.error();
@@ -633,8 +678,58 @@
         }else {
             return AjaxResult.error();
         }
-        
+
     }
 
 
+    @Override
+    public String getModuleCode() {
+        return "璁惧";
+    }
+
+    @Override
+//    @Cacheable(value = "economy_search", key = "T(String).format('2045_%s_%s_%s_%s',#companion != null ? #companion : 'null',#happenStartTime != null ? #happenStartTime.getTime() : 0,#happenEndTime != null ? #happenEndTime.getTime() : 0,#hasAttachment != null ? #hasAttachment : 'null')")
+    public List<?>  search(String companion, Date happenStartTime,Date happenEndTime,String hasAttachment) {
+        ZfEquipment zfEquipment = new ZfEquipment();
+        zfEquipment.setCompanion(companion);
+        zfEquipment.setHappenStartTime(happenStartTime);
+        zfEquipment.setHappenEndTime(happenEndTime);
+
+        String[] split = companion.split(",");
+        List<String> list = Arrays.asList(split);
+
+        zfEquipment.setCompanionList(list);
+        zfEquipment.setHasAttachment(hasAttachment);
+        zfEquipment.setIsHide("鍚�");
+
+        System.out.println("[[[[[[[["+zfEquipment);
+
+        return dataList(zfEquipment);
+    }
+
+    public List<zfEventdto> dataList(ZfEquipment zfEquipment) {
+
+        LambdaQueryWrapper<ZfEquipment> lqw = buildCondition(zfEquipment, null);
+
+        List<ZfEquipment> beanRecords = list(lqw);
+
+
+
+        return encapData(beanRecords);
+    }
+
+    public List<zfEventdto> encapData(List<ZfEquipment> lis)
+    {
+        List<zfEventdto> daoRes = new ArrayList<>() ;
+        for(ZfEquipment obj : lis)
+        {
+            zfEventdto atd = new zfEventdto();
+            atd.setId(Math.toIntExact(obj.getId()));
+            atd.setModule("璁惧");
+            atd.setName(obj.getCompanion());
+            atd.setCreateTime(obj.getCreateTime());
+            daoRes.add(atd);
+        }
+        return daoRes;
+    }
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
index dcdab4b..33cf325 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
@@ -2,6 +2,7 @@
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -11,6 +12,7 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.*;
 import com.ruoyi.domain.ZfEvent;
+import com.ruoyi.domain.dto.zfEventdto;
 import com.ruoyi.mapper.ZfEventMapper;
 import com.ruoyi.service.*;
 import lombok.extern.slf4j.Slf4j;
@@ -40,7 +42,7 @@
  */
 @Slf4j
 @Service
-public class ZfEventServiceImpl extends ServiceImpl<ZfEventMapper, ZfEvent> implements ZfEventService {
+public class ZfEventServiceImpl extends ServiceImpl<ZfEventMapper, ZfEvent> implements ZfEventService,ModuleSearchable {
 
     @Resource
     ZInfoUserService zInfoUserService;
@@ -66,12 +68,54 @@
         LambdaQueryWrapper<ZfEvent> lqw = new LambdaQueryWrapper<>();
         lqw.orderByDesc(ZfEvent::getCreateTime);
         lqw.like(!StringUtils.isEmpty(zfEvent.getAddress()), ZfEvent::getAddress, zfEvent.getAddress());
-        lqw.like(!StringUtils.isEmpty(zfEvent.getPeople()), ZfEvent::getPeople, zfEvent.getPeople());
         lqw.like(!StringUtils.isEmpty(zfEvent.getTitle()), ZfEvent::getTitle, zfEvent.getTitle());
         lqw.like(!StringUtils.isEmpty(zfEvent.getRemark()), ZfEvent::getRemark, zfEvent.getRemark());
         lqw.eq(zfEvent.getHappenTime() != null, ZfEvent::getHappenTime, zfEvent.getHappenTime());
-        lqw.in(ZfEvent::getFamilyId,familyIdList);
+        lqw.in(familyIdList != null, ZfEvent::getFamilyId,familyIdList);
         lqw.between(zfEvent.getHappenStartTime() != null && zfEvent.getHappenEndTime() != null, ZfEvent::getHappenTime, zfEvent.getHappenStartTime(), zfEvent.getHappenEndTime());
+
+        if (StringUtils.isNotEmpty(zfEvent.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(ZfEvent::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfEvent::getIsHide)
+            );
+        }else {
+                    lqw.like(!StringUtils.isEmpty(zfEvent.getPeople()), ZfEvent::getPeople, zfEvent.getPeople());
+
+        }
+        if (zfEvent.getHasAttachment() != null && zfEvent.getHasAttachment().equals("鏄�")) {
+            lqw.apply("url IS NOT NULL AND url != ''");
+        }
+//        lqw.in(StringUtils.isNotEmpty(ZfEvent.getCompanionList()),ZfEvent::getCompanion,ZfEvent.getCompanionList());
+//        if (ZfEvent.getYear() != 0) {
+//            System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+ZfEvent.getYear());
+//            lqw.apply("YEAR(happen_time) = {0}", ZfEvent.getYear());
+//        }
+
+        if (CollectionUtils.isNotEmpty(zfEvent.getCompanionList())) {
+            List<String> companionList = zfEvent.getCompanionList();
+
+            // 娓呯悊鍜屽幓閲�
+            companionList = companionList.stream()
+                .map(String::trim)
+                .filter(s -> !s.isEmpty())
+                .distinct()
+                .collect(Collectors.toList());
+
+            if (!companionList.isEmpty()) {
+                // 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
+                for (String companion : companionList) {
+                    lqw.apply(
+                        "FIND_IN_SET({0}, REPLACE(REPLACE(people, ' ', ''), '锛�', ',')) > 0",
+                        companion);
+                }
+            }
+        }
+        lqw.eq(zfEvent.getHappenTime() != null, ZfEvent::getHappenTime, zfEvent.getHappenTime());
+        System.out.println("鏌ヨ鏉′欢: " + lqw.getCustomSqlSegment());
+
         return lqw;
     }
 
@@ -619,4 +663,56 @@
     }
 
 
+    @Override
+    public String getModuleCode() {
+        return "瀹剁邯";
+    }
+
+    @Override
+//    @Cacheable(value = "economy_search", key = "T(String).format('2045_%s_%s_%s_%s',#companion != null ? #companion : 'null',#happenStartTime != null ? #happenStartTime.getTime() : 0,#happenEndTime != null ? #happenEndTime.getTime() : 0,#hasAttachment != null ? #hasAttachment : 'null')")
+    public List<?>  search(String companion, Date happenStartTime,Date happenEndTime,String hasAttachment) {
+        ZfEvent zfEvent = new ZfEvent();
+        zfEvent.setPeople(companion);
+        zfEvent.setHappenStartTime(happenStartTime);
+        zfEvent.setHappenEndTime(happenEndTime);
+
+        System.out.println("--------------"+companion+"-----------------");
+        String[] split = companion.trim().replace(" ", "").replace("锛�", ",").split(",");
+        List<String> list = Arrays.asList(split);
+
+        zfEvent.setCompanionList(list);
+        zfEvent.setHasAttachment(hasAttachment);
+        zfEvent.setIsHide("鍚�");
+
+        System.out.println("[[[[[[[["+zfEvent);
+
+        return dataList(zfEvent);
+    }
+
+    public List<zfEventdto> dataList(ZfEvent zfEvent) {
+
+        LambdaQueryWrapper<ZfEvent> lqw = buildCondition(zfEvent, null);
+
+        List<ZfEvent> beanRecords = list(lqw);
+
+
+
+        return encapData(beanRecords);
+    }
+
+    public List<zfEventdto> encapData(List<ZfEvent> lis)
+    {
+        List<zfEventdto> daoRes = new ArrayList<>() ;
+        for(ZfEvent obj : lis)
+        {
+            zfEventdto atd = new zfEventdto();
+            atd.setId(Math.toIntExact(obj.getId()));
+            atd.setModule("瀹剁邯");
+            atd.setName(obj.getPeople());
+            atd.setCreateTime(obj.getCreateTime());
+            daoRes.add(atd);
+        }
+        return daoRes;
+    }
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
index 2ed425e..e8590d3 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
@@ -2,6 +2,7 @@
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -9,6 +10,7 @@
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.*;
+import com.ruoyi.domain.dto.zfEventdto;
 import com.ruoyi.mapper.ZfPetMapper;
 import com.ruoyi.service.*;
 import lombok.extern.slf4j.Slf4j;
@@ -33,7 +35,7 @@
  */
 @Service
 @Slf4j
-public class ZfPetServiceImpl extends ServiceImpl<ZfPetMapper, ZfPet> implements ZfPetService {
+public class ZfPetServiceImpl extends ServiceImpl<ZfPetMapper, ZfPet> implements ZfPetService,ModuleSearchable {
 
     @Autowired
     ZInfoUserService zInfoUserService;
@@ -43,7 +45,7 @@
 
     @Autowired
     ZfPetService zfPetService;
-    
+
     @Resource
     ZAuthorityService zAuthorityService;
 
@@ -125,7 +127,7 @@
     }
 
 
-    
+
 
     @Override
     public List<ZfPet> selectByCondition(ZfPet zfPet) {
@@ -356,7 +358,7 @@
     private LambdaQueryWrapper<ZfPet> buildCondition(ZfPet zfPet,List<Long> familyIdList) {
         LambdaQueryWrapper<ZfPet> lqw = new LambdaQueryWrapper<>();
         lqw.orderByDesc(ZfPet::getCreateTime);
-        lqw.in(ZfPet::getFamilyId,familyIdList);
+        lqw.in(familyIdList != null, ZfPet::getFamilyId,familyIdList);
         lqw.eq(zfPet.getId()!=null,ZfPet::getId,zfPet.getId());
         lqw.like(StringUtils.isNotEmpty(zfPet.getIdNum()),ZfPet::getIdNum,zfPet.getIdNum());
         lqw.like(StringUtils.isNotEmpty(zfPet.getSecurityCode()),ZfPet::getSecurityCode,zfPet.getSecurityCode());
@@ -373,6 +375,93 @@
         lqw.like(StringUtils.isNotEmpty(zfPet.getDialect()),ZfPet::getDialect,zfPet.getDialect());
         lqw.like(StringUtils.isNotEmpty(zfPet.getDisEatHabit()),ZfPet::getDisEatHabit,zfPet.getDisEatHabit());
         lqw.like(StringUtils.isNotEmpty(zfPet.getDisLifeHabit()),ZfPet::getDisLifeHabit,zfPet.getDisLifeHabit());
-        return lqw;
-    }
-}
+
+
+        if (StringUtils.isNotEmpty(zfPet.getIsHide())) {
+
+            lqw.and(wrapper -> wrapper
+                .ne(ZfPet::getIsHide, "鏄�")
+                .or()
+                .isNull(ZfPet::getIsHide)
+            );
+        }
+        if (zfPet.getHasAttachment() != null && zfPet.getHasAttachment().equals("鏄�")) {
+            lqw.apply("url IS NOT NULL AND url != ''");
+        }
+//        lqw.in(StringUtils.isNotEmpty(zfPet.getCompanionList()),zfPet::getCompanion,zfPet.getCompanionList());
+//        if (zfPet.getYear() != 0) {
+//            System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfPet.getYear());
+//            lqw.apply("YEAR(happen_time) = {0}", zfPet.getYear());
+//        }
+
+        if (CollectionUtils.isNotEmpty(zfPet.getCompanionList())) {
+            List<String> companionList = zfPet.getCompanionList();
+
+            // 娓呯悊鍜屽幓閲�
+            companionList = companionList.stream()
+                .map(String::trim)
+                .filter(s -> !s.isEmpty())
+                .distinct()
+                .collect(Collectors.toList());
+
+            if (!companionList.isEmpty()) {
+                // 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
+                for (String companion : companionList) {
+                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+                        companion);
+                }
+            }
+        }
+
+        return lqw;}
+
+
+        @Override
+        public String getModuleCode() {
+            return "瀹犵墿";
+        }
+
+        @Override
+//    @Cacheable(value = "economy_search", key = "T(String).format('2045_%s_%s_%s_%s',#companion != null ? #companion : 'null',#happenStartTime != null ? #happenStartTime.getTime() : 0,#happenEndTime != null ? #happenEndTime.getTime() : 0,#hasAttachment != null ? #hasAttachment : 'null')")
+        public List<?>  search(String companion, Date happenStartTime,Date happenEndTime,String hasAttachment) {
+            ZfPet zfPet = new ZfPet();
+            zfPet.setCompanion(companion);
+
+
+            String[] split = companion.split(",");
+            List<String> list = Arrays.asList(split);
+
+            zfPet.setCompanionList(list);
+            zfPet.setHasAttachment(hasAttachment);
+            zfPet.setIsHide("鍚�");
+
+            System.out.println("[[[[[[[["+zfPet);
+
+            return dataList(zfPet);
+        }
+
+        public List<zfEventdto> dataList(ZfPet zfPet) {
+
+            LambdaQueryWrapper<ZfPet> lqw = buildCondition(zfPet, null);
+
+            List<ZfPet> beanRecords = list(lqw);
+
+
+
+            return encapData(beanRecords);
+        }
+
+        public List<zfEventdto> encapData(List<ZfPet> lis)
+        {
+            List<zfEventdto> daoRes = new ArrayList<>() ;
+            for(ZfPet obj : lis)
+            {
+                zfEventdto atd = new zfEventdto();
+                atd.setId(Math.toIntExact(Long.parseLong(obj.getId())));
+                atd.setModule("瀹犵墿");
+                atd.setName(obj.getCompanion());
+                atd.setCreateTime(obj.getCreateTime());
+                daoRes.add(atd);
+            }
+            return daoRes;
+        }}

--
Gitblit v1.9.1