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
04675577
Commit
04675577
authored
Mar 10, 2020
by
王昆
Browse files
Options
Browse Files
Download
Plain Diff
gsb
parents
587d15cd
a06fbfa5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
21 deletions
+30
-21
package-lock.json
+3
-0
xggsve-invoice/app/base/api/impl/op/action.js
+4
-8
xggsve-invoice/app/base/db/impl/invoice/iinvoiceDao.js
+4
-5
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
+1
-0
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
+18
-8
No files found.
package-lock.json
0 → 100644
View file @
04675577
{
"lockfileVersion"
:
1
}
xggsve-invoice/app/base/api/impl/op/action.js
View file @
04675577
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
// var rule =require("../../../utils/invoiceRule/rule");
// var Context =require("../../../utils/stateChain/context");
// var Calculation = require("../../../utils/strategies/calculation");
class
ActionAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
iinvoiceSve
=
system
.
getObject
(
"service.invoice.iinvoiceSve"
);
// this.context=new Context();
}
/**
* 接口跳转
...
...
@@ -30,13 +26,13 @@ class ActionAPI extends APIBase {
var
opResult
=
null
;
switch
(
action_type
)
{
case
"invoiceApply"
:
// 发票申请
// opResult = await rule.dispatcher
(action_body);
opResult
=
await
this
.
iinvoiceSve
.
invoiceApply
(
action_body
);
break
;
case
"invoicePage"
:
// 发票申请列表页(平台)
// opResult = await rule.dispatcher
(action_body);
opResult
=
await
this
.
iinvoiceSve
.
invoicePage
(
action_body
);
break
;
case
"deliverInvoicePage"
:
// 发票申请列表页(交付商)
// opResult = await rule.dispatcher
(action_body);
opResult
=
await
this
.
iinvoiceSve
.
deliverInvoicePage
(
action_body
);
break
;
case
"handleStatus"
:
//进度处理
break
;
...
...
@@ -132,7 +128,7 @@ class ActionAPI extends APIBase {
// break;
case
"test"
:
// 查询业务进度
opResult
=
await
this
.
iinvoiceSve
.
build
Order
Process
(
action_body
);
opResult
=
await
this
.
iinvoiceSve
.
buildProcess
(
action_body
);
break
;
default
:
...
...
xggsve-invoice/app/base/db/impl/invoice/iinvoiceDao.js
View file @
04675577
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
const
moment
=
require
(
"moment"
);
class
InvoiceDao
extends
Dao
{
class
I
I
nvoiceDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
InvoiceDao
));
this
.
tableName
=
this
.
model
.
tableName
;
super
(
Dao
.
getModelName
(
IInvoiceDao
));
}
async
countByParams
(
params
)
{
...
...
@@ -154,4 +153,4 @@ class InvoiceDao extends Dao {
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
);
}
}
module
.
exports
=
InvoiceDao
;
\ No newline at end of file
module
.
exports
=
IInvoiceDao
;
\ No newline at end of file
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
View file @
04675577
...
...
@@ -47,6 +47,7 @@ module.exports = (db, DataTypes) => {
deliver_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"交付商ID common下的交付商ID"
},
bd_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员Id"
},
bd_path
:{
type
:
DataTypes
.
STRING
(
200
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员权限"
},
channel_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
comment
:
"渠道ID"
},
created_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
...
...
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
View file @
04675577
...
...
@@ -4,9 +4,9 @@ const moment = require('moment')
/**
* 交付商 提交的信息
*/
class
InvoiceService
extends
ServiceBase
{
class
I
I
nvoiceService
extends
ServiceBase
{
constructor
()
{
super
(
"invoice"
,
ServiceBase
.
getDaoName
(
InvoiceService
));
super
(
"invoice"
,
ServiceBase
.
getDaoName
(
I
I
nvoiceService
));
let
is
=
system
.
getObject
(
"util.invoiceStatus"
);
this
.
invoiceStatus
=
is
.
status
;
...
...
@@ -16,19 +16,29 @@ class InvoiceService extends ServiceBase {
this
.
iinvoicedeliverDao
=
system
.
getObject
(
"db.invoice.iinvoicedeliverDao"
);
}
/**
* 发票申请
* @param {*} params
*/
async
invoiceApply
(
params
){
}
//**********************************************以下是旧版本************************************************************ */
/**
* 构建产品流程对象
* @param productPid
* @param chooseProductIds
* @returns {Promise<void>}
*/
async
build
OrderProcess
(
productPid
)
{
let
productPid
=
productPid
||
50010000
;
async
build
Process
(
params
)
{
let
productPid
=
p
arams
.
p
roductPid
||
50010000
;
// 查询产品流程
let
productProcessList
=
await
this
.
oproductprocessDao
.
byProductPid
(
productPid
);
if
(
!
productProcessList
||
productProcessList
.
length
==
0
)
{
continue
;
return
[]
;
}
let
invoiceProcessList
=
[];
...
...
@@ -40,7 +50,7 @@ class InvoiceService extends ServiceBase {
let
process
=
processMap
[
productProcess
.
process_id
];
let
nextArr
=
this
.
trim
(
productProcess
.
next_status
).
split
(
","
);
let
nextStatus
=
[];
for
(
var
nextId
of
nextArr
)
{
for
(
let
nextId
of
nextArr
)
{
nextId
=
Number
(
nextId
||
0
);
let
nextObj
=
processMap
[
nextId
];
if
(
!
nextObj
)
{
...
...
@@ -68,4 +78,4 @@ class InvoiceService extends ServiceBase {
return
invoiceProcessList
;
}
}
module
.
exports
=
InvoiceService
;
\ No newline at end of file
module
.
exports
=
IInvoiceService
;
\ 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