Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
f03c615b
Commit
f03c615b
authored
Nov 29, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'order_received_statistics' into dev
parents
6e53bbe5
59edd8ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
CompanyPerformanceBiz.java
...va/com/xxfc/platform/order/biz/CompanyPerformanceBiz.java
+17
-6
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/CompanyPerformanceBiz.java
View file @
f03c615b
...
@@ -17,6 +17,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
...
@@ -17,6 +17,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -207,14 +208,24 @@ public class CompanyPerformanceBiz {
...
@@ -207,14 +208,24 @@ public class CompanyPerformanceBiz {
pageDataVO
.
setData
(
companyPerformanceBos
);
pageDataVO
.
setData
(
companyPerformanceBos
);
if
(
companyPerformanceFindDTO
.
getPage
()
==
1
)
{
if
(
companyPerformanceFindDTO
.
getPage
()
==
1
)
{
OrderReceivedStatistics
orderReceivedStatistics
=
new
OrderReceivedStatistics
();
Example
example
=
new
Example
(
OrderReceivedStatistics
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
Objects
.
nonNull
(
companyPerformanceFindDTO
.
getCompanyId
()))
{
if
(
Objects
.
nonNull
(
companyPerformanceFindDTO
.
getCompanyId
()))
{
orderReceivedStatistics
.
setCompanyId
(
companyPerformanceFindDTO
.
getCompanyId
());
criteria
.
andEqualTo
(
"companyId"
,
companyPerformanceFindDTO
.
getCompanyId
());
}
}
Long
totlCount
=
orderReceivedStatisticsBiz
.
selectCount
(
orderReceivedStatistics
);
if
(
Objects
.
nonNull
(
companyPerformanceFindDTO
.
getStartDate
())
&&
Objects
.
nonNull
(
companyPerformanceFindDTO
.
getEndDate
())){
long
isZero
=
totlCount
%
companyPerformanceFindDTO
.
getLimit
();
criteria
.
andBetween
(
"date"
,
companyPerformanceFindDTO
.
getStartDate
(),
companyPerformanceFindDTO
.
getEndDate
());
long
totalPage
=
isZero
==
0
?
totlCount
/
companyPerformanceFindDTO
.
getLimit
()
:
totlCount
/
companyPerformanceFindDTO
.
getLimit
()
+
1
;
}
pageDataVO
.
setTotalCount
(
totlCount
);
if
(
Objects
.
nonNull
(
companyPerformanceFindDTO
.
getStartDate
())
&&
Objects
.
isNull
(
companyPerformanceFindDTO
.
getEndDate
())){
criteria
.
andGreaterThanOrEqualTo
(
"date"
,
companyPerformanceFindDTO
.
getStartDate
());
}
if
(
Objects
.
isNull
(
companyPerformanceFindDTO
.
getStartDate
())
&&
Objects
.
nonNull
(
companyPerformanceFindDTO
.
getEndDate
())){
criteria
.
andLessThanOrEqualTo
(
"date"
,
companyPerformanceFindDTO
.
getEndDate
());
}
int
totalCount
=
orderReceivedStatisticsBiz
.
selectCountByExample
(
example
);
long
isZero
=
totalCount
%
companyPerformanceFindDTO
.
getLimit
();
long
totalPage
=
isZero
==
0
?
totalCount
/
companyPerformanceFindDTO
.
getLimit
()
:
totalCount
/
companyPerformanceFindDTO
.
getLimit
()
+
1
;
pageDataVO
.
setTotalCount
(
Long
.
valueOf
(
totalCount
));
pageDataVO
.
setTotalPage
(
Integer
.
valueOf
(
String
.
valueOf
(
totalPage
)));
pageDataVO
.
setTotalPage
(
Integer
.
valueOf
(
String
.
valueOf
(
totalPage
)));
}
}
return
pageDataVO
;
return
pageDataVO
;
...
...
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