From 4a2deb11b819dd78a8c75e244ef67ec2e48cf5f5 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期一, 14 四月 2025 21:03:28 +0800 Subject: [PATCH] 重构轮灌组修改接口 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4StatisticsMapper.xml | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 101 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4StatisticsMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4StatisticsMapper.xml new file mode 100644 index 0000000..f6f07f3 --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4StatisticsMapper.xml @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper"> + + <select id="openCloseRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeOpenCloseValve"> + select + tb.intake_id as intakeId, + sec.id as clientId, + sec.name as clientName, + sec.address as clientAddr, + tb.op_dt as openTime, + tb.op_type as opType, + tb.op_ic_card_no as openIcNum, + tb.op_remain_money as openRemainMoney, + tb.cl_dt as closeTime, + tb.cl_type as clType, + tb.cl_ic_card_no as closeIcNum, + tb.cl_remain_money as closeRemainMoney, + tb.cl_this_time as thisTime, + tb.cl_this_amount as thisAmount, + tb.cl_this_money as thisMoney + from rm_open_close_valve_history tb + left join se_client sec on tb.client_id = sec.id + where tb.intake_id = #{intakeId, jdbcType=BIGINT} + ORDER BY tb.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="lossDayRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeLossDay"> + select + tb.intake_id as intakeId, + tb.dt AS dt, + tb.loss_amount AS loss + from rm_loss_day tb + where intake_id = #{intakeId, jdbcType=BIGINT} + ORDER BY tb.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="lossMonthRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeLossMonth"> + select + tb.intake_id as intakeId, + CONCAT(tb.year, '-', tb.month) AS dt, + tb.amount AS loss + from st_loss_month tb + where intake_id = #{intakeId, jdbcType=BIGINT} + ORDER BY tb.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="amountDayRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeAmountDay"> + select + tb.intake_id as intakeId, + tb.dt AS dt, + tb.amount AS amount, + tb.money AS money, + tb.times AS times + from rm_intake_amount_day tb + where intake_id = #{intakeId, jdbcType=BIGINT} + ORDER BY tb.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="amountMonthRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeAmountMonth"> + select + tb.intake_id as intakeId, + CONCAT(tb.year, '-', tb.month) AS dt, + tb.amount AS amount + from st_intake_amount_month tb + where intake_id = #{intakeId, jdbcType=BIGINT} + ORDER BY tb.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> + + +</mapper> \ No newline at end of file -- Gitblit v1.8.0