From 2967cb41a0a2ee19e82fc96e54e6863615008409 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 22 Feb 2022 16:48:42 +0800
Subject: [PATCH] fix

---
 zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java                      |    9 +++++++++
 zq-erp/src/main/java/com/matrix/system/hive/dto/AchieveNewStatisticsDto.java                   |    4 ++++
 zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/achieveNewStatiostics.html |    9 ++++++++-
 3 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dto/AchieveNewStatisticsDto.java b/zq-erp/src/main/java/com/matrix/system/hive/dto/AchieveNewStatisticsDto.java
index f4b4816..25bbfcc 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dto/AchieveNewStatisticsDto.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dto/AchieveNewStatisticsDto.java
@@ -25,6 +25,10 @@
     //订单类型
     String orderType;
 
+    String beginTimeStr;
+
+    String endTimeStr;
+
     @Override
     public void setSort(String sort) {
         if(StringUtils.isNotBlank(sort)){
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
index 9901970..1668d00 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
@@ -1,5 +1,6 @@
 package com.matrix.system.hive.statistics;
 
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.matrix.core.constance.MatrixConstance;
@@ -126,6 +127,14 @@
         }
         queryDto.setCompanyId(sysUsers.getCompanyId());
         Page<AchieveNewStatisticsVo> page = new Page(1, Long.MAX_VALUE);
+
+        if (StrUtil.isNotBlank(queryDto.getBeginTimeStr())) {
+            queryDto.setBeginTime(DateUtil.stringToDate(queryDto.getBeginTimeStr(), DateUtil.DATE_FORMAT_MM));
+        }
+
+        if (StrUtil.isNotBlank(queryDto.getEndTimeStr())) {
+            queryDto.setEndTime(DateUtil.stringToDate(queryDto.getEndTimeStr(), DateUtil.DATE_FORMAT_MM));
+        }
         IPage<AchieveNewStatisticsVo> rows = achieveNewDao.achieveNewStatistics(page,queryDto);
         List<AchieveNewStatisticsVo> dataList = rows.getRecords();
         List<List<Object>> list = new ArrayList<>();
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/achieveNewStatiostics.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/achieveNewStatiostics.html
index 34ecd48..286d33b 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/achieveNewStatiostics.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/achieveNewStatiostics.html
@@ -354,7 +354,14 @@
 
             //导出
           exportExcel(){
-            window.location.href=basePath+"/admin/achieve/exportAchieveNewStatisticsExcel?"+MTools.jsonToUrlParam(this.getRequestParam());
+              var reqParam = this.getRequestParam();
+              reqParam.beginTimeStr = reqParam.beginTime;
+              reqParam.endTimeStr = reqParam.endTime;
+              reqParam.beginTime = null;
+              reqParam.endTime = null;
+              var param = MTools.jsonToUrlParam(reqParam);
+              console.log(param);
+            window.location.href=basePath+"/admin/achieve/exportAchieveNewStatisticsExcel?"+param;
         }
 
         }

--
Gitblit v1.9.1