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
7809a203
Commit
7809a203
authored
Aug 20, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tx-fi-tax' of gitlab.gongsibao.com:jiangyong/zhichan into tx-fi-tax
parents
80425617
bfb52868
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
120 additions
and
25 deletions
+120
-25
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+58
-1
tx-fi-tax/app/base/controller/impl/bizchance/operationrecordCtl.js
+3
-2
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
+22
-9
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
+14
-3
tx-fi-tax/app/base/db/metadata/app/platform.js
+1
-1
tx-fi-tax/app/base/db/models/delivery/delivery_bill.js
+7
-4
tx-fi-tax/app/base/service/impl/bizchance/bizoptSve.js
+13
-3
tx-fi-tax/app/config/settings.js
+2
-2
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
7809a203
...
...
@@ -9,6 +9,9 @@ class BizOptCtl extends CtlBase {
constructor
()
{
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
BizOptCtl
));
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
.
shisService
=
system
.
getObject
(
"service.bizchance.salesmanhisSve"
);
this
.
receiveUrl
=
settings
.
receiveUrl
();
...
...
@@ -32,6 +35,7 @@ class BizOptCtl extends CtlBase {
delete
pobj
.
search
.
dateType
}
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
console
.
log
(
"rs-------------"
+
rs
);
let
rarr
=
[];
let
results
=
rs
.
results
.
rows
;
results
.
forEach
(
element
=>
{
...
...
@@ -66,6 +70,7 @@ class BizOptCtl extends CtlBase {
rs
.
results
.
rows
=
rarr
;
return
system
.
getResult
(
rs
);
}
catch
(
error
)
{
console
.
log
(
"error------------------------"
+
error
);
return
system
.
getResultError
(
error
);
}
}
...
...
@@ -111,7 +116,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
*/
async
findInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
...
...
@@ -171,6 +227,7 @@ class BizOptCtl extends CtlBase {
return
system
.
getResultError
(
"参数错误!"
);
}
}
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
...
...
tx-fi-tax/app/base/controller/impl/bizchance/operationrecordCtl.js
View file @
7809a203
...
...
@@ -11,8 +11,8 @@ class OperationrecordCtl extends CtlBase {
* 查询记录信息
* @param {*} mobj
* {
demand_code: "",//需求编号
operation_type: ""//操作类型
demand_code: "",//
必须,
需求编号
operation_type: ""//
可选,
操作类型
}
*/
async
findAllInfo
(
mobj
,
qobj
,
req
)
{
...
...
@@ -40,6 +40,7 @@ class OperationrecordCtl extends CtlBase {
}
*/
async
insertInfo
(
mobj
,
qobj
,
req
)
{
console
.
log
(
"用户信息: "
,
mobj
.
userid
,
mobj
.
username
);
let
pobj
=
mobj
.
d
;
try
{
if
(
!
pobj
.
demand_code
)
{
...
...
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
View file @
7809a203
...
...
@@ -7,7 +7,7 @@ class BizoptDao extends Dao {
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取商机信息的组装条件
qc
.
raw
=
true
;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不添加公司查询条件, 不添加路径条件,返回所有数据
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不
需要添加公司查询条件
添加公司查询条件, 不添加路径条件,返回所有数据
if
(
qobj
.
company_id
==
1
)
{
return
qw
}
else
{
...
...
@@ -19,14 +19,27 @@ class BizoptDao extends Dao {
}
//不是来自平台前端查询
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
console
.
log
(
"bizpath-------------"
+
qobj
.
bizpath
);
qc
.
where
.
business_type
=
qc
.
where
.
business_type
||
{
[
this
.
db
.
Op
.
In
]:
[
"bookkeeping"
]
[
this
.
db
.
Op
.
eq
]:
"bookkeeping"
}
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
if
(
qobj
.
bizpath
.
indexOf
(
"demandAllocation"
)
>
0
)
{
//从需求分配列表过来的
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
eq
]:
"received"
};
}
if
(
qobj
.
bizpath
.
indexOf
(
"demandfollow"
)
>
0
)
{
//从需求跟进列表过来的
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
in
]:
[
"beforeFollowUp"
,
"followingUp"
,
"beforeSubmission"
]
};
}
if
(
qobj
.
bizpath
.
indexOf
(
"distributionManagement"
)
>
0
)
{
//从分配记录列表过来的
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
ne
]:
"received"
};
}
}
// if (qobj.bizpath && qobj.bizpath != "") {
// if (qobj.bizpath.indexOf("myChance") > 0) {//说明是从商机列表过来的
// qw["salesman_id"] = qobj.userid;
// }
// }
}
}
...
...
@@ -35,7 +48,7 @@ class BizoptDao extends Dao {
/*根据商机编号获取商机详情*/
async
findInfoByDemandCode
(
qobj
)
{
var
qcwhere
=
{
"demand_code"
:
qobj
.
businessM
ode
};
var
qcwhere
=
{
"demand_code"
:
qobj
.
demand_c
ode
};
return
await
this
.
findOne
(
qcwhere
);
}
...
...
@@ -53,7 +66,7 @@ class BizoptDao extends Dao {
}
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
qobj
,
t
)
{
async
updateSalesmanInfoByDemandCode
(
qobj
,
t
)
{
var
setobj
=
{};
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
setobj
.
salesman_id
=
qobj
.
salesmanId
;
...
...
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
View file @
7809a203
...
...
@@ -10,9 +10,8 @@ class OperationrecordDao extends Dao {
*@param {*} qobj
*/
async
findAllInfo
(
qobj
)
{
qobj
.
order_type
=
"BIZ"
,
//数据类型需求|订单
qobj
.
raw
=
true
;
return
await
this
.
model
.
findAll
(
qobj
);
qobj
.
order_type
=
"BIZ"
;
//数据类型需求|订单
return
await
this
.
model
.
findAll
({
where
:
qobj
,
order
:
[[
"created_at"
,
"DESC"
]]
});
}
/**
...
...
@@ -38,3 +37,14 @@ class OperationrecordDao extends Dao {
}
}
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/db/metadata/app/platform.js
View file @
7809a203
...
...
@@ -17,7 +17,7 @@ module.exports = {
},
"bizoptStatus"
:
{
//财税需求状态
"
pending
"
:
"待处理"
,
"
received
"
:
"待处理"
,
"beforeFollowUp"
:
"待跟进"
,
"followingUp"
:
"跟进中"
,
"beforeSubmission"
:
"待确认方案"
,
...
...
tx-fi-tax/app/base/db/models/delivery/delivery_bill.js
View file @
7809a203
...
...
@@ -63,7 +63,7 @@ module.exports = (db, DataTypes) => {
type
:
DataTypes
.
STRING
},
master_source_number
:{
//主订单号
allowNull
:
fals
e
,
allowNull
:
tru
e
,
type
:
DataTypes
.
STRING
},
settle_status
:
{
// 服务单流转状态
...
...
@@ -72,7 +72,7 @@ module.exports = (db, DataTypes) => {
defaultValue
:
'waittosettle'
},
selling_price
:
{
//售价
allowNull
:
fals
e
,
allowNull
:
tru
e
,
type
:
DataTypes
.
INTEGER
},
cost_price
:
{
//成本价
...
...
@@ -107,7 +107,7 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
delivery_man_id
:
{
// 交付员id
delivery_man_id
:
{
// 交付员id
P
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
...
...
@@ -119,7 +119,10 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
biz_id
:
{
// 财税服务示例id
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
...
...
tx-fi-tax/app/base/service/impl/bizchance/bizoptSve.js
View file @
7809a203
...
...
@@ -91,7 +91,7 @@ class BizOptService extends ServiceBase {
}
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
qobj
){
async
updateSalesmanInfoByDemandCode
(
qobj
)
{
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateSalesmanInfoByDemandCode
(
qobj
,
t
);
...
...
@@ -107,4 +107,14 @@ class BizOptService extends ServiceBase {
}
}
module
.
exports
=
BizOptService
;
\ No newline at end of file
module
.
exports
=
BizOptService
;
// 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
tx-fi-tax/app/config/settings.js
View file @
7809a203
...
...
@@ -20,9 +20,9 @@ var settings = {
salt
:
"%iatpD1gcxz7iF#B"
,
defaultpwd
:
"gsb2020"
,
basepath
:
path
.
normalize
(
path
.
join
(
__dirname
,
'../..'
)),
port
:
process
.
env
.
NODE_PORT
||
888
8
,
port
:
process
.
env
.
NODE_PORT
||
888
9
,
logindex
:
"center_manage"
,
appname
:
"
ic_
deliver"
,
appname
:
"
book-
deliver"
,
kongurl
:
function
()
{
if
(
this
.
env
==
"localhost"
)
{
var
localsettings
=
require
(
"./localsettings"
);
...
...
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