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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
451 additions
and
474 deletions
+451
-474
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+323
-333
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
+128
-141
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
aae34162
...
@@ -6,369 +6,358 @@ const CtlBase = require("../../ctl.base");
...
@@ -6,369 +6,358 @@ const CtlBase = require("../../ctl.base");
const
moment
=
require
(
'moment'
);
const
moment
=
require
(
'moment'
);
const
appconfig
=
system
.
getSysConfig
();
const
appconfig
=
system
.
getSysConfig
();
class
BizOptCtl
extends
CtlBase
{
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
.
schemeSve
=
system
.
getObject
(
"service.bizchance.fitaxschemeSve"
);
//财税-方案信息
this
.
fitaxcompanySve
=
system
.
getObject
(
"service.bizchance.fitaxcompanySve"
);
//财税-企业信息
this
.
fitaxcompanySve
=
system
.
getObject
(
"service.bizchance.fitaxcompanySve"
);
//财税-企业信息
this
.
operationrecordSve
=
system
.
getObject
(
"service.bizchance.operationrecordSve"
);
//财税-需求分配记录
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
();
this
.
queueUrl
=
settings
.
queueUrl
();
this
.
queueUrl
=
settings
.
queueUrl
();
//this.wdyUrl = settings.wdyUrl();
//this.wdyUrl = settings.wdyUrl();
this
.
dateUtil
=
system
.
getObject
(
"util.dateClient"
);
this
.
dateUtil
=
system
.
getObject
(
"util.dateClient"
);
}
}
/**
/**
* 根据用户id获取商机信息,分页获取
* 根据用户id获取商机信息,分页获取
* @param {*} pobj
* @param {*} pobj
*/
*/
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
try
{
try
{
//设置查询条件
//设置查询条件
console
.
log
(
"bizoptCtl/findAndCountAll pobj--"
,
pobj
);
console
.
log
(
"bizoptCtl/findAndCountAll pobj--"
,
pobj
);
if
(
pobj
.
search
&&
pobj
.
search
.
dateType
)
{
if
(
pobj
.
search
&&
pobj
.
search
.
dateType
)
{
if
(
pobj
.
search
.
dateType
!==
'全部'
)
{
if
(
pobj
.
search
.
dateType
!==
'全部'
)
{
pobj
.
search
.
created_at
=
this
.
dateUtil
.
betweenTime
(
pobj
.
search
.
dateType
);
pobj
.
search
.
created_at
=
this
.
dateUtil
.
betweenTime
(
pobj
.
search
.
dateType
);
}
}
delete
pobj
.
search
.
dateType
delete
pobj
.
search
.
dateType
}
}
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
console
.
log
(
"rs-------------"
+
rs
);
console
.
log
(
"rs-------------"
+
rs
);
let
rarr
=
[];
let
rarr
=
[];
let
results
=
rs
.
results
.
rows
;
let
results
=
rs
.
results
.
rows
;
results
.
forEach
(
element
=>
{
results
.
forEach
(
element
=>
{
let
robj
=
{};
let
robj
=
{};
robj
.
id
=
element
.
id
;
//数据的id
robj
.
id
=
element
.
id
;
//数据的id
robj
.
demand_code
=
element
.
demand_code
;
//商机编号
robj
.
demand_code
=
element
.
demand_code
;
//商机编号
robj
.
v_cophone
=
system
.
decryptStr
(
element
.
v_cophone
);
//联系电话-shousuo
robj
.
v_cophone
=
system
.
decryptStr
(
element
.
v_cophone
);
//联系电话-shousuo
robj
.
business_status
=
element
.
business_status
;
//商机当前状态
robj
.
business_status
=
element
.
business_status
;
//商机当前状态
if
(
element
.
business_info
.
serviceName
&&
element
.
business_info
.
serviceName
!=
'undefined'
)
{
if
(
element
.
business_info
.
serviceName
&&
element
.
business_info
.
serviceName
!=
'undefined'
)
{
robj
.
address
=
element
.
business_info
.
serviceName
;
//服务地区
robj
.
address
=
element
.
business_info
.
serviceName
;
//服务地区
}
}
else
{
else
{
robj
.
address
=
""
;
robj
.
address
=
""
;
}
}
// robj.updated_at = this.timeFormat(element.updated_at);//商机当前状态日期
// robj.updated_at = this.timeFormat(element.updated_at);//商机当前状态日期
robj
.
updated_at
=
element
.
updated_at
;
//商机当前状态日期
robj
.
updated_at
=
element
.
updated_at
;
//商机当前状态日期
robj
.
business_type
=
element
.
business_type
;
//商机类型
robj
.
business_type
=
element
.
business_type
;
//商机类型
robj
.
v_coname
=
element
.
v_coname
;
//联系人-shousuo
robj
.
v_coname
=
element
.
v_coname
;
//联系人-shousuo
robj
.
source_name
=
element
.
source_name
;
//渠道来源--前端服务
robj
.
source_name
=
element
.
source_name
;
//渠道来源--前端服务
robj
.
servicerName
=
element
.
facilitator_name
;
//服务商名称
robj
.
servicerName
=
element
.
facilitator_name
;
//服务商名称
// robj.facilitator_name = element.facilitator_name;//服务商名称
// robj.facilitator_name = element.facilitator_name;//服务商名称
// robj.sourceName = element.source_name;//渠道来源
// robj.sourceName = element.source_name;//渠道来源
// robj.business_info_person = element.business_info.contactsName;//联系人
// robj.business_info_person = element.business_info.contactsName;//联系人
// robj.business_info_phone = system.decryptStr(element.business_info.contactsPhone);//联系电话
// robj.business_info_phone = system.decryptStr(element.business_info.contactsPhone);//联系电话
robj
.
salesman_name
=
element
.
salesman_name
;
robj
.
salesman_name
=
element
.
salesman_name
;
robj
.
salesman_phone
=
system
.
decryptStr
(
element
.
salesman_phone
);
robj
.
salesman_phone
=
system
.
decryptStr
(
element
.
salesman_phone
);
rarr
.
push
(
robj
);
rarr
.
push
(
robj
);
});
});
rs
.
results
.
rows
=
rarr
;
rs
.
results
.
rows
=
rarr
;
return
system
.
getResult
(
rs
);
return
system
.
getResult
(
rs
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"error------------------------"
+
error
);
console
.
log
(
"error------------------------"
+
error
);
return
system
.
getResultError
(
error
);
return
system
.
getResultError
(
error
);
}
}
}
}
/**
/**
* 需求分配 TODO
* 需求分配 TODO
* @param {*} mobj
* @param {*} mobj
* @param {*} qobj
* @param {*} qobj
* @param {*} req
* @param {*} req
* {
* {
demand_code_list: ["1", "2", "3"],//至少一个需求编号
demand_code_list: ["1", "2", "3"],//至少一个需求编号
salesman_opcode: "",//唯一标识
salesman_opcode: "",//唯一标识
salesman_id: "jdlfaj",//销售员id
salesman_id: "jdlfaj",//销售员id
salesman_name: "",//销售员姓名
salesman_name: "",//销售员姓名
salesman_phone: "",//销售员手机号
salesman_phone: "",//销售员手机号
}
*/
async
distribution
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
}
}
*/
async
distribution
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
}
/**
/**
* 关闭需求
* 关闭需求
* @param {*} mobj
* @param {*} mobj
* {
* {
demand_code: "",//需求编号
demand_code: "",//需求编号
close_reason: "",//关闭原因
close_reason: "",//关闭原因
remarks: ""//备注
remarks: ""//备注
}
}
*/
*/
async
closeBizopt
(
mobj
,
qobj
,
req
)
{
async
closeBizopt
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
let
pobj
=
mobj
.
d
;
pobj
.
business_status
=
"isClosed"
;
pobj
.
business_status
=
"isClosed"
;
//根据需求编号去更新该条需求的状态为已关闭
//根据需求编号去更新该条需求的状态为已关闭
try
{
try
{
let
res
=
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
let
res
=
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
//TODO 同步该需求关闭信息到其他系统
//TODO 同步该需求关闭信息到其他系统
return
system
.
getResult
(
"关闭需求成功!"
);
return
system
.
getResult
(
"关闭需求成功!"
);
}
catch
(
error
)
{
}
catch
(
error
)
{
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 关闭需求出错!"
);
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 关闭需求出错!"
);
}
}
}
}
/**
/**
* 获取跟进详情页所有信息
* 获取跟进详情页所有信息
* @param {*} mobj
* @param {*} mobj
* {
* {
demand_code: "",//需求编号
demand_code: "",//需求编号
}
}
*/
*/
async
getFollowUpInfo
(
mobj
,
qobj
,
req
)
{
async
getFollowUpInfo
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
var
pobj
=
mobj
.
d
;
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
try
{
try
{
var
bizoptInfo
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
var
bizoptInfo
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
var
companyInfo
=
await
this
.
fitaxcompanySve
.
findInfo
(
pobj
);
var
companyInfo
=
await
this
.
fitaxcompanySve
.
findInfo
(
pobj
);
pobj
.
operation_type
=
"followUp"
;
pobj
.
operation_type
=
"followUp"
;
var
followUpinfos
=
await
this
.
operationrecordSve
.
findAllInfo
(
pobj
);
var
followUpinfos
=
await
this
.
operationrecordSve
.
findAllInfo
(
pobj
);
var
followUpinfo
=
{};
var
followUpinfo
=
{};
if
(
followUpinfos
.
length
>
0
)
{
if
(
followUpinfos
.
length
>
0
)
{
followUpinfo
=
followUpinfos
[
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 获取跟进详情页信息出错!"
);
}
}
}
return
system
.
getResult
({
bizoptInfo
:
bizoptInfo
,
companyInfo
:
companyInfo
,
followUpinfo
:
followUpinfo
});
}
catch
(
error
)
{
console
.
log
(
"bizopt/getFollowUpInfo err: "
+
error
);
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 获取跟进详情页信息出错!"
);
}
}
}
}
/**
/**
* 获取记录详情页所有信息
* 获取记录详情页所有信息
* @param {*} mobj
* @param {*} mobj
* {
* {
demand_code: "",//需求编号
demand_code: "",//需求编号
}
}
*/
*/
async
getRecordInfo
(
mobj
,
qobj
,
req
)
{
async
getRecordInfo
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
var
pobj
=
mobj
.
d
;
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
try
{
try
{
var
bizoptInfo
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
//需求信息
var
bizoptInfo
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
//需求信息
var
companyInfo
=
await
this
.
fitaxcompanySve
.
findInfo
(
pobj
);
//企业信息
var
companyInfo
=
await
this
.
fitaxcompanySve
.
findInfo
(
pobj
);
//企业信息
var
schemeInfo
=
await
this
.
schemeSve
.
findInfo
(
pobj
);
//方案详情
var
schemeInfo
=
await
this
.
schemeSve
.
findInfo
(
pobj
);
//方案详情
var
followUpinfos
=
await
this
.
operationrecordSve
.
findAllInfo
(
pobj
);
//线索记录
var
followUpinfos
=
await
this
.
operationrecordSve
.
findAllInfo
(
pobj
);
//线索记录
return
system
.
getResult
({
bizoptInfo
:
bizoptInfo
,
companyInfo
:
companyInfo
,
schemeInfo
:
schemeInfo
,
followUpinfos
:
followUpinfos
});
return
system
.
getResult
({
bizoptInfo
:
bizoptInfo
,
companyInfo
:
companyInfo
,
schemeInfo
:
schemeInfo
,
followUpinfos
:
followUpinfos
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"bizopt/getFollowUpInfo err: "
+
error
);
console
.
log
(
"bizopt/getFollowUpInfo err: "
+
error
);
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 获取跟进详情页信息出错!"
);
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 获取跟进详情页信息出错!"
);
}
}
}
}
/**
* @param {*} mobj
*/
async
findInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
try
{
var
rs
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
var
ms
=
await
this
.
schemeService
.
findInfoByDemandCode
(
pobj
);
var
rarr
=
{}
if
(
rs
)
{
var
statusInfo
=
{
"currentStatus"
:
rs
.
business_status
};
//商机状态
var
businessInfo
=
{};
businessInfo
.
demand_code
=
rs
.
demand_code
;
//商机编号
businessInfo
.
channelSource
=
appconfig
.
pdict
.
source
[
rs
.
source_name
];
///渠道来源
// businessInfo.businessType = rs.business_type;//商机类型代码
businessInfo
.
businessType
=
appconfig
.
pdict
.
businessType
[
rs
.
business_type
];
//商机类型名称
// businessInfo.serviceArea = rs.service_address;//服务地区
if
(
businessInfo
.
businessName
==
"云上园区注册"
)
{
businessInfo
.
serviceArea
=
appconfig
.
pdict
.
registeredParkDict
[
rs
.
service_address
];
//服务地区名称
}
else
{
businessInfo
.
serviceArea
=
appconfig
.
pdict
.
registeredAreaDict
[
rs
.
service_address
];
//服务地区名称
}
if
(
businessInfo
.
businessName
==
"注册地址"
)
{
businessInfo
.
registeredAddress
=
appconfig
.
pdict
.
registeredAreaDict
[
rs
.
service_address
];
//注册地址名称
}
businessInfo
.
statusReason
=
rs
.
close_reason
;
//商机关闭原因
businessInfo
.
memoInfo
=
rs
.
business_info
.
memoInfo
;
//备注信息
businessInfo
.
contactsName
=
rs
.
business_info
.
contactsName
;
//联系人名称
businessInfo
.
contactsPhone
=
system
.
decryptStr
(
rs
.
business_info
.
contactsPhone
);
//联系人联系方式
businessInfo
.
createdTime
=
this
.
timeFormat
(
rs
.
created_at
);
//商机创建时间
rarr
.
statusInfo
=
statusInfo
;
rarr
.
businessInfo
=
businessInfo
;
}
if
(
ms
)
{
var
planInfo
=
ms
.
scheme_info
;
planInfo
.
schemeNumber
=
ms
.
scheme_number
;
planInfo
.
currentStatus
=
ms
.
scheme_status
;
if
(
ms
.
scheme_status
&&
ms
.
scheme_status
==
"isReject"
)
{
planInfo
.
currentStatus
=
"已退回"
;
}
else
{
planInfo
.
currentStatus
=
ms
.
scheme_status
;
}
planInfo
.
statusReason
=
ms
.
reject_reason
;
rarr
.
planInfo
=
planInfo
;
}
}
return
system
.
getResult
(
rarr
);
}
catch
(
error
)
{
console
.
log
(
"eeeeeeeeeeeeeeeeeeeeee"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
}
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
/*更新业务员信息*/
/**
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
* @param {*} mobj
var
pobj
=
mobj
.
d
;
*/
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
)
{
async
findInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
try
{
var
pobj
=
mobj
.
d
;
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
if
(
pobj
.
demand_code
&&
pobj
.
demand_code
!=
'undefined'
)
{
if
(
res
)
{
try
{
var
sInfo
=
{
var
rs
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
"flowType"
:
"BIZ"
,
var
ms
=
await
this
.
schemeService
.
findInfoByDemandCode
(
pobj
);
"flowId"
:
res
.
id
,
var
rarr
=
{}
"flowCode"
:
pobj
.
businessMode
,
if
(
rs
)
{
"salesmanInfo"
:
{
var
statusInfo
=
{
"currentStatus"
:
rs
.
business_status
};
//商机状态
"oldOpcode"
:
res
.
salesman_opcode
,
var
businessInfo
=
{};
"oldClerkName"
:
res
.
salesman_name
,
businessInfo
.
demand_code
=
rs
.
demand_code
;
//商机编号
"oldClerkId"
:
res
.
salesman_id
,
businessInfo
.
channelSource
=
appconfig
.
pdict
.
source
[
rs
.
source_name
];
///渠道来源
"oldClerkPhone"
:
res
.
salesman_phone
,
// businessInfo.businessType = rs.business_type;//商机类型代码
"oldFacilitatorId"
:
res
.
facilitator_id
,
businessInfo
.
businessType
=
appconfig
.
pdict
.
businessType
[
rs
.
business_type
];
//商机类型名称
"oldFacilitatorName"
:
res
.
facilitator_name
,
// businessInfo.serviceArea = rs.service_address;//服务地区
"newOpcode"
:
pobj
.
salesmanOpcode
,
if
(
businessInfo
.
businessName
==
"云上园区注册"
)
{
"newClerkName"
:
pobj
.
salesmanName
,
businessInfo
.
serviceArea
=
appconfig
.
pdict
.
registeredParkDict
[
rs
.
service_address
];
//服务地区名称
"newClerkId"
:
pobj
.
salesmanId
,
}
else
{
"newClerkPhone"
:
pobj
.
salesmanPhone
,
businessInfo
.
serviceArea
=
appconfig
.
pdict
.
registeredAreaDict
[
rs
.
service_address
];
//服务地区名称
"newFacilitatorId"
:
pobj
.
facilitatorId
,
}
"newFacilitatorName"
:
pobj
.
facilitatorName
if
(
businessInfo
.
businessName
==
"注册地址"
)
{
businessInfo
.
registeredAddress
=
appconfig
.
pdict
.
registeredAreaDict
[
rs
.
service_address
];
//注册地址名称
}
businessInfo
.
statusReason
=
rs
.
close_reason
;
//商机关闭原因
businessInfo
.
memoInfo
=
rs
.
business_info
.
memoInfo
;
//备注信息
businessInfo
.
contactsName
=
rs
.
business_info
.
contactsName
;
//联系人名称
businessInfo
.
contactsPhone
=
system
.
decryptStr
(
rs
.
business_info
.
contactsPhone
);
//联系人联系方式
businessInfo
.
createdTime
=
this
.
timeFormat
(
rs
.
created_at
);
//商机创建时间
rarr
.
statusInfo
=
statusInfo
;
rarr
.
businessInfo
=
businessInfo
;
}
if
(
ms
)
{
var
planInfo
=
ms
.
scheme_info
;
planInfo
.
schemeNumber
=
ms
.
scheme_number
;
planInfo
.
currentStatus
=
ms
.
scheme_status
;
if
(
ms
.
scheme_status
&&
ms
.
scheme_status
==
"isReject"
)
{
planInfo
.
currentStatus
=
"已退回"
;
}
else
{
planInfo
.
currentStatus
=
ms
.
scheme_status
;
}
planInfo
.
statusReason
=
ms
.
reject_reason
;
rarr
.
planInfo
=
planInfo
;
}
return
system
.
getResult
(
rarr
);
}
catch
(
error
)
{
console
.
log
(
"eeeeeeeeeeeeeeeeeeeeee"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
}
}
}
}
else
{
await
this
.
shisService
.
insertInfo
(
sInfo
);
//之前业务员转历史
return
system
.
getResultError
(
"参数错误!"
);
await
this
.
service
.
updateSalesmanInfoByDemandCode
(
pobj
);
//更新业务员信息
return
system
.
getResult
(
"操作成功!"
);
}
else
{
return
system
.
getResultError
(
"未找到相关数据"
);
}
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
/*根据商机编号更新商机状态*/
async
updateStatusByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
currentStatus
&&
pobj
.
currentStatus
!=
'undefined'
)
{
try
{
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
await
this
.
schemeService
.
updateStatusByDemandCode
(
pobj
);
//同时更新方案的状态
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
if
(
res
&&
res
!=
'undefined'
)
{
var
logInfo
=
{
"flowType"
:
"BIZ"
,
"flowId"
:
res
.
id
,
"statusCode"
:
pobj
.
currentStatus
,
"statusReason"
:
res
.
close_reason
,
"clerkName"
:
res
.
salesman_name
,
"clerkId"
:
res
.
salesman_id
}
await
this
.
logService
.
insertInfo
(
logInfo
);
//插入状态日志表
}
if
(
pobj
.
currentStatus
==
"isClosed"
)
{
//关闭需求时调用
/*更新业务员信息*/
var
rc
=
system
.
getObject
(
"util.execClient"
);
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
var
requrl
=
this
.
queueUrl
;
var
pobj
=
mobj
.
d
;
var
params
=
{
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
)
{
"actionType"
:
"produceData"
,
try
{
"actionBody"
:
{
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
"pushUrl"
:
this
.
receiveUrl
,
if
(
res
)
{
"actionType"
:
"closeNeed"
,
var
sInfo
=
{
"identifyCode"
:
"ic-manage"
,
"flowType"
:
"BIZ"
,
"messageBody"
:
{
"flowId"
:
res
.
id
,
"needNum"
:
pobj
.
businessMode
,
"flowCode"
:
pobj
.
businessMode
,
"note"
:
pobj
.
statusReason
"salesmanInfo"
:
{
}
"oldOpcode"
:
res
.
salesman_opcode
,
"oldClerkName"
:
res
.
salesman_name
,
"oldClerkId"
:
res
.
salesman_id
,
"oldClerkPhone"
:
res
.
salesman_phone
,
"oldFacilitatorId"
:
res
.
facilitator_id
,
"oldFacilitatorName"
:
res
.
facilitator_name
,
"newOpcode"
:
pobj
.
salesmanOpcode
,
"newClerkName"
:
pobj
.
salesmanName
,
"newClerkId"
:
pobj
.
salesmanId
,
"newClerkPhone"
:
pobj
.
salesmanPhone
,
"newFacilitatorId"
:
pobj
.
facilitatorId
,
"newFacilitatorName"
:
pobj
.
facilitatorName
}
}
await
this
.
shisService
.
insertInfo
(
sInfo
);
//之前业务员转历史
await
this
.
service
.
updateSalesmanInfoByDemandCode
(
pobj
);
//更新业务员信息
return
system
.
getResult
(
"操作成功!"
);
}
else
{
return
system
.
getResultError
(
"未找到相关数据"
);
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
1
)
{
return
system
.
getResult
(
"操作成功!"
);
}
else
{
return
system
.
getResultError
(
"更新方案状态出错!"
);
}
}
}
else
{
/*根据商机编号更新商机状态*/
return
system
.
getResult
(
"操作成功!"
);
async
updateStatusByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
currentStatus
&&
pobj
.
currentStatus
!=
'undefined'
)
{
try
{
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
await
this
.
schemeService
.
updateStatusByDemandCode
(
pobj
);
//同时更新方案的状态
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
if
(
res
&&
res
!=
'undefined'
)
{
var
logInfo
=
{
"flowType"
:
"BIZ"
,
"flowId"
:
res
.
id
,
"statusCode"
:
pobj
.
currentStatus
,
"statusReason"
:
res
.
close_reason
,
"clerkName"
:
res
.
salesman_name
,
"clerkId"
:
res
.
salesman_id
}
await
this
.
logService
.
insertInfo
(
logInfo
);
//插入状态日志表
}
if
(
pobj
.
currentStatus
==
"isClosed"
)
{
//关闭需求时调用
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
queueUrl
;
var
params
=
{
"actionType"
:
"produceData"
,
"actionBody"
:
{
"pushUrl"
:
this
.
receiveUrl
,
"actionType"
:
"closeNeed"
,
"identifyCode"
:
"ic-manage"
,
"messageBody"
:
{
"needNum"
:
pobj
.
businessMode
,
"note"
:
pobj
.
statusReason
}
}
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
1
)
{
return
system
.
getResult
(
"操作成功!"
);
}
else
{
return
system
.
getResultError
(
"更新方案状态出错!"
);
}
}
else
{
return
system
.
getResult
(
"操作成功!"
);
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
/*插入数据信息 */
/*插入数据信息 */
async
insertInfo
(
nobj
,
qobj
,
req
)
{
async
insertInfo
(
nobj
,
qobj
,
req
)
{
var
pobj
=
nobj
.
d
;
var
pobj
=
nobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
businessType
&&
pobj
.
businessType
!=
'undefined'
)
{
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
businessType
&&
pobj
.
businessType
!=
'undefined'
)
{
try
{
try
{
//pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案
//pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案
// pobj.channelSource = "tencentCloud";//目前渠道只有腾讯
// pobj.channelSource = "tencentCloud";//目前渠道只有腾讯
// pobj.sourceNumber = "1111111";
// pobj.sourceNumber = "1111111";
pobj
.
businessType
=
appconfig
.
pdict
.
dyDict
[
pobj
.
businessType
];
// pobj.businessType = appconfig.pdict.dyDict[pobj.businessType];
var
buInfo
=
await
this
.
service
.
insertInfo
(
pobj
);
var
buInfo
=
await
this
.
service
.
insertInfo
(
pobj
);
var
logInfo
=
{
"flowType"
:
"BIZ"
,
"flowId"
:
buInfo
.
id
,
"statusCode"
:
pobj
.
currentStatus
,
var
logInfo
=
{
"clerkName"
:
pobj
.
clerkName
,
"flowType"
:
"BIZ"
,
"clerkId"
:
pobj
.
salesmanId
"flowId"
:
buInfo
.
id
,
"statusCode"
:
pobj
.
bussinessStatus
,
"clerkName"
:
pobj
.
salesmanName
,
"clerkId"
:
pobj
.
salesmanId
}
await
this
.
logService
.
insertInfo
(
logInfo
);
//插入状态日至表
return
{
"status"
:
1
,
//1代表成功,否则失败
"message"
:
"操作成功"
,
"data"
:
""
,
"requestId"
:
""
};
}
catch
(
error
)
{
console
.
log
(
"TTTTTTTTTTTTTTTTTTTTTTT"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
await
this
.
logService
.
insertInfo
(
logInfo
);
//插入状态日至表
return
{
"status"
:
1
,
//1代表成功,否则失败
"message"
:
"操作成功"
,
"data"
:
""
,
"requestId"
:
""
};
}
catch
(
error
)
{
console
.
log
(
"TTTTTTTTTTTTTTTTTTTTTTT"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
}
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
timeFormat
(
date
)
{
timeFormat
(
date
)
{
let
localTime
=
moment
.
utc
(
date
).
toDate
();
let
localTime
=
moment
.
utc
(
date
).
toDate
();
localTime
=
moment
(
localTime
).
format
(
"YYYY-MM-DD"
);
localTime
=
moment
(
localTime
).
format
(
"YYYY-MM-DD"
);
return
localTime
;
return
localTime
;
}
}
}
}
module
.
exports
=
BizOptCtl
;
module
.
exports
=
BizOptCtl
;
...
@@ -397,4 +386,4 @@ module.exports = BizOptCtl;
...
@@ -397,4 +386,4 @@ module.exports = BizOptCtl;
// }
// }
// task.findInfoByDemandCode(obj,{},{}).then(d=>{
// task.findInfoByDemandCode(obj,{},{}).then(d=>{
// console.log(JSON.stringify(d));
// console.log(JSON.stringify(d));
// })
// })
\ No newline at end of file
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
View file @
aae34162
const
system
=
require
(
"../../../system"
);
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
class
BizoptDao
extends
Dao
{
class
BizoptDao
extends
Dao
{
constructor
()
{
constructor
()
{
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
)
{
return
qw
return
qw
}
else
{
}
else
{
//需要添加公司查询条件
//需要添加公司查询条件
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
)
{
}
console
.
log
(
"bizpath-------------"
+
qobj
.
bizpath
);
//不是来自平台前端查询
qc
.
where
.
business_type
=
qc
.
where
.
business_type
||
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
[
this
.
db
.
Op
.
eq
]:
"bookkeeping"
console
.
log
(
"bizpath-------------"
+
qobj
.
bizpath
);
}
qc
.
where
.
business_type
=
qc
.
where
.
business_type
||
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
[
this
.
db
.
Op
.
eq
]:
"bookkeeping"
if
(
qobj
.
bizpath
.
indexOf
(
"demandAllocation"
)
>
0
)
{
//从需求分配列表过来的
}
qw
[
"business_status"
]
=
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
[
this
.
db
.
Op
.
eq
]:
"received"
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
(
"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
.
indexOf
(
"distributionManagement"
)
>
0
)
{
//从分配记录列表过来的
};
qw
[
"business_status"
]
=
{
}
[
this
.
db
.
Op
.
ne
]:
"received"
}
};
}
}
}
}
}
return
qw
;
}
}
return
qw
;
}
/*根据商机编号获取商机详情*/
/*根据商机编号获取商机详情*/
async
findInfoByDemandCode
(
qobj
)
{
async
findInfoByDemandCode
(
qobj
)
{
var
qcwhere
=
{
"demand_code"
:
qobj
.
demand_code
};
var
qcwhere
=
{
"demand_code"
:
qobj
.
demand_code
};
return
await
this
.
findOne
(
qcwhere
);
return
await
this
.
findOne
(
qcwhere
);
}
}
/*更新商机状态*/
/*更新商机状态*/
async
updateStatusByDemandCode
(
qobj
,
t
)
{
async
updateStatusByDemandCode
(
qobj
,
t
)
{
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
{
setobj
[
"close_reason"
]
=
""
;
}
var
whereobj
=
{
"demand_code"
:
qobj
.
demand_code
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
}
else
{
setobj
[
"close_reason"
]
=
""
;
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
qobj
,
t
)
{
var
setobj
=
{};
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
setobj
.
salesman_id
=
qobj
.
salesmanId
;
};
if
(
qobj
.
salesmanName
&&
qobj
.
salesmanName
!=
'undefined'
)
{
setobj
.
salesman_name
=
qobj
.
salesmanName
;
};
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
setobj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
};
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesmanPhone
!=
'undefined'
)
{
setobj
.
salesman_phone
=
qobj
.
salesmanPhone
;
};
if
(
qobj
.
facilitatorId
&&
qobj
.
facilitatorId
!=
'undefined'
)
{
setobj
.
facilitator_id
=
qobj
.
facilitatorId
;
};
if
(
qobj
.
facilitatorName
&&
qobj
.
facilitatorName
!=
'undefined'
)
{
setobj
.
facilitator_name
=
qobj
.
facilitatorName
;
};
var
whereobj
=
{
"demand_code"
:
qobj
.
businessMode
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
}
var
whereobj
=
{
"demand_code"
:
qobj
.
demand_code
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
/*更新业务员信息*/
/*插入商机信息*/
async
updateSalesmanInfoByDemandCode
(
qobj
,
t
)
{
async
insertInfo
(
qobj
,
t
)
{
var
setobj
=
{};
var
obj
=
{
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
"demand_code"
:
qobj
.
businessMode
,
setobj
.
salesman_id
=
qobj
.
salesmanId
;
"business_type"
:
qobj
.
businessType
,
};
"business_status"
:
qobj
.
bussinessStatus
,
if
(
qobj
.
salesmanName
&&
qobj
.
salesmanName
!=
'undefined'
)
{
"business_info"
:
{},
setobj
.
salesman_name
=
qobj
.
salesmanName
;
"source_number"
:
qobj
.
sourceNumber
,
};
"service_address"
:
qobj
.
serviceAddress
,
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
"facilitator_id"
:
qobj
.
favilitatorID
,
setobj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
"facilitator_name"
:
qobj
.
favilitatorName
,
};
"source_name"
:
qobj
.
sourceName
,
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesmanPhone
!=
'undefined'
)
{
};
setobj
.
salesman_phone
=
qobj
.
salesmanPhone
;
//business_info START
};
if
(
qobj
.
topOrgCode
&&
qobj
.
topOrgCode
!=
'undefined'
)
{
if
(
qobj
.
facilitatorId
&&
qobj
.
facilitatorId
!=
'undefined'
)
{
obj
.
business_info
.
topOrgCode
=
qobj
.
topOrgCode
setobj
.
facilitator_id
=
qobj
.
facilitatorId
;
}
};
if
(
qobj
.
intentionBizId
&&
qobj
.
intentionBizId
!=
'undefined'
)
{
if
(
qobj
.
facilitatorName
&&
qobj
.
facilitatorName
!=
'undefined'
)
{
obj
.
business_info
.
intentionBizId
=
qobj
.
intentionBizId
;
setobj
.
facilitator_name
=
qobj
.
facilitatorName
;
}
};
if
(
qobj
.
contactsPhone
&&
qobj
.
contactsPhone
!=
'undefined'
)
{
var
whereobj
=
{
"demand_code"
:
qobj
.
businessMode
};
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
//已经加密
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
}
if
(
qobj
.
contactsName
&&
qobj
.
contactsName
!=
'undefined'
)
{
obj
.
business_info
.
contactsName
=
qobj
.
contactsName
;
}
//bussiness_info END
//other
if
(
qobj
.
closeReason
&&
qobj
.
closeReason
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
closeReason
;
}
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
obj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
}
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
obj
.
salesman_id
=
qobj
.
salesmanId
;
}
if
(
qobj
.
salesmanName
&&
qobj
.
salesmanName
!=
'undefined'
)
{
obj
.
salesman_name
=
qobj
.
salesmanName
;
}
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesmanPhone
!=
'undefined'
)
{
obj
.
salesman_phone
=
qobj
.
salesmanPhone
;
}
/*插入商机信息*/
return
await
this
.
create
(
obj
,
t
);
async
insertInfo
(
qobj
,
t
)
{
var
obj
=
{
"demand_code"
:
qobj
.
businessMode
,
"business_type"
:
qobj
.
businessType
,
"business_status"
:
qobj
.
currentStatus
,
"business_info"
:
{}
};
if
(
qobj
.
channelSource
&&
qobj
.
channelSource
!=
'undefined'
)
{
obj
.
source_name
=
qobj
.
channelSource
;
}
if
(
qobj
.
sourceNumber
&&
qobj
.
sourceNumber
!=
'undefined'
)
{
obj
.
source_number
=
qobj
.
sourceNumber
;
}
if
(
qobj
.
serviceCode
&&
qobj
.
serviceCode
!=
'undefined'
)
{
obj
.
service_address
=
qobj
.
serviceCode
;
}
if
(
qobj
.
memoInfo
&&
qobj
.
memoInfo
!=
'undefined'
)
{
obj
.
business_info
.
memoInfo
=
qobj
.
memoInfo
;
}
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
statusReason
;
}
if
(
qobj
.
contactsName
&&
qobj
.
contactsName
!=
'undefined'
)
{
obj
.
business_info
.
contactsName
=
qobj
.
contactsName
;
}
if
(
qobj
.
contactsPhone
&&
qobj
.
contactsPhone
!=
'undefined'
)
{
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
//已经加密
}
if
(
qobj
.
serviceName
&&
qobj
.
serviceName
!=
'undefined'
)
{
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'
)
{
obj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
}
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
obj
.
salesman_id
=
qobj
.
salesmanId
;
}
if
(
qobj
.
clerkName
&&
qobj
.
clerkName
!=
'undefined'
)
{
obj
.
salesman_name
=
qobj
.
clerkName
;
}
if
(
qobj
.
clerkPhone
&&
qobj
.
clerkPhone
!=
'undefined'
)
{
obj
.
salesman_phone
=
qobj
.
clerkPhone
;
}
}
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