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
1bc6b334
Commit
1bc6b334
authored
Apr 08, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 素材数据接口调整
parent
f7c0113e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
26 deletions
+25
-26
MaterialDataStaticsController.java
...web/controller/content/MaterialDataStaticsController.java
+6
-10
MaterialDataAdaptor.java
...e/web/controller/content/adaptor/MaterialDataAdaptor.java
+19
-16
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/MaterialDataStaticsController.java
View file @
1bc6b334
...
...
@@ -28,7 +28,6 @@ import com.gic.haoban.manage.web.vo.content.statistics.bo.MaterialTodayDataBO;
import
com.gic.haoban.manage.web.vo.content.statistics.report.MaterialPersonalUsedDataVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -210,8 +209,7 @@ public class MaterialDataStaticsController {
}
Page
<
MaterialPersonalUsedDataVO
>
usedDataVOPage
=
materialDataAdaptor
.
queryMaterialClerkUsedReport
(
materialReportQO
.
getEnterpriseId
(),
materialReportQO
.
getClerkId
(),
materialReportQO
.
getReportType
(),
storeIds
,
1
,
1
,
null
,
null
);
materialDataAdaptor
.
queryMaterialClerkUsedReport
(
materialReportQO
,
storeIds
);
if
(
usedDataVOPage
==
null
||
CollectionUtils
.
isEmpty
(
usedDataVOPage
.
getResult
()))
{
return
RestResponse
.
successResult
();
}
...
...
@@ -243,8 +241,7 @@ public class MaterialDataStaticsController {
}
Page
<
MaterialStoreUsedDataVO
>
usedDataVOPage
=
materialDataAdaptor
.
queryMaterialStoreUseReport
(
materialReportQO
.
getEnterpriseId
(),
materialReportQO
.
getClerkId
(),
materialReportQO
.
getReportType
(),
storeIds
,
1
,
1
,
null
,
null
);
materialDataAdaptor
.
queryMaterialStoreUseReport
(
materialReportQO
,
storeIds
);
if
(
usedDataVOPage
==
null
||
CollectionUtils
.
isEmpty
(
usedDataVOPage
.
getResult
()))
{
return
RestResponse
.
successResult
();
}
...
...
@@ -274,7 +271,8 @@ public class MaterialDataStaticsController {
}
else
{
storeIds
.
add
(
materialReportQO
.
getStoreId
());
}
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
materialDataAdaptor
.
queryMaterialAreaOverviewData
(
materialReportQO
.
getEnterpriseId
(),
materialReportQO
.
getClerkId
(),
materialReportQO
.
getReportType
(),
storeIds
);
MaterialAreaUsedDataVO
materialAreaUsedDataVO
=
materialDataAdaptor
.
queryMaterialAreaOverviewData
(
materialReportQO
.
getEnterpriseId
(),
materialReportQO
.
getClerkId
(),
materialReportQO
.
getReportType
(),
storeIds
,
materialReportQO
.
getBizDate
());
return
RestResponse
.
successResult
(
materialAreaUsedDataVO
);
}
...
...
@@ -295,8 +293,7 @@ public class MaterialDataStaticsController {
}
Page
<
MaterialPersonalUsedDataVO
>
usedDataVOPage
=
materialDataAdaptor
.
queryMaterialClerkUsedReport
(
materialReportQO
.
getEnterpriseId
(),
materialReportQO
.
getClerkId
(),
materialReportQO
.
getReportType
(),
storeIds
,
1
,
1
,
materialReportQO
.
getOrderByField
(),
materialReportQO
.
getOrder
());
materialDataAdaptor
.
queryMaterialClerkUsedReport
(
materialReportQO
,
storeIds
);
if
(
usedDataVOPage
==
null
||
CollectionUtils
.
isEmpty
(
usedDataVOPage
.
getResult
()))
{
return
RestResponse
.
successResult
();
}
...
...
@@ -340,8 +337,7 @@ public class MaterialDataStaticsController {
}
Page
<
MaterialStoreUsedDataVO
>
usedDataVOPage
=
materialDataAdaptor
.
queryMaterialStoreUseReport
(
materialReportQO
.
getEnterpriseId
(),
materialReportQO
.
getClerkId
(),
materialReportQO
.
getReportType
(),
storeIds
,
1
,
1
,
materialReportQO
.
getOrderByField
(),
materialReportQO
.
getOrder
());
materialDataAdaptor
.
queryMaterialStoreUseReport
(
materialReportQO
,
storeIds
);
if
(
usedDataVOPage
==
null
||
CollectionUtils
.
isEmpty
(
usedDataVOPage
.
getResult
()))
{
return
RestResponse
.
successResult
();
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/adaptor/MaterialDataAdaptor.java
View file @
1bc6b334
...
...
@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.web.qo.content.statistics.MaterialReportQO
;
import
com.gic.haoban.manage.web.utils.target.DataTargetHttpUtils
;
import
com.gic.haoban.manage.web.vo.content.statistics.MaterialAreaUsedDataVO
;
import
com.gic.haoban.manage.web.vo.content.statistics.MaterialClerkUsedDataVO
;
...
...
@@ -227,15 +228,17 @@ public class MaterialDataAdaptor {
/**
* 查询导购素材使用情况
*
* @param enterpriseId
* @param reportType
* @param storeIds
* @return
*/
public
Page
<
MaterialPersonalUsedDataVO
>
queryMaterialClerkUsedReport
(
String
enterpriseId
,
String
clerkId
,
Integer
reportType
,
List
<
String
>
storeIds
,
Integer
pageNo
,
Integer
pageSize
,
String
orderField
,
String
orderStr
)
{
public
Page
<
MaterialPersonalUsedDataVO
>
queryMaterialClerkUsedReport
(
MaterialReportQO
materialReportQO
,
List
<
String
>
storeIds
)
{
Integer
reportType
=
materialReportQO
.
getReportType
();
Integer
pageNo
=
materialReportQO
.
getPageNum
();
Integer
pageSize
=
materialReportQO
.
getPageSize
();
String
clerkId
=
materialReportQO
.
getClerkId
();
String
enterpriseId
=
materialReportQO
.
getEnterpriseId
();
String
orderField
=
materialReportQO
.
getOrderByField
();
String
orderStr
=
materialReportQO
.
getOrder
();
// 获取当前时间周期
DateTime
startTime
=
null
;
DateTime
endTime
=
null
;
...
...
@@ -289,17 +292,18 @@ public class MaterialDataAdaptor {
/**
* 查询门店/区经使用数据
*
* @param enterpriseId
* @param clerkId
* @param reportType
* @param storeIds
* @return
*/
public
Page
<
MaterialStoreUsedDataVO
>
queryMaterialStoreUseReport
(
String
enterpriseId
,
String
clerkId
,
Integer
reportType
,
List
<
String
>
storeIds
,
Integer
pageNo
,
Integer
pageSize
,
String
orderField
,
String
order
)
{
public
Page
<
MaterialStoreUsedDataVO
>
queryMaterialStoreUseReport
(
MaterialReportQO
materialReportQO
,
List
<
String
>
storeIds
)
{
Integer
reportType
=
materialReportQO
.
getReportType
();
Integer
pageNo
=
materialReportQO
.
getPageNum
();
Integer
pageSize
=
materialReportQO
.
getPageSize
();
String
clerkId
=
materialReportQO
.
getClerkId
();
String
enterpriseId
=
materialReportQO
.
getEnterpriseId
();
String
orderField
=
materialReportQO
.
getOrderByField
();
String
order
=
materialReportQO
.
getOrder
();
// 获取当前时间周期
DateTime
startTime
=
null
;
DateTime
endTime
=
null
;
...
...
@@ -357,12 +361,11 @@ public class MaterialDataAdaptor {
* @return
*/
public
MaterialAreaUsedDataVO
queryMaterialAreaOverviewData
(
String
enterpriseId
,
String
clerkId
,
Integer
reportType
,
List
<
String
>
storeIds
)
{
Integer
reportType
,
List
<
String
>
storeIds
,
String
bizDate
)
{
// 获取当前时间周期
DateTime
startTime
=
null
;
DateTime
endTime
=
null
;
String
bizDate
=
this
.
calcBizDate
(
reportType
);
String
apolloKey
=
MATERIAL_AREA_WEEK_DATA
;
if
(
MaterialReportType
.
WEEK
.
getCode
().
equals
(
reportType
))
{
// 周报
...
...
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