wwh 1 неделя назад
Родитель
Сommit
2c22bd50e8

+ 4 - 4
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/controller/LivestockResourceScreenController.java

@@ -10,10 +10,10 @@ import com.ruoyi.common.core.domain.AjaxResult;
10 10
 import com.ruoyi.web.modules.screen.service.ILivestockResourceScreenService;
11 11
 
12 12
 /**
13
- * 大屏 — 畜牧资源(AI 问诊)统计(只读)。
13
+ * 大屏 — 畜牧资源统计(只读)。
14 14
  * <p>
15
- * 数据来源:AI 咨询会话与消息表({@code biz_consult_session} / {@code biz_consult_message}),
16
- * 统计活跃、分类占比、时段热力、回复成功率及本地分词关键词 Top30
15
+ * 看板含产业总览、三资、产量、疫苗、线下预约、特派员/事业单位、农技课堂、实战培训等;
16
+ * 已屏蔽 AI 问诊相关区块(活跃度、用户结构、分类、模型调用、分时、会话分布、状态、热门、关键词)
17 17
  *
18 18
  * @see ILivestockResourceScreenService
19 19
  */
@@ -25,7 +25,7 @@ public class LivestockResourceScreenController extends BaseController
25 25
     private ILivestockResourceScreenService livestockResourceScreenService;
26 26
 
27 27
     /**
28
-     * 畜牧资源看板;统计年为当前年时额外包含「今日」实时指标
28
+     * 畜牧资源看板一屏数据(已屏蔽 AI 问诊九区块)
29 29
      *
30 30
      * @param statYear 统计年份
31 31
      */

+ 3 - 48
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/domain/vo/HomeScreenIndustryOverviewVo.java

@@ -3,6 +3,9 @@ package com.ruoyi.web.modules.screen.domain.vo;
3 3
 import java.math.BigDecimal;
4 4
 /**
5 5
  * 首页产业总览指标。
6
+ * <p>
7
+ * 已屏蔽:供应商/承销商/市场、草场块数。
8
+ * </p>
6 9
  */
7 10
 public class HomeScreenIndustryOverviewVo
8 11
 {
@@ -20,16 +23,8 @@ public class HomeScreenIndustryOverviewVo
20 23
     private int largeLivestockFarmerCount;
21 24
     /** 产业总览「有畜户数」(户):所选年最大填报月全县村级 {@code with_livestock_household_count} 合计 */
22 25
     private int withLivestockHouseholdCount;
23
-    /** 草场块数(草场台账快照,供草场类型区块使用) */
24
-    private int grasslandCount;
25 26
     /** 产业总览「草场面积」(亩):所选年最大填报月全县村级 {@code pasture_contract_area} 合计 */
26 27
     private BigDecimal grasslandAreaMu;
27
-    /** 入驻供应商数 */
28
-    private int supplierCount;
29
-    /** 入驻承销商数 */
30
-    private int distributorCount;
31
-    /** 交易市场数 */
32
-    private int tradeMarketCount;
33 28
 
34 29
     public int getInventoryTotal()
35 30
     {
@@ -101,16 +96,6 @@ public class HomeScreenIndustryOverviewVo
101 96
         this.withLivestockHouseholdCount = withLivestockHouseholdCount;
102 97
     }
103 98
 
104
-    public int getGrasslandCount()
105
-    {
106
-        return grasslandCount;
107
-    }
108
-
109
-    public void setGrasslandCount(int grasslandCount)
110
-    {
111
-        this.grasslandCount = grasslandCount;
112
-    }
113
-
114 99
     public BigDecimal getGrasslandAreaMu()
115 100
     {
116 101
         return grasslandAreaMu;
@@ -120,34 +105,4 @@ public class HomeScreenIndustryOverviewVo
120 105
     {
121 106
         this.grasslandAreaMu = grasslandAreaMu;
122 107
     }
123
-
124
-    public int getSupplierCount()
125
-    {
126
-        return supplierCount;
127
-    }
128
-
129
-    public void setSupplierCount(int supplierCount)
130
-    {
131
-        this.supplierCount = supplierCount;
132
-    }
133
-
134
-    public int getDistributorCount()
135
-    {
136
-        return distributorCount;
137
-    }
138
-
139
-    public void setDistributorCount(int distributorCount)
140
-    {
141
-        this.distributorCount = distributorCount;
142
-    }
143
-
144
-    public int getTradeMarketCount()
145
-    {
146
-        return tradeMarketCount;
147
-    }
148
-
149
-    public void setTradeMarketCount(int tradeMarketCount)
150
-    {
151
-        this.tradeMarketCount = tradeMarketCount;
152
-    }
153 108
 }

+ 9 - 41
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/domain/vo/LivestockResourceDashboardVo.java

@@ -2,7 +2,11 @@ package com.ruoyi.web.modules.screen.domain.vo;
2 2
 
3 3
 import java.util.List;
4 4
 /**
5
- * 大屏畜牧资源(AI 问诊)看板({@code GET /bigScreen/livestockResource/dashboard})。
5
+ * 大屏畜牧资源看板({@code GET /bigScreen/livestockResource/dashboard})。
6
+ * <p>
7
+ * 已屏蔽 AI 问诊区块:高频关键词、热门问题、会话提问分布、会话状态、分时热度、
8
+ * 提问分类、模型调用、活跃度趋势、用户结构。
9
+ * </p>
6 10
  */
7 11
 public class LivestockResourceDashboardVo
8 12
 {
@@ -14,7 +18,7 @@ public class LivestockResourceDashboardVo
14 18
     private String statDateTime;
15 19
     /** 有会话数据的年份列表 */
16 20
     private List<Integer> availableYears;
17
-    /** 年度/今日概览 */
21
+    /** 核心数据总览 */
18 22
     private LivestockResourceOverviewVo overview;
19 23
     /** 农村三资数据 */
20 24
     private LivestockResourceRuralThreeAssetsVo ruralThreeAssets;
@@ -24,34 +28,16 @@ public class LivestockResourceDashboardVo
24 28
     private LivestockResourceProductOutputTrendVo productOutputTrend;
25 29
     /** 疫苗接种(最大月免疫率) */
26 30
     private LivestockResourceVaccinationOverviewVo vaccinationOverview;
27
-    /** 线下服务预约(自首页迁入) */
31
+    /** 线下服务预约 */
28 32
     private HomeScreenAppointmentVo appointment;
29 33
     /** 科技特派员结构(党员/其他、男/女) */
30 34
     private LivestockResourceTechEnvoyStructureVo techEnvoyStructure;
31 35
     /** 农业事业单位职级人数 */
32 36
     private LivestockResourceAgriUnitStructureVo agriUnitStructure;
33
-    /** 农技课堂(自首页迁入) */
37
+    /** 农技课堂 */
34 38
     private HomeScreenAgriClassroomVo agriClassroom;
35
-    /** 实战培训报名(自首页迁入) */
39
+    /** 实战培训报名 */
36 40
     private HomeScreenTrainingTrendVo trainingTrend;
37
-    /** 近 7 日活跃趋势 */
38
-    private LivestockResourceActivityTrendVo activityTrend;
39
-    /** 新老用户结构 */
40
-    private LivestockResourceUserStructureVo userStructure;
41
-    /** 提问分类占比 */
42
-    private LivestockResourceCategoryShareVo categoryShare;
43
-    /** 模型调用分类分析(同 categoryShare.items) */
44
-    private List<LivestockResourceCategoryItemVo> modelCallAnalysis;
45
-    /** statDate 当天 24 小时热力 */
46
-    private LivestockResourceHourlyHeatVo hourlyHeat;
47
-    /** 会话深度(回复条数)分布 */
48
-    private List<LivestockResourceSessionBandVo> sessionReplyDistribution;
49
-    /** AI 回复成功/失败占比 */
50
-    private LivestockResourceReplyStatusVo replyStatusDistribution;
51
-    /** 热门话题 Top5(按分类) */
52
-    private List<LivestockResourceCategoryItemVo> hotTopics;
53
-    /** 提问高频关键词 Top30(本地分词) */
54
-    private List<LivestockResourceKeywordVo> topKeywords;
55 41
 
56 42
     public int getStatYear() { return statYear; }
57 43
     public void setStatYear(int statYear) { this.statYear = statYear; }
@@ -81,22 +67,4 @@ public class LivestockResourceDashboardVo
81 67
     public void setAgriClassroom(HomeScreenAgriClassroomVo agriClassroom) { this.agriClassroom = agriClassroom; }
82 68
     public HomeScreenTrainingTrendVo getTrainingTrend() { return trainingTrend; }
83 69
     public void setTrainingTrend(HomeScreenTrainingTrendVo trainingTrend) { this.trainingTrend = trainingTrend; }
84
-    public LivestockResourceActivityTrendVo getActivityTrend() { return activityTrend; }
85
-    public void setActivityTrend(LivestockResourceActivityTrendVo activityTrend) { this.activityTrend = activityTrend; }
86
-    public LivestockResourceUserStructureVo getUserStructure() { return userStructure; }
87
-    public void setUserStructure(LivestockResourceUserStructureVo userStructure) { this.userStructure = userStructure; }
88
-    public LivestockResourceCategoryShareVo getCategoryShare() { return categoryShare; }
89
-    public void setCategoryShare(LivestockResourceCategoryShareVo categoryShare) { this.categoryShare = categoryShare; }
90
-    public List<LivestockResourceCategoryItemVo> getModelCallAnalysis() { return modelCallAnalysis; }
91
-    public void setModelCallAnalysis(List<LivestockResourceCategoryItemVo> modelCallAnalysis) { this.modelCallAnalysis = modelCallAnalysis; }
92
-    public LivestockResourceHourlyHeatVo getHourlyHeat() { return hourlyHeat; }
93
-    public void setHourlyHeat(LivestockResourceHourlyHeatVo hourlyHeat) { this.hourlyHeat = hourlyHeat; }
94
-    public List<LivestockResourceSessionBandVo> getSessionReplyDistribution() { return sessionReplyDistribution; }
95
-    public void setSessionReplyDistribution(List<LivestockResourceSessionBandVo> sessionReplyDistribution) { this.sessionReplyDistribution = sessionReplyDistribution; }
96
-    public LivestockResourceReplyStatusVo getReplyStatusDistribution() { return replyStatusDistribution; }
97
-    public void setReplyStatusDistribution(LivestockResourceReplyStatusVo replyStatusDistribution) { this.replyStatusDistribution = replyStatusDistribution; }
98
-    public List<LivestockResourceCategoryItemVo> getHotTopics() { return hotTopics; }
99
-    public void setHotTopics(List<LivestockResourceCategoryItemVo> hotTopics) { this.hotTopics = hotTopics; }
100
-    public List<LivestockResourceKeywordVo> getTopKeywords() { return topKeywords; }
101
-    public void setTopKeywords(List<LivestockResourceKeywordVo> topKeywords) { this.topKeywords = topKeywords; }
102 70
 }

+ 2 - 2
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/service/ILivestockResourceScreenService.java

@@ -3,10 +3,10 @@ package com.ruoyi.web.modules.screen.service;
3 3
 import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceDashboardVo;
4 4
 
5 5
 /**
6
- * 大屏畜牧资源(AI 问诊)统计服务。
6
+ * 大屏畜牧资源统计服务。
7 7
  */
8 8
 public interface ILivestockResourceScreenService
9 9
 {
10
-    /** AI 咨询活跃、分类、热力、关键词等年度看板 */
10
+    /** 畜牧资源看板(产业与培训相关区块;AI 问诊九区块已屏蔽) */
11 11
     LivestockResourceDashboardVo loadDashboard(String statYear);
12 12
 }

+ 2 - 13
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/service/impl/HomeScreenServiceImpl.java

@@ -21,8 +21,6 @@ import com.ruoyi.web.modules.industryservice.domain.BizLargeLivestockFarmer;
21 21
 import com.ruoyi.web.modules.industryservice.domain.BizLivestockOwnershipHousehold;
22 22
 import com.ruoyi.web.modules.industryservice.domain.BizYakHerdInventory;
23 23
 import com.ruoyi.web.modules.industryservice.domain.BizYakOutboundReport;
24
-import com.ruoyi.web.modules.industryservice.domain.vo.BreedingIndustryDegradationStatVo;
25
-import com.ruoyi.web.modules.industryservice.mapper.BreedingIndustryStatsMapper;
26 24
 import com.ruoyi.web.modules.industryservice.mapper.BizCooperativeDevelopmentMapper;
27 25
 import com.ruoyi.web.modules.industryservice.mapper.BizDisposableIncomeMapper;
28 26
 import com.ruoyi.web.modules.industryservice.mapper.BizFamilyRanchMapper;
@@ -62,15 +60,12 @@ import com.ruoyi.web.modules.screen.support.HomeScreenSupport;
62 60
  * 大屏首页统计服务实现。
63 61
  * <p>
64 62
  * 产业总览填报类指标取所选年<strong>最大填报月</strong>合计或记录数。
65
- * 看板已屏蔽:惠农补贴、草场类型占比、牦牛出栏月度、牦牛存栏变动。
63
+ * 看板已屏蔽:惠农补贴、草场类型占比、牦牛出栏月度、牦牛存栏变动、供应商/承销商/市场、草场块数
66 64
  * </p>
67 65
  */
68 66
 @Service
69 67
 public class HomeScreenServiceImpl implements IHomeScreenService
70 68
 {
71
-    @Autowired
72
-    private BreedingIndustryStatsMapper breedingIndustryStatsMapper;
73
-
74 69
     @Autowired
75 70
     private HomeScreenStatsMapper homeScreenStatsMapper;
76 71
 
@@ -117,14 +112,8 @@ public class HomeScreenServiceImpl implements IHomeScreenService
117 112
         vo.setStatYear(year);
118 113
         vo.setStatDate(HomeScreenSupport.formatStatDate(statDate));
119 114
 
120
-        // 产业总览:供应商/承销商/市场;草场块数仍取台账
121
-        HomeScreenIndustryOverviewVo overview = new HomeScreenIndustryOverviewVo();
122
-        overview.setSupplierCount(homeScreenStatsMapper.countSupplierForScreen());
123
-        overview.setDistributorCount(homeScreenStatsMapper.countDistributorForScreen());
124
-        overview.setTradeMarketCount(homeScreenStatsMapper.countTradeMarketForScreen());
125
-        overview.setGrasslandCount(breedingIndustryStatsMapper.countGrassland());
126
-
127 115
         // 产业总览填报类:所选年份内最大填报月,全县(各村)合计/计数
116
+        HomeScreenIndustryOverviewVo overview = new HomeScreenIndustryOverviewVo();
128 117
         HomeScreenStatPeriodDto yearHerd = homeScreenStatsMapper.selectLatestHerdInventoryStatPeriodByYear(year);
129 118
         HomeScreenStatPeriodDto yearOutbound = homeScreenStatsMapper.selectLatestOutboundReportStatPeriodByYear(year);
130 119
         HomeScreenStatPeriodDto yearFarmerHousehold =

+ 3 - 60
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/service/impl/LivestockResourceScreenServiceImpl.java

@@ -4,7 +4,6 @@ import java.time.LocalDate;
4 4
 import java.time.LocalDateTime;
5 5
 import java.time.ZoneId;
6 6
 import java.util.Date;
7
-import java.util.List;
8 7
 import org.springframework.beans.factory.annotation.Autowired;
9 8
 import org.springframework.stereotype.Service;
10 9
 import com.ruoyi.web.modules.industryservice.support.BreedingIndustryRules;
@@ -14,26 +13,20 @@ import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceProductOutputSum
14 13
 import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceTechPersonnelDto;
15 14
 import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceThreeAssetsSumDto;
16 15
 import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceVaccinationSumDto;
17
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceActivityTrendVo;
18
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceCategoryItemVo;
19
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceCategoryShareVo;
20 16
 import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceDashboardVo;
21
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceHourlyHeatVo;
22 17
 import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceOverviewVo;
23
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceReplyStatusVo;
24
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceUserStructureVo;
25 18
 import com.ruoyi.web.modules.screen.mapper.HomeScreenStatsMapper;
26 19
 import com.ruoyi.web.modules.screen.mapper.LivestockResourceScreenMapper;
27 20
 import com.ruoyi.web.modules.screen.service.ILivestockResourceScreenService;
28 21
 import com.ruoyi.web.modules.screen.support.HomeScreenSupport;
29
-import com.ruoyi.web.modules.screen.support.LivestockResourceScreenRules;
30 22
 import com.ruoyi.web.modules.screen.support.LivestockResourceScreenSupport;
31 23
 
32 24
 /**
33 25
  * 大屏畜牧资源统计服务实现。
34 26
  * <p>
35
- * 产业区块:总览、三资、问题上报、产量、疫苗、线下预约、特派员、事业单位、农技课堂、实战培训;
36
- * 其余区块仍统计 AI 咨询会话与消息。
27
+ * 产业区块:总览、三资、问题上报、产量、疫苗、线下预约、特派员、事业单位、农技课堂、实战培训。
28
+ * 已屏蔽 AI 问诊相关区块(活跃度、用户结构、分类、模型调用、分时热度、会话分布、状态、热门问题、关键词)。
29
+ * </p>
37 30
  */
38 31
 @Service
39 32
 public class LivestockResourceScreenServiceImpl implements ILivestockResourceScreenService
@@ -53,11 +46,6 @@ public class LivestockResourceScreenServiceImpl implements ILivestockResourceScr
53 46
 
54 47
         Date yearStart = toDate(LocalDate.of(year, 1, 1));
55 48
         Date yearEnd = toDateEndOfDay(statDate);
56
-        Date sevenStart = toDate(statDate.minusDays(LivestockResourceScreenRules.ACTIVITY_DAYS - 1));
57
-        Date sevenEnd = yearEnd;
58
-        LocalDateTime hourlyAnchor = statDateTime.truncatedTo(java.time.temporal.ChronoUnit.HOURS);
59
-        Date hourlyWindowStart = toDateTime(hourlyAnchor.minusHours(LivestockResourceScreenRules.HOURLY_BUCKETS - 1));
60
-        Date hourlyWindowEnd = toDateTime(hourlyAnchor.plusHours(1).minusSeconds(1));
61 49
 
62 50
         LivestockResourceThreeAssetsSumDto assetsSum = livestockResourceScreenMapper.sumRuralThreeAssetsFixed();
63 51
         LivestockResourceProductOutputSumDto productOutputSum = resolveProductOutputSum(year);
@@ -73,32 +61,6 @@ public class LivestockResourceScreenServiceImpl implements ILivestockResourceScr
73 61
                 livestockResourceScreenMapper.countVetMedicalResource(),
74 62
                 techPersonnel);
75 63
 
76
-        LivestockResourceActivityTrendVo activityTrend = LivestockResourceScreenSupport.buildActivityTrend(
77
-                livestockResourceScreenMapper.selectDailySessionCounts(sevenStart, sevenEnd),
78
-                livestockResourceScreenMapper.selectDailyAiReplyCounts(sevenStart, sevenEnd),
79
-                statDate);
80
-
81
-        LivestockResourceUserStructureVo userStructure = LivestockResourceScreenSupport.buildUserStructure(
82
-                livestockResourceScreenMapper.selectUserStructure());
83
-
84
-        long totalAiMessages = safeLong(livestockResourceScreenMapper.countAskerMessagesInYear(yearStart, yearEnd));
85
-        List<com.ruoyi.web.modules.screen.domain.dto.LivestockResourceCategoryCountDto> categoryRows =
86
-                livestockResourceScreenMapper.selectAskerCategoryCounts(yearStart, yearEnd);
87
-        LivestockResourceCategoryShareVo categoryShare = LivestockResourceScreenSupport.buildCategoryShare(
88
-                categoryRows, totalAiMessages);
89
-        List<LivestockResourceCategoryItemVo> categoryItems = categoryShare.getItems();
90
-
91
-        LivestockResourceHourlyHeatVo hourlyHeat = LivestockResourceScreenSupport.buildHourlyHeat(
92
-                livestockResourceScreenMapper.selectHourlySessionCounts(hourlyWindowStart, hourlyWindowEnd),
93
-                livestockResourceScreenMapper.selectHourlyAiReplyCounts(hourlyWindowStart, hourlyWindowEnd),
94
-                hourlyAnchor);
95
-
96
-        long yearSessionTotal = safeLong(livestockResourceScreenMapper.countYearSessions(yearStart, yearEnd));
97
-
98
-        long okCount = safeLong(livestockResourceScreenMapper.countAiRepliesOk(yearStart, yearEnd));
99
-        long failCount = safeLong(livestockResourceScreenMapper.countAiRepliesFail(yearStart, yearEnd));
100
-        LivestockResourceReplyStatusVo replyStatus = LivestockResourceScreenSupport.buildReplyStatus(okCount, failCount);
101
-
102 64
         LivestockResourceDashboardVo vo = new LivestockResourceDashboardVo();
103 65
         vo.setStatYear(year);
104 66
         vo.setStatDate(HomeScreenSupport.formatStatDate(statDate));
@@ -125,20 +87,6 @@ public class LivestockResourceScreenServiceImpl implements ILivestockResourceScr
125 87
         vo.setAgriClassroom(HomeScreenSupport.buildAgriClassroom(videoCount, trainingPublishCount));
126 88
         vo.setTrainingTrend(HomeScreenSupport.buildTrainingTrendForStatYear(
127 89
                 homeScreenStatsMapper.selectTrainingTrendByTrainingYear(year), year));
128
-        vo.setActivityTrend(activityTrend);
129
-        vo.setUserStructure(userStructure);
130
-        vo.setCategoryShare(categoryShare);
131
-        vo.setModelCallAnalysis(LivestockResourceScreenSupport.buildModelCallAnalysis(categoryItems));
132
-        vo.setHourlyHeat(hourlyHeat);
133
-        vo.setSessionReplyDistribution(LivestockResourceScreenSupport.buildSessionReplyDistribution(
134
-                livestockResourceScreenMapper.selectSessionReplyBuckets(yearStart, yearEnd),
135
-                yearSessionTotal));
136
-        vo.setReplyStatusDistribution(replyStatus);
137
-        vo.setHotTopics(LivestockResourceScreenSupport.buildHotTopics(
138
-                categoryRows, LivestockResourceScreenRules.HOT_TOPIC_TOP));
139
-        vo.setTopKeywords(LivestockResourceScreenSupport.extractTopKeywords(
140
-                livestockResourceScreenMapper.selectTextAskerContents(yearStart, yearEnd),
141
-                LivestockResourceScreenRules.KEYWORD_TOP));
142 90
         return vo;
143 91
     }
144 92
 
@@ -204,9 +152,4 @@ public class LivestockResourceScreenServiceImpl implements ILivestockResourceScr
204 152
         return Date.from(localDate.atTime(23, 59, 59)
205 153
                 .atZone(ZoneId.of(BreedingIndustryRules.ZONE_SHANGHAI)).toInstant());
206 154
     }
207
-
208
-    private static Date toDateTime(LocalDateTime dateTime)
209
-    {
210
-        return Date.from(dateTime.atZone(ZoneId.of(BreedingIndustryRules.ZONE_SHANGHAI)).toInstant());
211
-    }
212 155
 }

+ 0 - 4
baqing-admin/src/test/java/com/ruoyi/web/modules/screen/controller/HomeScreenControllerApiTest.java

@@ -498,11 +498,7 @@ class HomeScreenControllerApiTest
498 498
         overview.setInventoryTotal(10);
499 499
         overview.setAnnualOutbound(2);
500 500
         overview.setPastureCount(1);
501
-        overview.setGrasslandCount(5);
502 501
         overview.setGrasslandAreaMu(new BigDecimal("100.00"));
503
-        overview.setSupplierCount(1);
504
-        overview.setDistributorCount(1);
505
-        overview.setTradeMarketCount(1);
506 502
         vo.setIndustryOverview(overview);
507 503
 
508 504
         vo.setAgeStructure(new ArrayList<>());

+ 1 - 41
baqing-admin/src/test/java/com/ruoyi/web/modules/screen/controller/LivestockResourceScreenControllerApiTest.java

@@ -7,7 +7,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
7 7
 
8 8
 import java.math.BigDecimal;
9 9
 import java.util.Arrays;
10
-import java.util.Collections;
11 10
 import java.util.HashSet;
12 11
 import java.util.Set;
13 12
 import org.junit.jupiter.api.AfterEach;
@@ -27,14 +26,8 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
27 26
 import com.ruoyi.common.constant.Constants;
28 27
 import com.ruoyi.common.core.domain.entity.SysUser;
29 28
 import com.ruoyi.common.core.domain.model.LoginUser;
30
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceActivityTrendVo;
31
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceCategoryShareVo;
32
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceDailyPointVo;
33 29
 import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceDashboardVo;
34
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceHourlyHeatVo;
35
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceHourlyPointVo;
36 30
 import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceOverviewVo;
37
-import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceUserStructureVo;
38 31
 import com.ruoyi.web.modules.screen.service.ILivestockResourceScreenService;
39 32
 
40 33
 /**
@@ -77,9 +70,7 @@ class LivestockResourceScreenControllerApiTest
77 70
                 .andExpect(jsonPath("$.data.statYear").value(2026))
78 71
                 .andExpect(jsonPath("$.data.overview.operatingFixedAssets").value(100.5))
79 72
                 .andExpect(jsonPath("$.data.overview.immunityRate").value(90.0))
80
-                .andExpect(jsonPath("$.data.overview.vetCount").value(15))
81
-                .andExpect(jsonPath("$.data.activityTrend.dailySeries.length()").value(7))
82
-                .andExpect(jsonPath("$.data.hourlyHeat.hourlySeries.length()").value(24));
73
+                .andExpect(jsonPath("$.data.overview.vetCount").value(15));
83 74
     }
84 75
 
85 76
     @Test
@@ -112,37 +103,6 @@ class LivestockResourceScreenControllerApiTest
112 103
         overview.setTechEnvoyCount(30);
113 104
         overview.setAgriUnitCount(40);
114 105
         vo.setOverview(overview);
115
-
116
-        LivestockResourceDailyPointVo day = new LivestockResourceDailyPointVo();
117
-        day.setDate("2026-05-20");
118
-        day.setSessionCount(3);
119
-        day.setQuestionCount(10);
120
-        LivestockResourceActivityTrendVo trend = new LivestockResourceActivityTrendVo();
121
-        trend.setDailySeries(Collections.nCopies(7, day));
122
-        vo.setActivityTrend(trend);
123
-
124
-        LivestockResourceUserStructureVo user = new LivestockResourceUserStructureVo();
125
-        user.setNewUserCount(3);
126
-        user.setOldUserCount(2);
127
-        vo.setUserStructure(user);
128
-
129
-        LivestockResourceCategoryShareVo share = new LivestockResourceCategoryShareVo();
130
-        share.setTotalAskerMessages(100);
131
-        share.setItems(Collections.emptyList());
132
-        vo.setCategoryShare(share);
133
-        vo.setModelCallAnalysis(Collections.emptyList());
134
-        vo.setHotTopics(Collections.emptyList());
135
-        vo.setTopKeywords(Collections.emptyList());
136
-        vo.setSessionReplyDistribution(Collections.emptyList());
137
-
138
-        LivestockResourceHourlyPointVo hour = new LivestockResourceHourlyPointVo();
139
-        hour.setBucketStart("14:00");
140
-        hour.setSessionCount(1);
141
-        hour.setQuestionCount(2);
142
-        LivestockResourceHourlyHeatVo heat = new LivestockResourceHourlyHeatVo();
143
-        heat.setWindowEnd("2026-05-20 15:30:00");
144
-        heat.setHourlySeries(Collections.nCopies(24, hour));
145
-        vo.setHourlyHeat(heat);
146 106
         return vo;
147 107
     }
148 108
 

+ 0 - 29
baqing-admin/src/test/java/com/ruoyi/web/modules/screen/service/impl/HomeScreenServiceImplTest.java

@@ -33,7 +33,6 @@ import com.ruoyi.web.modules.industryservice.mapper.BizLargeLivestockFarmerMappe
33 33
 import com.ruoyi.web.modules.industryservice.mapper.BizLivestockOwnershipHouseholdMapper;
34 34
 import com.ruoyi.web.modules.industryservice.mapper.BizYakHerdInventoryMapper;
35 35
 import com.ruoyi.web.modules.industryservice.mapper.BizYakOutboundReportMapper;
36
-import com.ruoyi.web.modules.industryservice.mapper.BreedingIndustryStatsMapper;
37 36
 import com.ruoyi.web.modules.screen.domain.dto.HomeScreenCoopBusinessModelSumDto;
38 37
 import com.ruoyi.web.modules.screen.domain.dto.HomeScreenDisposableIncomeYearDto;
39 38
 import com.ruoyi.web.modules.screen.domain.dto.HomeScreenEnterpriseFinanceSumDto;
@@ -68,9 +67,6 @@ import com.ruoyi.web.modules.industryservice.support.TownDeptSupport;
68 67
 class HomeScreenServiceImplTest
69 68
 {
70 69
 
71
-    @Mock
72
-    private BreedingIndustryStatsMapper breedingIndustryStatsMapper;
73
-
74 70
     @Mock
75 71
     private HomeScreenStatsMapper homeScreenStatsMapper;
76 72
 
@@ -107,27 +103,6 @@ class HomeScreenServiceImplTest
107 103
     @InjectMocks
108 104
     private HomeScreenServiceImpl service;
109 105
 
110
-    @Test
111
-    @DisplayName("DP-SY-UT-010 流通三项与年份无关")
112
-    void ut010_tradeCountsStable()
113
-    {
114
-        stubGrasslandAndReport();
115
-        stubOtherBlocks();
116
-        when(homeScreenStatsMapper.countSupplierForScreen()).thenReturn(3);
117
-        when(homeScreenStatsMapper.countDistributorForScreen()).thenReturn(2);
118
-        when(homeScreenStatsMapper.countTradeMarketForScreen()).thenReturn(1);
119
-
120
-        HomeScreenDashboardVo y2025 = service.loadDashboard("2025");
121
-        HomeScreenDashboardVo y2026 = service.loadDashboard("2026");
122
-
123
-        assertEquals(3, y2025.getIndustryOverview().getSupplierCount());
124
-        assertEquals(3, y2026.getIndustryOverview().getSupplierCount());
125
-        assertEquals(2, y2025.getIndustryOverview().getDistributorCount());
126
-        assertEquals(2, y2026.getIndustryOverview().getDistributorCount());
127
-        assertEquals(1, y2025.getIndustryOverview().getTradeMarketCount());
128
-        assertEquals(1, y2026.getIndustryOverview().getTradeMarketCount());
129
-    }
130
-
131 106
     @Test
132 107
     @DisplayName("DP-SY-API-001 看板结构完整")
133 108
     void dashboardStructure()
@@ -886,7 +861,6 @@ class HomeScreenServiceImplTest
886 861
 
887 862
     private void stubGrasslandAndReport()
888 863
     {
889
-        when(breedingIndustryStatsMapper.countGrassland()).thenReturn(5);
890 864
         lenient().when(homeScreenStatsMapper.selectLatestHerdInventoryStatPeriod()).thenReturn(null);
891 865
         lenient().when(homeScreenStatsMapper.selectLatestOutboundReportStatPeriod()).thenReturn(null);
892 866
         lenient().when(homeScreenStatsMapper.selectLatestHerdInventoryStatPeriodByYear(any(Integer.class))).thenReturn(null);
@@ -906,9 +880,6 @@ class HomeScreenServiceImplTest
906 880
 
907 881
     private void stubOtherBlocks()
908 882
     {
909
-        when(homeScreenStatsMapper.countSupplierForScreen()).thenReturn(0);
910
-        when(homeScreenStatsMapper.countDistributorForScreen()).thenReturn(0);
911
-        when(homeScreenStatsMapper.countTradeMarketForScreen()).thenReturn(0);
912 883
         when(homeScreenStatsMapper.selectDistinctOutboundYears()).thenReturn(Collections.emptyList());
913 884
         when(homeScreenStatsMapper.selectDistinctAppointmentYears()).thenReturn(Collections.emptyList());
914 885
         when(homeScreenStatsMapper.selectDistinctSubsidyYears()).thenReturn(Collections.emptyList());

+ 0 - 31
baqing-admin/src/test/java/com/ruoyi/web/modules/screen/service/impl/LivestockResourceScreenServiceImplTest.java

@@ -20,7 +20,6 @@ import com.ruoyi.web.modules.screen.domain.dto.HomeScreenStatPeriodDto;
20 20
 import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceProductOutputSumDto;
21 21
 import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceTechPersonnelDto;
22 22
 import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceThreeAssetsSumDto;
23
-import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceUserStructureDto;
24 23
 import com.ruoyi.web.modules.screen.domain.dto.LivestockResourceVaccinationSumDto;
25 24
 import com.ruoyi.web.modules.screen.domain.vo.LivestockResourceDashboardVo;
26 25
 import com.ruoyi.web.modules.screen.mapper.HomeScreenStatsMapper;
@@ -95,22 +94,6 @@ class LivestockResourceScreenServiceImplTest
95 94
         when(homeScreenStatsMapper.countTrainingsPublishedInYear(any(), any())).thenReturn(3);
96 95
         when(homeScreenStatsMapper.selectTrainingTrendByTrainingYear(anyInt()))
97 96
                 .thenReturn(Collections.emptyList());
98
-
99
-        when(livestockResourceScreenMapper.selectDailySessionCounts(any(), any())).thenReturn(Collections.emptyList());
100
-        when(livestockResourceScreenMapper.selectDailyAiReplyCounts(any(), any())).thenReturn(Collections.emptyList());
101
-        LivestockResourceUserStructureDto user = new LivestockResourceUserStructureDto();
102
-        user.setNewUserCount(1L);
103
-        user.setOldUserCount(1L);
104
-        when(livestockResourceScreenMapper.selectUserStructure()).thenReturn(user);
105
-        when(livestockResourceScreenMapper.countAskerMessagesInYear(any(), any())).thenReturn(0L);
106
-        when(livestockResourceScreenMapper.selectAskerCategoryCounts(any(), any())).thenReturn(Collections.emptyList());
107
-        when(livestockResourceScreenMapper.selectHourlySessionCounts(any(), any())).thenReturn(Collections.emptyList());
108
-        when(livestockResourceScreenMapper.selectHourlyAiReplyCounts(any(), any())).thenReturn(Collections.emptyList());
109
-        when(livestockResourceScreenMapper.countYearSessions(any(), any())).thenReturn(10L);
110
-        when(livestockResourceScreenMapper.selectSessionReplyBuckets(any(), any())).thenReturn(Collections.emptyList());
111
-        when(livestockResourceScreenMapper.countAiRepliesOk(any(), any())).thenReturn(15L);
112
-        when(livestockResourceScreenMapper.countAiRepliesFail(any(), any())).thenReturn(5L);
113
-        when(livestockResourceScreenMapper.selectTextAskerContents(any(), any())).thenReturn(Collections.emptyList());
114 97
         when(livestockResourceScreenMapper.selectDistinctSessionYears()).thenReturn(Arrays.asList(2026, 2025));
115 98
 
116 99
         int currentYear = java.time.LocalDate.now().getYear();
@@ -143,8 +126,6 @@ class LivestockResourceScreenServiceImplTest
143 126
         assertNotNull(vo.getAgriClassroom());
144 127
         assertEquals(2, vo.getAgriClassroom().getVideoCourseCount());
145 128
         assertNotNull(vo.getTrainingTrend());
146
-        assertEquals(7, vo.getActivityTrend().getDailySeries().size());
147
-        assertEquals(24, vo.getHourlyHeat().getHourlySeries().size());
148 129
     }
149 130
 
150 131
     @Test
@@ -167,18 +148,6 @@ class LivestockResourceScreenServiceImplTest
167 148
         when(homeScreenStatsMapper.countTrainingsPublishedInYear(any(), any())).thenReturn(0);
168 149
         when(homeScreenStatsMapper.selectTrainingTrendByTrainingYear(anyInt()))
169 150
                 .thenReturn(Collections.emptyList());
170
-        when(livestockResourceScreenMapper.selectDailySessionCounts(any(), any())).thenReturn(Collections.emptyList());
171
-        when(livestockResourceScreenMapper.selectDailyAiReplyCounts(any(), any())).thenReturn(Collections.emptyList());
172
-        when(livestockResourceScreenMapper.selectUserStructure()).thenReturn(new LivestockResourceUserStructureDto());
173
-        when(livestockResourceScreenMapper.countAskerMessagesInYear(any(), any())).thenReturn(0L);
174
-        when(livestockResourceScreenMapper.selectAskerCategoryCounts(any(), any())).thenReturn(Collections.emptyList());
175
-        when(livestockResourceScreenMapper.selectHourlySessionCounts(any(), any())).thenReturn(Collections.emptyList());
176
-        when(livestockResourceScreenMapper.selectHourlyAiReplyCounts(any(), any())).thenReturn(Collections.emptyList());
177
-        when(livestockResourceScreenMapper.countYearSessions(any(), any())).thenReturn(0L);
178
-        when(livestockResourceScreenMapper.selectSessionReplyBuckets(any(), any())).thenReturn(Collections.emptyList());
179
-        when(livestockResourceScreenMapper.countAiRepliesOk(any(), any())).thenReturn(0L);
180
-        when(livestockResourceScreenMapper.countAiRepliesFail(any(), any())).thenReturn(0L);
181
-        when(livestockResourceScreenMapper.selectTextAskerContents(any(), any())).thenReturn(Collections.emptyList());
182 151
         when(livestockResourceScreenMapper.selectDistinctSessionYears()).thenReturn(Collections.singletonList(2020));
183 152
 
184 153
         LivestockResourceDashboardVo vo = service.loadDashboard("2020");

+ 3 - 9
doc/大屏/畜牧资源/大屏畜牧资源技术方案.md

@@ -247,15 +247,8 @@ XML:`mapper/screen/LivestockResourceScreenMapper.xml`。
247 247
 | `agriUnitStructure` | object | 农业事业单位:员级/初级/中级/高级/管理级人数 |
248 248
 | `agriClassroom` | object | 农技课堂(自首页迁入) |
249 249
 | `trainingTrend` | object | 实战培训报名:所选年 1~库中最大月;`monthly[].statYear/month/activityCount/enrolledCount` |
250
-| `activityTrend` | object | 活跃度趋势 **§3.1.2** |
251
-| `userStructure` | object | 用户结构 **§3.1.3** |
252
-| `categoryShare` | object | 提问分类占比 **§3.1.4** |
253
-| `modelCallAnalysis` | array | 模型调用分析(与分类同源) **§3.1.5** |
254
-| `hourlyHeat` | object | 分时热度 **§3.1.6** |
255
-| `sessionReplyDistribution` | array | 会话提问数量分布 **§3.1.7** |
256
-| `replyStatusDistribution` | object | 会话状态分布 **§3.1.8** |
257
-| `hotTopics` | array | 热点问题榜单 Top5 **§3.1.9** |
258
-| `topKeywords` | array | 高频关键词 Top30 **§3.1.10** |
250
+
251
+> **已屏蔽(不再返回):** `activityTrend`、`userStructure`、`categoryShare`、`modelCallAnalysis`、`hourlyHeat`、`sessionReplyDistribution`、`replyStatusDistribution`、`hotTopics`、`topKeywords`。
259 252
 
260 253
 #### 3.1.1 `overview`
261 254
 
@@ -454,6 +447,7 @@ SQL 示例:`sql/big_screen_livestock_resource_perm.sql`(挂载「大屏」
454 447
 
455 448
 | 版本 | 日期 | 说明 |
456 449
 | --- | --- | --- |
450
+| 1.11 | 2026-07-24 | 看板屏蔽 AI 问诊九区块:活跃度/用户结构/分类/模型调用/分时/会话分布/状态/热门/关键词 |
457 451
 | 1.10 | 2026-07-24 | 线下服务预约三项汇总改为资源台账:兽医 004001、机构 004003、专家 004005 |
458 452
 | 1.9 | 2026-07-24 | 线下服务预约月度改为所选年 1~最大月 |
459 453
 | 1.8 | 2026-07-24 | 实战培训报名改为所选年 1~最大月;前端横轴仅月、悬停显年月 |

+ 5 - 4
doc/大屏/首页/大屏首页技术方案.md

@@ -245,7 +245,7 @@
245 245
 | `cooperativeBusinessModel` / `farmerHouseholdClassification` | array | 合作社模式 / 农牧户分类 |
246 246
 | `perCapitaIncomeTrend` | array | 人均收入近 5 年 |
247 247
 
248
-> **已屏蔽(不再返回):** `inventoryChange`(牦牛存栏变动)、`outboundMonthly`(牦牛出栏月度)、`grassland`(草场类型占比)、`subsidy`(惠农补贴发放);以及此前迁出的预约/农技课堂/培训。
248
+> **已屏蔽(不再返回):** `inventoryChange`(牦牛存栏变动)、`outboundMonthly`(牦牛出栏月度)、`grassland`(草场类型占比)、`subsidy`(惠农补贴发放);产业总览内 `supplierCount`/`distributorCount`/`tradeMarketCount`/`grasslandCount`;以及此前迁出的预约/农技课堂/培训。
249 249
 
250 250
 #### 3.1.1 `industryOverview`
251 251
 
@@ -258,11 +258,11 @@
258 258
 | `familyRanchCount` | 家庭牧场(个),所选年 **Y** 内 `biz_family_ranch` 最大填报月记录条数 |
259 259
 | `largeLivestockFarmerCount` | 养殖大户(个),所选年 **Y** 内 `biz_large_livestock_farmer` 最大填报月记录条数 |
260 260
 | `withLivestockHouseholdCount` | 有畜户数(户),所选年 **Y** 内 `biz_livestock_ownership_household` 最大填报月全县村级 `with_livestock_household_count` 合计 |
261
-| `grasslandCount` | 草场块数(台账快照,供草场类型区块) |
262 261
 | `grasslandAreaMu` | 草场面积(亩),所选年 **Y** 内 `biz_farmer_household` 最大填报月全县村级 `pasture_contract_area` 合计 |
263
-| `supplierCount` / `distributorCount` / `tradeMarketCount` | 流通三项**实时**快照(接口保留;首页卡片改展示合作社等) |
264 262
 
265
-#### 3.1.2 `inventoryChange`
263
+> **已屏蔽(不再返回):** `grasslandCount`、`supplierCount`、`distributorCount`、`tradeMarketCount`。
264
+
265
+#### 3.1.2 `inventoryChange`(已屏蔽)
266 266
 
267 267
 | 字段 | 说明 |
268 268
 | --- | --- |
@@ -665,6 +665,7 @@ SQL 示例:`sql/big_screen_home_perm.sql`(挂载「大屏」父菜单下)
665 665
 
666 666
 | 版本 | 日期 | 说明 |
667 667
 | --- | --- | --- |
668
+| 1.22 | 2026-07-24 | 产业总览屏蔽:`supplierCount`/`distributorCount`/`tradeMarketCount`/`grasslandCount` |
668 669
 | 1.21 | 2026-07-24 | 看板屏蔽:`subsidy`、`grassland`、`outboundMonthly`、`inventoryChange` |
669 670
 | 1.20 | 2026-07-24 | 人均收入 `perCapitaIncomeTrend`:以库中最大所属年为终点向前 5 年 |
670 671
 | 1.19 | 2026-07-24 | 出栏 `outboundMonthly`:按填报最大月 N 输出 1~N |