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
2997c710
Commit
2997c710
authored
Aug 19, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bizopt api
parent
21ce1b8e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
10 deletions
+86
-10
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+56
-1
tx-fi-tax/app/base/controller/impl/bizchance/operationrecordCtl.js
+2
-2
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
+1
-1
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
+14
-3
tx-fi-tax/app/base/service/impl/bizchance/bizoptSve.js
+13
-3
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
2997c710
...
@@ -9,6 +9,9 @@ class BizOptCtl extends CtlBase {
...
@@ -9,6 +9,9 @@ class BizOptCtl extends CtlBase {
constructor
()
{
constructor
()
{
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
BizOptCtl
));
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
BizOptCtl
));
this
.
schemeService
=
system
.
getObject
(
"service.bizchance.schemeSve"
);
this
.
schemeService
=
system
.
getObject
(
"service.bizchance.schemeSve"
);
this
.
schemeSve
=
system
.
getObject
(
"service.bizchance.fitaxschemeSve"
);
//财税-方案信息
this
.
fitaxcompanySve
=
system
.
getObject
(
"service.bizchance.fitaxcompanySve"
);
//财税-企业信息
this
.
operationrecordSve
=
system
.
getObject
(
"service.bizchance.operationrecordSve"
);
//财税-需求分配记录
this
.
logService
=
system
.
getObject
(
"service.bizchance.statuslogSve"
);
this
.
logService
=
system
.
getObject
(
"service.bizchance.statuslogSve"
);
this
.
shisService
=
system
.
getObject
(
"service.bizchance.salesmanhisSve"
);
this
.
shisService
=
system
.
getObject
(
"service.bizchance.salesmanhisSve"
);
this
.
receiveUrl
=
settings
.
receiveUrl
();
this
.
receiveUrl
=
settings
.
receiveUrl
();
...
@@ -111,7 +114,58 @@ class BizOptCtl extends CtlBase {
...
@@ -111,7 +114,58 @@ class BizOptCtl extends CtlBase {
}
}
/**
/**
* 根据需求编号获取需求详情
* 获取跟进详情页所有信息
* @param {*} mobj
* {
demand_code: "",//需求编号
}
*/
async
getFollowUpInfo
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
try
{
var
bizoptInfo
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
var
companyInfo
=
await
this
.
fitaxcompanySve
.
findInfo
(
pobj
);
pobj
.
operation_type
=
"followUp"
;
var
followUpinfos
=
await
this
.
operationrecordSve
.
findAllInfo
(
pobj
);
var
followUpinfo
=
{};
if
(
followUpinfos
.
length
>
0
)
{
followUpinfo
=
followUpinfos
[
0
];
}
return
system
.
getResult
({
bizoptInfo
:
bizoptInfo
,
companyInfo
:
companyInfo
,
followUpinfo
:
followUpinfo
});
}
catch
(
error
)
{
console
.
log
(
"bizopt/getFollowUpInfo err: "
+
error
);
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 获取跟进详情页信息出错!"
);
}
}
}
/**
* 获取记录详情页所有信息
* @param {*} mobj
* {
demand_code: "",//需求编号
}
*/
async
getRecordInfo
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
try
{
var
bizoptInfo
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
//需求信息
var
companyInfo
=
await
this
.
fitaxcompanySve
.
findInfo
(
pobj
);
//企业信息
var
schemeInfo
=
await
this
.
schemeSve
.
findInfo
(
pobj
);
//方案详情
var
followUpinfos
=
await
this
.
operationrecordSve
.
findAllInfo
(
pobj
);
//线索记录
return
system
.
getResult
({
bizoptInfo
:
bizoptInfo
,
companyInfo
:
companyInfo
,
schemeInfo
:
schemeInfo
,
followUpinfos
:
followUpinfos
});
}
catch
(
error
)
{
console
.
log
(
"bizopt/getFollowUpInfo err: "
+
error
);
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 获取跟进详情页信息出错!"
);
}
}
}
/**
* @param {*} mobj
* @param {*} mobj
*/
*/
async
findInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
async
findInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
...
@@ -171,6 +225,7 @@ class BizOptCtl extends CtlBase {
...
@@ -171,6 +225,7 @@ class BizOptCtl extends CtlBase {
return
system
.
getResultError
(
"参数错误!"
);
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
}
/*更新业务员信息*/
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
var
pobj
=
mobj
.
d
;
...
...
tx-fi-tax/app/base/controller/impl/bizchance/operationrecordCtl.js
View file @
2997c710
...
@@ -11,8 +11,8 @@ class OperationrecordCtl extends CtlBase {
...
@@ -11,8 +11,8 @@ class OperationrecordCtl extends CtlBase {
* 查询记录信息
* 查询记录信息
* @param {*} mobj
* @param {*} mobj
* {
* {
demand_code: "",//需求编号
demand_code: "",//
必须,
需求编号
operation_type: ""//操作类型
operation_type: ""//
可选,
操作类型
}
}
*/
*/
async
findAllInfo
(
mobj
,
qobj
,
req
)
{
async
findAllInfo
(
mobj
,
qobj
,
req
)
{
...
...
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
View file @
2997c710
...
@@ -35,7 +35,7 @@ class BizoptDao extends Dao {
...
@@ -35,7 +35,7 @@ class BizoptDao extends Dao {
/*根据商机编号获取商机详情*/
/*根据商机编号获取商机详情*/
async
findInfoByDemandCode
(
qobj
)
{
async
findInfoByDemandCode
(
qobj
)
{
var
qcwhere
=
{
"demand_code"
:
qobj
.
businessM
ode
};
var
qcwhere
=
{
"demand_code"
:
qobj
.
demand_c
ode
};
return
await
this
.
findOne
(
qcwhere
);
return
await
this
.
findOne
(
qcwhere
);
}
}
...
...
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
View file @
2997c710
...
@@ -10,9 +10,8 @@ class OperationrecordDao extends Dao {
...
@@ -10,9 +10,8 @@ class OperationrecordDao extends Dao {
*@param {*} qobj
*@param {*} qobj
*/
*/
async
findAllInfo
(
qobj
)
{
async
findAllInfo
(
qobj
)
{
qobj
.
order_type
=
"BIZ"
,
//数据类型需求|订单
qobj
.
order_type
=
"BIZ"
;
//数据类型需求|订单
qobj
.
raw
=
true
;
return
await
this
.
model
.
findAll
({
where
:
qobj
,
order
:
[[
"created_at"
,
"DESC"
]]
});
return
await
this
.
model
.
findAll
(
qobj
);
}
}
/**
/**
...
@@ -38,3 +37,14 @@ class OperationrecordDao extends Dao {
...
@@ -38,3 +37,14 @@ class OperationrecordDao extends Dao {
}
}
}
}
module
.
exports
=
OperationrecordDao
;
module
.
exports
=
OperationrecordDao
;
// let test = new OperationrecordDao();
// let a = {
// "demand_code": "111"
// }
// start(a);
// async function start(a) {
// let res = await test.findAllInfo(a);
// console.log("结果:" + JSON.stringify(res));
// }
\ No newline at end of file
tx-fi-tax/app/base/service/impl/bizchance/bizoptSve.js
View file @
2997c710
...
@@ -91,7 +91,7 @@ class BizOptService extends ServiceBase {
...
@@ -91,7 +91,7 @@ class BizOptService extends ServiceBase {
}
}
/*更新业务员信息*/
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
qobj
){
async
updateSalesmanInfoByDemandCode
(
qobj
)
{
var
self
=
this
;
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateSalesmanInfoByDemandCode
(
qobj
,
t
);
return
await
self
.
dao
.
updateSalesmanInfoByDemandCode
(
qobj
,
t
);
...
@@ -107,4 +107,14 @@ class BizOptService extends ServiceBase {
...
@@ -107,4 +107,14 @@ class BizOptService extends ServiceBase {
}
}
}
}
module
.
exports
=
BizOptService
;
module
.
exports
=
BizOptService
;
\ No newline at end of file
// let test = new BizOptService();
// let a = {
// "demand_code": "111"
// }
// start(a);
// async function start(a) {
// let res = await test.findInfoByDemandCode(a);
// console.log("结果:" + JSON.stringify(res));
// }
\ 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