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
901900a1
Commit
901900a1
authored
Jun 18, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
910042ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
14 deletions
+40
-14
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
+14
-4
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
+26
-10
No files found.
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
901900a1
...
...
@@ -25,10 +25,20 @@ class BizOptService extends ServiceBase {
finishedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isFinished'
}})
closedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isClosed'
}})
}
else
{
waittoHandledCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'beforeSubmission'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
handlingCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'beforeConfirmation'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
finishedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isFinished'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
closedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isClosed'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
let
opathstr
=
''
if
(
opath
){
opathstr
=
opath
waittoHandledCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'beforeSubmission'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
handlingCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'beforeConfirmation'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
finishedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isFinished'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
closedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isClosed'
,
salesman_opcode
:{[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
}
else
{
waittoHandledCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'beforeSubmission'
,
'facilitator_id'
:
companyId
}})
handlingCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'beforeConfirmation'
,
'facilitator_id'
:
companyId
}})
finishedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isFinished'
,
'facilitator_id'
:
companyId
}})
closedCount
=
await
this
.
dao
.
findCount
({
where
:{
business_status
:
'isClosed'
,
'facilitator_id'
:
companyId
}})
}
}
//成单率
let
allChance
=
waittoHandledCount
+
handlingCount
+
finishedCount
+
closedCount
...
...
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
View file @
901900a1
...
...
@@ -30,16 +30,32 @@ class DeliverybillService extends ServiceBase {
settled
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'settled'
}})
settledAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'settled'
}})
}
else
{
waittoHandledCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'received'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
handlingCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:{[
this
.
db
.
Op
.
notIn
]:[
'received'
,
'success'
,
'closed'
]},
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
finishedCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'success'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
closedCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'closed'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
toSettle
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'waittosettle'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
toSettleAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'waittosettle'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
settling
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'settling'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
settlingAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'settling'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
settled
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'settled'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
settledAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'settled'
,
salesman_opcode
:
opath
,
'facilitator_id'
:
companyId
}})
let
opathstr
=
''
if
(
opath
){
opathstr
=
opath
waittoHandledCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'received'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
handlingCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:{[
this
.
db
.
Op
.
notIn
]:[
'received'
,
'success'
,
'closed'
]},
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
finishedCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'success'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
closedCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'closed'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
toSettle
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'waittosettle'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
toSettleAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'waittosettle'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
settling
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'settling'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
settlingAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'settling'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
settled
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'settled'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
settledAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'settled'
,
salesman_opcode
:{
[
this
.
db
.
Op
.
like
]:
`%
${
opathstr
}
%`
},
'facilitator_id'
:
companyId
}})
}
else
{
waittoHandledCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'received'
,
'facilitator_id'
:
companyId
}})
handlingCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:{[
this
.
db
.
Op
.
notIn
]:[
'received'
,
'success'
,
'closed'
]},
'facilitator_id'
:
companyId
}})
finishedCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'success'
,
'facilitator_id'
:
companyId
}})
closedCount
=
await
this
.
dao
.
findCount
({
where
:{
delivery_status
:
'closed'
,
'facilitator_id'
:
companyId
}})
toSettle
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'waittosettle'
,
'facilitator_id'
:
companyId
}})
toSettleAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'waittosettle'
,
'facilitator_id'
:
companyId
}})
settling
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'settling'
,
'facilitator_id'
:
companyId
}})
settlingAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'settling'
,
'facilitator_id'
:
companyId
}})
settled
=
await
this
.
dao
.
findCount
({
where
:{
settle_status
:
'settled'
,
'facilitator_id'
:
companyId
}})
settledAmount
=
await
this
.
dao
.
findSum
(
'cost_price'
,{
where
:{
settle_status
:
'settled'
,
'facilitator_id'
:
companyId
}})
}
}
//成单率
let
allHandled
=
finishedCount
+
closedCount
...
...
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