Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
朱海
/
VVAS-PicGroup
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 351cd534
authored
Apr 18, 2024
by
朱海
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg]接待统计时间范围扩大
1 parent
1f22fa60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
src/main/java/com/viontech/keliu/dao/DPersonReceptionDao.java
src/main/java/com/viontech/keliu/service/impl/PersonRecordServiceImpl.java
src/main/java/com/viontech/keliu/dao/DPersonReceptionDao.java
View file @
351cd53
package
com
.
viontech
.
keliu
.
dao
;
import
cn.hutool.core.date.DateUtil
;
import
com.viontech.keliu.entity.DPersonReception
;
import
org.springframework.jdbc.core.BeanPropertyRowMapper
;
import
org.springframework.jdbc.core.JdbcTemplate
;
...
...
@@ -24,6 +25,8 @@ public class DPersonReceptionDao {
public
List
<
DPersonReception
>
getPersonReceptionList
(
Long
mallId
,
Date
countDate
,
String
personUnid
,
Date
startTime
,
Date
endTime
)
{
startTime
=
DateUtil
.
offsetMinute
(
startTime
,
-
5
);
endTime
=
DateUtil
.
offsetMinute
(
endTime
,
5
);
String
sql
=
"select * from d_person_reception where mall_id = ? and count_date = ? and person_unid = ? and start_time >= ? and end_time <= ? order by start_time;"
;
return
jdbcTemplate
.
query
(
sql
,
new
BeanPropertyRowMapper
<>(
DPersonReception
.
class
),
mallId
,
countDate
,
personUnid
,
startTime
,
endTime
);
}
...
...
src/main/java/com/viontech/keliu/service/impl/PersonRecordServiceImpl.java
View file @
351cd53
...
...
@@ -222,6 +222,15 @@ public class PersonRecordServiceImpl implements PersonRecordService {
if
(
personInOutDetail
.
getPersonType
()
!=
0
)
{
continue
;
}
//处理接待数据
List
<
DPersonReception
>
personReceptionList
=
dPersonReceptionDao
.
getPersonReceptionList
(
dPersonRecord
.
getMallId
(),
dPersonRecord
.
getCountDate
(),
dPersonRecord
.
getPersonUnid
(),
dPersonRecord
.
getArriveTime
(),
dPersonRecord
.
getLeaveTime
());
if
(
CollectionUtils
.
isNotEmpty
(
personReceptionList
))
{
dPersonRecord
.
setReceptionCount
(
personReceptionList
.
size
());
dPersonRecord
.
setReceptionTime
(
personReceptionList
.
get
(
0
).
getStartTime
());
dPersonRecord
.
setReceptionDuration
(
personReceptionList
.
stream
().
mapToLong
(
DPersonReception:
:
getDuration
).
sum
());
}
//进出匹配的人在店内的抓拍记录
List
<
Person
>
insidePersonList
=
personInOutDetail
.
getInsidePersonList
();
if
(
CollectionUtils
.
isEmpty
(
insidePersonList
))
{
...
...
@@ -258,13 +267,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
dPersonRecord
.
setAttentionCount
(
attentionList
.
size
());
dPersonRecord
.
setAttentionTime
(
attentionList
.
get
(
0
).
getArriveTime
());
}
//处理接待数据
List
<
DPersonReception
>
personReceptionList
=
dPersonReceptionDao
.
getPersonReceptionList
(
dPersonRecord
.
getMallId
(),
dPersonRecord
.
getCountDate
(),
dPersonRecord
.
getPersonUnid
(),
dPersonRecord
.
getArriveTime
(),
dPersonRecord
.
getLeaveTime
());
if
(
CollectionUtils
.
isNotEmpty
(
personReceptionList
))
{
dPersonRecord
.
setReceptionCount
(
personReceptionList
.
size
());
dPersonRecord
.
setReceptionTime
(
personReceptionList
.
get
(
0
).
getStartTime
());
dPersonRecord
.
setReceptionDuration
(
personReceptionList
.
stream
().
mapToLong
(
DPersonReception:
:
getDuration
).
sum
());
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment