From 8a0a8adfbe53db564df7aaaf561a60be7d4d8dd0 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 26 九月 2024 17:52:24 +0800
Subject: [PATCH] 1. 新增监管系统中用户模糊搜索功能 2. 新增监测设备和用户的匹配关系搜索功能

---
 src/main/kotlin/cn/flightfeather/supervision/domain/ds2/repository/ComplaintAndPunishmentRep.kt |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/repository/ComplaintAndPunishmentRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/repository/ComplaintAndPunishmentRep.kt
index 3c60c11..5ccbc6a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/repository/ComplaintAndPunishmentRep.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/repository/ComplaintAndPunishmentRep.kt
@@ -6,16 +6,17 @@
 import cn.flightfeather.supervision.lightshare.vo.ComplaintVo
 import cn.flightfeather.supervision.lightshare.vo.PunishmentVo
 import org.springframework.stereotype.Repository
+import java.time.LocalDateTime
+import java.time.format.DateTimeFormatter
 import java.util.*
 
 /**
-     * 淇¤鎶曡瘔鍜岃鏀垮缃氭暟鎹簱鐩稿叧鎿嶄綔
+ * 淇¤鎶曡瘔鍜岃鏀垮缃氭暟鎹簱鐩稿叧鎿嶄綔
  */
 @Repository
 class ComplaintAndPunishmentRep(
     private val complaintMapper: ComplaintMapper,
     private val punishmentMapper: PunishmentMapper,
-    private val dateUtil: DateUtil,
 ){
 
 
@@ -25,8 +26,14 @@
      * @param tzUserIdList 椋炵窘鐜绯荤粺涓嬬殑鐢ㄦ埛id鍒楄〃
      */
     fun findComplaint(tzUserIdList: List<String?>, sTime: Date?, eTime: Date?): List<ComplaintVo?> {
-        val s = dateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
-        val e = dateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
+        val s = DateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
+        val e = DateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
+        return findComplaint(tzUserIdList, s, e)
+    }
+
+    fun findComplaint(tzUserIdList: List<String?>, sTime: LocalDateTime?, eTime: LocalDateTime?): List<ComplaintVo?> {
+        val s = sTime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
+        val e = eTime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
         return findComplaint(tzUserIdList, s, e)
     }
 
@@ -39,8 +46,14 @@
      * @param tzUserIdList 椋炵窘鐜绯荤粺涓嬬殑鐢ㄦ埛id鍒楄〃
      */
     fun findPunishment(tzUserIdList: List<String?>, sTime: Date?, eTime: Date?): List<PunishmentVo?> {
-        val s = dateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
-        val e = dateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
+        val s = DateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
+        val e = DateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
+        return findPunishment(tzUserIdList, s, e)
+    }
+
+    fun findPunishment(tzUserIdList: List<String?>, sTime: LocalDateTime?, eTime: LocalDateTime?): List<PunishmentVo?> {
+        val s = sTime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
+        val e = eTime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
         return findPunishment(tzUserIdList, s, e)
     }
 

--
Gitblit v1.9.3