|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+# 畜牧产品产量登记 — 技术方案
|
|
|
2
|
+
|
|
|
3
|
+> 模板:`baqing-admin/src/main/resources/templates/livestock_product_output_import_template.xlsx`
|
|
|
4
|
+
|
|
|
5
|
+## 1. 架构
|
|
|
6
|
+
|
|
|
7
|
+Controller `/dataModel/livestockProductOutput` → Service → Mapper;Excel:`LivestockProductOutputExcelParser` / `LivestockProductOutputExcelExporter`;校验:`LivestockProductOutputValidation`。
|
|
|
8
|
+
|
|
|
9
|
+## 2. 表 `biz_livestock_product_output`
|
|
|
10
|
+
|
|
|
11
|
+唯一键 `uk_year_month_village (stat_year, stat_month, village_dept_id)`;字段含乡镇/村冗余名、`meat_output`、`milk_output`(万吨)。DDL:`sql/biz_livestock_product_output.sql`。
|
|
|
12
|
+
|
|
|
13
|
+## 3. Excel 列(0-based)
|
|
|
14
|
+
|
|
|
15
|
+| 列 | 字段 |
|
|
|
16
|
+| --- | --- |
|
|
|
17
|
+| 0 | 序号 |
|
|
|
18
|
+| 1 | 乡镇 |
|
|
|
19
|
+| 2 | 村 |
|
|
|
20
|
+| 3 | 肉产量(万吨) |
|
|
|
21
|
+| 4 | 奶产量(万吨) |
|
|
|
22
|
+
|
|
|
23
|
+数据起始:`headerRow + 1`。导入遇「合计」停止;导出写合计行并合并 0~2 列,对肉/奶求和。
|
|
|
24
|
+
|
|
|
25
|
+## 4. 导入 / 导出
|
|
|
26
|
+
|
|
|
27
|
+- 导入:任一行失败不写库 → 按唯一键 upsert。
|
|
|
28
|
+- 导出:可选 `townDeptId`;复制模板数据行样式到新建行;含合计行。
|
|
|
29
|
+
|
|
|
30
|
+## 5. 前端
|
|
|
31
|
+
|
|
|
32
|
+- 页面:`ruoyi-ui/src/views/dataModel/livestockProductOutput/index.vue`
|
|
|
33
|
+- API:`ruoyi-ui/src/api/dataModel/livestockProductOutput.js`
|
|
|
34
|
+- i18n:`livestockProductOutput`
|
|
|
35
|
+
|
|
|
36
|
+## 6. 修订记录
|
|
|
37
|
+
|
|
|
38
|
+| 版本 | 说明 |
|
|
|
39
|
+| --- | --- |
|
|
|
40
|
+| 1.0 | 首版对齐交接模板与合作社/出栏交互 |
|