From 6955a2c758385c6c2e0d14350a11bdbf4f99780b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 06 八月 2025 14:02:43 +0800
Subject: [PATCH] 1、实现作物实体管理;2、实现计算参数管理。
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml | 80 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
index 2027ccd..4108fe1 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
@@ -111,6 +111,86 @@
where id = #{id,jdbcType=BIGINT}
</update>
+ <!-- ////////////////////////////////// -->
+ <!-- 鏌ヨ缁熻缁撴灉 -->
+ <!-- ////////////////////////////////// -->
+ <select id="selectCountYearStatistics" resultType="java.lang.Long">
+ select
+ count(*)
+ from se_client mtb
+ where mtb.deleted != 1
+ <trim prefix="and" suffixOverrides="and">
+ <if test="name != null and name != ''">
+ mtb.name like concat('%', #{name}, '%')
+ </if>
+ </trim>
+ </select>
+
+ <select id="selectClientIds4YearStatistics" resultType="com.dy.pipIrrGlobal.voSt.VoStClientIdAmountYearRecord">
+ select
+ mtb.id as clientId
+ from se_client mtb
+ where mtb.deleted != 1
+ <trim prefix="and" suffixOverrides="and">
+ <if test="name != null and name != ''">
+ mtb.name like concat('%', #{name}, '%')
+ </if>
+ </trim>
+ order by mtb.id DESC
+ <trim prefix="limit " >
+ <if test="start != null and count != null">
+ #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+ </if>
+ </trim>
+ </select>
+
+ <select id="selectYearStatistics" resultType="com.dy.pipIrrGlobal.voSt.VoStClientAmountYearRecord">
+ select
+ ctb.id as clientId,
+ ctb.clientNum as clientNum,
+ ctb.name as clientName,
+ ctb.address as clientAddress,
+ cayTb.amount as amount,
+ cayTb.money as money,
+ cayTb.times as times
+ from se_client ctb
+ <if test="clientIdsJson != null and clientIdsJson !=''">
+ INNER JOIN JSON_TABLE(
+ <!--'[{"clientId":"37142501020100215"},{"clientId":"37142501020100215"}]'-->
+ #{clientIdsJson},
+ '$[*]' COLUMNS (
+ clientId BIGINT PATH '$.clientId'
+ )
+ ) clientIdTb ON clientIdTb.clientId = ctb.id
+ </if>
+ LEFT JOIN
+ (
+ select *
+ from st_client_amount_year
+ <where>
+ <if test="year != null">
+ `year` = #{year,jdbcType=INTEGER}
+ </if>
+ </where>
+ ) as cayTb
+ on cayTb.client_id = clientIdTb.clientId
+ where ctb.deleted != 1
+ <trim prefix="and" suffixOverrides="and">
+ <!-- 2025-07-14 鐨剆electClientIds4YearStatisticssselectClientIds4YearStatistics鏌ヨ涓凡缁忕敤浜唍ame鏉′欢
+ <if test="name != null and name != ''">
+ and ctb.name like concat('%', #{clientName}, '%')
+ </if>
+ -->
+ </trim>
+ order by ctb.id DESC
+ <!-- 2025-07-14 鍥犱负鏈塩lientIdsJson闄愬埗浜嗘暟閲忥紝鎵�浠ヤ笉鍐嶇敤limit浜�
+ <trim prefix="limit " >
+ <if test="start != null and count != null">
+ #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+ </if>
+ </trim>
+ -->
+ </select>
<!-- ////////////////////////////////// -->
<!-- 缁熻鐩稿叧 -->
--
Gitblit v1.8.0