Browse Source

大屏首页

wwh 1 week ago
parent
commit
0a4210d1e3

+ 21 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/controller/HomeScreenController.java

@@ -19,6 +19,7 @@ import com.ruoyi.web.modules.screen.domain.vo.HomeScreenLivestockOwnershipHouseh
19 19
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenPerCapitaIncomeListItemVo;
20 20
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenStandardListItemVo;
21 21
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakHerdInventoryListItemVo;
22
+import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakInventoryOutboundListItemVo;
22 23
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakOutboundReportListItemVo;
23 24
 import com.ruoyi.web.modules.screen.service.IHomeScreenService;
24 25
 
@@ -227,4 +228,24 @@ public class HomeScreenController extends BaseController
227 228
                 homeScreenService.listLivestockOwnershipHouseholds(statYear, statMonth, townDeptId, villageDeptId);
228 229
         return getDataTable(list);
229 230
     }
231
+
232
+    /**
233
+     * 牦牛存出栏情况明细(分页);按年、月倒序。
234
+     * <p>按 {@code (stat_year, stat_month, village_dept_id)} 关联
235
+     * {@code biz_yak_herd_inventory} 与 {@code biz_yak_outbound_report};
236
+     * 返回年份、月份、乡镇、村、牦牛总存栏数、牦牛总出栏数。
237
+     * 所属年/月未传则不过滤,支持跨多年全量翻页。</p>
238
+     */
239
+    @GetMapping("/yakInventoryOutbounds")
240
+    public TableDataInfo yakInventoryOutbounds(
241
+            @RequestParam(value = "statYear", required = false) Integer statYear,
242
+            @RequestParam(value = "statMonth", required = false) Integer statMonth,
243
+            @RequestParam(value = "townDeptId", required = false) Long townDeptId,
244
+            @RequestParam(value = "villageDeptId", required = false) Long villageDeptId)
245
+    {
246
+        startPage();
247
+        List<HomeScreenYakInventoryOutboundListItemVo> list =
248
+                homeScreenService.listYakInventoryOutbounds(statYear, statMonth, townDeptId, villageDeptId);
249
+        return getDataTable(list);
250
+    }
230 251
 }

+ 11 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/mapper/HomeScreenStatsMapper.java

@@ -23,6 +23,7 @@ import com.ruoyi.web.modules.screen.domain.dto.HomeScreenStatPeriodDto;
23 23
 import com.ruoyi.web.modules.screen.domain.dto.HomeScreenSubsidyTypeSumDto;
24 24
 import com.ruoyi.web.modules.screen.domain.dto.HomeScreenTrainingMonthDto;
25 25
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapMarkerVo;
26
+import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakInventoryOutboundListItemVo;
26 27
 
27 28
 /**
28 29
  * 大屏首页聚合查询。
@@ -224,4 +225,14 @@ public interface HomeScreenStatsMapper
224 225
     /** 指定年份区间可支配收入(含起止年) */
225 226
     List<HomeScreenDisposableIncomeYearDto> selectDisposableIncomeByYearRange(
226 227
             @Param("startYear") int startYear, @Param("endYear") int endYear);
228
+
229
+    /**
230
+     * 牦牛存出栏情况明细:按 {@code (stat_year, stat_month, village_dept_id)} 关联存栏/出栏填报;
231
+     * 按年、月倒序。缺一侧时存栏或出栏计为 0。
232
+     */
233
+    List<HomeScreenYakInventoryOutboundListItemVo> selectYakInventoryOutboundList(
234
+            @Param("statYear") Integer statYear,
235
+            @Param("statMonth") Integer statMonth,
236
+            @Param("townDeptId") Long townDeptId,
237
+            @Param("villageDeptId") Long villageDeptId);
227 238
 }

+ 9 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/screen/service/IHomeScreenService.java

@@ -12,6 +12,7 @@ import com.ruoyi.web.modules.screen.domain.vo.HomeScreenPerCapitaIncomeListItemV
12 12
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenStandardListItemVo;
13 13
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapVo;
14 14
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakHerdInventoryListItemVo;
15
+import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakInventoryOutboundListItemVo;
15 16
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakOutboundReportListItemVo;
16 17
 
17 18
 /**
@@ -107,4 +108,12 @@ public interface IHomeScreenService
107 108
      */
108 109
     List<HomeScreenLivestockOwnershipHouseholdListItemVo> listLivestockOwnershipHouseholds(
109 110
             Integer statYear, Integer statMonth, Long townDeptId, Long villageDeptId);
111
+
112
+    /**
113
+     * 牦牛存出栏情况明细(分页;按年、月倒序)。
114
+     * 按 {@code (stat_year, stat_month, village_dept_id)} 关联存栏/出栏填报表。
115
+     * 年月未传不过滤,支持跨多年全量翻页。
116
+     */
117
+    List<HomeScreenYakInventoryOutboundListItemVo> listYakInventoryOutbounds(
118
+            Integer statYear, Integer statMonth, Long townDeptId, Long villageDeptId);
110 119
 }

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

@@ -48,6 +48,7 @@ import com.ruoyi.web.modules.screen.domain.vo.HomeScreenStandardListItemVo;
48 48
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapMarkerVo;
49 49
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapVo;
50 50
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakHerdInventoryListItemVo;
51
+import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakInventoryOutboundListItemVo;
51 52
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakOutboundReportListItemVo;
52 53
 import com.ruoyi.web.modules.screen.mapper.HomeScreenStandardMapper;
53 54
 import com.ruoyi.web.modules.screen.mapper.HomeScreenStatsMapper;
@@ -533,6 +534,15 @@ public class HomeScreenServiceImpl implements IHomeScreenService
533 534
         return HomeScreenSupport.buildLivestockOwnershipHouseholdListItems(rows);
534 535
     }
535 536
 
537
+    @Override
538
+    public List<HomeScreenYakInventoryOutboundListItemVo> listYakInventoryOutbounds(
539
+            Integer statYear, Integer statMonth, Long townDeptId, Long villageDeptId)
540
+    {
541
+        // 年月不默认:未传则跨年全量翻页;传入则按条件过滤
542
+        return homeScreenStatsMapper.selectYakInventoryOutboundList(
543
+                statYear, statMonth, townDeptId, villageDeptId);
544
+    }
545
+
536 546
     private static Date toDate(LocalDate localDate)
537 547
     {
538 548
         return Date.from(localDate.atStartOfDay(ZoneId.of(BreedingIndustryRules.ZONE_SHANGHAI)).toInstant());

+ 80 - 0
baqing-admin/src/main/resources/mapper/screen/HomeScreenStatsMapper.xml

@@ -549,4 +549,84 @@
549 549
           and stat_year &lt;= #{endYear}
550 550
         order by stat_year
551 551
     </select>
552
+
553
+    <!-- 牦牛存出栏情况明细:唯一键关联;支持跨年全量翻页(年月可选不过滤) -->
554
+    <sql id="yakInventoryOutboundHerdFilter">
555
+        <if test="statYear != null">
556
+            and h.stat_year = #{statYear}
557
+        </if>
558
+        <if test="statMonth != null">
559
+            and h.stat_month = #{statMonth}
560
+        </if>
561
+        <if test="townDeptId != null">
562
+            and h.town_dept_id = #{townDeptId}
563
+        </if>
564
+        <if test="villageDeptId != null">
565
+            and h.village_dept_id = #{villageDeptId}
566
+        </if>
567
+    </sql>
568
+
569
+    <!--
570
+      以存栏为主表 LEFT JOIN 出栏,再用 UNION ALL 补「仅出栏」行;
571
+      去掉 DISTINCT/UNION 去重与 sys_dept 排序,ORDER BY 对齐 uk(stat_year,stat_month,village_dept_id) 便于索引序扫描。
572
+    -->
573
+    <select id="selectYakInventoryOutboundList"
574
+            resultType="com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakInventoryOutboundListItemVo">
575
+        select t.stat_year as statYear,
576
+               t.stat_month as statMonth,
577
+               t.town_dept_id as townDeptId,
578
+               t.town_name as townName,
579
+               t.village_dept_id as villageDeptId,
580
+               t.village_name as villageName,
581
+               t.yak_total as yakTotal,
582
+               t.yak_outbound_count as yakOutboundCount
583
+        from (
584
+            select h.stat_year,
585
+                   h.stat_month,
586
+                   h.town_dept_id,
587
+                   h.town_name,
588
+                   h.village_dept_id,
589
+                   h.village_name,
590
+                   h.yak_total,
591
+                   coalesce(o.yak_outbound_count, 0) as yak_outbound_count
592
+            from biz_yak_herd_inventory h
593
+            left join biz_yak_outbound_report o
594
+                on o.stat_year = h.stat_year
595
+               and o.stat_month = h.stat_month
596
+               and o.village_dept_id = h.village_dept_id
597
+            <where>
598
+                <include refid="yakInventoryOutboundHerdFilter"/>
599
+            </where>
600
+            union all
601
+            select o.stat_year,
602
+                   o.stat_month,
603
+                   o.town_dept_id,
604
+                   o.town_name,
605
+                   o.village_dept_id,
606
+                   o.village_name,
607
+                   0 as yak_total,
608
+                   o.yak_outbound_count
609
+            from biz_yak_outbound_report o
610
+            where not exists (
611
+                select 1
612
+                from biz_yak_herd_inventory h
613
+                where h.stat_year = o.stat_year
614
+                  and h.stat_month = o.stat_month
615
+                  and h.village_dept_id = o.village_dept_id
616
+            )
617
+            <if test="statYear != null">
618
+                and o.stat_year = #{statYear}
619
+            </if>
620
+            <if test="statMonth != null">
621
+                and o.stat_month = #{statMonth}
622
+            </if>
623
+            <if test="townDeptId != null">
624
+                and o.town_dept_id = #{townDeptId}
625
+            </if>
626
+            <if test="villageDeptId != null">
627
+                and o.village_dept_id = #{villageDeptId}
628
+            </if>
629
+        ) t
630
+        order by t.stat_year desc, t.stat_month desc, t.town_dept_id asc, t.village_dept_id asc
631
+    </select>
552 632
 </mapper>

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

@@ -45,6 +45,7 @@ import com.ruoyi.web.modules.screen.domain.vo.HomeScreenLargeLivestockFarmerList
45 45
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenLivestockOwnershipHouseholdListItemVo;
46 46
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenPerCapitaIncomeListItemVo;
47 47
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakHerdInventoryListItemVo;
48
+import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakInventoryOutboundListItemVo;
48 49
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakOutboundReportListItemVo;
49 50
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenSubsidyVo;
50 51
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenTrainingTrendVo;
@@ -381,6 +382,33 @@ class HomeScreenControllerApiTest
381 382
                 .andExpect(jsonPath("$.rows[0].withoutLivestockHouseholdCount").value(5));
382 383
     }
383 384
 
385
+    @Test
386
+    @DisplayName("DP-SY-API-048 GET yakInventoryOutbounds 牦牛存出栏情况明细")
387
+    void api048_yakInventoryOutbounds() throws Exception
388
+    {
389
+        HomeScreenYakInventoryOutboundListItemVo item = new HomeScreenYakInventoryOutboundListItemVo();
390
+        item.setStatYear(2026);
391
+        item.setStatMonth(6);
392
+        item.setTownName("巴青镇");
393
+        item.setVillageName("某村");
394
+        item.setYakTotal(1200);
395
+        item.setYakOutboundCount(80);
396
+        when(homeScreenService.listYakInventoryOutbounds(eq(2026), eq(6), eq(101L), eq(201L)))
397
+                .thenReturn(Collections.singletonList(item));
398
+        mockMvc.perform(get("/bigScreen/home/yakInventoryOutbounds")
399
+                        .param("statYear", "2026")
400
+                        .param("statMonth", "6")
401
+                        .param("townDeptId", "101")
402
+                        .param("villageDeptId", "201")
403
+                        .param("pageNum", "1")
404
+                        .param("pageSize", "10"))
405
+                .andExpect(status().isOk())
406
+                .andExpect(jsonPath("$.code").value(200))
407
+                .andExpect(jsonPath("$.rows[0].yakTotal").value(1200))
408
+                .andExpect(jsonPath("$.rows[0].yakOutboundCount").value(80))
409
+                .andExpect(jsonPath("$.rows[0].townName").value("巴青镇"));
410
+    }
411
+
384 412
     private static com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapVo sampleTownMap()
385 413
     {
386 414
         com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapMarkerVo marker =

+ 1 - 0
baqing-admin/src/test/java/com/ruoyi/web/modules/screen/mapper/HomeScreenStatsMapperXmlTest.java

@@ -64,6 +64,7 @@ class HomeScreenStatsMapperXmlTest
64 64
         assertTrue(xml.contains("selectOutboundReportYakCountByYearMonthRange"));
65 65
         assertTrue(xml.contains("selectOutboundReportYakCountByMonth"));
66 66
         assertTrue(xml.contains("selectTownMapMarkers"));
67
+        assertTrue(xml.contains("selectYakInventoryOutboundList"));
67 68
         assertTrue(xml.contains("herdStatMonth"));
68 69
         assertTrue(xml.contains("outboundStatMonth"));
69 70
         assertTrue(xml.contains("status not in (2, 3)"));

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

@@ -52,6 +52,7 @@ import com.ruoyi.web.modules.screen.domain.vo.HomeScreenLargeLivestockFarmerList
52 52
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenLivestockOwnershipHouseholdListItemVo;
53 53
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenPerCapitaIncomeListItemVo;
54 54
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakHerdInventoryListItemVo;
55
+import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakInventoryOutboundListItemVo;
55 56
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenYakOutboundReportListItemVo;
56 57
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapMarkerVo;
57 58
 import com.ruoyi.web.modules.screen.domain.vo.HomeScreenTownMapVo;
@@ -531,6 +532,36 @@ class HomeScreenServiceImplTest
531 532
         assertEquals(0, service.listLivestockOwnershipHouseholds(null, null, null, null).size());
532 533
     }
533 534
 
535
+    @Test
536
+    @DisplayName("DP-SY-UT-039 牦牛存出栏情况明细按条件过滤并返回存栏出栏")
537
+    void ut039_yakInventoryOutbounds()
538
+    {
539
+        HomeScreenYakInventoryOutboundListItemVo row = new HomeScreenYakInventoryOutboundListItemVo();
540
+        row.setStatYear(2026);
541
+        row.setStatMonth(6);
542
+        row.setTownName("巴青镇");
543
+        row.setVillageName("某村");
544
+        row.setYakTotal(1200);
545
+        row.setYakOutboundCount(80);
546
+        when(homeScreenStatsMapper.selectYakInventoryOutboundList(eq(2026), eq(6), eq(101L), eq(201L)))
547
+                .thenReturn(Collections.singletonList(row));
548
+        List<HomeScreenYakInventoryOutboundListItemVo> list =
549
+                service.listYakInventoryOutbounds(2026, 6, 101L, 201L);
550
+        assertEquals(1, list.size());
551
+        assertEquals(1200, list.get(0).getYakTotal().intValue());
552
+        assertEquals(80, list.get(0).getYakOutboundCount().intValue());
553
+    }
554
+
555
+    @Test
556
+    @DisplayName("DP-SY-UT-039b 牦牛存出栏情况明细未传年月不过滤(跨年全量)")
557
+    void ut039b_yakInventoryOutboundsNoDefaultYearMonth()
558
+    {
559
+        when(homeScreenStatsMapper.selectYakInventoryOutboundList(
560
+                eq(null), eq(null), eq(null), eq(null)))
561
+                .thenReturn(Collections.emptyList());
562
+        assertEquals(0, service.listYakInventoryOutbounds(null, null, null, null).size());
563
+    }
564
+
534 565
     @Test
535 566
     @DisplayName("DP-SY-UT-027 产业总览存栏出栏取所选年最大填报月")
536 567
     void ut027_overviewFromReportTables()

+ 3 - 0
doc/大屏/首页/大屏首页功能需求.md

@@ -98,6 +98,7 @@
98 98
 | **牦牛出栏数据明细** | 独立接口分页查询 `biz_yak_outbound_report`(牲畜出栏/自食情况明细);条件同农牧户明细;按**年、月倒序**;返回全部业务列表字段 |
99 99
 | **牦牛存栏数据明细** | 独立接口分页查询 `biz_yak_herd_inventory`(畜群存栏/牦牛存栏结构明细);条件同农牧户明细;按**年、月倒序**;返回全部业务列表字段 |
100 100
 | **有无畜户数据明细** | 独立接口分页查询 `biz_livestock_ownership_household`;条件同农牧户明细;按**年、月倒序**;返回全部业务列表字段 |
101
+| **牦牛存出栏情况明细** | 独立接口分页;按 `(stat_year, stat_month, village_dept_id)` 关联 `biz_yak_herd_inventory` 与 `biz_yak_outbound_report`;年/月/乡镇/村均可选(**未传年月不过滤,支持跨多年全量翻页**);按**年、月倒序**;返回年、月、乡镇、村、牦牛总存栏数、牦牛总出栏数 |
101 102
 | **草畜失衡预警明细** | 独立接口分页查询 `biz_grass_livestock_imbalance_warning`;条件:年/月/乡镇/村;按**预警时间倒序**;返回年、月、乡镇、村、主体名称、主体类型、核定载畜量、年底存栏、是否草畜平衡 |
102 103
 | **出栏统计** | 所选年 **Y** 的 1~12 月;各月全县村级 `yak_outbound_count` 合计;纯柱状图无趋势线;接口字段 **`outboundMonthly`** |
103 104
 | **地图标注** | 所选年 **Y** 内存栏/出栏表各自**最大填报月**,按乡镇汇总各村 `yak_total` / `yak_outbound_count`;**随 Y 切换** |
@@ -499,6 +500,8 @@ flowchart TB
499 500
 
500 501
 | 版本 | 日期 | 说明 |
501 502
 | --- | --- | --- |
503
+| 1.14 | 2026-07-23 | 牦牛存出栏明细:年月未传不过滤(跨年全量翻页);SQL 改为存栏主表+UNION ALL 补仅出栏 |
504
+| 1.13 | 2026-07-23 | 新增牦牛存出栏情况明细分页接口(关联存栏/出栏填报表) |
502 505
 | 1.12 | 2026-07-23 | 明确草场面积数据明细复用农牧户明细接口,不另开接口 |
503 506
 | 1.11 | 2026-07-23 | 新增牦牛出栏/存栏、有无畜户明细分页接口 |
504 507
 | 1.10 | 2026-07-23 | 新增合作社/家庭牧场/养殖大户明细分页接口 |

+ 31 - 0
doc/大屏/首页/大屏首页技术方案.md

@@ -210,6 +210,7 @@
210 210
 | 3.10 | 牦牛出栏数据明细 | GET | `/bigScreen/home/yakOutboundReports` | 同上 |
211 211
 | 3.11 | 牦牛存栏数据明细 | GET | `/bigScreen/home/yakHerdInventories` | 同上 |
212 212
 | 3.12 | 有无畜户数据明细 | GET | `/bigScreen/home/livestockOwnershipHouseholds` | 同上 |
213
+| 3.13 | 牦牛存出栏情况明细 | GET | `/bigScreen/home/yakInventoryOutbounds` | 同上 |
213 214
 
214 215
 前端:切换 `statYear` → **3.1** + **3.2**(`pageNum=1`)+ **3.3**;仅翻页 / 切 Tab → **3.2**;进入首页 → **3.1** + **3.2** + **3.3**。
215 216
 
@@ -550,6 +551,34 @@
550 551
 
551 552
 查询条件与 3.7~3.9 相同:年/月默认当前年月,乡镇/村可选;按年、月倒序;全县口径清空 dataScope。
552 553
 
554
+### 3.13 牦牛存出栏情况明细
555
+
556
+#### Query
557
+
558
+| 参数 | 类型 | 必填 | 说明 |
559
+| --- | --- | --- | --- |
560
+| `statYear` | int | N | 所属年份;**未传不过滤(支持跨多年全量翻页)** |
561
+| `statMonth` | int | N | 所属月份;**未传不过滤** |
562
+| `townDeptId` | long | N | 所属乡镇 |
563
+| `villageDeptId` | long | N | 所属村 |
564
+| `pageNum` / `pageSize` | int | N | 分页(PageHelper) |
565
+
566
+关联:`biz_yak_herd_inventory` 为主表 `LEFT JOIN` `biz_yak_outbound_report`(唯一键 `(stat_year, stat_month, village_dept_id)`),`UNION ALL` 补仅出栏侧有数据的行;缺一侧时对应计数为 0。
567
+
568
+排序:`stat_year DESC, stat_month DESC, town_dept_id ASC, village_dept_id ASC`(对齐唯一键,利于索引序)。
569
+
570
+性能说明:条件下推至基表;关联走 `uk_year_month_village`;跨年全量时仍建议控制 `pageSize`,超深 offset 会随页码增大变慢。
571
+
572
+#### 响应 `rows[]`
573
+
574
+| 字段 | 说明 |
575
+| --- | --- |
576
+| `statYear` / `statMonth` | 年份、月份 |
577
+| `townDeptId` / `townName` | 乡镇 |
578
+| `villageDeptId` / `villageName` | 村 |
579
+| `yakTotal` | 牦牛总存栏数(头) |
580
+| `yakOutboundCount` | 牦牛总出栏数(头) |
581
+
553 582
 ---
554 583
 
555 584
 ## 4. 前端实现要点
@@ -593,6 +622,8 @@ SQL 示例:`sql/big_screen_home_perm.sql`(挂载「大屏」父菜单下)
593 622
 
594 623
 | 版本 | 日期 | 说明 |
595 624
 | --- | --- | --- |
625
+| 1.15 | 2026-07-23 | `/yakInventoryOutbounds`:年月未传不过滤;SQL 改为存栏主表 LEFT JOIN + UNION ALL 补仅出栏 |
626
+| 1.14 | 2026-07-23 | 新增牦牛存出栏情况明细分页接口 `/yakInventoryOutbounds` |
596 627
 | 1.13 | 2026-07-23 | 明确草场面积数据明细复用 `/farmerHouseholds`,不另开接口 |
597 628
 | 1.12 | 2026-07-23 | 新增牦牛出栏/存栏、有无畜户明细分页接口 |
598 629
 | 1.11 | 2026-07-23 | 新增合作社/家庭牧场/养殖大户明细分页接口 |

+ 4 - 0
doc/大屏/首页/大屏首页测试用例.md

@@ -91,6 +91,7 @@
91 91
 | DP-SY-UT-036 | 牦牛出栏明细 | 条件过滤与默认年月 | 单元测试 | JUnit5 | §2.5 | Mock `biz_yak_outbound_report` | `listYakOutboundReports(...)` | 字段完整;未传年月默认当前年月 |
92 92
 | DP-SY-UT-037 | 牦牛存栏明细 | 条件过滤与默认年月 | 单元测试 | JUnit5 | §2.5 | Mock `biz_yak_herd_inventory` | `listYakHerdInventories(...)` | 字段完整;未传年月默认当前年月 |
93 93
 | DP-SY-UT-038 | 有无畜户明细 | 条件过滤与默认年月 | 单元测试 | JUnit5 | §2.5 | Mock `biz_livestock_ownership_household` | `listLivestockOwnershipHouseholds(...)` | 字段完整;未传年月默认当前年月 |
94
+| DP-SY-UT-039 | 存出栏情况明细 | 关联与跨年全量 | 单元测试 | JUnit5 | §2.5 | Mock `selectYakInventoryOutboundList` | `listYakInventoryOutbounds(...)` | 返回存栏/出栏;未传年月不过滤(传 null) |
94 95
 
95 96
 ---
96 97
 
@@ -144,6 +145,7 @@
144 145
 | DP-SY-API-045 | 牦牛出栏明细 | 分页与字段 | 接口测试 | Postman/curl | §2.5 | 填报表有样本 | `GET .../yakOutboundReports?statYear=2026&statMonth=7` | `code` 成功;含出栏/自食等业务字段 |
145 146
 | DP-SY-API-046 | 牦牛存栏明细 | 分页与字段 | 接口测试 | Postman/curl | §2.5 | 填报表有样本 | `GET .../yakHerdInventories?statYear=2026&statMonth=8` | `code` 成功;含 `yakTotal` 等业务字段 |
146 147
 | DP-SY-API-047 | 有无畜户明细 | 分页与字段 | 接口测试 | Postman/curl | §2.5 | 填报表有样本 | `GET .../livestockOwnershipHouseholds?statYear=2026&statMonth=9` | `code` 成功;含有畜/无畜户数字段 |
148
+| DP-SY-API-048 | 存出栏情况明细 | 分页与关联字段 | 接口测试 | Postman/curl | §2.5 | 存栏/出栏有样本 | `GET .../yakInventoryOutbounds?statYear=2026&statMonth=6` | `code` 成功;`rows[]` 含年/月/乡镇/村/`yakTotal`/`yakOutboundCount`;按时间倒序 |
147 149
 
148 150
 ---
149 151
 
@@ -260,6 +262,8 @@ await page.route('**/bigScreen/home/dashboard**', route =>
260 262
 
261 263
 | 版本 | 说明 |
262 264
 | --- | --- |
265
+| 1.5 | 存出栏明细:年月未传不过滤,支持跨年全量翻页(UT-039) |
266
+| 1.4 | 新增牦牛存出栏情况明细接口(UT-039、API-048) |
263 267
 | 1.3 | 明确草场面积明细复用农牧户明细接口(API-041) |
264 268
 | 1.2 | 年龄结构改为两档;用例 UT-008~009、API-006、UI-007 同步 |
265 269
 | 1.1 | 对齐 v1.1 需求/技术方案:滚动 12 月、`statYear`+`month`、填报表样本、UI 横轴/Tooltip、四档年龄、地图最近填报年月 |