liurunyu
2024-10-31 aa59ddfc2c48dd540fe769e95c2429623f3851c8
重构日漏损量查询,增加果询条件和排序方法,及增加显示内容
3个文件已修改
25 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayLastMapper.xml
@@ -181,6 +181,9 @@
            <if test="intakeName != null and intakeName != ''">
                and pint.name like CONCAT('%', #{intakeName,jdbcType=VARCHAR}, '%')
            </if>
            <if test="lossAmountGreaterOrEqual != null ">
                and rldl.loss_amount  &gt;= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE}
            </if>
            <if test="startDt != null">
                and rldl.dt &gt;= #{startDt,jdbcType=DATE}
            </if>
@@ -208,6 +211,9 @@
            <if test="intakeName != null and intakeName != ''">
                and pint.name like CONCAT('%', #{intakeName,jdbcType=VARCHAR}, '%')
            </if>
            <if test="lossAmountGreaterOrEqual != null ">
                and rldl.loss_amount  &gt;= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE}
            </if>
            <if test="startDt != null">
                and rldl.dt &gt;= #{startDt,jdbcType=DATE}
            </if>
@@ -215,10 +221,7 @@
                and rldl.dt &lt;= #{endDt,jdbcType=DATE}
            </if>
        </where>
        ORDER BY rldl.dt DESC, rldl.loss_amount DESC
        <!--    <if test="pageCurr != null and pageSize != null">-->
        <!--      LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}-->
        <!--    </if>-->
        ORDER BY rldl.id DESC
        <trim prefix="limit ">
            <if test="start != null and count != null">
                #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmLossDayMapper.xml
@@ -161,6 +161,9 @@
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="lossAmountGreaterOrEqual != null ">
        and rld.loss_amount  &gt;= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE}
      </if>
      <if test="startDt != null">
        and rld.dt &gt;= #{startDt,jdbcType=DATE}
      </if>
@@ -189,6 +192,9 @@
      <if test="intakeName != null and intakeName != '' ">
        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
      </if>
      <if test="lossAmountGreaterOrEqual != null ">
        and rld.loss_amount  &gt;= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE}
      </if>
      <if test="startDt != null">
        and rld.dt &gt;= #{startDt,jdbcType=DATE}
      </if>
@@ -196,10 +202,7 @@
        and rld.dt &lt;= #{endDt,jdbcType=DATE}
      </if>
    </where>
    ORDER BY rld.dt DESC , rld.loss_amount DESC
<!--    <if test="pageCurr != null and pageSize != null">-->
<!--      LIMIT {(pageCurr-1)*pageSize}, ${pageSize}-->
<!--    </if>-->
    ORDER BY rld.id DESC
    <trim prefix="limit " >
      <if test="start != null and count != null">
        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/lossDay/LossDayQueryVo.java
@@ -30,6 +30,9 @@
    @Schema(description = "取水口ID")
    private String intakeId;
    @Schema(description = "漏损大于等于")
    private Double lossAmountGreaterOrEqual;
    @Schema(description = "统计开始日期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")