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
4e7286aa
Commit
4e7286aa
authored
Jun 18, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
78d5d964
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
11 deletions
+35
-11
ic-deliver/app/base/controller/impl/bizchance/settlebillCtl.js
+5
-3
ic-deliver/app/base/db/models/delivery/settlebill.js
+19
-3
ic-deliver/app/base/service/impl/bizchance/settlebillSve.js
+11
-5
No files found.
ic-deliver/app/base/controller/impl/bizchance/settlebillCtl.js
View file @
4e7286aa
...
...
@@ -12,17 +12,19 @@ class SettleBillCtl extends CtlBase {
async
advice
(
p
,
q
,
req
){
let
sid
=
p
.
advice
.
settleId
let
msg
=
p
.
advice
.
memo
let
rtn
=
await
this
.
service
.
advice
(
sid
,
msg
)
let
userid
=
p
.
userid
let
userName
=
p
.
username
let
rtn
=
await
this
.
service
.
advice
(
sid
,
msg
,
userid
,
userName
)
return
system
.
getResult
(
rtn
)
}
async
auditPass
(
p
,
q
,
req
){
let
sid
=
p
.
pass
.
settleId
let
rtn
=
await
this
.
service
.
auditPass
(
sid
)
let
rtn
=
await
this
.
service
.
auditPass
(
sid
,
p
.
userid
,
p
.
username
)
return
system
.
getResult
(
rtn
)
}
async
pay
(
p
,
q
,
req
){
let
sid
=
p
.
pay
.
settleId
let
rtn
=
await
this
.
service
.
pay
(
sid
)
let
rtn
=
await
this
.
service
.
pay
(
sid
,
p
.
userid
,
p
.
username
)
return
system
.
getResult
(
rtn
)
}
}
...
...
ic-deliver/app/base/db/models/delivery/settlebill.js
View file @
4e7286aa
...
...
@@ -10,7 +10,7 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
audited
:
{
// 审核状态
audited
Status
:
{
// 审核状态
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
...
...
@@ -18,7 +18,7 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
isPayed
:{
isPayed
Status
:{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
...
...
@@ -26,13 +26,29 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
creator_id
:{
creator_id
:{
//申请人
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
creator
:{
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
auditor_id
:{
//审核人
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
auditor
:{
//审核人
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
payer_id
:{
//付款人
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
payer
:{
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
}
},
{
paranoid
:
true
,
//真的删除
...
...
ic-deliver/app/base/service/impl/bizchance/settlebillSve.js
View file @
4e7286aa
...
...
@@ -7,32 +7,38 @@ class SettleBillService extends ServiceBase {
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
SettleBillService
));
this
.
deliverbillDao
=
system
.
getObject
(
"db.bizchance.deliverybillDao"
)
}
async
advice
(
id
,
msg
){
async
advice
(
id
,
msg
,
userId
,
userName
){
var
self
=
this
return
this
.
db
.
transaction
(
async
function
(
t
){
//先按照ids查询出交付单的合计服务成本
let
st
=
await
self
.
dao
.
findById
(
id
,{
transaction
:
t
})
st
.
auditor_id
=
userId
st
.
auditor
=
userName
st
.
memo
=
msg
await
st
.
save
({
transaction
:
t
})
return
st
});
}
async
auditPass
(
settleId
){
async
auditPass
(
settleId
,
userId
,
userName
){
var
self
=
this
return
this
.
db
.
transaction
(
async
function
(
t
){
//先按照ids查询出交付单的合计服务成本
let
st
=
await
self
.
dao
.
findById
(
settleId
,{
transaction
:
t
})
st
.
audited
=
true
st
.
auditedStatus
=
true
st
.
auditor_id
=
userId
st
.
auditor
=
userName
await
st
.
save
({
transaction
:
t
})
return
st
});
}
async
pay
(
settleId
){
async
pay
(
settleId
,
userId
,
userName
){
var
self
=
this
return
this
.
db
.
transaction
(
async
function
(
t
){
//先按照ids查询出交付单的合计服务成本
let
st
=
await
self
.
dao
.
findById
(
settleId
,{
transaction
:
t
})
st
.
isPayed
=
true
st
.
isPayedStatus
=
true
st
.
payer_id
=
userId
st
.
payer
=
userName
await
st
.
save
({
transaction
:
t
})
//改变所有交付单的结算settle_status settled ,
await
self
.
deliverbillDao
.
updateByWhere
({
settle_status
:
'settled'
},
{
settlebill_id
:
st
.
id
},
t
);
...
...
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