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
b7fb33ee
Commit
b7fb33ee
authored
Jun 26, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ic-deliver' of gitlab.gongsibao.com:jiangyong/zhichan into ic-deliver
parents
60bd5d59
21580065
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
12 deletions
+64
-12
ic-deliver/app/base/api/impl/bizDeliver/bizChance.js
+2
-11
ic-deliver/app/base/api/impl/bizDeliver/deliver.js
+10
-0
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
+1
-0
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
+5
-0
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
+11
-1
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
+35
-0
No files found.
ic-deliver/app/base/api/impl/bizDeliver/bizChance.js
View file @
b7fb33ee
...
@@ -14,17 +14,8 @@ class BizChanceAPI extends APIBase {
...
@@ -14,17 +14,8 @@ class BizChanceAPI extends APIBase {
*/
*/
async
statBizChanceCountBySp
(
p
,
q
,
req
){
async
statBizChanceCountBySp
(
p
,
q
,
req
){
let
params
=
{}
let
bizStatus
=
p
.
bizStatus
params
.
group
=
{
let
rtn
=
await
this
.
bizChanceS
.
statBizChanceCountBySp
(
bizStatus
)
byFields
:[
'facilitator_name'
],
actionType
:
'count'
,
aggField
:
'id'
,
aliasField
:
' as chanceCount'
,
tblName
:
'bussiness_opportunity'
,
where
:
''
,
having
:
''
,
}
let
rtn
=
await
this
.
bizChanceS
.
statBizChanceCountBySp
(
params
)
return
system
.
getResult
(
rtn
)
return
system
.
getResult
(
rtn
)
}
}
...
...
ic-deliver/app/base/api/impl/bizDeliver/deliver.js
View file @
b7fb33ee
...
@@ -6,6 +6,16 @@ class BizDeliverAPI extends APIBase {
...
@@ -6,6 +6,16 @@ class BizDeliverAPI extends APIBase {
super
();
super
();
this
.
bizDeliveryS
=
system
.
getObject
(
"service.bizchance.deliverybillSve"
)
this
.
bizDeliveryS
=
system
.
getObject
(
"service.bizchance.deliverybillSve"
)
}
}
async
statBizDeliveryCountBySp
(
p
,
q
,
req
){
let
bizStatus
=
p
.
bizStatus
let
rtn
=
await
this
.
bizDeliveryS
.
statBizDeliveryCountBySp
(
bizStatus
)
return
system
.
getResult
(
rtn
)
}
async
statBizDeliverySettleAmountBySp
(
p
,
q
,
req
){
let
bizStatus
=
p
.
bizStatus
let
rtn
=
await
this
.
bizDeliveryS
.
statBizDeliverySettleAmountBySp
(
bizStatus
)
return
system
.
getResult
(
rtn
)
}
/**
/**
* 待处理商机beforeSubmission
* 待处理商机beforeSubmission
* 处理中商机 beforeConfirmation
* 处理中商机 beforeConfirmation
...
...
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
b7fb33ee
...
@@ -62,6 +62,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -62,6 +62,7 @@ class DeliverybillCtl extends CtlBase {
};
};
robj
.
payAmount
=
this
.
FenToYuan
(
element
.
selling_price
);
//交付单金额
robj
.
payAmount
=
this
.
FenToYuan
(
element
.
selling_price
);
//交付单金额
robj
.
deliverStatus
=
element
.
delivery_status
;
//交付单状态
robj
.
deliverStatus
=
element
.
delivery_status
;
//交付单状态
robj
.
delivery_status
=
element
.
delivery_status
;
//交付单状态
robj
.
contactsName
=
robj
.
baseInfo
.
contactsName
;
//联系人
robj
.
contactsName
=
robj
.
baseInfo
.
contactsName
;
//联系人
robj
.
contactsPhone
=
robj
.
baseInfo
.
contactsPhone
;
//联系电话
robj
.
contactsPhone
=
robj
.
baseInfo
.
contactsPhone
;
//联系电话
robj
.
clerkName
=
element
.
salesman_name
;
//业务员名称
robj
.
clerkName
=
element
.
salesman_name
;
//业务员名称
...
...
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
View file @
b7fb33ee
...
@@ -11,6 +11,10 @@ class DeliverybillDao extends Dao {
...
@@ -11,6 +11,10 @@ class DeliverybillDao extends Dao {
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取交付单信息的组装条件
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取交付单信息的组装条件
//qc.raw = true;
//qc.raw = true;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不添加公司查询条件, 不添加路径条件,返回所有数据
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不添加公司查询条件, 不添加路径条件,返回所有数据
if
(
qw
[
"delivery_status"
]
==
"handling"
){
//解决首页多状态查询
qw
[
"delivery_status"
]
=
{
[
this
.
db
.
Op
.
notIn
]:[
'received'
,
'success'
,
'closed'
]}
}
if
(
qobj
.
company_id
==
1
)
{
if
(
qobj
.
company_id
==
1
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
if
(
qobj
.
bizpath
.
indexOf
(
"pmxdeliverrequest"
)
>
0
)
{
//说明是从商机列表过来的
if
(
qobj
.
bizpath
.
indexOf
(
"pmxdeliverrequest"
)
>
0
)
{
//说明是从商机列表过来的
...
@@ -18,6 +22,7 @@ class DeliverybillDao extends Dao {
...
@@ -18,6 +22,7 @@ class DeliverybillDao extends Dao {
qw
[
"settle_status"
]
=
"waittosettle"
;
qw
[
"settle_status"
]
=
"waittosettle"
;
}
}
}
}
return
qw
return
qw
}
else
{
}
else
{
//需要添加公司查询条件
//需要添加公司查询条件
...
...
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
b7fb33ee
...
@@ -6,7 +6,17 @@ class BizOptService extends ServiceBase {
...
@@ -6,7 +6,17 @@ class BizOptService extends ServiceBase {
constructor
()
{
constructor
()
{
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
BizOptService
));
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
BizOptService
));
}
}
async
statBizChanceCountBySp
(
params
){
async
statBizChanceCountBySp
(
bizStatus
){
let
params
=
{}
params
.
group
=
{
byFields
:[
'facilitator_name'
],
actionType
:
'count'
,
aggField
:
'id'
,
aliasField
:
' as chanceCount'
,
tblName
:
'bussiness_opportunity'
,
where
:
bizStatus
!=
""
?
`where business_status='
${
bizStatus
}
'`
:
''
,
having
:
''
,
}
let
s
=
await
this
.
dao
.
statGroupBy
(
params
,
null
)
let
s
=
await
this
.
dao
.
statGroupBy
(
params
,
null
)
return
s
return
s
}
}
...
...
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
View file @
b7fb33ee
...
@@ -9,6 +9,41 @@ class DeliverybillService extends ServiceBase {
...
@@ -9,6 +9,41 @@ class DeliverybillService extends ServiceBase {
this
.
logDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
this
.
logDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
this
.
cacheDao
=
system
.
getObject
(
"db.bizchance.cacheinfoDao"
);
this
.
cacheDao
=
system
.
getObject
(
"db.bizchance.cacheinfoDao"
);
}
}
async
statBizDeliverySettleAmountBySp
(
settleStatus
){
let
params
=
{}
let
where
=
settleStatus
!=
""
?
`where settle_status='
${
settleStatus
}
'`
:
''
params
.
group
=
{
byFields
:[
'facilitator_name'
],
actionType
:
'sum'
,
aggField
:
'cost_price'
,
aliasField
:
' as chanceCount'
,
tblName
:
'delivery_bill'
,
where
:
where
,
having
:
''
,
}
let
s
=
await
this
.
dao
.
statGroupBy
(
params
,
null
)
return
s
}
async
statBizDeliveryCountBySp
(
deliverStatus
){
let
params
=
{}
let
where
=
deliverStatus
!=
""
?
`where delivery_status='
${
deliverStatus
}
'`
:
''
if
(
deliverStatus
==
"handling"
){
where
=
`where delivery_status not in ('received', 'success', 'closed')`
}
params
.
group
=
{
byFields
:[
'facilitator_name'
],
actionType
:
'count'
,
aggField
:
'id'
,
aliasField
:
' as chanceCount'
,
tblName
:
'delivery_bill'
,
where
:
where
,
having
:
''
,
}
let
s
=
await
this
.
dao
.
statGroupBy
(
params
,
null
)
return
s
}
async
statBizDelivery
(
companyId
,
opath
,
username
,
userid
)
{
async
statBizDelivery
(
companyId
,
opath
,
username
,
userid
)
{
//如果当前登录人是平台,返回所有商机
//如果当前登录人是平台,返回所有商机
let
waittoHandledCount
=
0
//received
let
waittoHandledCount
=
0
//received
...
...
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