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
983babc4
Commit
983babc4
authored
Aug 20, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Plain Diff
pp
parents
418b3029
0b0b8162
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
51 deletions
+36
-51
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+0
-0
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
+36
-51
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
983babc4
This diff is collapsed.
Click to expand it.
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
View file @
983babc4
...
@@ -19,21 +19,17 @@ class BizoptDao extends Dao {
...
@@ -19,21 +19,17 @@ class BizoptDao extends Dao {
*/
*/
if
(
!
qobj
.
opath
)
{
// 管理员 不做处理
if
(
!
qobj
.
opath
)
{
// 管理员 不做处理
}
else
if
(
qobj
.
isPrincipal
)
{
// 销售主管 查询为空和自己组织结构下的
}
else
if
(
qobj
.
isPrincipal
)
{
// 销售主管 查询为空和自己组织结构下的
filters
.
push
({
qw
[
"$or"
]
=
[
$or
:
[
{
{
salesman_opcode
:
{
salesman_opcode
:
{
$eq
:
null
$eq
:
null
}
},
{
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
}
]
},
{
});
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
]
}
else
{
// 销售 查询自己的
}
else
{
// 销售 查询自己的
filters
.
push
({
qw
[
"salesman_opcode"
]
=
{
$like
:
`%
${
qobj
.
opath
}
%`
}
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
});
}
}
//不是来自平台前端查询
//不是来自平台前端查询
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
...
@@ -75,8 +71,7 @@ class BizoptDao extends Dao {
...
@@ -75,8 +71,7 @@ class BizoptDao extends Dao {
var
setobj
=
{
"business_status"
:
qobj
.
business_status
};
var
setobj
=
{
"business_status"
:
qobj
.
business_status
};
if
(
qobj
.
close_reason
&&
qobj
.
close_reason
!=
'undefined'
)
{
if
(
qobj
.
close_reason
&&
qobj
.
close_reason
!=
'undefined'
)
{
setobj
[
"close_reason"
]
=
qobj
.
close_reason
;
setobj
[
"close_reason"
]
=
qobj
.
close_reason
;
}
}
else
{
else
{
setobj
[
"close_reason"
]
=
""
;
setobj
[
"close_reason"
]
=
""
;
}
}
var
whereobj
=
{
"demand_code"
:
qobj
.
demand_code
};
var
whereobj
=
{
"demand_code"
:
qobj
.
demand_code
};
...
@@ -113,47 +108,35 @@ class BizoptDao extends Dao {
...
@@ -113,47 +108,35 @@ class BizoptDao extends Dao {
var
obj
=
{
var
obj
=
{
"demand_code"
:
qobj
.
businessMode
,
"demand_code"
:
qobj
.
businessMode
,
"business_type"
:
qobj
.
businessType
,
"business_type"
:
qobj
.
businessType
,
"business_status"
:
qobj
.
currentStatus
,
"business_status"
:
qobj
.
bussinessStatus
,
"business_info"
:
{}
"business_info"
:
{},
"source_number"
:
qobj
.
sourceNumber
,
"service_address"
:
qobj
.
serviceAddress
,
"facilitator_id"
:
qobj
.
favilitatorID
,
"facilitator_name"
:
qobj
.
favilitatorName
,
"source_name"
:
qobj
.
sourceName
,
};
};
if
(
qobj
.
channelSource
&&
qobj
.
channelSource
!=
'undefined'
)
{
//business_info START
obj
.
source_name
=
qobj
.
channelSource
;
if
(
qobj
.
topOrgCode
&&
qobj
.
topOrgCode
!=
'undefined'
)
{
}
obj
.
business_info
.
topOrgCode
=
qobj
.
topOrgCode
if
(
qobj
.
sourceNumber
&&
qobj
.
sourceNumber
!=
'undefined'
)
{
obj
.
source_number
=
qobj
.
sourceNumber
;
}
}
if
(
qobj
.
serviceCode
&&
qobj
.
serviceCode
!=
'undefined'
)
{
if
(
qobj
.
intentionBizId
&&
qobj
.
intentionBizId
!=
'undefined'
)
{
obj
.
service_address
=
qobj
.
serviceCode
;
obj
.
business_info
.
intentionBizId
=
qobj
.
intentionBizId
;
}
}
if
(
qobj
.
memoInfo
&&
qobj
.
memoInfo
!=
'undefined'
)
{
if
(
qobj
.
contactsPhone
&&
qobj
.
contactsPhone
!=
'undefined'
)
{
obj
.
business_info
.
memoInfo
=
qobj
.
memoInfo
;
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
//已经加密
}
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
statusReason
;
}
}
if
(
qobj
.
contactsName
&&
qobj
.
contactsName
!=
'undefined'
)
{
if
(
qobj
.
contactsName
&&
qobj
.
contactsName
!=
'undefined'
)
{
obj
.
business_info
.
contactsName
=
qobj
.
contactsName
;
obj
.
business_info
.
contactsName
=
qobj
.
contactsName
;
}
}
if
(
qobj
.
contactsPhone
&&
qobj
.
contactsPhone
!=
'undefined'
)
{
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
//已经加密
}
if
(
qobj
.
serviceName
&&
qobj
.
serviceName
!=
'undefined'
)
{
if
(
qobj
.
serviceName
&&
qobj
.
serviceName
!=
'undefined'
)
{
obj
.
business_info
.
serviceName
=
qobj
.
serviceName
;
obj
.
business_info
.
serviceName
=
qobj
.
serviceName
;
}
}
if
(
qobj
.
businessName
&&
qobj
.
businessName
!=
'undefined'
)
{
obj
.
business_info
.
businessName
=
qobj
.
businessName
;
//bussiness_info END
}
//other
if
(
qobj
.
UserName
&&
qobj
.
UserName
!=
'undefined'
)
{
if
(
qobj
.
closeReason
&&
qobj
.
closeReason
!=
'undefined'
)
{
obj
.
business_info
.
userName
=
qobj
.
UserNames
;
obj
.
close_reason
=
qobj
.
closeReason
;
}
if
(
qobj
.
companyName
&&
qobj
.
companyName
!=
'undefined'
)
{
obj
.
business_info
.
companyName
=
qobj
.
companyName
;
}
if
(
qobj
.
servicerCode
&&
qobj
.
servicerCode
!=
'undefined'
)
{
obj
.
facilitator_id
=
qobj
.
servicerCode
;
}
if
(
qobj
.
servicerName
&&
qobj
.
servicerName
!=
'undefined'
)
{
obj
.
facilitator_name
=
qobj
.
servicerName
;
}
}
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
obj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
obj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
...
@@ -161,15 +144,16 @@ class BizoptDao extends Dao {
...
@@ -161,15 +144,16 @@ class BizoptDao extends Dao {
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
obj
.
salesman_id
=
qobj
.
salesmanId
;
obj
.
salesman_id
=
qobj
.
salesmanId
;
}
}
if
(
qobj
.
clerkName
&&
qobj
.
clerk
Name
!=
'undefined'
)
{
if
(
qobj
.
salesmanName
&&
qobj
.
salesman
Name
!=
'undefined'
)
{
obj
.
salesman_name
=
qobj
.
clerk
Name
;
obj
.
salesman_name
=
qobj
.
salesman
Name
;
}
}
if
(
qobj
.
clerkPhone
&&
qobj
.
clerk
Phone
!=
'undefined'
)
{
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesman
Phone
!=
'undefined'
)
{
obj
.
salesman_phone
=
qobj
.
clerk
Phone
;
obj
.
salesman_phone
=
qobj
.
salesman
Phone
;
}
}
return
await
this
.
create
(
obj
,
t
);
return
await
this
.
create
(
obj
,
t
);
}
}
}
}
module
.
exports
=
BizoptDao
;
module
.
exports
=
BizoptDao
;
\ No newline at end of file
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