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
9f42d5de
Commit
9f42d5de
authored
Jun 21, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
0f9f92b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
center-manage/app/base/service/impl/common/channelhandlers/tx.js
+20
-10
No files found.
center-manage/app/base/service/impl/common/channelhandlers/tx.js
View file @
9f42d5de
var
system
=
require
(
"../../../../system"
);
class
TxHandler
{
class
TxHandler
{
constructor
()
{
constructor
()
{
this
.
icUrl
=
"http://ic.com:8000/web/bizchance"
;
this
.
icUrl
=
"http://ic.com:8000/web/bizchance"
;
...
@@ -10,23 +11,27 @@ class TxHandler {
...
@@ -10,23 +11,27 @@ class TxHandler {
*/
*/
//新商机处理
//新商机处理
async
addChance
(
datajson
){
async
addChance
(
datajson
){
//console.log("put in queue",datajson)
console
.
log
(
"put in queue"
,
datajson
);
try
{
try
{
//获取分配的业务员信息
//获取分配的业务员信息
var
salesmanInfo
=
await
this
.
userService
.
getBizUserForBizChance
(
datajson
.
actionBody
.
contactsMoblie
,
datajson
.
actionBody
.
servicerName
,
datajson
.
actionBody
.
consultTypeName
);
var
salesmanInfo
=
await
this
.
userService
.
getBizUserForBizChance
(
datajson
.
actionBody
.
ContactsMoblie
,
datajson
.
actionBody
.
ServicerName
,
datajson
.
actionBody
.
ConsultTypeName
);
console
.
log
(
"salesman "
+
salesmanInfo
);
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
icUrl
+
"/bizoptCtl/insertInfo"
;
var
requrl
=
this
.
icUrl
+
"/bizoptCtl/insertInfo"
;
var
params
=
{
var
params
=
{
"businessMode"
:
datajson
.
actionBody
.
needNum
,
"businessMode"
:
datajson
.
actionBody
.
needNum
,
"servicerCode"
:
datajson
.
actionBody
.
s
ervicerCode
,
"servicerCode"
:
datajson
.
actionBody
.
S
ervicerCode
,
"servicerName"
:
datajson
.
actionBody
.
s
ervicerName
,
"servicerName"
:
datajson
.
actionBody
.
S
ervicerName
,
"serviceCode"
:
datajson
.
actionBody
.
r
egionId
,
"serviceCode"
:
datajson
.
actionBody
.
R
egionId
,
"serviceName"
:
datajson
.
actionBody
.
r
egionName
,
"serviceName"
:
datajson
.
actionBody
.
R
egionName
,
"contactsName"
:
datajson
.
actionBody
.
c
ontactsName
,
"contactsName"
:
datajson
.
actionBody
.
C
ontactsName
,
"contactsPhone"
:
datajson
.
actionBody
.
c
ontactsMoblie
,
"contactsPhone"
:
datajson
.
actionBody
.
C
ontactsMoblie
,
"businessType"
:
datajson
.
actionBody
.
c
onsultType
,
"businessType"
:
datajson
.
actionBody
.
C
onsultType
,
"businessName"
:
datajson
.
actionBody
.
c
onsultTypeName
"businessName"
:
datajson
.
actionBody
.
C
onsultTypeName
}
}
if
(
datajson
.
actionBody
.
Notes
&&
datajson
.
actionBody
.
Notes
!=
'undefined'
){
params
.
memoInfo
=
datajson
.
actionBody
.
Notes
;
}
if
(
salesmanInfo
&&
salesmanInfo
!=
'undefined'
){
if
(
salesmanInfo
&&
salesmanInfo
!=
'undefined'
){
params
.
salesmanOpcode
=
salesmanInfo
.
opath
;
params
.
salesmanOpcode
=
salesmanInfo
.
opath
;
params
.
salesmanId
=
salesmanInfo
.
userId
;
params
.
salesmanId
=
salesmanInfo
.
userId
;
...
@@ -38,6 +43,8 @@ class TxHandler {
...
@@ -38,6 +43,8 @@ class TxHandler {
return
j
;
return
j
;
}
}
catch
(
error
){
catch
(
error
){
console
.
log
(
"TTTTTTTTTTTTTT"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
return
system
.
getResultError
(
error
);
}
}
...
@@ -45,6 +52,7 @@ class TxHandler {
...
@@ -45,6 +52,7 @@ class TxHandler {
//退回商机处理
//退回商机处理
async
needClose
(
datajson
){
async
needClose
(
datajson
){
console
.
log
(
"put in queue"
,
datajson
);
try
{
try
{
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
icUrl
+
"/schemeCtl/updateStatusByDemandCode"
;
var
requrl
=
this
.
icUrl
+
"/schemeCtl/updateStatusByDemandCode"
;
...
@@ -75,6 +83,7 @@ class TxHandler {
...
@@ -75,6 +83,7 @@ class TxHandler {
//交付单处理
//交付单处理
async
orderSubmit
(
datajson
){
async
orderSubmit
(
datajson
){
console
.
log
(
"put in queue"
,
datajson
);
try
{
try
{
//获取分配的业务员信息
//获取分配的业务员信息
var
salesmanInfo
=
await
this
.
userService
.
getBizUserForDelivery
(
datajson
.
actionBody
.
contactsMoblie
,
datajson
.
actionBody
.
servicerName
,
datajson
.
actionBody
.
productTypeName
,
datajson
.
actionBody
.
skucode
);
var
salesmanInfo
=
await
this
.
userService
.
getBizUserForDelivery
(
datajson
.
actionBody
.
contactsMoblie
,
datajson
.
actionBody
.
servicerName
,
datajson
.
actionBody
.
productTypeName
,
datajson
.
actionBody
.
skucode
);
...
@@ -206,6 +215,7 @@ class TxHandler {
...
@@ -206,6 +215,7 @@ class TxHandler {
//关闭交付单处理
//关闭交付单处理
async
needClose
(
datajson
){
async
needClose
(
datajson
){
console
.
log
(
"put in queue"
,
datajson
);
try
{
try
{
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
icUrl
+
"/deliverybillCtl/updateStatusByDeliverCode"
;
var
requrl
=
this
.
icUrl
+
"/deliverybillCtl/updateStatusByDeliverCode"
;
...
...
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