Bladeren bron

外部接口

wwh 1 week geleden
bovenliggende
commit
9986ab665e

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

@@ -14,6 +14,8 @@ import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiPageResult;
14 14
 import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiResponse;
15 15
 import com.ruoyi.web.modules.industryservice.research.domain.dto.ResearchTokenRequest;
16 16
 import com.ruoyi.web.modules.industryservice.research.domain.dto.ResearchTokenVo;
17
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCooperativeDevelopmentVo;
18
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
17 19
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
18 20
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
19 21
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -145,4 +147,53 @@ public class ResearchOpenApiController
145 147
             return ResearchOpenApiSupport.error(code, ex.getMessage());
146 148
         }
147 149
     }
150
+
151
+    /**
152
+     * 合作社发展数据列表。
153
+     */
154
+    @GetMapping("/cooperative-developments")
155
+    public OpenApiResponse<OpenApiPageResult<ResearchCooperativeDevelopmentVo>> listCooperativeDevelopments(
156
+            @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
157
+            @RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
158
+            @RequestParam(value = "statYear", required = false) Integer statYear,
159
+            @RequestParam(value = "statMonth", required = false) Integer statMonth,
160
+            @RequestParam(value = "townName", required = false) String townName,
161
+            @RequestParam(value = "villageName", required = false) String villageName,
162
+            @RequestParam(value = "cooperativeName", required = false) String cooperativeName)
163
+    {
164
+        try
165
+        {
166
+            return ResearchOpenApiSupport.success(researchOpenApiService.listCooperativeDevelopments(
167
+                    pageNum, pageSize, statYear, statMonth, townName, villageName, cooperativeName));
168
+        }
169
+        catch (ServiceException ex)
170
+        {
171
+            int code = ex.getCode() != null ? ex.getCode() : 500;
172
+            return ResearchOpenApiSupport.error(code, ex.getMessage());
173
+        }
174
+    }
175
+
176
+    /**
177
+     * 畜牧产品产量登记列表(村级汇总)。
178
+     */
179
+    @GetMapping("/livestock-product-outputs")
180
+    public OpenApiResponse<OpenApiPageResult<ResearchLivestockProductOutputVo>> listLivestockProductOutputs(
181
+            @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
182
+            @RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
183
+            @RequestParam(value = "statYear", required = false) Integer statYear,
184
+            @RequestParam(value = "statMonth", required = false) Integer statMonth,
185
+            @RequestParam(value = "townName", required = false) String townName,
186
+            @RequestParam(value = "villageName", required = false) String villageName)
187
+    {
188
+        try
189
+        {
190
+            return ResearchOpenApiSupport.success(researchOpenApiService.listLivestockProductOutputs(
191
+                    pageNum, pageSize, statYear, statMonth, townName, villageName));
192
+        }
193
+        catch (ServiceException ex)
194
+        {
195
+            int code = ex.getCode() != null ? ex.getCode() : 500;
196
+            return ResearchOpenApiSupport.error(code, ex.getMessage());
197
+        }
198
+    }
148 199
 }

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

@@ -0,0 +1,555 @@
1
+package com.ruoyi.web.modules.industryservice.research.domain.vo;
2
+
3
+import java.math.BigDecimal;
4
+
5
+/**
6
+ * 科研开放接口 — 合作社发展填报记录(脱敏法人姓名;不含部门 ID / 备注)。
7
+ */
8
+public class ResearchCooperativeDevelopmentVo
9
+{
10
+    /** 合作社发展记录 ID */
11
+    private Long cooperativeId;
12
+
13
+    /** 所属年份 */
14
+    private Integer statYear;
15
+
16
+    /** 所属月份(1~12) */
17
+    private Integer statMonth;
18
+
19
+    /** 所属乡镇名称 */
20
+    private String townName;
21
+
22
+    /** 所属村名称 */
23
+    private String villageName;
24
+
25
+    /** 合作社名称 */
26
+    private String cooperativeName;
27
+
28
+    /** 法定代表人(脱敏) */
29
+    private String legalRepresentative;
30
+
31
+    /** 成立时间 */
32
+    private String establishDate;
33
+
34
+    /** 注册资本(万元) */
35
+    private BigDecimal registeredCapital;
36
+
37
+    /** 截止年底总资产(万元) */
38
+    private BigDecimal yearEndTotalAssets;
39
+
40
+    /** 入社户数 */
41
+    private Integer memberHouseholdCount;
42
+
43
+    /** 入社人数 */
44
+    private Integer memberPopulationCount;
45
+
46
+    /** 防返贫监测人数 */
47
+    private Integer povertyMonitorCount;
48
+
49
+    /** 牛入股数量 */
50
+    private Integer cattleShareCount;
51
+
52
+    /** 羊入股数量 */
53
+    private Integer sheepShareCount;
54
+
55
+    /** 牲畜入股小计 */
56
+    private Integer livestockShareTotal;
57
+
58
+    /** 草场入股面积(万亩) */
59
+    private BigDecimal grasslandShareArea;
60
+
61
+    /** 劳动力入股(人) */
62
+    private Integer laborShareCount;
63
+
64
+    /** 现金入股(万元) */
65
+    private BigDecimal cashShareAmount;
66
+
67
+    /** 其他入股(万元) */
68
+    private BigDecimal otherShareAmount;
69
+
70
+    /** 总收入(万元) */
71
+    private BigDecimal totalIncome;
72
+
73
+    /** 纯收入(万元) */
74
+    private BigDecimal netIncome;
75
+
76
+    /** 现金分红(万元) */
77
+    private BigDecimal cashDividend;
78
+
79
+    /** 实物分红折算(万元) */
80
+    private BigDecimal inKindDividend;
81
+
82
+    /** 周转金(万元) */
83
+    private BigDecimal revolvingFund;
84
+
85
+    /** 亏损(万元) */
86
+    private BigDecimal lossAmount;
87
+
88
+    /** 吸纳大学生(人) */
89
+    private Integer collegeGraduateCount;
90
+
91
+    /** 大学生工资性收入(万元) */
92
+    private BigDecimal collegeGraduateWage;
93
+
94
+    /** 农牧民转移就业(人) */
95
+    private Integer farmerTransferEmploymentCount;
96
+
97
+    /** 农牧民工资性收入(万元) */
98
+    private BigDecimal farmerTransferWage;
99
+
100
+    /** 牛存栏(头) */
101
+    private Integer cattleInventoryCount;
102
+
103
+    /** 牛出栏(头) */
104
+    private Integer cattleOutboundCount;
105
+
106
+    /** 羊存栏(头) */
107
+    private Integer sheepInventoryCount;
108
+
109
+    /** 羊出栏(头) */
110
+    private Integer sheepOutboundCount;
111
+
112
+    /** 注册商标产品数量 */
113
+    private Integer trademarkProductCount;
114
+
115
+    /** 质量认证产品数量 */
116
+    private Integer qualityCertProductCount;
117
+
118
+    /** 培训-管理能力 */
119
+    private Integer trainingManageCount;
120
+
121
+    /** 培训-专业技能 */
122
+    private Integer trainingSkillCount;
123
+
124
+    /** 培训-其他 */
125
+    private Integer trainingOtherCount;
126
+
127
+    /** 主要经营范围(逗号分隔) */
128
+    private String businessScope;
129
+
130
+    /** 经营模式分类 */
131
+    private String businessModel;
132
+
133
+    /** 运营情况 */
134
+    private String operationStatus;
135
+
136
+    public Long getCooperativeId()
137
+    {
138
+        return cooperativeId;
139
+    }
140
+
141
+    public void setCooperativeId(Long cooperativeId)
142
+    {
143
+        this.cooperativeId = cooperativeId;
144
+    }
145
+
146
+    public Integer getStatYear()
147
+    {
148
+        return statYear;
149
+    }
150
+
151
+    public void setStatYear(Integer statYear)
152
+    {
153
+        this.statYear = statYear;
154
+    }
155
+
156
+    public Integer getStatMonth()
157
+    {
158
+        return statMonth;
159
+    }
160
+
161
+    public void setStatMonth(Integer statMonth)
162
+    {
163
+        this.statMonth = statMonth;
164
+    }
165
+
166
+    public String getTownName()
167
+    {
168
+        return townName;
169
+    }
170
+
171
+    public void setTownName(String townName)
172
+    {
173
+        this.townName = townName;
174
+    }
175
+
176
+    public String getVillageName()
177
+    {
178
+        return villageName;
179
+    }
180
+
181
+    public void setVillageName(String villageName)
182
+    {
183
+        this.villageName = villageName;
184
+    }
185
+
186
+    public String getCooperativeName()
187
+    {
188
+        return cooperativeName;
189
+    }
190
+
191
+    public void setCooperativeName(String cooperativeName)
192
+    {
193
+        this.cooperativeName = cooperativeName;
194
+    }
195
+
196
+    public String getLegalRepresentative()
197
+    {
198
+        return legalRepresentative;
199
+    }
200
+
201
+    public void setLegalRepresentative(String legalRepresentative)
202
+    {
203
+        this.legalRepresentative = legalRepresentative;
204
+    }
205
+
206
+    public String getEstablishDate()
207
+    {
208
+        return establishDate;
209
+    }
210
+
211
+    public void setEstablishDate(String establishDate)
212
+    {
213
+        this.establishDate = establishDate;
214
+    }
215
+
216
+    public BigDecimal getRegisteredCapital()
217
+    {
218
+        return registeredCapital;
219
+    }
220
+
221
+    public void setRegisteredCapital(BigDecimal registeredCapital)
222
+    {
223
+        this.registeredCapital = registeredCapital;
224
+    }
225
+
226
+    public BigDecimal getYearEndTotalAssets()
227
+    {
228
+        return yearEndTotalAssets;
229
+    }
230
+
231
+    public void setYearEndTotalAssets(BigDecimal yearEndTotalAssets)
232
+    {
233
+        this.yearEndTotalAssets = yearEndTotalAssets;
234
+    }
235
+
236
+    public Integer getMemberHouseholdCount()
237
+    {
238
+        return memberHouseholdCount;
239
+    }
240
+
241
+    public void setMemberHouseholdCount(Integer memberHouseholdCount)
242
+    {
243
+        this.memberHouseholdCount = memberHouseholdCount;
244
+    }
245
+
246
+    public Integer getMemberPopulationCount()
247
+    {
248
+        return memberPopulationCount;
249
+    }
250
+
251
+    public void setMemberPopulationCount(Integer memberPopulationCount)
252
+    {
253
+        this.memberPopulationCount = memberPopulationCount;
254
+    }
255
+
256
+    public Integer getPovertyMonitorCount()
257
+    {
258
+        return povertyMonitorCount;
259
+    }
260
+
261
+    public void setPovertyMonitorCount(Integer povertyMonitorCount)
262
+    {
263
+        this.povertyMonitorCount = povertyMonitorCount;
264
+    }
265
+
266
+    public Integer getCattleShareCount()
267
+    {
268
+        return cattleShareCount;
269
+    }
270
+
271
+    public void setCattleShareCount(Integer cattleShareCount)
272
+    {
273
+        this.cattleShareCount = cattleShareCount;
274
+    }
275
+
276
+    public Integer getSheepShareCount()
277
+    {
278
+        return sheepShareCount;
279
+    }
280
+
281
+    public void setSheepShareCount(Integer sheepShareCount)
282
+    {
283
+        this.sheepShareCount = sheepShareCount;
284
+    }
285
+
286
+    public Integer getLivestockShareTotal()
287
+    {
288
+        return livestockShareTotal;
289
+    }
290
+
291
+    public void setLivestockShareTotal(Integer livestockShareTotal)
292
+    {
293
+        this.livestockShareTotal = livestockShareTotal;
294
+    }
295
+
296
+    public BigDecimal getGrasslandShareArea()
297
+    {
298
+        return grasslandShareArea;
299
+    }
300
+
301
+    public void setGrasslandShareArea(BigDecimal grasslandShareArea)
302
+    {
303
+        this.grasslandShareArea = grasslandShareArea;
304
+    }
305
+
306
+    public Integer getLaborShareCount()
307
+    {
308
+        return laborShareCount;
309
+    }
310
+
311
+    public void setLaborShareCount(Integer laborShareCount)
312
+    {
313
+        this.laborShareCount = laborShareCount;
314
+    }
315
+
316
+    public BigDecimal getCashShareAmount()
317
+    {
318
+        return cashShareAmount;
319
+    }
320
+
321
+    public void setCashShareAmount(BigDecimal cashShareAmount)
322
+    {
323
+        this.cashShareAmount = cashShareAmount;
324
+    }
325
+
326
+    public BigDecimal getOtherShareAmount()
327
+    {
328
+        return otherShareAmount;
329
+    }
330
+
331
+    public void setOtherShareAmount(BigDecimal otherShareAmount)
332
+    {
333
+        this.otherShareAmount = otherShareAmount;
334
+    }
335
+
336
+    public BigDecimal getTotalIncome()
337
+    {
338
+        return totalIncome;
339
+    }
340
+
341
+    public void setTotalIncome(BigDecimal totalIncome)
342
+    {
343
+        this.totalIncome = totalIncome;
344
+    }
345
+
346
+    public BigDecimal getNetIncome()
347
+    {
348
+        return netIncome;
349
+    }
350
+
351
+    public void setNetIncome(BigDecimal netIncome)
352
+    {
353
+        this.netIncome = netIncome;
354
+    }
355
+
356
+    public BigDecimal getCashDividend()
357
+    {
358
+        return cashDividend;
359
+    }
360
+
361
+    public void setCashDividend(BigDecimal cashDividend)
362
+    {
363
+        this.cashDividend = cashDividend;
364
+    }
365
+
366
+    public BigDecimal getInKindDividend()
367
+    {
368
+        return inKindDividend;
369
+    }
370
+
371
+    public void setInKindDividend(BigDecimal inKindDividend)
372
+    {
373
+        this.inKindDividend = inKindDividend;
374
+    }
375
+
376
+    public BigDecimal getRevolvingFund()
377
+    {
378
+        return revolvingFund;
379
+    }
380
+
381
+    public void setRevolvingFund(BigDecimal revolvingFund)
382
+    {
383
+        this.revolvingFund = revolvingFund;
384
+    }
385
+
386
+    public BigDecimal getLossAmount()
387
+    {
388
+        return lossAmount;
389
+    }
390
+
391
+    public void setLossAmount(BigDecimal lossAmount)
392
+    {
393
+        this.lossAmount = lossAmount;
394
+    }
395
+
396
+    public Integer getCollegeGraduateCount()
397
+    {
398
+        return collegeGraduateCount;
399
+    }
400
+
401
+    public void setCollegeGraduateCount(Integer collegeGraduateCount)
402
+    {
403
+        this.collegeGraduateCount = collegeGraduateCount;
404
+    }
405
+
406
+    public BigDecimal getCollegeGraduateWage()
407
+    {
408
+        return collegeGraduateWage;
409
+    }
410
+
411
+    public void setCollegeGraduateWage(BigDecimal collegeGraduateWage)
412
+    {
413
+        this.collegeGraduateWage = collegeGraduateWage;
414
+    }
415
+
416
+    public Integer getFarmerTransferEmploymentCount()
417
+    {
418
+        return farmerTransferEmploymentCount;
419
+    }
420
+
421
+    public void setFarmerTransferEmploymentCount(Integer farmerTransferEmploymentCount)
422
+    {
423
+        this.farmerTransferEmploymentCount = farmerTransferEmploymentCount;
424
+    }
425
+
426
+    public BigDecimal getFarmerTransferWage()
427
+    {
428
+        return farmerTransferWage;
429
+    }
430
+
431
+    public void setFarmerTransferWage(BigDecimal farmerTransferWage)
432
+    {
433
+        this.farmerTransferWage = farmerTransferWage;
434
+    }
435
+
436
+    public Integer getCattleInventoryCount()
437
+    {
438
+        return cattleInventoryCount;
439
+    }
440
+
441
+    public void setCattleInventoryCount(Integer cattleInventoryCount)
442
+    {
443
+        this.cattleInventoryCount = cattleInventoryCount;
444
+    }
445
+
446
+    public Integer getCattleOutboundCount()
447
+    {
448
+        return cattleOutboundCount;
449
+    }
450
+
451
+    public void setCattleOutboundCount(Integer cattleOutboundCount)
452
+    {
453
+        this.cattleOutboundCount = cattleOutboundCount;
454
+    }
455
+
456
+    public Integer getSheepInventoryCount()
457
+    {
458
+        return sheepInventoryCount;
459
+    }
460
+
461
+    public void setSheepInventoryCount(Integer sheepInventoryCount)
462
+    {
463
+        this.sheepInventoryCount = sheepInventoryCount;
464
+    }
465
+
466
+    public Integer getSheepOutboundCount()
467
+    {
468
+        return sheepOutboundCount;
469
+    }
470
+
471
+    public void setSheepOutboundCount(Integer sheepOutboundCount)
472
+    {
473
+        this.sheepOutboundCount = sheepOutboundCount;
474
+    }
475
+
476
+    public Integer getTrademarkProductCount()
477
+    {
478
+        return trademarkProductCount;
479
+    }
480
+
481
+    public void setTrademarkProductCount(Integer trademarkProductCount)
482
+    {
483
+        this.trademarkProductCount = trademarkProductCount;
484
+    }
485
+
486
+    public Integer getQualityCertProductCount()
487
+    {
488
+        return qualityCertProductCount;
489
+    }
490
+
491
+    public void setQualityCertProductCount(Integer qualityCertProductCount)
492
+    {
493
+        this.qualityCertProductCount = qualityCertProductCount;
494
+    }
495
+
496
+    public Integer getTrainingManageCount()
497
+    {
498
+        return trainingManageCount;
499
+    }
500
+
501
+    public void setTrainingManageCount(Integer trainingManageCount)
502
+    {
503
+        this.trainingManageCount = trainingManageCount;
504
+    }
505
+
506
+    public Integer getTrainingSkillCount()
507
+    {
508
+        return trainingSkillCount;
509
+    }
510
+
511
+    public void setTrainingSkillCount(Integer trainingSkillCount)
512
+    {
513
+        this.trainingSkillCount = trainingSkillCount;
514
+    }
515
+
516
+    public Integer getTrainingOtherCount()
517
+    {
518
+        return trainingOtherCount;
519
+    }
520
+
521
+    public void setTrainingOtherCount(Integer trainingOtherCount)
522
+    {
523
+        this.trainingOtherCount = trainingOtherCount;
524
+    }
525
+
526
+    public String getBusinessScope()
527
+    {
528
+        return businessScope;
529
+    }
530
+
531
+    public void setBusinessScope(String businessScope)
532
+    {
533
+        this.businessScope = businessScope;
534
+    }
535
+
536
+    public String getBusinessModel()
537
+    {
538
+        return businessModel;
539
+    }
540
+
541
+    public void setBusinessModel(String businessModel)
542
+    {
543
+        this.businessModel = businessModel;
544
+    }
545
+
546
+    public String getOperationStatus()
547
+    {
548
+        return operationStatus;
549
+    }
550
+
551
+    public void setOperationStatus(String operationStatus)
552
+    {
553
+        this.operationStatus = operationStatus;
554
+    }
555
+}

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

@@ -0,0 +1,100 @@
1
+package com.ruoyi.web.modules.industryservice.research.domain.vo;
2
+
3
+import java.math.BigDecimal;
4
+
5
+/**
6
+ * 科研开放接口 — 畜牧产品产量登记(村级汇总)。
7
+ */
8
+public class ResearchLivestockProductOutputVo
9
+{
10
+    /** 产量登记记录 ID */
11
+    private Long outputId;
12
+
13
+    /** 所属年份 */
14
+    private Integer statYear;
15
+
16
+    /** 所属月份(1~12) */
17
+    private Integer statMonth;
18
+
19
+    /** 所属乡镇名称 */
20
+    private String townName;
21
+
22
+    /** 所属村名称 */
23
+    private String villageName;
24
+
25
+    /** 肉产量(万吨) */
26
+    private BigDecimal meatOutput;
27
+
28
+    /** 奶产量(万吨) */
29
+    private BigDecimal milkOutput;
30
+
31
+    public Long getOutputId()
32
+    {
33
+        return outputId;
34
+    }
35
+
36
+    public void setOutputId(Long outputId)
37
+    {
38
+        this.outputId = outputId;
39
+    }
40
+
41
+    public Integer getStatYear()
42
+    {
43
+        return statYear;
44
+    }
45
+
46
+    public void setStatYear(Integer statYear)
47
+    {
48
+        this.statYear = statYear;
49
+    }
50
+
51
+    public Integer getStatMonth()
52
+    {
53
+        return statMonth;
54
+    }
55
+
56
+    public void setStatMonth(Integer statMonth)
57
+    {
58
+        this.statMonth = statMonth;
59
+    }
60
+
61
+    public String getTownName()
62
+    {
63
+        return townName;
64
+    }
65
+
66
+    public void setTownName(String townName)
67
+    {
68
+        this.townName = townName;
69
+    }
70
+
71
+    public String getVillageName()
72
+    {
73
+        return villageName;
74
+    }
75
+
76
+    public void setVillageName(String villageName)
77
+    {
78
+        this.villageName = villageName;
79
+    }
80
+
81
+    public BigDecimal getMeatOutput()
82
+    {
83
+        return meatOutput;
84
+    }
85
+
86
+    public void setMeatOutput(BigDecimal meatOutput)
87
+    {
88
+        this.meatOutput = meatOutput;
89
+    }
90
+
91
+    public BigDecimal getMilkOutput()
92
+    {
93
+        return milkOutput;
94
+    }
95
+
96
+    public void setMilkOutput(BigDecimal milkOutput)
97
+    {
98
+        this.milkOutput = milkOutput;
99
+    }
100
+}

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

@@ -2,6 +2,8 @@ package com.ruoyi.web.modules.industryservice.research.service;
2 2
 
3 3
 import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiPageResult;
4 4
 import com.ruoyi.web.modules.industryservice.research.domain.dto.ResearchTokenVo;
5
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCooperativeDevelopmentVo;
6
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
5 7
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
6 8
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
7 9
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -36,4 +38,23 @@ public interface IResearchOpenApiService
36 38
      */
37 39
     OpenApiPageResult<ResearchYakOutboundReportVo> listYakOutboundReports(int pageNum, int pageSize,
38 40
             Integer statYear, Integer statMonth, String townName, String villageName);
41
+
42
+    /**
43
+     * 合作社发展填报列表。
44
+     *
45
+     * @param townName 所属乡镇名称模糊匹配
46
+     * @param villageName 所属村名称模糊匹配
47
+     * @param cooperativeName 合作社名称模糊匹配
48
+     */
49
+    OpenApiPageResult<ResearchCooperativeDevelopmentVo> listCooperativeDevelopments(int pageNum, int pageSize,
50
+            Integer statYear, Integer statMonth, String townName, String villageName, String cooperativeName);
51
+
52
+    /**
53
+     * 畜牧产品产量登记列表。
54
+     *
55
+     * @param townName 所属乡镇名称模糊匹配
56
+     * @param villageName 所属村名称模糊匹配
57
+     */
58
+    OpenApiPageResult<ResearchLivestockProductOutputVo> listLivestockProductOutputs(int pageNum, int pageSize,
59
+            Integer statYear, Integer statMonth, String townName, String villageName);
39 60
 }

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

@@ -8,15 +8,21 @@ import com.github.pagehelper.PageHelper;
8 8
 import com.github.pagehelper.PageInfo;
9 9
 import com.ruoyi.common.exception.ServiceException;
10 10
 import com.ruoyi.common.utils.StringUtils;
11
+import com.ruoyi.web.modules.industryservice.domain.BizCooperativeDevelopment;
12
+import com.ruoyi.web.modules.industryservice.domain.BizLivestockProductOutput;
11 13
 import com.ruoyi.web.modules.industryservice.domain.BizPasture;
12 14
 import com.ruoyi.web.modules.industryservice.domain.BizYakAsset;
13 15
 import com.ruoyi.web.modules.industryservice.domain.BizYakHerdInventory;
14 16
 import com.ruoyi.web.modules.industryservice.domain.BizYakOutboundReport;
15 17
 import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiPageResult;
18
+import com.ruoyi.web.modules.industryservice.mapper.BizCooperativeDevelopmentMapper;
19
+import com.ruoyi.web.modules.industryservice.mapper.BizLivestockProductOutputMapper;
16 20
 import com.ruoyi.web.modules.industryservice.mapper.BizYakHerdInventoryMapper;
17 21
 import com.ruoyi.web.modules.industryservice.mapper.BizYakOutboundReportMapper;
18 22
 import com.ruoyi.web.modules.industryservice.research.config.ResearchOpenApiProperties;
19 23
 import com.ruoyi.web.modules.industryservice.research.domain.dto.ResearchTokenVo;
24
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCooperativeDevelopmentVo;
25
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
20 26
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
21 27
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
22 28
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -48,6 +54,12 @@ public class ResearchOpenApiServiceImpl implements IResearchOpenApiService
48 54
     @Autowired
49 55
     private BizYakOutboundReportMapper bizYakOutboundReportMapper;
50 56
 
57
+    @Autowired
58
+    private BizCooperativeDevelopmentMapper bizCooperativeDevelopmentMapper;
59
+
60
+    @Autowired
61
+    private BizLivestockProductOutputMapper bizLivestockProductOutputMapper;
62
+
51 63
     @Override
52 64
     public ResearchTokenVo authenticate(String appKey, String appSecret)
53 65
     {
@@ -143,6 +155,64 @@ public class ResearchOpenApiServiceImpl implements IResearchOpenApiService
143 155
                 rows.stream().map(ResearchOpenApiSupport::toYakOutboundReportVo).collect(Collectors.toList()));
144 156
     }
145 157
 
158
+    @Override
159
+    public OpenApiPageResult<ResearchCooperativeDevelopmentVo> listCooperativeDevelopments(int pageNum, int pageSize,
160
+            Integer statYear, Integer statMonth, String townName, String villageName, String cooperativeName)
161
+    {
162
+        tokenService.assertEnabled();
163
+        int safePageNum = normalizePageNum(pageNum);
164
+        int safePageSize = normalizePageSize(pageSize);
165
+        BizCooperativeDevelopment query = new BizCooperativeDevelopment();
166
+        query.setStatYear(statYear);
167
+        query.setStatMonth(statMonth);
168
+        if (StringUtils.isNotEmpty(townName))
169
+        {
170
+            query.setTownName(townName.trim());
171
+        }
172
+        if (StringUtils.isNotEmpty(villageName))
173
+        {
174
+            query.setVillageName(villageName.trim());
175
+        }
176
+        if (StringUtils.isNotEmpty(cooperativeName))
177
+        {
178
+            query.setCooperativeName(cooperativeName.trim());
179
+        }
180
+        // 开放接口无登录上下文,清空 dataScope,避免走填报部门权限
181
+        query.getParams().put("dataScope", "");
182
+        PageHelper.startPage(safePageNum, safePageSize);
183
+        List<BizCooperativeDevelopment> rows = bizCooperativeDevelopmentMapper.selectBizCooperativeDevelopmentList(query);
184
+        PageInfo<BizCooperativeDevelopment> page = new PageInfo<>(rows);
185
+        return toPageResult(safePageNum, safePageSize, page.getTotal(),
186
+                rows.stream().map(ResearchOpenApiSupport::toCooperativeDevelopmentVo).collect(Collectors.toList()));
187
+    }
188
+
189
+    @Override
190
+    public OpenApiPageResult<ResearchLivestockProductOutputVo> listLivestockProductOutputs(int pageNum, int pageSize,
191
+            Integer statYear, Integer statMonth, String townName, String villageName)
192
+    {
193
+        tokenService.assertEnabled();
194
+        int safePageNum = normalizePageNum(pageNum);
195
+        int safePageSize = normalizePageSize(pageSize);
196
+        BizLivestockProductOutput query = new BizLivestockProductOutput();
197
+        query.setStatYear(statYear);
198
+        query.setStatMonth(statMonth);
199
+        if (StringUtils.isNotEmpty(townName))
200
+        {
201
+            query.setTownName(townName.trim());
202
+        }
203
+        if (StringUtils.isNotEmpty(villageName))
204
+        {
205
+            query.setVillageName(villageName.trim());
206
+        }
207
+        // 开放接口无登录上下文,清空 dataScope,避免走填报部门权限
208
+        query.getParams().put("dataScope", "");
209
+        PageHelper.startPage(safePageNum, safePageSize);
210
+        List<BizLivestockProductOutput> rows = bizLivestockProductOutputMapper.selectBizLivestockProductOutputList(query);
211
+        PageInfo<BizLivestockProductOutput> page = new PageInfo<>(rows);
212
+        return toPageResult(safePageNum, safePageSize, page.getTotal(),
213
+                rows.stream().map(ResearchOpenApiSupport::toLivestockProductOutputVo).collect(Collectors.toList()));
214
+    }
215
+
146 216
     private int normalizePageNum(int pageNum)
147 217
     {
148 218
         return pageNum > 0 ? pageNum : 1;

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

@@ -2,11 +2,15 @@ package com.ruoyi.web.modules.industryservice.research.support;
2 2
 
3 3
 import java.time.Instant;
4 4
 import java.util.UUID;
5
+import com.ruoyi.web.modules.industryservice.domain.BizCooperativeDevelopment;
6
+import com.ruoyi.web.modules.industryservice.domain.BizLivestockProductOutput;
5 7
 import com.ruoyi.web.modules.industryservice.domain.BizPasture;
6 8
 import com.ruoyi.web.modules.industryservice.domain.BizYakAsset;
7 9
 import com.ruoyi.web.modules.industryservice.domain.BizYakHerdInventory;
8 10
 import com.ruoyi.web.modules.industryservice.domain.BizYakOutboundReport;
9 11
 import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiResponse;
12
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCooperativeDevelopmentVo;
13
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
10 14
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
11 15
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
12 16
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
@@ -152,4 +156,73 @@ public final class ResearchOpenApiSupport
152 156
         vo.setSelfConsumptionGoatCount(row.getSelfConsumptionGoatCount());
153 157
         return vo;
154 158
     }
159
+
160
+    public static ResearchCooperativeDevelopmentVo toCooperativeDevelopmentVo(BizCooperativeDevelopment row)
161
+    {
162
+        if (row == null)
163
+        {
164
+            return null;
165
+        }
166
+        ResearchCooperativeDevelopmentVo vo = new ResearchCooperativeDevelopmentVo();
167
+        vo.setCooperativeId(row.getId());
168
+        vo.setStatYear(row.getStatYear());
169
+        vo.setStatMonth(row.getStatMonth());
170
+        vo.setTownName(row.getTownName());
171
+        vo.setVillageName(row.getVillageName());
172
+        vo.setCooperativeName(row.getCooperativeName());
173
+        vo.setLegalRepresentative(ResearchOpenApiMasking.maskPersonName(row.getLegalRepresentative()));
174
+        vo.setEstablishDate(row.getEstablishDate());
175
+        vo.setRegisteredCapital(row.getRegisteredCapital());
176
+        vo.setYearEndTotalAssets(row.getYearEndTotalAssets());
177
+        vo.setMemberHouseholdCount(row.getMemberHouseholdCount());
178
+        vo.setMemberPopulationCount(row.getMemberPopulationCount());
179
+        vo.setPovertyMonitorCount(row.getPovertyMonitorCount());
180
+        vo.setCattleShareCount(row.getCattleShareCount());
181
+        vo.setSheepShareCount(row.getSheepShareCount());
182
+        vo.setLivestockShareTotal(row.getLivestockShareTotal());
183
+        vo.setGrasslandShareArea(row.getGrasslandShareArea());
184
+        vo.setLaborShareCount(row.getLaborShareCount());
185
+        vo.setCashShareAmount(row.getCashShareAmount());
186
+        vo.setOtherShareAmount(row.getOtherShareAmount());
187
+        vo.setTotalIncome(row.getTotalIncome());
188
+        vo.setNetIncome(row.getNetIncome());
189
+        vo.setCashDividend(row.getCashDividend());
190
+        vo.setInKindDividend(row.getInKindDividend());
191
+        vo.setRevolvingFund(row.getRevolvingFund());
192
+        vo.setLossAmount(row.getLossAmount());
193
+        vo.setCollegeGraduateCount(row.getCollegeGraduateCount());
194
+        vo.setCollegeGraduateWage(row.getCollegeGraduateWage());
195
+        vo.setFarmerTransferEmploymentCount(row.getFarmerTransferEmploymentCount());
196
+        vo.setFarmerTransferWage(row.getFarmerTransferWage());
197
+        vo.setCattleInventoryCount(row.getCattleInventoryCount());
198
+        vo.setCattleOutboundCount(row.getCattleOutboundCount());
199
+        vo.setSheepInventoryCount(row.getSheepInventoryCount());
200
+        vo.setSheepOutboundCount(row.getSheepOutboundCount());
201
+        vo.setTrademarkProductCount(row.getTrademarkProductCount());
202
+        vo.setQualityCertProductCount(row.getQualityCertProductCount());
203
+        vo.setTrainingManageCount(row.getTrainingManageCount());
204
+        vo.setTrainingSkillCount(row.getTrainingSkillCount());
205
+        vo.setTrainingOtherCount(row.getTrainingOtherCount());
206
+        vo.setBusinessScope(row.getBusinessScope());
207
+        vo.setBusinessModel(row.getBusinessModel());
208
+        vo.setOperationStatus(row.getOperationStatus());
209
+        return vo;
210
+    }
211
+
212
+    public static ResearchLivestockProductOutputVo toLivestockProductOutputVo(BizLivestockProductOutput row)
213
+    {
214
+        if (row == null)
215
+        {
216
+            return null;
217
+        }
218
+        ResearchLivestockProductOutputVo vo = new ResearchLivestockProductOutputVo();
219
+        vo.setOutputId(row.getId());
220
+        vo.setStatYear(row.getStatYear());
221
+        vo.setStatMonth(row.getStatMonth());
222
+        vo.setTownName(row.getTownName());
223
+        vo.setVillageName(row.getVillageName());
224
+        vo.setMeatOutput(row.getMeatOutput());
225
+        vo.setMilkOutput(row.getMilkOutput());
226
+        return vo;
227
+    }
155 228
 }

+ 2 - 0
baqing-admin/src/main/resources/mapper/industryservice/BizCooperativeDevelopmentMapper.xml

@@ -88,6 +88,8 @@
88 88
             <if test="statMonth != null">and r.stat_month = #{statMonth}</if>
89 89
             <if test="townDeptId != null">and r.town_dept_id = #{townDeptId}</if>
90 90
             <if test="villageDeptId != null">and r.village_dept_id = #{villageDeptId}</if>
91
+            <if test="townName != null and townName != ''">and r.town_name like concat('%', #{townName}, '%')</if>
92
+            <if test="villageName != null and villageName != ''">and r.village_name like concat('%', #{villageName}, '%')</if>
91 93
             <if test="cooperativeName != null and cooperativeName != ''">and r.cooperative_name like concat('%', #{cooperativeName}, '%')</if>
92 94
             ${params.dataScope}
93 95
         </where>

+ 2 - 0
baqing-admin/src/main/resources/mapper/industryservice/BizLivestockProductOutputMapper.xml

@@ -52,6 +52,8 @@
52 52
             <if test="statMonth != null">and r.stat_month = #{statMonth}</if>
53 53
             <if test="townDeptId != null">and r.town_dept_id = #{townDeptId}</if>
54 54
             <if test="villageDeptId != null">and r.village_dept_id = #{villageDeptId}</if>
55
+            <if test="townName != null and townName != ''">and r.town_name like concat('%', #{townName}, '%')</if>
56
+            <if test="villageName != null and villageName != ''">and r.village_name like concat('%', #{villageName}, '%')</if>
55 57
             ${params.dataScope}
56 58
         </where>
57 59
         order by r.stat_year desc, r.stat_month desc, d.order_num asc, r.village_dept_id asc, r.id desc

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

@@ -21,6 +21,8 @@ import org.springframework.test.web.servlet.MockMvc;
21 21
 import org.springframework.test.web.servlet.setup.MockMvcBuilders;
22 22
 import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiPageResult;
23 23
 import com.ruoyi.web.modules.industryservice.research.domain.dto.ResearchTokenVo;
24
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCooperativeDevelopmentVo;
25
+import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
24 26
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
25 27
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
26 28
 import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakOutboundReportVo;
@@ -139,4 +141,63 @@ class ResearchOpenApiControllerApiTest
139 141
                 .andExpect(jsonPath("$.data.records[0].townName").value("雅安镇"))
140 142
                 .andExpect(jsonPath("$.data.records[0].villageName").value("荣嘎村"));
141 143
     }
144
+
145
+    @Test
146
+    @DisplayName("GET /cooperative-developments 成功")
147
+    void listCooperativeDevelopments() throws Exception
148
+    {
149
+        ResearchCooperativeDevelopmentVo row = new ResearchCooperativeDevelopmentVo();
150
+        row.setCooperativeId(1L);
151
+        row.setStatYear(2026);
152
+        row.setStatMonth(5);
153
+        row.setTownName("雅安镇");
154
+        row.setVillageName("荣嘎村");
155
+        row.setCooperativeName("测试合作社");
156
+        OpenApiPageResult<ResearchCooperativeDevelopmentVo> page = new OpenApiPageResult<>();
157
+        page.setPageNum(1);
158
+        page.setPageSize(20);
159
+        page.setTotal(1L);
160
+        page.setRecords(Collections.singletonList(row));
161
+        when(researchOpenApiService.listCooperativeDevelopments(
162
+                anyInt(), anyInt(), any(), any(), any(), any(), any())).thenReturn(page);
163
+
164
+        mockMvc.perform(get("/open-api/v1/research/cooperative-developments")
165
+                .param("statYear", "2026")
166
+                .param("statMonth", "5")
167
+                .param("townName", "雅安")
168
+                .param("villageName", "荣嘎")
169
+                .param("cooperativeName", "测试"))
170
+                .andExpect(status().isOk())
171
+                .andExpect(jsonPath("$.code").value(200))
172
+                .andExpect(jsonPath("$.data.records[0].cooperativeName").value("测试合作社"));
173
+    }
174
+
175
+    @Test
176
+    @DisplayName("GET /livestock-product-outputs 成功")
177
+    void listLivestockProductOutputs() throws Exception
178
+    {
179
+        ResearchLivestockProductOutputVo row = new ResearchLivestockProductOutputVo();
180
+        row.setOutputId(1L);
181
+        row.setStatYear(2026);
182
+        row.setStatMonth(5);
183
+        row.setTownName("雅安镇");
184
+        row.setVillageName("荣嘎村");
185
+        OpenApiPageResult<ResearchLivestockProductOutputVo> page = new OpenApiPageResult<>();
186
+        page.setPageNum(1);
187
+        page.setPageSize(20);
188
+        page.setTotal(1L);
189
+        page.setRecords(Collections.singletonList(row));
190
+        when(researchOpenApiService.listLivestockProductOutputs(anyInt(), anyInt(), any(), any(), any(), any()))
191
+                .thenReturn(page);
192
+
193
+        mockMvc.perform(get("/open-api/v1/research/livestock-product-outputs")
194
+                .param("statYear", "2026")
195
+                .param("statMonth", "5")
196
+                .param("townName", "雅安")
197
+                .param("villageName", "荣嘎"))
198
+                .andExpect(status().isOk())
199
+                .andExpect(jsonPath("$.code").value(200))
200
+                .andExpect(jsonPath("$.data.records[0].townName").value("雅安镇"))
201
+                .andExpect(jsonPath("$.data.records[0].villageName").value("荣嘎村"));
202
+    }
142 203
 }

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

@@ -30,6 +30,8 @@
30 30
 | 牦牛资产档案列表 | 分页返回脱敏档案数据(种群健康研究字段) |
31 31
 | 牦牛存栏数据列表 | 分页返回村级存栏填报汇总 |
32 32
 | 牦牛出栏数据列表 | 分页返回村级出栏填报汇总 |
33
+| 合作社发展数据列表 | 分页返回合作社发展填报;法人姓名脱敏 |
34
+| 畜牧产品产量登记列表 | 分页返回村级肉/奶产量 |
33 35
 
34 36
 **本期不实现:**
35 37
 
@@ -144,6 +146,34 @@ sequenceDiagram
144 146
 
145 147
 **不返回**:部门 ID、创建人、备注等内部字段。
146 148
 
149
+### 6.6 合作社发展数据列表
150
+
151
+| 项 | 说明 |
152
+| --- | --- |
153
+| 方法 | GET |
154
+| 路径 | `/cooperative-developments` |
155
+| 鉴权 | Bearer Token |
156
+| 分页 | 同 §6.2 |
157
+| 筛选 | `statYear`、`statMonth`、`townName`(乡镇模糊)、`villageName`(村模糊)、`cooperativeName`(合作社名称模糊) |
158
+
159
+**返回字段**:`cooperativeId`、年月、乡镇村、合作社信息、入社/入股/效益/就业/存出栏/认证/培训/经营等业务字段;`legalRepresentative` 脱敏。
160
+
161
+**不返回**:部门 ID、创建人、备注等内部字段。
162
+
163
+### 6.7 畜牧产品产量登记列表
164
+
165
+| 项 | 说明 |
166
+| --- | --- |
167
+| 方法 | GET |
168
+| 路径 | `/livestock-product-outputs` |
169
+| 鉴权 | Bearer Token |
170
+| 分页 | 同 §6.2 |
171
+| 筛选 | `statYear`、`statMonth`、`townName`(乡镇模糊)、`villageName`(村模糊) |
172
+
173
+**返回字段**:`outputId`、`statYear`、`statMonth`、`townName`、`villageName`、`meatOutput`(万吨)、`milkOutput`(万吨)。
174
+
175
+**不返回**:部门 ID、创建人、备注等内部字段。
176
+
147 177
 ---
148 178
 
149 179
 ## 7. 脱敏规则摘要
@@ -183,6 +213,8 @@ sequenceDiagram
183 213
 | 牦牛资产档案管理 | 数据源 `biz_yak_asset` |
184 214
 | 牦牛存栏数据填报 | 数据源 `biz_yak_herd_inventory` |
185 215
 | 牦牛出栏数据填报 | 数据源 `biz_yak_outbound_report` |
216
+| 合作社发展数据填报 | 数据源 `biz_cooperative_development` |
217
+| 畜牧产品产量登记 | 数据源 `biz_livestock_product_output` |
186 218
 | 若依权限体系 | **无**关联;开放接口走独立 Token |
187 219
 
188 220
 ---
@@ -196,5 +228,7 @@ sequenceDiagram
196 228
 | 牦牛档案列表 | §6.3、§7 |
197 229
 | 牦牛存栏列表 | §6.4 |
198 230
 | 牦牛出栏列表 | §6.5 |
231
+| 合作社发展列表 | §6.6 |
232
+| 畜牧产品产量列表 | §6.7 |
199 233
 | 脱敏合规 | §7 |
200 234
 | 本期不实现 | §3 |

+ 42 - 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` |
12
+| **数据库** | 只读查询既有表 `biz_pasture`、`biz_yak_asset`、`biz_yak_herd_inventory`、`biz_yak_outbound_report`、`biz_cooperative_development`、`biz_livestock_product_output` |
13 13
 | **鉴权** | 独立 JWT + Servlet Filter;`@Anonymous` 绕过若依登录,Filter 校验 Bearer Token |
14 14
 | **响应** | `OpenApiResponse<T>` + `OpenApiPageResult<T>`(与第三方 farming OpenAPI 同结构) |
15 15
 
@@ -156,6 +156,32 @@ Authorization: Bearer <accessToken>
156 156
 
157 157
 实现说明:直接查 `BizYakOutboundReportMapper`(清空 `params.dataScope`)。
158 158
 
159
+### 3.6 合作社发展数据列表
160
+
161
+```
162
+GET /open-api/v1/research/cooperative-developments?pageNum=1&pageSize=20&statYear=2026&statMonth=5&townName=&villageName=&cooperativeName=
163
+Authorization: Bearer <accessToken>
164
+```
165
+
166
+**查询参数:** `statYear` / `statMonth`(精确);`townName` / `villageName` / `cooperativeName`(模糊);分页同前。
167
+
168
+**`records[]` 元素(ResearchCooperativeDevelopmentVo):** 合作社发展业务字段;`legalRepresentative` 脱敏;**不含**部门 ID、操作人、备注。
169
+
170
+实现说明:直接查 `BizCooperativeDevelopmentMapper`(清空 `params.dataScope`)。
171
+
172
+### 3.7 畜牧产品产量登记列表
173
+
174
+```
175
+GET /open-api/v1/research/livestock-product-outputs?pageNum=1&pageSize=20&statYear=2026&statMonth=5&townName=&villageName=
176
+Authorization: Bearer <accessToken>
177
+```
178
+
179
+**查询参数:** `statYear` / `statMonth`(精确);`townName` / `villageName`(模糊);分页同前。
180
+
181
+**`records[]` 元素(ResearchLivestockProductOutputVo):** `outputId`、年月、乡镇村、`meatOutput`/`milkOutput`(万吨);**不含**部门 ID、操作人、备注。
182
+
183
+实现说明:直接查 `BizLivestockProductOutputMapper`(清空 `params.dataScope`)。
184
+
159 185
 ---
160 186
 
161 187
 ## 4. 鉴权流程
@@ -179,8 +205,10 @@ Token 申请:`appKey`/`appSecret` 与配置项精确匹配后签发 JWT(HS51
179 205
 | 档案列表 | `IBizYakAssetService.selectBizYakAssetList` | `biz_yak_asset` | `del_flag=0`;支持 `assetStatus`、`gender`、`pastureId` |
180 206
 | 存栏列表 | `BizYakHerdInventoryMapper.selectBizYakHerdInventoryList` | `biz_yak_herd_inventory` | 年/月精确;乡镇/村名模糊;清空 `params.dataScope` |
181 207
 | 出栏列表 | `BizYakOutboundReportMapper.selectBizYakOutboundReportList` | `biz_yak_outbound_report` | 同上 |
208
+| 合作社列表 | `BizCooperativeDevelopmentMapper.selectBizCooperativeDevelopmentList` | `biz_cooperative_development` | 年/月精确;乡镇/村/合作社名模糊;清空 `params.dataScope` |
209
+| 产量列表 | `BizLivestockProductOutputMapper.selectBizLivestockProductOutputList` | `biz_livestock_product_output` | 年/月精确;乡镇/村名模糊;清空 `params.dataScope` |
182 210
 
183
-实体 → VO:`ResearchOpenApiSupport.toPastureVo` / `toYakAssetVo` / `toYakHerdInventoryVo` / `toYakOutboundReportVo`。
211
+实体 → VO:`ResearchOpenApiSupport.toPastureVo` / `toYakAssetVo` / `toYakHerdInventoryVo` / `toYakOutboundReportVo` / `toCooperativeDevelopmentVo` / `toLivestockProductOutputVo`
184 212
 
185 213
 ---
186 214
 
@@ -233,6 +261,14 @@ curl "http://localhost:8010/open-api/v1/research/yak-herd-inventories?pageNum=1&
233 261
 # 5. 牦牛出栏
234 262
 curl "http://localhost:8010/open-api/v1/research/yak-outbound-reports?pageNum=1&pageSize=10&statYear=2026&townName=雅安" \
235 263
   -H "Authorization: Bearer <accessToken>"
264
+
265
+# 6. 合作社发展
266
+curl "http://localhost:8010/open-api/v1/research/cooperative-developments?pageNum=1&pageSize=10&statYear=2026&cooperativeName=合作" \
267
+  -H "Authorization: Bearer <accessToken>"
268
+
269
+# 7. 畜牧产品产量
270
+curl "http://localhost:8010/open-api/v1/research/livestock-product-outputs?pageNum=1&pageSize=10&statYear=2026&townName=雅安" \
271
+  -H "Authorization: Bearer <accessToken>"
236 272
 ```
237 273
 
238 274
 ---
@@ -256,6 +292,8 @@ curl "http://localhost:8010/open-api/v1/research/yak-outbound-reports?pageNum=1&
256 292
 | §6.3 档案 | **§3.3**、**§5** BizYakAsset |
257 293
 | §6.4 存栏 | **§3.4**、**§5** BizYakHerdInventory |
258 294
 | §6.5 出栏 | **§3.5**、**§5** BizYakOutboundReport |
295
+| §6.6 合作社 | **§3.6**、**§5** BizCooperativeDevelopment |
296
+| §6.7 产量 | **§3.7**、**§5** BizLivestockProductOutput |
259 297
 | §7 脱敏 | **§6** Masking |
260 298
 | §3 不实现机构区分 | 单一 app-key/secret,JWT 无 clientId |
261 299
 
@@ -265,6 +303,8 @@ curl "http://localhost:8010/open-api/v1/research/yak-outbound-reports?pageNum=1&
265 303
 
266 304
 | 版本 | 日期 | 说明 |
267 305
 | --- | --- | --- |
306
+| 1.4 | 2026-07-22 | 新增畜牧产品产量登记开放列表(年/月/乡镇村模糊+分页) |
307
+| 1.3 | 2026-07-22 | 新增合作社发展开放列表(年/月/乡镇村/名称模糊+分页;法人脱敏) |
268 308
 | 1.2 | 2026-07-22 | 新增牦牛出栏开放列表(年/月/乡镇村模糊+分页) |
269 309
 | 1.1 | 2026-07-22 | 新增牦牛存栏开放列表(年/月/乡镇村模糊+分页) |
270 310
 | 1.0 | 2026-07-04 | 初版:Token + 牧场/档案脱敏列表;全局一对凭证 |

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

@@ -47,6 +47,10 @@
47 47
 | KYKF-API-014 | 存栏 | 年/月/乡镇村筛选 | 接口测试 | curl | §6.4 | 已知年月与乡镇名片段 | GET `statYear=&statMonth=&townName=&villageName=` | 条件生效;名称模糊匹配 |
48 48
 | KYKF-API-015 | 出栏 | 分页列表 | 接口测试 | curl | §6.5 | 有效 Token;库有出栏数据 | GET `/yak-outbound-reports?pageNum=1&pageSize=10` | `code=200`;含出栏汇总字段;无部门 ID |
49 49
 | KYKF-API-016 | 出栏 | 年/月/乡镇村筛选 | 接口测试 | curl | §6.5 | 已知年月与村名片段 | GET 带筛选参数 | 条件生效;名称模糊匹配 |
50
+| KYKF-API-017 | 合作社 | 分页列表 | 接口测试 | curl | §6.6 | 有效 Token;库有合作社数据 | GET `/cooperative-developments?pageNum=1&pageSize=10` | `code=200`;法人已脱敏;无部门 ID |
51
+| KYKF-API-018 | 合作社 | 年/月/乡镇村/名称筛选 | 接口测试 | curl | §6.6 | 已知合作社名片段 | GET 带筛选参数 | 条件生效;名称模糊匹配 |
52
+| KYKF-API-019 | 产量 | 分页列表 | 接口测试 | curl | §6.7 | 有效 Token;库有产量数据 | GET `/livestock-product-outputs?pageNum=1&pageSize=10` | `code=200`;含肉/奶产量;无部门 ID |
53
+| KYKF-API-020 | 产量 | 年/月/乡镇村筛选 | 接口测试 | curl | §6.7 | 已知年月与乡镇名片段 | GET 带筛选参数 | 条件生效;名称模糊匹配 |
50 54
 
51 55
 ---
52 56
 
@@ -59,11 +63,13 @@
59 63
 | §6.3 档案列表 | UT-004 | API-007~009 |
60 64
 | §6.4 存栏列表 | — | API-013~014 |
61 65
 | §6.5 出栏列表 | — | API-015~016 |
66
+| §6.6 合作社列表 | — | API-017~018 |
67
+| §6.7 产量列表 | — | API-019~020 |
62 68
 | §7 脱敏 | UT-001~004 | API-012 |
63 69
 | §2 分页 | — | API-010 |
64 70
 | §3 无机构区分 | UT-005 | API-001(单一凭证) |
65 71
 
66
-**用例统计**:单元 **6**、接口 **16**,合计 **22** 条。
72
+**用例统计**:单元 **6**、接口 **20**,合计 **26** 条。
67 73
 
68 74
 ---
69 75
 
@@ -80,6 +86,8 @@ curl -s "$BASE/pastures?pageNum=1&pageSize=5" -H "Authorization: Bearer $TOKEN"
80 86
 curl -s "$BASE/yak-assets?pageNum=1&pageSize=5&assetStatus=1" -H "Authorization: Bearer $TOKEN"
81 87
 curl -s "$BASE/yak-herd-inventories?pageNum=1&pageSize=5&statYear=2026" -H "Authorization: Bearer $TOKEN"
82 88
 curl -s "$BASE/yak-outbound-reports?pageNum=1&pageSize=5&statYear=2026" -H "Authorization: Bearer $TOKEN"
89
+curl -s "$BASE/cooperative-developments?pageNum=1&pageSize=5&statYear=2026" -H "Authorization: Bearer $TOKEN"
90
+curl -s "$BASE/livestock-product-outputs?pageNum=1&pageSize=5&statYear=2026" -H "Authorization: Bearer $TOKEN"
83 91
 ```
84 92
 
85 93
 (Windows 环境可用 PowerShell `Invoke-RestMethod`,见技术方案 **§8**。)