farm模块-租号所属数据

This commit is contained in:
顾君禹
2025-08-21 09:38:59 +08:00
parent ea4761845d
commit e5b9edea50
16 changed files with 124 additions and 36 deletions

View File

@@ -9,4 +9,9 @@
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="getBaseCount" parameterType="Long" resultType="java.lang.Integer">
select count(*)
from farm_base_info
where tenant_id = #{tenantId}
</select>
</mapper>

View File

@@ -9,4 +9,10 @@
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="personnelCount" parameterType="Long" resultType="java.lang.Integer">
select count(*)
from farm_personnel_management
where tenant_id = #{tenantId}
and account_status = 0
</select>
</mapper>

View File

@@ -9,4 +9,14 @@
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="getCropCount" parameterType="Long" resultType="java.lang.Integer">
select count(plant_species_code)
from farm_production_plan
where tenant_id = #{tenantId}
</select>
<select id="getTotalArea" parameterType="Long" resultType="java.lang.Double">
select sum(total_area)
from farm_production_plan
where tenant_id = #{tenantId}
</select>
</mapper>