Explorar el Código

养殖大户数据填报

wwh hace 2 semanas
padre
commit
27e8995888

+ 1 - 1
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/BizFarmerHousehold.java

@@ -66,7 +66,7 @@ public class BizFarmerHousehold extends BaseEntity
66 66
 
67 67
     private BigDecimal villageSupervisorSubsidy;
68 68
 
69
-    /** 派生:封顶保底后 + 村级监督员补助 */
69
+    /** 派生:补助奖励总资金 + 封顶保底后享受补助奖励总资金 + 村级草原监督员补助 */
70 70
     private BigDecimal subsidyTotal;
71 71
 
72 72
     public Long getId()

+ 13 - 2
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/support/FarmerHouseholdDerivedSupport.java

@@ -6,7 +6,15 @@ import com.ruoyi.common.utils.StringUtils;
6 6
 import com.ruoyi.web.modules.industryservice.domain.BizFarmerHousehold;
7 7
 
8 8
 /**
9
- * 农牧户派生字段与是/否规范化
9
+ * 农牧户派生字段与是/否规范化。
10
+ * <p>
11
+ * 派生:
12
+ * <ul>
13
+ *   <li>草场承包总面积 = 禁牧面积 + 草畜平衡面积</li>
14
+ *   <li>补助奖励总资金 = 禁牧补助 + 草畜平衡奖励</li>
15
+ *   <li>补助合计金额 = 补助奖励总资金 + 封顶保底后享受补助奖励总资金 + 村级草原监督员补助</li>
16
+ * </ul>
17
+ * </p>
10 18
  */
11 19
 public final class FarmerHouseholdDerivedSupport
12 20
 {
@@ -26,7 +34,10 @@ public final class FarmerHouseholdDerivedSupport
26 34
         }
27 35
         row.setPastureContractArea(safeDec(row.getGrazingBanArea()).add(safeDec(row.getGrassBalanceArea())));
28 36
         row.setSubsidyRewardSubtotal(safeDec(row.getGrazingBanSubsidy()).add(safeDec(row.getGrassBalanceReward())));
29
-        row.setSubsidyTotal(safeDec(row.getAfterCapFloorSubsidy()).add(safeDec(row.getVillageSupervisorSubsidy())));
37
+        // 补助合计金额 = 补助奖励总资金 + 封顶保底后享受补助奖励总资金 + 村级草原监督员补助
38
+        row.setSubsidyTotal(safeDec(row.getSubsidyRewardSubtotal())
39
+                .add(safeDec(row.getAfterCapFloorSubsidy()))
40
+                .add(safeDec(row.getVillageSupervisorSubsidy())));
30 41
     }
31 42
 
32 43
     /** 核定载畜量 &lt; 年底存栏绵羊单位 → 草畜失衡 */

BIN
baqing-admin/src/main/resources/templates/巴青软件新增功能2.xlsx


+ 1 - 1
doc/产业数据模型及服务/农牧户数据填报/农牧户数据填报功能需求.md

@@ -20,7 +20,7 @@
20 20
 - 派生(保存时计算):
21 21
   - 草场承包总面积 = 禁牧面积 + 草畜平衡面积
22 22
   - 补助奖励总资金 = 禁牧补助 + 草畜平衡奖励
23
-  - 补助合计金额 = 封顶保底后享受补助奖励总资金 + 村级草原监督员补助
23
+  - 补助合计金额 = 补助奖励总资金 + 封顶保底后享受补助奖励总资金 + 村级草原监督员补助
24 24
 - 封顶保底六项(是否是纯牧户等)按模板填写「是 / 否」。
25 25
 - 草畜失衡预警:核定年末草畜平衡载畜量 &lt; 年底牲畜存栏(绵羊单位)时写入 **`biz_yak_disease_warning`**(`warning_type=6`,`data_source=farmer_household`,`device_no=FH-{id}`);恢复平衡或删除记录时清除对应预警。不另建预警表。
26 26
 

+ 1 - 0
doc/产业数据模型及服务/农牧户数据填报/农牧户数据填报技术方案.md

@@ -23,6 +23,7 @@ Base Path:`/dataModel/farmerHousehold`
23 23
 - 主表 `biz_farmer_household`
24 24
 - 唯一键 `(stat_year, stat_month, village_dept_id)`
25 25
 - 派生落库:`pasture_contract_area`、`subsidy_reward_subtotal`、`subsidy_total`
26
+  - `subsidy_total` = `subsidy_reward_subtotal` + `after_cap_floor_subsidy` + `village_supervisor_subsidy`
26 27
 - 草畜失衡预警:**复用** `biz_yak_disease_warning`
27 28
   - `warning_type = 6`(草畜失衡)
28 29
   - `data_source = farmer_household`

+ 1 - 1
doc/产业数据模型及服务/农牧户数据填报/农牧户数据填报测试用例.md

@@ -7,7 +7,7 @@
7 7
 | 编号 | 场景 | 期望 |
8 8
 | --- | --- | --- |
9 9
 | UT-001 | 解析运行模板样例 | 2 行;乡镇/村/户数/禁牧面积/是否纯牧户正确 |
10
-| UT-002 | 派生计算 | 草场承包总面积、补助奖励总资金、补助合计正确 |
10
+| UT-002 | 派生计算 | 草场承包总面积、补助奖励总资金、补助合计(=补助奖励总资金+封顶保底后+村级监督员)正确 |
11 11
 | API-001 | 新增 | 选村+年月成功;乡镇回填 |
12 12
 | API-002 | 唯一键 | 同年同月同村再增失败 |
13 13
 | API-003 | 导入 upsert | 已有更新、新建插入;不删同月其他记录 |

+ 1 - 1
sql/biz_farmer_household.sql

@@ -26,7 +26,7 @@ CREATE TABLE `biz_farmer_household` (
26 26
   `subsidy_reward_subtotal` decimal(18,4) DEFAULT NULL COMMENT '补助奖励总资金(元)=禁牧补助+草畜平衡奖励',
27 27
   `after_cap_floor_subsidy` decimal(18,4) DEFAULT NULL COMMENT '封顶保底后享受补助奖励总资金(元)',
28 28
   `village_supervisor_subsidy` decimal(18,4) DEFAULT NULL COMMENT '村级草原监督员补助(元)',
29
-  `subsidy_total` decimal(18,4) DEFAULT NULL COMMENT '补助合计金额(元)=封顶保底后+村级监督员',
29
+  `subsidy_total` decimal(18,4) DEFAULT NULL COMMENT '补助合计金额(元)=补助奖励总资金+封顶保底后+村级监督员',
30 30
   `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
31 31
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
32 32
   `update_by` varchar(64) DEFAULT '' COMMENT '更新者',