瀏覽代碼

收益概览fix

tanbin 1 年之前
父節點
當前提交
432cad08e8

+ 8 - 8
device-api-service/src/main/java/com/xy/service/MercFeeCountMonthServiceImpl.java

@@ -1,7 +1,5 @@
 package com.xy.service;
 
-import cn.hutool.core.date.DatePattern;
-import cn.hutool.core.date.LocalDateTimeUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -80,10 +78,10 @@ public class MercFeeCountMonthServiceImpl extends ServiceImpl<MercFeeCountMonthM
     public R<PageBean<MercFeeCountMonthDto.Vo>> page(MercFeeCountMonthDto.Page page) {
 
         PageBean pageBean = page.getPage();
-        LocalDateTime beginTime = page.getBeginTime();
-        LocalDateTime endTime = page.getEndTime();
-        String start = LocalDateTimeUtil.format(beginTime, DatePattern.SIMPLE_MONTH_PATTERN);
-        String end = LocalDateTimeUtil.format(endTime, DatePattern.SIMPLE_MONTH_PATTERN);
+
+
+        String start = page.getBeginTime();
+        String end = page.getEndTime();
 
         LambdaQueryWrapper<MercFeeCountMonth> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(page, MercFeeCountMonth.class)
                 .build()
@@ -91,8 +89,10 @@ public class MercFeeCountMonthServiceImpl extends ServiceImpl<MercFeeCountMonthM
                 .orderByDesc(MercFeeCountMonth::getDateValue);
 
         if (StrUtil.isNotEmpty(start) && StrUtil.isNotEmpty(end)) {
-            int s = Integer.valueOf(start).intValue();
-            int e = Integer.valueOf(end).intValue();
+            String startDate = start.replaceAll("-", "");
+            String endDate = end.replaceAll("-", "");
+            int s = Integer.valueOf(startDate).intValue();
+            int e = Integer.valueOf(endDate).intValue();
             lambdaQueryWrapper.between(MercFeeCountMonth::getDateValue, s, e);
         }
         IPage<MercFeeCountMonth> iPage = page(toIPage(pageBean), lambdaQueryWrapper);

+ 4 - 4
device-api/src/main/java/com/xy/dto/MercFeeCountMonthDto.java

@@ -38,12 +38,12 @@ public class MercFeeCountMonthDto {
     @Accessors(chain = true)
     public static class Page extends Vo {
         @ApiModelProperty(value = "月份-起")
-        @JsonFormat(pattern = "yyyy-MM-dd")
-        private LocalDateTime beginTime;
+      
+        private String beginTime;
 
         @ApiModelProperty(value = "月份-止")
-        @JsonFormat(pattern = "yyyy-MM-dd")
-        private LocalDateTime endTime;
+
+        private String endTime;
 
         @ApiModelProperty(value = "分页对象", required = true)
         private PageBean page;