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
a1db065d
Commit
a1db065d
authored
Aug 25, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
05f5376d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
11 deletions
+39
-11
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
+39
-11
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
a1db065d
...
...
@@ -10,6 +10,7 @@ class DeliverybillCtl extends CtlBase {
constructor
()
{
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
DeliverybillCtl
));
this
.
logService
=
system
.
getObject
(
"service.bizchance.statuslogSve"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
}
/**
...
...
@@ -143,8 +144,20 @@ class DeliverybillCtl extends CtlBase {
// 创建服务实例
async
insertInfo
(
pobj
,
qobj
,
req
)
{
try
{
var
cachestr
=
sha235
(
JSON
.
stringify
(
pobj
));
var
cacheInfo
=
await
this
.
cacheManager
[
"TxCache"
].
getCache
(
cachestr
);
if
(
cacheInfo
&&
cacheInfo
!=
'undefined'
)
{
return
{
"status"
:
1
,
//1代表成功,否则失败
"msg"
:
"已处理成功!"
,
"data"
:
""
,
"requestId"
:
""
}
}
else
{
// 检验各项必传参数
if
(
pobj
.
requestId
&&
pobj
.
requestId
!=
'undefined'
&&
if
(
pobj
.
ac
requestId
&&
pobj
.
requestId
!=
'undefined'
&&
pobj
.
bizId
&&
pobj
.
bizId
!=
'undefined'
&&
pobj
.
contactsPhone
&&
pobj
.
contactsPhone
!=
'undefined'
&&
pobj
.
userId
&&
pobj
.
userId
!=
'undefined'
&&
...
...
@@ -158,17 +171,32 @@ class DeliverybillCtl extends CtlBase {
pobj
.
service_address
&&
pobj
.
service_address
!=
'undefined'
&&
pobj
.
delivery_status
&&
pobj
.
delivery_status
!=
'undefined'
&&
pobj
.
facilitator_id
&&
pobj
.
facilitator_id
!=
'undefined'
)
{
try
{
var
buInfo
=
await
this
.
service
.
insertInfo
(
pobj
);
return
system
.
getResult
(
buInfo
);
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
if
(
buInfo
){
await
this
.
cacheManager
[
"TxCache"
].
cache
(
cachestr
,
JSON
.
stringify
({
cachestr
:
cachestr
}),
180
);
//插入redis缓存
return
{
"status"
:
1
,
//1代表成功,否则失败
"msg"
:
"处理成功!"
,
"data"
:
buInfo
,
"requestId"
:
""
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
async
updateServer
(
pobj
,
qobj
,
req
)
{
try
{
if
(
!
pobj
.
requestId
||
pobj
.
requestId
==
'undefined'
)
{
...
...
@@ -202,16 +230,16 @@ class DeliverybillCtl extends CtlBase {
}
}
//根据bizId查询deliverybill表中的所有信息
async
getInfo
(
pobj
,
qobj
,
req
)
{
try
{
if
(
!
pobj
.
bizId
)
{
async
getInfo
(
pobj
,
qobj
,
req
)
{
try
{
if
(
!
pobj
.
bizId
)
{
throw
new
Error
(
"bizId 不能为空"
);
}
const
rs
=
await
this
.
service
.
getInfo
(
pobj
);
const
rs
=
await
this
.
service
.
getInfo
(
pobj
);
//console.log("got message");
return
system
.
getResult
(
rs
);
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
}
}
}
...
...
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