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
a8875550
Commit
a8875550
authored
Aug 14, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bussiness_opt inti
parent
a0fa347a
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
340 additions
and
29 deletions
+340
-29
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+30
-29
tx-fi-tax/app/base/db/impl/bizchance/fitaxcompanyDao.js
+21
-0
tx-fi-tax/app/base/db/impl/bizchance/fitaxschemeDao.js
+21
-0
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
+21
-0
tx-fi-tax/app/base/db/models/delivery/business_opportunity.js
+4
-0
tx-fi-tax/app/base/db/models/delivery/fi_tax_company.js
+85
-0
tx-fi-tax/app/base/db/models/delivery/fi_tax_operation_record.js
+69
-0
tx-fi-tax/app/base/db/models/delivery/fi_tax_scheme.js
+89
-0
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
a8875550
...
...
@@ -17,12 +17,14 @@ class BizOptCtl extends CtlBase {
this
.
dateUtil
=
system
.
getObject
(
"util.dateClient"
);
}
/*根据用户id获取商机信息,分页获取*/
/**
* 根据用户id获取商机信息,分页获取
* @param pobj
*/
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
try
{
//TODO 根据业务员id获取该业务员所有列表
//设置查询条件
console
.
log
(
"
pobj--"
,
pobj
)
console
.
log
(
"
bizoptCtl/findAndCountAll pobj--"
,
pobj
);
if
(
pobj
.
search
&&
pobj
.
search
.
dateType
)
{
if
(
pobj
.
search
.
dateType
!==
'全部'
)
{
pobj
.
search
.
created_at
=
this
.
dateUtil
.
betweenTime
(
pobj
.
search
.
dateType
);
...
...
@@ -36,29 +38,28 @@ class BizOptCtl extends CtlBase {
let
robj
=
{};
robj
.
id
=
element
.
id
;
//数据的id
robj
.
demand_code
=
element
.
demand_code
;
//商机编号
robj
.
source
=
element
.
source_name
;
//商机来源
// robj.source_name = element.source_name;//商机来源-jiansuo
robj
.
business_type
=
element
.
business_type
;
//商机类型
robj
.
business_info_person
=
element
.
business_info
.
contactsName
;
//联系人
robj
.
v_coname
=
element
.
v_coname
;
//联系人-shousuo
robj
.
business_info_phone
=
system
.
decryptStr
(
element
.
business_info
.
contactsPhone
);
//联系电话
robj
.
v_cophone
=
system
.
decryptStr
(
element
.
v_cophone
);
//联系电话-shousuo
robj
.
business_status
=
element
.
business_status
;
//商机当前状态
if
(
element
.
business_info
.
serviceName
&&
element
.
business_info
.
serviceName
!=
'undefined'
){
robj
.
serviceName
=
element
.
business_info
.
serviceName
;
//服务地区
if
(
element
.
business_info
.
serviceName
&&
element
.
business_info
.
serviceName
!=
'undefined'
)
{
robj
.
address
=
element
.
business_info
.
serviceName
;
//服务地区
}
else
{
robj
.
serviceName
=
""
;
else
{
robj
.
address
=
""
;
}
robj
.
updated_at
=
this
.
timeFormat
(
element
.
updated_at
);
//商机当前状态日期
robj
.
servicerName
=
element
.
facilitator_name
;
robj
.
facilitator_name
=
element
.
facilitator_name
;
robj
.
sourceName
=
element
.
source_name
;
//渠道来源
// robj.updated_at = this.timeFormat(element.updated_at);//商机当前状态日期
robj
.
updated_at
=
element
.
updated_at
;
//商机当前状态日期
robj
.
business_type
=
element
.
business_type
;
//商机类型
robj
.
v_coname
=
element
.
v_coname
;
//联系人-shousuo
robj
.
source_name
=
element
.
source_name
;
//渠道来源--前端服务
robj
.
servicerName
=
element
.
facilitator_name
;
//服务商名称
robj
.
salesman_name
=
element
.
salesman_name
;
robj
.
salesman_phone
=
system
.
decryptStr
(
element
.
salesman_phone
);
// robj.facilitator_name = element.facilitator_name;//服务商名称
// robj.sourceName = element.source_name;//渠道来源
// robj.business_info_person = element.business_info.contactsName;//联系人
// robj.business_info_phone = system.decryptStr(element.business_info.contactsPhone);//联系电话
robj
.
salesman_name
=
element
.
salesman_name
;
robj
.
salesman_phone
=
system
.
decryptStr
(
element
.
salesman_phone
);
rarr
.
push
(
robj
);
});
...
...
@@ -129,17 +130,17 @@ class BizOptCtl extends CtlBase {
}
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
){
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
){
try
{
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
)
{
try
{
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
if
(
res
){
if
(
res
)
{
var
sInfo
=
{
"flowType"
:
"BIZ"
,
"flowId"
:
res
.
id
,
"flowCode"
:
pobj
.
businessMode
,
"salesmanInfo"
:{
"flowCode"
:
pobj
.
businessMode
,
"salesmanInfo"
:
{
"oldOpcode"
:
res
.
salesman_opcode
,
"oldClerkName"
:
res
.
salesman_name
,
"oldClerkId"
:
res
.
salesman_id
,
...
...
@@ -158,16 +159,16 @@ class BizOptCtl extends CtlBase {
await
this
.
service
.
updateSalesmanInfoByDemandCode
(
pobj
);
//更新业务员信息
return
system
.
getResult
(
"操作成功!"
);
}
else
{
else
{
return
system
.
getResultError
(
"未找到相关数据"
);
}
}
catch
(
error
)
{
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
else
{
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
...
...
tx-fi-tax/app/base/db/impl/bizchance/fitaxcompanyDao.js
0 → 100644
View file @
a8875550
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
FitaxcompanyDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
FitaxcompanyDao
));
}
/**
* 插入状态信息
* @param {*} qobj
* @param {*} t
*/
async
insertInfo
(
qobj
,
t
){
}
/**
*增删改查
*/
}
module
.
exports
=
FitaxcompanyDao
;
tx-fi-tax/app/base/db/impl/bizchance/fitaxschemeDao.js
0 → 100644
View file @
a8875550
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
FitaxschemeDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
FitaxschemeDao
));
}
/**
*增删改查
*/
/**
* 插入状态信息
* @param {*} qobj
* @param {*} t
*/
async
insertInfo
(
qobj
,
t
){
}
}
module
.
exports
=
FitaxschemeDao
;
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
0 → 100644
View file @
a8875550
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
OperationrecordDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
OperationrecordDao
));
}
/**
*增删改查
*/
/**
* 插入状态信息
* @param {*} qobj
* @param {*} t
*/
async
insertInfo
(
qobj
,
t
){
}
}
module
.
exports
=
OperationrecordDao
;
tx-fi-tax/app/base/db/models/delivery/business_opportunity.js
View file @
a8875550
...
...
@@ -69,6 +69,10 @@ module.exports = (db, DataTypes) => {
salesman_phone
:
{
// 业务员联系方式
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
biz_id
:
{
// 融易算-服务实例id
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
...
...
tx-fi-tax/app/base/db/models/delivery/fi_tax_company.js
0 → 100644
View file @
a8875550
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 财税-企业信息表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"fitaxcompany"
,
{
demand_code
:
{
// 需求编码
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
company_name
:
{
// 企业名称
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
legal_person
:
{
// 法人姓名
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
tax_number
:
{
// 税号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
taxpayer_type
:
{
// 纳税人类型
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
engaged_industry
:
{
// 所属行业
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
region
:
{
// 地区
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
address
:
{
// 企业地址
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'fi_tax_company'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
tx-fi-tax/app/base/db/models/delivery/fi_tax_operation_record.js
0 → 100644
View file @
a8875550
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 财税-操作记录表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"operationrecord"
,
{
demand_code
:
{
// 需求编码
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
operator
:
{
// 操作人
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
operation_type
:
{
// 操作类型
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
operation_details
:
{
// 操作详细记录
allowNull
:
true
,
type
:
DataTypes
.
JSON
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'fi_tax_operation_record'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
tx-fi-tax/app/base/db/models/delivery/fi_tax_scheme.js
0 → 100644
View file @
a8875550
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 财税-方案表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"fitaxscheme"
,
{
demand_code
:
{
// 需求编码
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
solution_bizid
:
{
// 方案编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
company_type
:
{
// 公司类型
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
taxpayer_type
:
{
// 纳税人类型
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
service_name
:
{
// 服务地区
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
buy_duration
:
{
// 购买时长
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
number
:
{
// 数量
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
total_cost
:
{
// 总计费用
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
remarks
:
{
// 备注
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'fi_tax_scheme'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
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