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
2c9ad600
Commit
2c9ad600
authored
Feb 24, 2021
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 同步业务员
parent
2bda75c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
center-manage/app/config/routes/api.js
+28
-0
No files found.
center-manage/app/config/routes/api.js
View file @
2c9ad600
...
...
@@ -4,6 +4,7 @@ const chnelapi = System.getObject("api.common.channels")
const
userS
=
System
.
getObject
(
"service.auth.userSve"
)
const
roleS
=
System
.
getObject
(
"service.auth.roleSve"
)
const
companyS
=
System
.
getObject
(
"service.common.companySve"
)
const
rc
=
System
.
getObject
(
"util.execClient"
);
const
settings
=
require
(
"../settings.js"
)
let
channelCache
=
{};
module
.
exports
=
function
(
app
)
{
...
...
@@ -179,6 +180,33 @@ module.exports = function (app) {
res
.
json
(
System
.
getResult
(
null
,
e
.
message
));
}
})
//
app
.
post
(
"/order/changeSalesman"
,
async
function
(
req
,
res
,
next
)
{
let
{
appkey
,
companykey
,
orderNumber
,
userId
,
userName
}
=
req
.
body
;
let
salesman_opcode
;
if
(
!
appkey
||
!
companykey
)
{
res
.
json
(
System
.
getResult
(
null
,
"没有公司宝的租户appkey,companykey,请联系资质宝服务提供方"
));
return
}
if
(
!
orderNumber
||
!
userId
)
{
res
.
json
(
System
.
getResult
(
null
,
"订单号或转移人不能为空"
));
return
}
let
uf
=
await
userS
.
dao
.
model
.
findOne
({
where
:
{
openid
:
userId
}
});
if
(
uf
)
{
salesman_opcode
=
uf
.
opath
;
userName
=
uf
.
nickName
;
}
else
{
salesman_opcode
=
`root10/bizgroup01/g1members/
${
userId
}
`
}
let
rtn
=
await
rc
.
execPost3
({
orderNumber
,
userId
,
userName
,
salesman_opcode
},
`
${
settings
.
icpUrl
()}
/web/delivery/deliverCtl/changeSalesman`
);
res
.
json
(
JSON
.
parse
(
rtn
.
stdout
));
})
app
.
post
(
"/entService/*"
,
async
function
(
req
,
res
,
next
)
{
try
{
let
channel
;
...
...
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