Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
03ad2373
Commit
03ad2373
authored
Jan 16, 2024
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 小程序兼容
parent
1ab951b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
10 deletions
+49
-10
MaterialAnalyzeDataQO.java
...nage/web/qo/content/statistics/MaterialAnalyzeDataQO.java
+0
-5
MaterialStatisticsBaseQO.java
...e/web/qo/content/statistics/MaterialStatisticsBaseQO.java
+49
-0
MaterialStoreAnalyzeDataQO.java
...web/qo/content/statistics/MaterialStoreAnalyzeDataQO.java
+0
-5
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/statistics/MaterialAnalyzeDataQO.java
View file @
03ad2373
...
...
@@ -15,11 +15,6 @@ import java.util.Map;
public
class
MaterialAnalyzeDataQO
extends
MaterialStatisticsBaseQO
{
private
static
final
long
serialVersionUID
=
3422937373665522931L
;
/**
* 时间筛选
* 1 过去7天(默认选中),2 过去30天,3 过去60天,4 过去90天,5本周,6 本月,7 上月,8 上上月,9 上上上月
*/
private
Integer
fixedDateDiff
;
/**
* 排序字段
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/statistics/MaterialStatisticsBaseQO.java
View file @
03ad2373
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
content
.
statistics
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.haoban.common.utils.DateUtil
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
java.util.Date
;
/**
* @Author MUSI
...
...
@@ -42,6 +47,12 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
*/
private
String
endDate
;
/**
* 时间筛选
* 1 过去7天(默认选中),2 过去30天,3 过去60天,4 过去90天,5本周,6 本月,7 上月,8 上上月,9 上上上月
*/
private
Integer
fixedDateDiff
;
public
String
getEnterpriseId
()
{
return
enterpriseId
;
...
...
@@ -68,6 +79,12 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
}
public
String
getStartDate
()
{
if
(
StringUtils
.
isNotBlank
(
this
.
startDate
))
{
return
this
.
startDate
;
}
if
(
this
.
fixedDateDiff
!=
null
)
{
return
convertStartDate
(
this
.
fixedDateDiff
);
}
return
startDate
;
}
...
...
@@ -76,10 +93,42 @@ public class MaterialStatisticsBaseQO extends BasePageInfo {
}
public
String
getEndDate
()
{
if
(
StringUtils
.
isBlank
(
this
.
endDate
))
{
return
DateUtil
.
dateToStr
(
new
Date
(),
"yyyy-MM-dd"
);
}
return
endDate
;
}
public
void
setEndDate
(
String
endDate
)
{
this
.
endDate
=
endDate
;
}
public
String
convertStartDate
(
Integer
fixedDateDiff
)
{
if
(
fixedDateDiff
==
null
)
{
return
null
;
}
switch
(
fixedDateDiff
)
{
case
1
:
return
DateUtil
.
dateToStr
(
DateUtils
.
addDays
(
new
Date
(),
-
7
),
"yyyy-MM-dd"
);
case
2
:
return
DateUtil
.
dateToStr
(
DateUtils
.
addDays
(
new
Date
(),
-
30
),
"yyyy-MM-dd"
);
case
3
:
return
DateUtil
.
dateToStr
(
DateUtils
.
addDays
(
new
Date
(),
-
60
),
"yyyy-MM-dd"
);
case
4
:
return
DateUtil
.
dateToStr
(
DateUtils
.
addDays
(
new
Date
(),
-
90
),
"yyyy-MM-dd"
);
case
5
:
return
DateUtil
.
dateToStr
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
beginOfWeek
(
new
Date
()),
"yyyy-MM-dd"
);
case
6
:
return
DateUtil
.
dateToStr
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
beginOfMonth
(
new
Date
()),
"yyyy-MM-dd"
);
case
7
:
return
DateUtil
.
dateToStr
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
lastMonth
(),
"yyyy-MM-dd"
);
case
8
:
return
DateUtil
.
dateToStr
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
beginOfMonth
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMonth
(
new
Date
(),
-
2
)),
"yyyy-MM-dd"
);
case
9
:
return
DateUtil
.
dateToStr
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
beginOfMonth
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMonth
(
new
Date
(),
-
3
)),
"yyyy-MM-dd"
);
default
:
return
null
;
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/statistics/MaterialStoreAnalyzeDataQO.java
View file @
03ad2373
...
...
@@ -15,11 +15,6 @@ import java.util.Map;
public
class
MaterialStoreAnalyzeDataQO
extends
MaterialStatisticsBaseQO
{
private
static
final
long
serialVersionUID
=
3422937373665522931L
;
/**
* 时间筛选
* 1 过去7天(默认选中),2 过去30天,3 过去60天,4 过去90天,5本周,6 本月,7 上月,8 上上月,9 上上上月
*/
private
Integer
fixedDateDiff
;
/**
* 排序字段
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment