Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
d9e432d2
Commit
d9e432d2
authored
Apr 16, 2021
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 看板渠道产品统计维度
parent
eeb56fab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
0 deletions
+88
-0
center-channel/app/base/api/impl/action/opNeed.js
+3
-0
center-channel/app/base/api/impl/opaction/order.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+41
-0
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+41
-0
No files found.
center-channel/app/base/api/impl/action/opNeed.js
View file @
d9e432d2
...
...
@@ -60,6 +60,9 @@ class OpNeed extends APIBase {
case
"getStatisticsByProduct"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByProduct
(
pobj
);
break
;
case
"getStatisticsByChannel"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByChannel
(
pobj
);
break
;
case
"getNeedProductType"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getNeedProductType
(
pobj
);
break
;
...
...
center-channel/app/base/api/impl/opaction/order.js
View file @
d9e432d2
...
...
@@ -51,6 +51,9 @@ class ProductAPI extends WEBBase {
case
"getOrderStatisticsByProduct"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrdersStatisticsByProduct
(
pobj
);
break
;
case
"getOrderStatisticsByChannel"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrdersStatisticsByChannel
(
pobj
);
break
;
case
"getOrdersComparison"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrdersComparison
(
pobj
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
View file @
d9e432d2
...
...
@@ -409,6 +409,47 @@ class UtilsOpNeedService extends AppServiceBase {
}
/**
* 需求统计(产品维度) 总数
* @param pobj
* @returns {Promise<void>}
*/
async
getStatisticsByChannel
(
pobj
){
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
){
return
system
.
getResultFail
(
-
1
);
}
let
data
=
result
.
data
;
let
temp
=
""
;
let
arr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
""
)){
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
arr
=
[];
}
let
dArr
=
{
typeCode
:
data
[
i
].
typeCode
,
count
:
data
[
i
].
count
}
arr
.
push
(
dArr
);
temp
=
data
[
i
].
uapp_id
;
if
(
i
==
data
.
length
-
1
){
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
reArr
);
}
/**
* 获取需求 的产品类型
* @param pobj
* @returns {Promise<void>}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
d9e432d2
...
...
@@ -319,6 +319,47 @@ class UtilsOrderService extends AppServiceBase {
}
/**
* 需求统计(产品、渠道维度)
* @param pobj
* @returns {Promise<void>}
*/
async
getOrdersStatisticsByChannel
(
pobj
)
{
let
url
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
);
}
let
data
=
result
.
data
;
let
temp
=
""
;
let
arr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
((
temp
!=
data
[
i
].
uapp_id
&&
temp
!=
""
))
{
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
arr
=
[];
}
let
dArr
=
{
pathName
:
data
[
i
].
pathName
,
count
:
data
[
i
].
count
}
arr
.
push
(
dArr
);
temp
=
data
[
i
].
uapp_id
;
if
(
i
==
data
.
length
-
1
)
{
let
obj
=
{
uapp_id
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
reArr
);
}
/**
* 订单数量对比
* @param pobj
* @returns {Promise<void>}
...
...
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