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
aae34162
Commit
aae34162
authored
Aug 20, 2020
by
张庆香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改插入数据信息功能
parent
fd68779d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
45 deletions
+31
-45
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+0
-0
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
+31
-45
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
aae34162
This diff is collapsed.
Click to expand it.
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
View file @
aae34162
...
@@ -5,7 +5,7 @@ class BizoptDao extends Dao {
...
@@ -5,7 +5,7 @@ class BizoptDao extends Dao {
super
(
Dao
.
getModelName
(
BizoptDao
));
super
(
Dao
.
getModelName
(
BizoptDao
));
}
}
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取商机信息的组装条件
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取商机信息的组装条件
qc
.
raw
=
true
;
qc
.
raw
=
true
;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不需要添加公司查询条件添加公司查询条件, 不添加路径条件,返回所有数据
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不需要添加公司查询条件添加公司查询条件, 不添加路径条件,返回所有数据
if
(
qobj
.
company_id
==
1
)
{
if
(
qobj
.
company_id
==
1
)
{
...
@@ -15,7 +15,9 @@ class BizoptDao extends Dao {
...
@@ -15,7 +15,9 @@ class BizoptDao extends Dao {
qw
[
"facilitator_id"
]
=
Number
(
qobj
.
company_id
)
qw
[
"facilitator_id"
]
=
Number
(
qobj
.
company_id
)
// 为空说明是管理员,不需设置组织结构过滤
// 为空说明是管理员,不需设置组织结构过滤
if
(
qobj
.
opath
&&
qobj
.
opath
!=
""
)
{
if
(
qobj
.
opath
&&
qobj
.
opath
!=
""
)
{
qw
[
"salesman_opcode"
]
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
qobj
.
opath
}
%`
}
qw
[
"salesman_opcode"
]
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
qobj
.
opath
}
%`
}
}
}
//不是来自平台前端查询
//不是来自平台前端查询
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
...
@@ -24,17 +26,17 @@ class BizoptDao extends Dao {
...
@@ -24,17 +26,17 @@ class BizoptDao extends Dao {
[
this
.
db
.
Op
.
eq
]:
"bookkeeping"
[
this
.
db
.
Op
.
eq
]:
"bookkeeping"
}
}
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
if
(
qobj
.
bizpath
.
indexOf
(
"demandAllocation"
)
>
0
)
{
//从需求分配列表过来的
if
(
qobj
.
bizpath
.
indexOf
(
"demandAllocation"
)
>
0
)
{
//从需求分配列表过来的
qw
[
"business_status"
]
=
{
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
eq
]:
"received"
[
this
.
db
.
Op
.
eq
]:
"received"
};
};
}
}
if
(
qobj
.
bizpath
.
indexOf
(
"demandfollow"
)
>
0
)
{
//从需求跟进列表过来的
if
(
qobj
.
bizpath
.
indexOf
(
"demandfollow"
)
>
0
)
{
//从需求跟进列表过来的
qw
[
"business_status"
]
=
{
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
in
]:
[
"beforeFollowUp"
,
"followingUp"
,
"beforeSubmission"
]
[
this
.
db
.
Op
.
in
]:
[
"beforeFollowUp"
,
"followingUp"
,
"beforeSubmission"
]
};
};
}
}
if
(
qobj
.
bizpath
.
indexOf
(
"distributionManagement"
)
>
0
)
{
//从分配记录列表过来的
if
(
qobj
.
bizpath
.
indexOf
(
"distributionManagement"
)
>
0
)
{
//从分配记录列表过来的
qw
[
"business_status"
]
=
{
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
ne
]:
"received"
[
this
.
db
.
Op
.
ne
]:
"received"
};
};
...
@@ -57,8 +59,7 @@ class BizoptDao extends Dao {
...
@@ -57,8 +59,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
};
...
@@ -95,47 +96,31 @@ class BizoptDao extends Dao {
...
@@ -95,47 +96,31 @@ 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'
)
{
//bussiness_info END
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
//已经加密
//other
}
if
(
qobj
.
closeReason
&&
qobj
.
closeReason
!=
'undefined'
)
{
if
(
qobj
.
serviceName
&&
qobj
.
serviceName
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
closeReason
;
obj
.
business_info
.
serviceName
=
qobj
.
serviceName
;
}
if
(
qobj
.
businessName
&&
qobj
.
businessName
!=
'undefined'
)
{
obj
.
business_info
.
businessName
=
qobj
.
businessName
;
}
if
(
qobj
.
UserName
&&
qobj
.
UserName
!=
'undefined'
)
{
obj
.
business_info
.
userName
=
qobj
.
UserNames
;
}
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
;
...
@@ -143,12 +128,13 @@ class BizoptDao extends Dao {
...
@@ -143,12 +128,13 @@ 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
);
}
}
...
...
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