重构日漏损量查询,增加果询条件和排序方法,及增加显示内容
|  |  |  | 
|---|
|  |  |  | <if test="intakeName != null and intakeName != ''"> | 
|---|
|  |  |  | and pint.name like CONCAT('%', #{intakeName,jdbcType=VARCHAR}, '%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="lossAmountGreaterOrEqual != null "> | 
|---|
|  |  |  | and rldl.loss_amount  >= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="startDt != null"> | 
|---|
|  |  |  | and rldl.dt >= #{startDt,jdbcType=DATE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="intakeName != null and intakeName != ''"> | 
|---|
|  |  |  | and pint.name like CONCAT('%', #{intakeName,jdbcType=VARCHAR}, '%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="lossAmountGreaterOrEqual != null "> | 
|---|
|  |  |  | and rldl.loss_amount  >= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="startDt != null"> | 
|---|
|  |  |  | and rldl.dt >= #{startDt,jdbcType=DATE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | and rldl.dt <= #{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} | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="intakeName != null and intakeName != '' "> | 
|---|
|  |  |  | and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="lossAmountGreaterOrEqual != null "> | 
|---|
|  |  |  | and rld.loss_amount  >= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="startDt != null"> | 
|---|
|  |  |  | and rld.dt >= #{startDt,jdbcType=DATE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="intakeName != null and intakeName != '' "> | 
|---|
|  |  |  | and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="lossAmountGreaterOrEqual != null "> | 
|---|
|  |  |  | and rld.loss_amount  >= #{lossAmountGreaterOrEqual,jdbcType=DOUBLE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="startDt != null"> | 
|---|
|  |  |  | and rld.dt >= #{startDt,jdbcType=DATE} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | and rld.dt <= #{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} | 
|---|
|  |  |  | 
|---|
|  |  |  | @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") | 
|---|