ソースを参照

大模型查询停水公告的SQL逻辑调整

王苗苗 2 週間 前
コミット
9ccb9e961b

+ 14 - 2
slibra-system/src/main/resources/mapper/business/TCutOffWaterMapper.xml

@@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <!--    </select>-->
 
     <select id="getCutOffWaterByNeighbourhoodName" resultMap="TCutOffWaterResult">
-        SELECT
+        <!-- SELECT
             *,#{asrText} neighbourhoodName
         FROM
             t_cut_off_water
@@ -126,7 +126,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                         AND n.del_flag = 0
             )
           AND NOW() BETWEEN time_begin
-            AND time_end
+            AND time_end -->
+            <!-- 2024年11月15日15:15:56,逻辑调整,查询改成下面 -->
+        SELECT DISTINCT
+        a.*,
+        c.`name` neighbourhoodName
+        FROM
+        t_cut_off_water a
+        INNER JOIN t_cut_off_water_extra b ON a.id = b.cut_off_water_id
+        AND a.del_flag = 0
+        AND b.del_flag = 0
+        INNER JOIN t_neighborhood c ON c.id = b.neighborhood_id
+        AND c.del_flag = 0
+        WHERE c.`name` LIKE concat('%', #{asrText}, '%')
     </select>
     
     <select id="selectgetExtraListByPumpingStationId" resultType="com.slibra.business.res.CutOffExtraRes">

+ 10 - 0
slibra-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -1,4 +1,6 @@
 com/slibra/business/domain/TUserFeeInfo$TUserFeeInfoBuilder.class
+com/slibra/business/req/CutOffExtraReq$CutOffExtraReqBuilder.class
+com/slibra/business/req/CutOffExtraReq.class
 com/slibra/system/mapper/SysRoleDeptMapper.class
 com/slibra/business/req/ChatRequest$ChatRequestBuilder.class
 com/slibra/system/service/impl/SysUserOnlineServiceImpl.class
@@ -27,6 +29,7 @@ com/slibra/system/service/ISysDeptService.class
 com/slibra/system/service/impl/SysConfigServiceImpl.class
 com/slibra/system/service/ISysRoleService.class
 com/slibra/system/domain/SysPost.class
+com/slibra/business/domain/TCutOffWaterExtra.class
 com/slibra/business/domain/TNeighborhoodBuilding.class
 com/slibra/business/res/PumpAndNumber$PumpAndNumberBuilder.class
 com/slibra/business/res/PumpAndBuildingNumberNames.class
@@ -54,6 +57,7 @@ com/slibra/system/service/impl/SysUserServiceImpl.class
 com/slibra/system/service/ISysNoticeService.class
 com/slibra/system/mapper/SysMenuMapper.class
 com/slibra/system/service/ISysDictTypeService.class
+com/slibra/business/domain/TCallRecord$TCallRecordBuilder.class
 com/slibra/business/domain/TPumpingStation$TPumpingStationBuilder.class
 com/slibra/business/domain/TNeighborhoodBuilding$TNeighborhoodBuildingBuilder.class
 com/slibra/business/domain/TCallRecord.class
@@ -70,6 +74,7 @@ com/slibra/business/res/NeighbourhoodAndNumber$NeighbourhoodAndNumberBuilder.cla
 com/slibra/business/res/NeighbourhoodNumberAndAddFlag.class
 com/slibra/system/domain/SysUserRole.class
 com/slibra/system/service/ISysDictDataService.class
+com/slibra/business/service/impl/TCutOffWaterExtraServiceImpl.class
 com/slibra/business/domain/TCutOffWater$TCutOffWaterBuilder.class
 com/slibra/system/domain/SysConfig.class
 com/slibra/system/service/ISysUserOnlineService.class
@@ -78,6 +83,7 @@ com/slibra/business/res/NeighbourhoodAndNumber.class
 com/slibra/system/service/ISysPostService.class
 com/slibra/business/domain/TCutOffWater.class
 com/slibra/system/service/ISysOperLogService.class
+com/slibra/business/mapper/TCutOffWaterExtraMapper.class
 com/slibra/business/req/ChatRequest.class
 com/slibra/business/service/impl/TCutOffWaterServiceImpl.class
 com/slibra/business/domain/City$CityBuilder.class
@@ -108,6 +114,7 @@ com/slibra/system/domain/SysRoleMenu.class
 com/slibra/system/domain/SysUserPost.class
 com/slibra/system/service/impl/SysOperLogServiceImpl.class
 com/slibra/business/req/NeighbourhoodNumberAndAddFlagReq.class
+com/slibra/business/res/CutOffExtraRes$CutOffExtraResBuilder.class
 com/slibra/business/domain/TPumpingStationNeighbourhoodNumber.class
 com/slibra/system/service/impl/SysNoticeServiceImpl.class
 com/slibra/system/service/ISysMenuService.class
@@ -119,11 +126,14 @@ com/slibra/system/service/ISysLogininforService.class
 com/slibra/business/mapper/TCallRecordMapper.class
 com/slibra/system/service/impl/SysDeptServiceImpl.class
 com/slibra/business/domain/TPumpingStation.class
+com/slibra/business/service/ITCutOffWaterExtraService.class
 com/slibra/business/res/FeeInfo.class
+com/slibra/business/res/CutOffExtraRes.class
 com/slibra/system/mapper/SysRoleMenuMapper.class
 com/slibra/business/service/ITWhitelistService.class
 com/slibra/business/domain/TUserFeeInfo.class
 com/slibra/business/req/AiChatRes$AiChatResBuilder.class
+com/slibra/business/domain/TCutOffWaterExtra$TCutOffWaterExtraBuilder.class
 com/slibra/business/service/impl/TCallRecordServiceImpl.class
 com/slibra/business/mapper/TWhitelistMapper.class
 com/slibra/business/req/ChatReq.class

+ 6 - 0
slibra-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -1,5 +1,6 @@
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/ISysLogininforService.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/domain/SysOperLog.java
+/Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/impl/TCutOffWaterExtraServiceImpl.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/mapper/SysRoleDeptMapper.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/domain/SysPost.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/impl/FrontServiceImpl.java
@@ -26,6 +27,7 @@
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/ITUserInfoService.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/mapper/SysNoticeMapper.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/res/FeeInfo.java
+/Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/req/CutOffExtraReq.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/impl/SysDictTypeServiceImpl.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/ITWhitelistService.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/ISysDictTypeService.java
@@ -46,6 +48,7 @@
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/impl/TWhitelistServiceImpl.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/ISysPostService.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/mapper/TWhitelistMapper.java
+/Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/res/CutOffExtraRes.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/mapper/SysConfigMapper.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/req/ChatReq.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/ITNeighborhoodService.java
@@ -68,6 +71,7 @@
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/res/NeighbourhoodAndBuilding.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/ISysUserService.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/res/NeighbourhoodAndNumber.java
+/Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/mapper/TCutOffWaterExtraMapper.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/ITPumpingStationNeighbourhoodNumberService.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/domain/SysUserPost.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/impl/SysDictDataServiceImpl.java
@@ -93,6 +97,7 @@
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/impl/TCallRecordServiceImpl.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/impl/SysOperLogServiceImpl.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/service/impl/SysNoticeServiceImpl.java
+/Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/domain/TCutOffWaterExtra.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/mapper/SysRoleMenuMapper.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/req/GenerateArgs.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/impl/TNeighborhoodBuildingServiceImpl.java
@@ -106,5 +111,6 @@
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/domain/SysCache.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/system/domain/SysRoleMenu.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/ITNeighborhoodBuildingService.java
+/Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/service/ITCutOffWaterExtraService.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/req/WorkOrderReq.java
 /Users/wangmiaomiao/IdeaProjects/intelligent-voice-customer-service-java/slibra-system/src/main/java/com/slibra/business/req/PredictorRequest.java