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

+ 30 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/research/controller/ResearchOpenApiController.java

@@ -1,7 +1,9 @@
1 1
 package com.ruoyi.web.modules.industryservice.research.controller;
2 2
 
3
+import java.util.Date;
3 4
 import javax.validation.Valid;
4 5
 import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.format.annotation.DateTimeFormat;
5 7
 import org.springframework.web.bind.annotation.GetMapping;
6 8
 import org.springframework.web.bind.annotation.PostMapping;
7 9
 import org.springframework.web.bind.annotation.RequestBody;
@@ -24,6 +26,7 @@ import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestoc
24 26
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
25 27
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
26 28
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchRuralThreeAssetsVo;
29
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchThreeAssetsProblemReportVo;
27 30
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchVaccinationDataVo;
28 31
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
29 32
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -392,4 +395,31 @@ public class ResearchOpenApiController
392 395
             return ResearchOpenApiSupport.error(code, ex.getMessage());
393 396
         }
394 397
     }
398
+
399
+    /**
400
+     * 三资具体问题上报列表。
401
+     */
402
+    @GetMapping("/three-assets-problem-reports")
403
+    public OpenApiResponse<OpenApiPageResult<ResearchThreeAssetsProblemReportVo>> listThreeAssetsProblemReports(
404
+            @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
405
+            @RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
406
+            @RequestParam(value = "townName", required = false) String townName,
407
+            @RequestParam(value = "villageName", required = false) String villageName,
408
+            @RequestParam(value = "problemType", required = false) String problemType,
409
+            @RequestParam(value = "beginReportTime", required = false)
410
+            @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginReportTime,
411
+            @RequestParam(value = "endReportTime", required = false)
412
+            @DateTimeFormat(pattern = "yyyy-MM-dd") Date endReportTime)
413
+    {
414
+        try
415
+        {
416
+            return ResearchOpenApiSupport.success(researchOpenApiService.listThreeAssetsProblemReports(
417
+                    pageNum, pageSize, townName, villageName, problemType, beginReportTime, endReportTime));
418
+        }
419
+        catch (ServiceException ex)
420
+        {
421
+            int code = ex.getCode() != null ? ex.getCode() : 500;
422
+            return ResearchOpenApiSupport.error(code, ex.getMessage());
423
+        }
424
+    }
395 425
 }

+ 115 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/research/domain/vo/ResearchThreeAssetsProblemReportVo.java

@@ -0,0 +1,115 @@
1
+package com.ruoyi.web.modules.industryservice.research.domain.vo;
2
+
3
+import java.util.Date;
4
+import com.fasterxml.jackson.annotation.JsonFormat;
5
+
6
+/**
7
+ * 科研开放接口 — 三资具体问题上报(不含部门 ID / 备注)。
8
+ */
9
+public class ResearchThreeAssetsProblemReportVo
10
+{
11
+    /** 问题上报记录 ID */
12
+    private Long problemId;
13
+
14
+    /** 上报时间 */
15
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
16
+    private Date reportTime;
17
+
18
+    /** 所属乡镇名称 */
19
+    private String townName;
20
+
21
+    /** 所属村名称 */
22
+    private String villageName;
23
+
24
+    /** 问题类型(fund/asset/resource/other) */
25
+    private String problemType;
26
+
27
+    /** 问题等级(general/key/major) */
28
+    private String problemLevel;
29
+
30
+    /** 问题详情 */
31
+    private String problemDetail;
32
+
33
+    /** 处理结果 */
34
+    private String handleResult;
35
+
36
+    public Long getProblemId()
37
+    {
38
+        return problemId;
39
+    }
40
+
41
+    public void setProblemId(Long problemId)
42
+    {
43
+        this.problemId = problemId;
44
+    }
45
+
46
+    public Date getReportTime()
47
+    {
48
+        return reportTime;
49
+    }
50
+
51
+    public void setReportTime(Date reportTime)
52
+    {
53
+        this.reportTime = reportTime;
54
+    }
55
+
56
+    public String getTownName()
57
+    {
58
+        return townName;
59
+    }
60
+
61
+    public void setTownName(String townName)
62
+    {
63
+        this.townName = townName;
64
+    }
65
+
66
+    public String getVillageName()
67
+    {
68
+        return villageName;
69
+    }
70
+
71
+    public void setVillageName(String villageName)
72
+    {
73
+        this.villageName = villageName;
74
+    }
75
+
76
+    public String getProblemType()
77
+    {
78
+        return problemType;
79
+    }
80
+
81
+    public void setProblemType(String problemType)
82
+    {
83
+        this.problemType = problemType;
84
+    }
85
+
86
+    public String getProblemLevel()
87
+    {
88
+        return problemLevel;
89
+    }
90
+
91
+    public void setProblemLevel(String problemLevel)
92
+    {
93
+        this.problemLevel = problemLevel;
94
+    }
95
+
96
+    public String getProblemDetail()
97
+    {
98
+        return problemDetail;
99
+    }
100
+
101
+    public void setProblemDetail(String problemDetail)
102
+    {
103
+        this.problemDetail = problemDetail;
104
+    }
105
+
106
+    public String getHandleResult()
107
+    {
108
+        return handleResult;
109
+    }
110
+
111
+    public void setHandleResult(String handleResult)
112
+    {
113
+        this.handleResult = handleResult;
114
+    }
115
+}

+ 15 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/research/service/IResearchOpenApiService.java

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.web.modules.industryservice.research.service;
2 2
 
3
+import java.util.Date;
3 4
 import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiPageResult;
4 5
 import com.ruoyi.web.modules.industryservice.research.domain.dto.ResearchTokenVo;
5 6
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCooperativeDevelopmentVo;
@@ -12,6 +13,7 @@ import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestoc
12 13
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
13 14
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
14 15
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchRuralThreeAssetsVo;
16
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchThreeAssetsProblemReportVo;
15 17
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchVaccinationDataVo;
16 18
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
17 19
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -138,4 +140,17 @@ public interface IResearchOpenApiService
138 140
      */
139 141
     OpenApiPageResult<ResearchRuralThreeAssetsVo> listRuralThreeAssets(int pageNum, int pageSize,
140 142
             String townName, String villageName);
143
+
144
+    /**
145
+     * 三资具体问题上报列表。
146
+     *
147
+     * @param townName 所属乡镇名称模糊匹配
148
+     * @param villageName 所属村名称模糊匹配
149
+     * @param problemType 问题类型精确匹配
150
+     * @param beginReportTime 上报开始日期(与结束日期同时有值时生效)
151
+     * @param endReportTime 上报结束日期(与开始日期同时有值时生效)
152
+     */
153
+    OpenApiPageResult<ResearchThreeAssetsProblemReportVo> listThreeAssetsProblemReports(int pageNum, int pageSize,
154
+            String townName, String villageName, String problemType,
155
+            Date beginReportTime, Date endReportTime);
141 156
 }

+ 44 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/research/service/impl/ResearchOpenApiServiceImpl.java

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.web.modules.industryservice.research.service.impl;
2 2
 
3
+import java.util.Date;
3 4
 import java.util.List;
4 5
 import java.util.stream.Collectors;
5 6
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +18,7 @@ import com.ruoyi.web.modules.industryservice.domain.BizLivestockOwnershipHouseho
17 18
 import com.ruoyi.web.modules.industryservice.domain.BizLivestockProductOutput;
18 19
 import com.ruoyi.web.modules.industryservice.domain.BizPasture;
19 20
 import com.ruoyi.web.modules.industryservice.domain.BizRuralThreeAssets;
21
+import com.ruoyi.web.modules.industryservice.domain.BizThreeAssetsProblemReport;
20 22
 import com.ruoyi.web.modules.industryservice.domain.BizVaccinationData;
21 23
 import com.ruoyi.web.modules.industryservice.domain.BizYakAsset;
22 24
 import com.ruoyi.web.modules.industryservice.domain.BizYakHerdInventory;
@@ -30,6 +32,7 @@ import com.ruoyi.web.modules.industryservice.mapper.BizLargeLivestockFarmerMappe
30 32
 import com.ruoyi.web.modules.industryservice.mapper.BizLivestockOwnershipHouseholdMapper;
31 33
 import com.ruoyi.web.modules.industryservice.mapper.BizLivestockProductOutputMapper;
32 34
 import com.ruoyi.web.modules.industryservice.mapper.BizRuralThreeAssetsMapper;
35
+import com.ruoyi.web.modules.industryservice.mapper.BizThreeAssetsProblemReportMapper;
33 36
 import com.ruoyi.web.modules.industryservice.mapper.BizVaccinationDataMapper;
34 37
 import com.ruoyi.web.modules.industryservice.mapper.BizYakHerdInventoryMapper;
35 38
 import com.ruoyi.web.modules.industryservice.mapper.BizYakOutboundReportMapper;
@@ -45,6 +48,7 @@ import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestoc
45 48
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
46 49
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
47 50
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchRuralThreeAssetsVo;
51
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchThreeAssetsProblemReportVo;
48 52
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchVaccinationDataVo;
49 53
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
50 54
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -108,6 +112,9 @@ public class ResearchOpenApiServiceImpl implements IResearchOpenApiService
108 112
     @Autowired
109 113
     private BizRuralThreeAssetsMapper bizRuralThreeAssetsMapper;
110 114
 
115
+    @Autowired
116
+    private BizThreeAssetsProblemReportMapper bizThreeAssetsProblemReportMapper;
117
+
111 118
     @Override
112 119
     public ResearchTokenVo authenticate(String appKey, String appSecret)
113 120
     {
@@ -468,6 +475,43 @@ public class ResearchOpenApiServiceImpl implements IResearchOpenApiService
468 475
                 rows.stream().map(ResearchOpenApiSupport::toRuralThreeAssetsVo).collect(Collectors.toList()));
469 476
     }
470 477
 
478
+    @Override
479
+    public OpenApiPageResult<ResearchThreeAssetsProblemReportVo> listThreeAssetsProblemReports(int pageNum,
480
+            int pageSize, String townName, String villageName, String problemType,
481
+            Date beginReportTime, Date endReportTime)
482
+    {
483
+        tokenService.assertEnabled();
484
+        int safePageNum = normalizePageNum(pageNum);
485
+        int safePageSize = normalizePageSize(pageSize);
486
+        BizThreeAssetsProblemReport query = new BizThreeAssetsProblemReport();
487
+        if (StringUtils.isNotEmpty(townName))
488
+        {
489
+            query.setTownName(townName.trim());
490
+        }
491
+        if (StringUtils.isNotEmpty(villageName))
492
+        {
493
+            query.setVillageName(villageName.trim());
494
+        }
495
+        if (StringUtils.isNotEmpty(problemType))
496
+        {
497
+            query.setProblemType(problemType.trim());
498
+        }
499
+        // 上报时间区间:开始、结束日期同时有值时才生效
500
+        if (beginReportTime != null && endReportTime != null)
501
+        {
502
+            query.setBeginReportTime(beginReportTime);
503
+            query.setEndReportTime(endReportTime);
504
+        }
505
+        // 开放接口无登录上下文,清空 dataScope,避免走填报部门权限
506
+        query.getParams().put("dataScope", "");
507
+        PageHelper.startPage(safePageNum, safePageSize);
508
+        List<BizThreeAssetsProblemReport> rows =
509
+                bizThreeAssetsProblemReportMapper.selectBizThreeAssetsProblemReportList(query);
510
+        PageInfo<BizThreeAssetsProblemReport> page = new PageInfo<>(rows);
511
+        return toPageResult(safePageNum, safePageSize, page.getTotal(),
512
+                rows.stream().map(ResearchOpenApiSupport::toThreeAssetsProblemReportVo).collect(Collectors.toList()));
513
+    }
514
+
471 515
     private int normalizePageNum(int pageNum)
472 516
     {
473 517
         return pageNum > 0 ? pageNum : 1;

+ 20 - 0
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/research/support/ResearchOpenApiSupport.java

@@ -11,6 +11,7 @@ import com.ruoyi.web.modules.industryservice.domain.BizLivestockOwnershipHouseho
11 11
 import com.ruoyi.web.modules.industryservice.domain.BizLivestockProductOutput;
12 12
 import com.ruoyi.web.modules.industryservice.domain.BizPasture;
13 13
 import com.ruoyi.web.modules.industryservice.domain.BizRuralThreeAssets;
14
+import com.ruoyi.web.modules.industryservice.domain.BizThreeAssetsProblemReport;
14 15
 import com.ruoyi.web.modules.industryservice.domain.BizVaccinationData;
15 16
 import com.ruoyi.web.modules.industryservice.domain.BizYakAsset;
16 17
 import com.ruoyi.web.modules.industryservice.domain.BizYakHerdInventory;
@@ -26,6 +27,7 @@ import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestoc
26 27
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
27 28
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
28 29
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchRuralThreeAssetsVo;
30
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchThreeAssetsProblemReportVo;
29 31
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchVaccinationDataVo;
30 32
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
31 33
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -461,4 +463,22 @@ public final class ResearchOpenApiSupport
461 463
         vo.setFixedAssets(row.getFixedAssets());
462 464
         return vo;
463 465
     }
466
+
467
+    public static ResearchThreeAssetsProblemReportVo toThreeAssetsProblemReportVo(BizThreeAssetsProblemReport row)
468
+    {
469
+        if (row == null)
470
+        {
471
+            return null;
472
+        }
473
+        ResearchThreeAssetsProblemReportVo vo = new ResearchThreeAssetsProblemReportVo();
474
+        vo.setProblemId(row.getId());
475
+        vo.setReportTime(row.getReportTime());
476
+        vo.setTownName(row.getTownName());
477
+        vo.setVillageName(row.getVillageName());
478
+        vo.setProblemType(row.getProblemType());
479
+        vo.setProblemLevel(row.getProblemLevel());
480
+        vo.setProblemDetail(row.getProblemDetail());
481
+        vo.setHandleResult(row.getHandleResult());
482
+        return vo;
483
+    }
464 484
 }

+ 6 - 0
baqing-admin/src/main/resources/mapper/industryservice/BizThreeAssetsProblemReportMapper.xml

@@ -48,6 +48,12 @@
48 48
             <if test="villageDeptId != null">
49 49
                 and r.village_dept_id = #{villageDeptId}
50 50
             </if>
51
+            <if test="townName != null and townName != ''">
52
+                and r.town_name like concat('%', #{townName}, '%')
53
+            </if>
54
+            <if test="villageName != null and villageName != ''">
55
+                and r.village_name like concat('%', #{villageName}, '%')
56
+            </if>
51 57
             <if test="problemType != null and problemType != ''">
52 58
                 and r.problem_type = #{problemType}
53 59
             </if>

+ 30 - 0
baqing-admin/src/test/java/com/ruoyi/web/modules/industryservice/research/controller/ResearchOpenApiControllerApiTest.java

@@ -31,6 +31,7 @@ import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestoc
31 31
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
32 32
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
33 33
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchRuralThreeAssetsVo;
34
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchThreeAssetsProblemReportVo;
34 35
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchVaccinationDataVo;
35 36
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
36 37
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakOutboundReportVo;
@@ -427,4 +428,33 @@ class ResearchOpenApiControllerApiTest
427 428
                 .andExpect(jsonPath("$.data.records[0].townName").value("雅安镇"))
428 429
                 .andExpect(jsonPath("$.data.records[0].villageName").value("荣嘎村"));
429 430
     }
431
+
432
+    @Test
433
+    @DisplayName("GET /three-assets-problem-reports 成功")
434
+    void listThreeAssetsProblemReports() throws Exception
435
+    {
436
+        ResearchThreeAssetsProblemReportVo row = new ResearchThreeAssetsProblemReportVo();
437
+        row.setProblemId(1L);
438
+        row.setTownName("雅安镇");
439
+        row.setVillageName("荣嘎村");
440
+        row.setProblemType("fund");
441
+        OpenApiPageResult<ResearchThreeAssetsProblemReportVo> page = new OpenApiPageResult<>();
442
+        page.setPageNum(1);
443
+        page.setPageSize(20);
444
+        page.setTotal(1L);
445
+        page.setRecords(Collections.singletonList(row));
446
+        when(researchOpenApiService.listThreeAssetsProblemReports(
447
+                anyInt(), anyInt(), any(), any(), any(), any(), any())).thenReturn(page);
448
+
449
+        mockMvc.perform(get("/open-api/v1/research/three-assets-problem-reports")
450
+                .param("townName", "雅安")
451
+                .param("villageName", "荣嘎")
452
+                .param("problemType", "fund")
453
+                .param("beginReportTime", "2026-01-01")
454
+                .param("endReportTime", "2026-12-31"))
455
+                .andExpect(status().isOk())
456
+                .andExpect(jsonPath("$.code").value(200))
457
+                .andExpect(jsonPath("$.data.records[0].problemType").value("fund"))
458
+                .andExpect(jsonPath("$.data.records[0].townName").value("雅安镇"));
459
+    }
430 460
 }

+ 17 - 0
doc/产业数据模型及服务/科研开放数据接口/科研开放数据接口功能需求.md

@@ -40,6 +40,7 @@
40 40
 | 疫苗接种数据列表 | 分页返回村级疫苗接种填报 |
41 41
 | 有无畜户数据列表 | 分页返回村级有无畜户填报 |
42 42
 | 农村三资数据列表 | 分页返回村级农村三资填报 |
43
+| 三资具体问题列表 | 分页返回三资具体问题上报 |
43 44
 
44 45
 **本期不实现:**
45 46
 
@@ -294,6 +295,20 @@ sequenceDiagram
294 295
 
295 296
 **不返回**:部门 ID、创建人、备注等内部字段。
296 297
 
298
+### 6.16 三资具体问题列表
299
+
300
+| 项 | 说明 |
301
+| --- | --- |
302
+| 方法 | GET |
303
+| 路径 | `/three-assets-problem-reports` |
304
+| 鉴权 | Bearer Token |
305
+| 分页 | 同 §6.2 |
306
+| 筛选 | `townName`(乡镇模糊)、`villageName`(村模糊)、`problemType`(精确,`fund`/`asset`/`resource`/`other`)、`beginReportTime`+`endReportTime`(`yyyy-MM-dd`,**同时有值**时按上报日期区间过滤) |
307
+
308
+**返回字段**:`problemId`、`reportTime`、乡镇村、问题类型/等级、详情、处理结果。
309
+
310
+**不返回**:部门 ID、创建人、备注等内部字段。
311
+
297 312
 ---
298 313
 
299 314
 ## 7. 脱敏规则摘要
@@ -343,6 +358,7 @@ sequenceDiagram
343 358
 | 疫苗接种数据填报 | 数据源 `biz_vaccination_data` |
344 359
 | 有无畜户数据填报 | 数据源 `biz_livestock_ownership_household` |
345 360
 | 农村三资数据填报 | 数据源 `biz_rural_three_assets` |
361
+| 三资具体问题上报 | 数据源 `biz_three_assets_problem_report` |
346 362
 | 若依权限体系 | **无**关联;开放接口走独立 Token |
347 363
 
348 364
 ---
@@ -366,5 +382,6 @@ sequenceDiagram
366 382
 | 疫苗接种列表 | §6.13 |
367 383
 | 有无畜户列表 | §6.14 |
368 384
 | 农村三资列表 | §6.15 |
385
+| 三资具体问题列表 | §6.16 |
369 386
 | 脱敏合规 | §7 |
370 387
 | 本期不实现 | §3 |

+ 22 - 2
doc/产业数据模型及服务/科研开放数据接口/科研开放数据接口技术方案.md

@@ -9,7 +9,7 @@
9 9
 | 项 | 说明 |
10 10
 | --- | --- |
11 11
 | **后端** | RuoYi **v3.9.2**(**springboot2** 分支):JDK 8、Spring MVC、MyBatis |
12
-| **数据库** | 只读查询既有表 `biz_pasture`、`biz_yak_asset`、`biz_yak_herd_inventory`、`biz_yak_outbound_report`、`biz_cooperative_development`、`biz_livestock_product_output`、`biz_family_ranch`、`biz_disposable_income`、`biz_farmer_household`、`biz_common_prosperity_project`、`biz_large_livestock_farmer`、`biz_vaccination_data`、`biz_livestock_ownership_household`、`biz_rural_three_assets` |
12
+| **数据库** | 只读查询既有表 `biz_pasture`、`biz_yak_asset`、`biz_yak_herd_inventory`、`biz_yak_outbound_report`、`biz_cooperative_development`、`biz_livestock_product_output`、`biz_family_ranch`、`biz_disposable_income`、`biz_farmer_household`、`biz_common_prosperity_project`、`biz_large_livestock_farmer`、`biz_vaccination_data`、`biz_livestock_ownership_household`、`biz_rural_three_assets`、`biz_three_assets_problem_report` |
13 13
 | **鉴权** | 独立 JWT + Servlet Filter;`@Anonymous` 绕过若依登录,Filter 校验 Bearer Token |
14 14
 | **响应** | `OpenApiResponse<T>` + `OpenApiPageResult<T>`(与第三方 farming OpenAPI 同结构) |
15 15
 
@@ -286,6 +286,19 @@ Authorization: Bearer <accessToken>
286 286
 
287 287
 实现说明:直接查 `BizRuralThreeAssetsMapper`(清空 `params.dataScope`)。
288 288
 
289
+### 3.16 三资具体问题列表
290
+
291
+```
292
+GET /open-api/v1/research/three-assets-problem-reports?pageNum=1&pageSize=20&townName=&villageName=&problemType=fund&beginReportTime=2026-01-01&endReportTime=2026-12-31
293
+Authorization: Bearer <accessToken>
294
+```
295
+
296
+**查询参数:** `townName` / `villageName`(模糊);`problemType`(精确);`beginReportTime` / `endReportTime`(`yyyy-MM-dd`,**同时有值**才按上报日期区间过滤);分页同前。
297
+
298
+**`records[]` 元素(ResearchThreeAssetsProblemReportVo):** 上报时间、乡镇村、问题类型/等级、详情、处理结果;**不含**部门 ID、操作人、备注。
299
+
300
+实现说明:直接查 `BizThreeAssetsProblemReportMapper`(清空 `params.dataScope`)。
301
+
289 302
 ---
290 303
 
291 304
 ## 4. 鉴权流程
@@ -319,8 +332,9 @@ Token 申请:`appKey`/`appSecret` 与配置项精确匹配后签发 JWT(HS51
319 332
 | 疫苗接种列表 | `BizVaccinationDataMapper.selectBizVaccinationDataList` | `biz_vaccination_data` | 年/月精确;乡镇/村名模糊;清空 `params.dataScope` |
320 333
 | 有无畜户列表 | `BizLivestockOwnershipHouseholdMapper.selectBizLivestockOwnershipHouseholdList` | `biz_livestock_ownership_household` | 年/月精确;乡镇/村名模糊;清空 `params.dataScope` |
321 334
 | 农村三资列表 | `BizRuralThreeAssetsMapper.selectBizRuralThreeAssetsList` | `biz_rural_three_assets` | 乡镇/村名模糊;清空 `params.dataScope` |
335
+| 三资具体问题列表 | `BizThreeAssetsProblemReportMapper.selectBizThreeAssetsProblemReportList` | `biz_three_assets_problem_report` | 乡镇/村名模糊;类型精确;上报起止日期同时有值;清空 `params.dataScope` |
322 336
 
323
-实体 → VO:`ResearchOpenApiSupport.toPastureVo` / `toYakAssetVo` / `toYakHerdInventoryVo` / `toYakOutboundReportVo` / `toCooperativeDevelopmentVo` / `toLivestockProductOutputVo` / `toFamilyRanchVo` / `toDisposableIncomeVo` / `toFarmerHouseholdVo` / `toCommonProsperityProjectVo` / `toLargeLivestockFarmerVo` / `toVaccinationDataVo` / `toLivestockOwnershipHouseholdVo` / `toRuralThreeAssetsVo`。
337
+实体 → VO:`ResearchOpenApiSupport.toPastureVo` / `toYakAssetVo` / `toYakHerdInventoryVo` / `toYakOutboundReportVo` / `toCooperativeDevelopmentVo` / `toLivestockProductOutputVo` / `toFamilyRanchVo` / `toDisposableIncomeVo` / `toFarmerHouseholdVo` / `toCommonProsperityProjectVo` / `toLargeLivestockFarmerVo` / `toVaccinationDataVo` / `toLivestockOwnershipHouseholdVo` / `toRuralThreeAssetsVo` / `toThreeAssetsProblemReportVo`
324 338
 
325 339
 ---
326 340
 
@@ -413,6 +427,10 @@ curl "http://localhost:8010/open-api/v1/research/livestock-ownership-households?
413 427
 # 15. 农村三资
414 428
 curl "http://localhost:8010/open-api/v1/research/rural-three-assets?pageNum=1&pageSize=10&townName=雅安" \
415 429
   -H "Authorization: Bearer <accessToken>"
430
+
431
+# 16. 三资具体问题
432
+curl "http://localhost:8010/open-api/v1/research/three-assets-problem-reports?pageNum=1&pageSize=10&problemType=fund&beginReportTime=2026-01-01&endReportTime=2026-12-31" \
433
+  -H "Authorization: Bearer <accessToken>"
416 434
 ```
417 435
 
418 436
 ---
@@ -446,6 +464,7 @@ curl "http://localhost:8010/open-api/v1/research/rural-three-assets?pageNum=1&pa
446 464
 | §6.13 疫苗接种 | **§3.13**、**§5** BizVaccinationData |
447 465
 | §6.14 有无畜户 | **§3.14**、**§5** BizLivestockOwnershipHousehold |
448 466
 | §6.15 农村三资 | **§3.15**、**§5** BizRuralThreeAssets |
467
+| §6.16 三资具体问题 | **§3.16**、**§5** BizThreeAssetsProblemReport |
449 468
 | §7 脱敏 | **§6** Masking |
450 469
 | §3 不实现机构区分 | 单一 app-key/secret,JWT 无 clientId |
451 470
 
@@ -455,6 +474,7 @@ curl "http://localhost:8010/open-api/v1/research/rural-three-assets?pageNum=1&pa
455 474
 
456 475
 | 版本 | 日期 | 说明 |
457 476
 | --- | --- | --- |
477
+| 1.13 | 2026-07-22 | 新增三资具体问题开放列表(乡镇村模糊/类型精确/上报起止日期同时有值+分页) |
458 478
 | 1.12 | 2026-07-22 | 新增农村三资开放列表(乡镇村模糊+分页) |
459 479
 | 1.11 | 2026-07-22 | 新增有无畜户开放列表(年/月/乡镇村模糊+分页) |
460 480
 | 1.10 | 2026-07-22 | 新增疫苗接种开放列表(年/月/乡镇村模糊+分页) |

+ 5 - 1
doc/产业数据模型及服务/科研开放数据接口/科研开放数据接口测试用例.md

@@ -67,6 +67,8 @@
67 67
 | KYKF-API-034 | 有无畜户 | 年/月/乡镇村筛选 | 接口测试 | curl | §6.14 | 已知年月与乡镇名片段 | GET 带筛选参数 | 条件生效;名称模糊匹配 |
68 68
 | KYKF-API-035 | 农村三资 | 分页列表 | 接口测试 | curl | §6.15 | 有效 Token;库有三资数据 | GET `/rural-three-assets?pageNum=1&pageSize=10` | `code=200`;无部门 ID |
69 69
 | KYKF-API-036 | 农村三资 | 乡镇村筛选 | 接口测试 | curl | §6.15 | 已知乡镇名片段 | GET 带筛选参数 | 条件生效;名称模糊匹配 |
70
+| KYKF-API-037 | 三资具体问题 | 分页列表 | 接口测试 | curl | §6.16 | 有效 Token;库有问题数据 | GET `/three-assets-problem-reports?pageNum=1&pageSize=10` | `code=200`;无部门 ID |
71
+| KYKF-API-038 | 三资具体问题 | 乡镇村/类型/上报区间 | 接口测试 | curl | §6.16 | 已知类型与日期区间 | GET 带筛选参数(起止日期均传) | 条件生效;仅起止同时有值时日期过滤生效 |
70 72
 
71 73
 ---
72 74
 
@@ -89,11 +91,12 @@
89 91
 | §6.13 疫苗接种列表 | — | API-031~032 |
90 92
 | §6.14 有无畜户列表 | — | API-033~034 |
91 93
 | §6.15 农村三资列表 | — | API-035~036 |
94
+| §6.16 三资具体问题列表 | — | API-037~038 |
92 95
 | §7 脱敏 | UT-001~004 | API-012 |
93 96
 | §2 分页 | — | API-010 |
94 97
 | §3 无机构区分 | UT-005 | API-001(单一凭证) |
95 98
 
96
-**用例统计**:单元 **6**、接口 **36**,合计 **42** 条。
99
+**用例统计**:单元 **6**、接口 **38**,合计 **44** 条。
97 100
 
98 101
 ---
99 102
 
@@ -120,6 +123,7 @@ curl -s "$BASE/large-livestock-farmers?pageNum=1&pageSize=5&statYear=2026" -H "A
120 123
 curl -s "$BASE/vaccination-data?pageNum=1&pageSize=5&statYear=2026" -H "Authorization: Bearer $TOKEN"
121 124
 curl -s "$BASE/livestock-ownership-households?pageNum=1&pageSize=5&statYear=2026" -H "Authorization: Bearer $TOKEN"
122 125
 curl -s "$BASE/rural-three-assets?pageNum=1&pageSize=5" -H "Authorization: Bearer $TOKEN"
126
+curl -s "$BASE/three-assets-problem-reports?pageNum=1&pageSize=5&problemType=fund&beginReportTime=2026-01-01&endReportTime=2026-12-31" -H "Authorization: Bearer $TOKEN"
123 127
 ```
124 128
 
125 129
 (Windows 环境可用 PowerShell `Invoke-RestMethod`,见技术方案 **§8**。)