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
f339c797
Commit
f339c797
authored
Apr 09, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
d7a9122c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
0 deletions
+44
-0
xggsve-order/app/base/api/impl/op/action.js
+3
-0
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
+14
-0
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
+27
-0
No files found.
xggsve-order/app/base/api/impl/op/action.js
View file @
f339c797
...
...
@@ -87,6 +87,9 @@ class ActionAPI extends APIBase {
case
"queryObusinessmen"
:
//查询个体工商户信息
opResult
=
await
this
.
obusinessmenSve
.
queryObusinessmen
(
action_body
);
break
;
case
"queryObusinessmenInfo"
:
//查询个体工商户信息
opResult
=
await
this
.
obusinessmenSve
.
queryObusinessmenInfo
(
action_body
);
break
;
case
"queryObusinessmenByCreditCode"
:
//查询个体工商户信息
opResult
=
await
this
.
obusinessmenSve
.
queryObusinessmenByCreditCode
(
action_body
);
break
;
...
...
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
View file @
f339c797
...
...
@@ -114,6 +114,19 @@ class ObusinessmenDao extends Dao {
return
result
;
}
/**
* 提送发票
* @param {*} id
*/
async
queryObusinessmenInfo
(
id
){
let
sql
=
`SELECT t1.source_no,t1.saas_deliver_api ,t2.* FROM o_order t1 INNER JOIN o_businessmen t2 ON t1.id = t2.order_id WHERE t1.id = :id `
;
let
list
=
await
this
.
customQuery
(
sql
,
{
id
:
id
})
||
[];
if
(
list
.
length
==
0
)
{
return
{};
}
return
result
[
0
];
}
}
module
.
exports
=
ObusinessmenDao
;
\ No newline at end of file
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
View file @
f339c797
...
...
@@ -21,6 +21,14 @@ class ObusinessmenService extends ServiceBase {
try
{
let
obj
=
await
this
.
findById
(
this
.
trim
(
params
.
id
));
this
.
handleDate
(
obj
,
[
"created_at"
,
"assignTime"
,
"reg_date"
,
"tax_reg_day"
,
"updated_at"
],
null
,
-
8
);
let
attributes
=
[
"source_no"
,
"saas_deliver_api"
];
let
order
=
await
this
.
oorderDao
.
model
.
findOne
({
where
:{
id
:
obj
.
order_id
},
attributes
});
obj
.
dataValues
.
order
=
order
;
return
system
.
getResult
(
obj
);
}
catch
(
error
)
{
console
.
log
(
error
);
...
...
@@ -373,6 +381,24 @@ class ObusinessmenService extends ServiceBase {
return
system
.
getResultSuccess
(
rs
);
}
/**
* saas 推送接口
* @param {*} params
*/
async
queryObusinessmenInfo
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
try
{
let
businessmenBean
=
await
this
.
dao
.
queryObusinessmenInfo
(
this
.
trim
(
params
.
id
));
return
system
.
getResult
(
businessmenBean
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
module
.
exports
=
ObusinessmenService
;
\ 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