Browse Source

抄表记录排序

lihui001 3 years ago
parent
commit
45981e9724

+ 1 - 1
zoniot-rmcp/zoniot-rmcp-api/src/main/java/com/zcxk/rmcp/api/dto/meterreadrecord/MeterReadRecordDto.java

@@ -42,6 +42,6 @@ public class MeterReadRecordDto extends BasePageDto {
     private String collectorCode;
 
     public String getDate(){
-        return ZoniotStringUtils.isNotEmpty(date) ? date + " 00:00:00" :date;
+        return ZoniotStringUtils.isNotEmpty(date) ? date + " 00:00:00" : date;
     }
 }

+ 8 - 8
zoniot-rmcp/zoniot-rmcp-api/src/main/java/com/zcxk/rmcp/api/vo/ReadRateVo.java

@@ -16,20 +16,20 @@ import java.math.BigDecimal;
 @Data
 public class ReadRateVo {
 
-    @ApiModelProperty(value="小区名字")
-    @ExcelProperty(value = {"小区名字"},index = 0)
+    @ApiModelProperty(value="小区")
+    @ExcelProperty(value = {"小区"},index = 0)
     private String communityName;
 
-    @ApiModelProperty(value="水表名字")
-    @ExcelProperty(value = {"水表名字"},index = 1)
+    @ApiModelProperty(value="水表")
+    @ExcelProperty(value = {"水表"},index = 1)
     private String categoryName;
 
-    @ApiModelProperty(value="公司名字")
-    @ExcelProperty(value = {"公司名字"},index = 2)
+    @ApiModelProperty(value="公司")
+    @ExcelProperty(value = {"公司"},index = 2)
     private String companyOrgName;
 
-    @ApiModelProperty(value="部门名字")
-    @ExcelProperty(value = {"部门名字"},index = 3)
+    @ApiModelProperty(value="部门")
+    @ExcelProperty(value = {"部门"},index = 3)
     private String deptOrgName;
 
     @ApiModelProperty(value="应抄数据")

+ 0 - 3
zoniot-rmcp/zoniot-rmcp-core/src/main/java/com/zcxk/rmcp/core/dao/mongo/MeterReadRecordDao.java

@@ -284,11 +284,8 @@ public class MeterReadRecordDao extends BaseDao<MeterReadRecord, String> impleme
         if (ZoniotStringUtils.isNotEmpty(dto.getConcentratorId())) {
             criteria.and("concentratorId").is(dto.getConcentratorId());
         }
-
-
         // 设置用户权限过滤
         Criteria criteriaUser = criteriaUserCondition(userCondition);
-        System.out.println(criteriaUser.toString());
 
         if (ZoniotStringUtils.isNotEmpty(dto.getDeviceMeterNo())) {
             Criteria orCriteria = new Criteria();

+ 6 - 0
zoniot-rmcp/zoniot-rmcp-core/src/main/java/com/zcxk/rmcp/core/mapper/ReadRate7Day.xml

@@ -83,6 +83,12 @@
     <if test="dto.categoryId != null and dto.categoryId != ''">
       and rd.category_id = #{dto.categoryId}
     </if>
+    <if test="dto.readRateBegin != null and dto.readRateEnd == null">
+      and rd.read_rate >= #{dto.readRateBegin}
+    </if>
+    <if test="dto.readRateBegin == null and dto.readRateEnd != null">
+      and #{dto.readRateEnd} >= rd.read_rate
+    </if>
     <if test="dto.readRateBegin != null and dto.readRateEnd != null">
       and rd.read_rate BETWEEN #{dto.readRateBegin} and  #{dto.readRateEnd}
     </if>

+ 6 - 0
zoniot-rmcp/zoniot-rmcp-core/src/main/java/com/zcxk/rmcp/core/mapper/ReadRateMonth.xml

@@ -82,6 +82,12 @@
     <if test="dto.categoryId != null and dto.categoryId != ''">
       and rd.category_id = #{dto.categoryId}
     </if>
+    <if test="dto.readRateBegin != null and dto.readRateEnd == null">
+      and rd.read_rate >= #{dto.readRateBegin}
+    </if>
+    <if test="dto.readRateBegin == null and dto.readRateEnd != null">
+      and #{dto.readRateEnd} >= rd.read_rate
+    </if>
     <if test="dto.readRateBegin != null and dto.readRateEnd != null">
       and rd.read_rate BETWEEN #{dto.readRateBegin} and  #{dto.readRateEnd}
     </if>

+ 6 - 0
zoniot-rmcp/zoniot-rmcp-core/src/main/java/com/zcxk/rmcp/core/mapper/ReadRateToday.xml

@@ -83,6 +83,12 @@
     <if test="dto.categoryId != null and dto.categoryId != ''">
       and rd.category_id = #{dto.categoryId}
     </if>
+    <if test="dto.readRateBegin != null and dto.readRateEnd == null">
+      and rd.read_rate >= #{dto.readRateBegin}
+    </if>
+    <if test="dto.readRateBegin == null and dto.readRateEnd != null">
+      and #{dto.readRateEnd} >= rd.read_rate
+    </if>
     <if test="dto.readRateBegin != null and dto.readRateEnd != null">
       and rd.read_rate BETWEEN #{dto.readRateBegin} and  #{dto.readRateEnd}
     </if>

+ 6 - 0
zoniot-rmcp/zoniot-rmcp-core/src/main/java/com/zcxk/rmcp/core/mapper/ReadRateYesterday.xml

@@ -83,6 +83,12 @@
     <if test="dto.categoryId != null and dto.categoryId != ''">
       and rd.category_id = #{dto.categoryId}
     </if>
+    <if test="dto.readRateBegin != null and dto.readRateEnd == null">
+      and rd.read_rate >= #{dto.readRateBegin}
+    </if>
+    <if test="dto.readRateBegin == null and dto.readRateEnd != null">
+      and #{dto.readRateEnd} >= rd.read_rate
+    </if>
     <if test="dto.readRateBegin != null and dto.readRateEnd != null">
       and rd.read_rate BETWEEN #{dto.readRateBegin} and  #{dto.readRateEnd}
     </if>