Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-daily-report
This project
Loading...
Sign in
Toggle navigation
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 7461ee2f
authored
Jun 16, 2026
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' into 'v5.8.2.1'
上线合并 See merge request
!1
2 parents
4dcf2dfd
74063a85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
16 deletions
rpc-dj-daily-report/src/main/java/cn/com/glsx/dj/daily/report/service/DailyReportDataService.java
rpc-dj-daily-report/src/main/java/cn/com/glsx/dj/daily/report/service/DailyReportRecordService.java
rpc-dj-daily-report/src/main/resources/templates/轻改-售后部数据统计表.xlsx
rpc-dj-daily-report/src/main/java/cn/com/glsx/dj/daily/report/service/DailyReportDataService.java
View file @
7461ee2
...
...
@@ -114,14 +114,17 @@ public class DailyReportDataService {
return
null
;
}
DailyReportRecord
latestRecord
=
queryLatestSubmittedRecord
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
latestRecord
==
null
)
{
List
<
DailyReportRecord
>
recordList
=
querySubmittedRecordsByDate
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
CollectionUtils
.
isEmpty
(
recordList
)
)
{
log
.
info
(
"queryNegotiationData no record found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
null
;
}
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
Collections
.
singletonList
(
latestRecord
.
getId
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
buildNegotiationRows
(
latestRecord
,
subformDataMap
);
DailyReportRecord
latestRecord
=
recordList
.
get
(
recordList
.
size
()
-
1
);
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
recordList
.
stream
()
.
map
(
DailyReportRecord:
:
getId
)
.
collect
(
Collectors
.
toList
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
collectNegotiationRows
(
recordList
,
record
->
buildNegotiationRows
(
record
,
subformDataMap
));
if
(
CollectionUtils
.
isEmpty
(
negotiationRows
))
{
log
.
info
(
"queryNegotiationData no rows found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
null
;
...
...
@@ -205,14 +208,17 @@ public class DailyReportDataService {
return
Collections
.
emptyList
();
}
DailyReportRecord
latestRecord
=
queryLatestSubmittedRecord
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
latestRecord
==
null
)
{
List
<
DailyReportRecord
>
recordList
=
querySubmittedRecordsByDate
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
CollectionUtils
.
isEmpty
(
recordList
)
)
{
log
.
info
(
"queryExtendedWarrantyNegotiationRows no record found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
Collections
.
emptyList
();
}
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
Collections
.
singletonList
(
latestRecord
.
getId
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
buildExtendedWarrantyNegotiationRows
(
latestRecord
,
subformDataMap
);
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
recordList
.
stream
()
.
map
(
DailyReportRecord:
:
getId
)
.
collect
(
Collectors
.
toList
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
collectNegotiationRows
(
recordList
,
record
->
buildExtendedWarrantyNegotiationRows
(
record
,
subformDataMap
));
if
(
CollectionUtils
.
isEmpty
(
negotiationRows
))
{
log
.
info
(
"queryExtendedWarrantyNegotiationRows no rows found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
Collections
.
emptyList
();
...
...
@@ -231,14 +237,17 @@ public class DailyReportDataService {
return
Collections
.
emptyList
();
}
DailyReportRecord
latestRecord
=
queryLatestSubmittedRecord
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
latestRecord
==
null
)
{
List
<
DailyReportRecord
>
recordList
=
querySubmittedRecordsByDate
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
CollectionUtils
.
isEmpty
(
recordList
)
)
{
log
.
info
(
"queryExtendedWarrantyLanTuNegotiationRows no record found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
Collections
.
emptyList
();
}
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
Collections
.
singletonList
(
latestRecord
.
getId
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
buildExtendedWarrantyLanTuNegotiationRows
(
latestRecord
,
subformDataMap
);
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
recordList
.
stream
()
.
map
(
DailyReportRecord:
:
getId
)
.
collect
(
Collectors
.
toList
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
collectNegotiationRows
(
recordList
,
record
->
buildExtendedWarrantyLanTuNegotiationRows
(
record
,
subformDataMap
));
if
(
CollectionUtils
.
isEmpty
(
negotiationRows
))
{
log
.
info
(
"queryExtendedWarrantyLanTuNegotiationRows no rows found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
Collections
.
emptyList
();
...
...
@@ -287,14 +296,17 @@ public class DailyReportDataService {
return
Collections
.
emptyList
();
}
DailyReportRecord
latestRecord
=
queryLatestSubmittedRecord
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
latestRecord
==
null
)
{
List
<
DailyReportRecord
>
recordList
=
querySubmittedRecordsByDate
(
merchantId
,
DailyReportTemplateTypeEnum
.
DISCUSSION
.
getValue
(),
reportDate
);
if
(
CollectionUtils
.
isEmpty
(
recordList
)
)
{
log
.
info
(
"queryExtendedWarrantyOtherNegotiationRows no record found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
Collections
.
emptyList
();
}
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
Collections
.
singletonList
(
latestRecord
.
getId
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
buildExtendedWarrantyOtherNegotiationRows
(
latestRecord
,
subformDataMap
);
Map
<
Integer
,
List
<
DailyReportSubformData
>>
subformDataMap
=
querySubformDataMap
(
recordList
.
stream
()
.
map
(
DailyReportRecord:
:
getId
)
.
collect
(
Collectors
.
toList
()));
List
<
Map
<
String
,
String
>>
negotiationRows
=
collectNegotiationRows
(
recordList
,
record
->
buildExtendedWarrantyOtherNegotiationRows
(
record
,
subformDataMap
));
if
(
CollectionUtils
.
isEmpty
(
negotiationRows
))
{
log
.
info
(
"queryExtendedWarrantyOtherNegotiationRows no rows found, merchantId:{}, reportDate:{}"
,
merchantId
,
reportDate
);
return
Collections
.
emptyList
();
...
...
@@ -362,6 +374,21 @@ public class DailyReportDataService {
}
/**
* 查询指定日期下当天所有已提交的日报记录
*/
private
List
<
DailyReportRecord
>
querySubmittedRecordsByDate
(
Integer
merchantId
,
Byte
templateType
,
String
reportDate
)
{
Example
example
=
new
Example
(
DailyReportRecord
.
class
);
example
.
createCriteria
()
.
andEqualTo
(
"deletedFlag"
,
DeleteFlagEnum
.
N
.
getValue
())
.
andEqualTo
(
"merchantId"
,
merchantId
)
.
andEqualTo
(
"templateType"
,
templateType
)
.
andEqualTo
(
"reportStatus"
,
(
byte
)
1
)
.
andEqualTo
(
"reportDate"
,
reportDate
);
example
.
setOrderByClause
(
"id asc"
);
return
dailyReportRecordMapper
.
selectByExample
(
example
);
}
/**
* 今日汇总
*/
private
LightChangeDailyReportData
.
DailyReportSummary
buildTodaySummary
(
Integer
recordId
,
...
...
@@ -1286,10 +1313,20 @@ public class DailyReportDataService {
summary
.
setMonthAvgOrderPrice
(
monthAvgOrderPriceTotal
);
summary
.
setMonthOriginalFilmUpgradeCount
(
monthOriginalFilmUpgradeCount
);
if
(!
Objects
.
equals
(
monthOriginalFilmSystemCount
,
BigDecimal
.
ZERO
))
{
monthOriginalFilmSystemCount
=
monthOriginalFilmSystemCount
.
multiply
(
BigDecimal
.
valueOf
(
100
));
}
summary
.
setMonthOriginalFilmPermeability
(
monthOriginalFilmSystemCount
);
summary
.
setMonthOriginalCarCoatUpgradeCount
(
monthOriginalCarCoatUpgradeCount
);
if
(!
Objects
.
equals
(
monthOriginalCarCoatSystemCount
,
BigDecimal
.
ZERO
))
{
monthOriginalCarCoatSystemCount
=
monthOriginalCarCoatSystemCount
.
multiply
(
BigDecimal
.
valueOf
(
100
));
}
summary
.
setMonthOriginalCarCoatPermeability
(
monthOriginalCarCoatSystemCount
);
summary
.
setMonthBoutiqueUpgradeCount
(
monthBoutiqueUpgradeCount
);
if
(!
Objects
.
equals
(
monthBoutiqueSystemCount
,
BigDecimal
.
ZERO
))
{
monthBoutiqueSystemCount
=
monthBoutiqueSystemCount
.
multiply
(
BigDecimal
.
valueOf
(
100
));
}
summary
.
setMonthBoutiqueUpgradeRate
(
monthBoutiqueSystemCount
);
if
(
monthBookingCount
>
0
&&
monthBookingTouchCount
>
0
)
{
...
...
@@ -1395,6 +1432,22 @@ public class DailyReportDataService {
return
result
;
}
private
List
<
Map
<
String
,
String
>>
collectNegotiationRows
(
List
<
DailyReportRecord
>
recordList
,
java
.
util
.
function
.
Function
<
DailyReportRecord
,
List
<
Map
<
String
,
String
>>>
rowBuilder
)
{
if
(
CollectionUtils
.
isEmpty
(
recordList
)
||
rowBuilder
==
null
)
{
return
Collections
.
emptyList
();
}
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<>();
for
(
DailyReportRecord
record
:
recordList
)
{
List
<
Map
<
String
,
String
>>
rows
=
rowBuilder
.
apply
(
record
);
if
(
CollectionUtils
.
isEmpty
(
rows
))
{
continue
;
}
result
.
addAll
(
rows
);
}
return
result
;
}
private
Map
<
String
,
String
>
buildSalesRow
(
String
merchantName
,
String
reportDate
,
String
staffName
,
Map
<
String
,
String
>
todayRow
,
List
<
Map
<
String
,
String
>>
monthRows
)
{
Map
<
String
,
String
>
row
=
new
LinkedHashMap
<>();
...
...
rpc-dj-daily-report/src/main/java/cn/com/glsx/dj/daily/report/service/DailyReportRecordService.java
View file @
7461ee2
...
...
@@ -798,6 +798,7 @@ public class DailyReportRecordService {
.
andEqualTo
(
"merchantId"
,
dailyReportRecordDTO
.
getMerchantId
())
.
andEqualTo
(
"sceneType"
,
dailyReportRecordDTO
.
getSceneType
())
.
andEqualTo
(
"templateType"
,
dailyReportRecordDTO
.
getTemplateType
())
.
andEqualTo
(
"reportStatus"
,
dailyReportRecordDTO
.
getReportStatus
())
.
andBetween
(
"reportDate"
,
dailyReportRecordDTO
.
getReportStartDate
(),
dailyReportRecordDTO
.
getReportEndDate
());
// 门店日报不按个人维度过滤
if
(!
Objects
.
equals
(
DailyReportTemplateTypeEnum
.
MERCHANT_DAILY_REPORT
.
getValue
(),
dailyReportRecordDTO
.
getTemplateType
()))
{
...
...
rpc-dj-daily-report/src/main/resources/templates/轻改-售后部数据统计表.xlsx
View file @
7461ee2
No preview for this file type
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