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
a28271d3
Commit
a28271d3
authored
Mar 11, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
62e6de9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
xggsve-invoice/app/base/api/impl/op/action.js
+1
-2
xggsve-invoice/app/base/db/impl/invoice/iinvoiceDao.js
+5
-7
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
+10
-0
No files found.
xggsve-invoice/app/base/api/impl/op/action.js
View file @
a28271d3
...
@@ -9,7 +9,6 @@ class ActionAPI extends APIBase {
...
@@ -9,7 +9,6 @@ class ActionAPI extends APIBase {
this
.
iproductSve
=
system
.
getObject
(
"service.product.iproductSve"
);
this
.
iproductSve
=
system
.
getObject
(
"service.product.iproductSve"
);
this
.
iprocessSve
=
system
.
getObject
(
"service.product.iprocessSve"
);
this
.
iprocessSve
=
system
.
getObject
(
"service.product.iprocessSve"
);
}
}
/**
/**
* 接口跳转
* 接口跳转
...
@@ -45,7 +44,7 @@ class ActionAPI extends APIBase {
...
@@ -45,7 +44,7 @@ class ActionAPI extends APIBase {
case
"productDics"
:
// 查询产品字典
case
"productDics"
:
// 查询产品字典
// opResult = await this.oproductSve.productDics(action_body);
// opResult = await this.oproductSve.productDics(action_body);
break
;
break
;
case
"
allProces
s"
:
// 查询业务进度
case
"
processDic
s"
:
// 查询业务进度
opResult
=
await
this
.
iprocessSve
.
allNames
(
action_body
);
opResult
=
await
this
.
iprocessSve
.
allNames
(
action_body
);
break
;
break
;
...
...
xggsve-invoice/app/base/db/impl/invoice/iinvoiceDao.js
View file @
a28271d3
...
@@ -21,7 +21,7 @@ class IInvoiceDao extends Dao {
...
@@ -21,7 +21,7 @@ class IInvoiceDao extends Dao {
return
counts
[
0
].
total
||
0
;
return
counts
[
0
].
total
||
0
;
}
}
async
pageByParams
(
params
,
startRow
,
pageSize
)
{
async
pageByParams
(
params
)
{
var
sql
=
[];
var
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"SELECT"
);
sql
.
push
(
"t1.*"
);
sql
.
push
(
"t1.*"
);
...
@@ -32,8 +32,6 @@ class IInvoiceDao extends Dao {
...
@@ -32,8 +32,6 @@ class IInvoiceDao extends Dao {
sql
.
push
(
"ORDER BY t1.id DESC"
);
sql
.
push
(
"ORDER BY t1.id DESC"
);
sql
.
push
(
"LIMIT :startRow, :pageSize"
);
sql
.
push
(
"LIMIT :startRow, :pageSize"
);
params
.
startRow
=
startRow
||
0
;
params
.
pageSize
=
pageSize
||
10
;
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
);
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
);
}
}
...
@@ -50,11 +48,11 @@ class IInvoiceDao extends Dao {
...
@@ -50,11 +48,11 @@ class IInvoiceDao extends Dao {
if
(
params
.
invoice_type
)
{
if
(
params
.
invoice_type
)
{
sql
.
push
(
"AND t1.`invoice_type` = :invoice_type"
);
sql
.
push
(
"AND t1.`invoice_type` = :invoice_type"
);
}
}
if
(
params
.
invoic
eTimeBegin
)
{
if
(
params
.
creat
eTimeBegin
)
{
sql
.
push
(
"AND t1.`
invoice_time` >= :invoic
eTimeBegin"
);
sql
.
push
(
"AND t1.`
created_at` >= :creat
eTimeBegin"
);
}
}
if
(
params
.
invoic
eTimeEnd
)
{
if
(
params
.
creat
eTimeEnd
)
{
sql
.
push
(
"AND t1.`
invoice_time` <= :invoic
eTimeEnd"
);
sql
.
push
(
"AND t1.`
created_at` <= :creat
eTimeEnd"
);
}
}
if
(
params
.
red_status
)
{
if
(
params
.
red_status
)
{
...
...
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
View file @
a28271d3
...
@@ -181,6 +181,9 @@ class IInvoiceService extends ServiceBase {
...
@@ -181,6 +181,9 @@ class IInvoiceService extends ServiceBase {
productIdList
.
push
(
item
.
product_id
);
productIdList
.
push
(
item
.
product_id
);
}
}
}
}
if
(
!
productIdList
||
productIdList
.
length
===
0
)
{
return
;
}
let
productMap
=
await
this
.
iproductDao
.
mapByIds
(
productIdList
);
let
productMap
=
await
this
.
iproductDao
.
mapByIds
(
productIdList
);
for
(
let
item
of
list
)
{
for
(
let
item
of
list
)
{
item
.
oproduct
=
productMap
[
item
.
product_id
]
||
{}
item
.
oproduct
=
productMap
[
item
.
product_id
]
||
{}
...
@@ -199,6 +202,9 @@ class IInvoiceService extends ServiceBase {
...
@@ -199,6 +202,9 @@ class IInvoiceService extends ServiceBase {
}
}
ids
.
push
(
item
.
invoice_deliver_id
)
ids
.
push
(
item
.
invoice_deliver_id
)
}
}
if
(
!
ids
||
ids
.
length
===
0
)
{
return
;
}
let
map
=
await
this
.
iinvoicedeliverDao
.
findMapByIds
(
ids
);
let
map
=
await
this
.
iinvoicedeliverDao
.
findMapByIds
(
ids
);
for
(
let
item
of
list
)
{
for
(
let
item
of
list
)
{
...
@@ -219,6 +225,10 @@ class IInvoiceService extends ServiceBase {
...
@@ -219,6 +225,10 @@ class IInvoiceService extends ServiceBase {
statuses
.
push
(
item
.
status
);
statuses
.
push
(
item
.
status
);
}
}
if
(
!
ids
||
ids
.
length
===
0
||
!
statuses
||
statuses
.
length
===
0
)
{
return
;
}
let
map
=
await
this
.
iinvoiceprocessDao
.
mapByInvoiceIdsAndStatus
(
ids
,
statuses
);
let
map
=
await
this
.
iinvoiceprocessDao
.
mapByInvoiceIdsAndStatus
(
ids
,
statuses
);
for
(
let
item
of
list
)
{
for
(
let
item
of
list
)
{
let
key
=
item
.
id
+
"_"
+
item
.
status
;
let
key
=
item
.
id
+
"_"
+
item
.
status
;
...
...
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