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
2d3da3f6
Commit
2d3da3f6
authored
Jun 17, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
77f33df4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
2 deletions
+57
-2
xggsve-order/app/base/api/impl/op/action.js
+3
-0
xggsve-order/app/base/db/impl/order/oorderDao.js
+16
-0
xggsve-order/app/base/service/impl/order/oorderSve.js
+23
-0
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
+15
-2
No files found.
xggsve-order/app/base/api/impl/op/action.js
View file @
2d3da3f6
...
@@ -87,6 +87,9 @@ class ActionAPI extends APIBase {
...
@@ -87,6 +87,9 @@ class ActionAPI extends APIBase {
case
"aliOrderPage"
:
// 阿里我的业务订单
case
"aliOrderPage"
:
// 阿里我的业务订单
opResult
=
await
this
.
oorderSve
.
aliOrderPage
(
action_body
);
opResult
=
await
this
.
oorderSve
.
aliOrderPage
(
action_body
);
break
;
break
;
case
"queryOrderStatusBySourceNo"
:
// 根据sourceNo查询订单状态
opResult
=
await
this
.
oorderSve
.
queryOrderStatusBySourceNo
(
action_body
);
break
;
case
"productDics"
:
// 阿里查询产品字典
case
"productDics"
:
// 阿里查询产品字典
opResult
=
await
this
.
oproductSve
.
productDics
(
action_body
);
opResult
=
await
this
.
oproductSve
.
productDics
(
action_body
);
break
;
break
;
...
...
xggsve-order/app/base/db/impl/order/oorderDao.js
View file @
2d3da3f6
...
@@ -237,5 +237,20 @@ class OorderDao extends Dao {
...
@@ -237,5 +237,20 @@ class OorderDao extends Dao {
return
list
;
return
list
;
}
}
/**
* fn:根据订单来源查询状态
* @param params
* @returns {Promise<void>}
*/
async
queryOrderStatusBySourceNo
(
params
){
let
result
=
{};
let
sql
=
[];
sql
.
push
(
`SELECT t1.id,t1.source_no,t1.status,t2.name,t2.name1,t2.name2,t2.name3,t2.name4 `
);
sql
.
push
(
`FROM o_order t1 INNER JOIN o_order_process t2 ON t1.id=t2.order_id WHERE t1.status=t2.status `
)
if
(
params
.
source_nos
&&
params
.
source_nos
.
length
>
0
){
sql
.
push
(
`and t1.source_no IN(:source_nos) `
)
}
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
);
}
}
}
module
.
exports
=
OorderDao
;
module
.
exports
=
OorderDao
;
\ No newline at end of file
xggsve-order/app/base/service/impl/order/oorderSve.js
View file @
2d3da3f6
...
@@ -925,6 +925,28 @@ class OorderService extends ServiceBase {
...
@@ -925,6 +925,28 @@ class OorderService extends ServiceBase {
}
}
return
await
this
.
aliOrderPageAll
(
where
);
return
await
this
.
aliOrderPageAll
(
where
);
}
}
/**
* fn:根据订单来源查询状态
* @param params
* @returns {Promise<void>}
*/
async
queryOrderStatusBySourceNo
(
params
){
if
(
!
params
.
source_nos
&&
params
.
source_nos
.
length
<=
0
){
return
system
.
getResult
(
null
,
`参数错误 订单来源不能为空`
);
}
try
{
let
list
=
await
this
.
dao
.
queryOrderStatusBySourceNo
(
params
);
let
map
=
{};
for
(
let
item
of
list
)
{
map
[
item
.
source_no
]
=
item
;
}
return
system
.
getResult
(
map
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
)
}
}
}
}
module
.
exports
=
OorderService
;
module
.
exports
=
OorderService
;
\ No newline at end of file
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
View file @
2d3da3f6
...
@@ -905,26 +905,39 @@ class OorderstatusService extends ServiceBase {
...
@@ -905,26 +905,39 @@ class OorderstatusService extends ServiceBase {
if
(
!
params
.
cost_rate
)
{
if
(
!
params
.
cost_rate
)
{
return
system
.
getResult
(
null
,
`参数错误 核定成本费用率不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 核定成本费用率不能为空`
);
}
}
//普票个税
if
(
!
params
.
common_tax_ladder
)
{
if
(
!
params
.
common_tax_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 普票个税阶梯不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 普票个税阶梯不能为空`
);
}
else
{
}
else
{
params
.
common_tax_ladder
=
this
.
formatMoney
(
params
.
common_tax_ladder
);
params
.
common_tax_ladder
=
this
.
formatMoney
(
params
.
common_tax_ladder
);
}
}
//普票增值税&附加税
if
(
!
params
.
common_other_ladder
)
{
if
(
!
params
.
common_other_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 普票增值税、附加税阶梯不能为空`
);
// return system.getResult(null, `参数错误 普票增值税、附加税阶梯不能为空`);
//TODO:对于小规模个体户提供默认的税价的梯度
}
else
{
}
else
{
params
.
common_other_ladder
=
this
.
formatMoney
(
params
.
common_other_ladder
);
params
.
common_other_ladder
=
this
.
formatMoney
(
params
.
common_other_ladder
);
}
}
//专票个税
if
(
!
params
.
special_tax_ladder
)
{
if
(
!
params
.
special_tax_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 专票个税阶梯不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 专票个税阶梯不能为空`
);
}
else
{
}
else
{
params
.
special_tax_ladder
=
this
.
formatMoney
(
params
.
special_tax_ladder
);
params
.
special_tax_ladder
=
this
.
formatMoney
(
params
.
special_tax_ladder
);
}
}
//专票增值税&附加税
if
(
!
params
.
special_other_ladder
)
{
if
(
!
params
.
special_other_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 专票增值税、附加税阶梯不能为空`
);
// return system.getResult(null, `参数错误 专票增值税、附加税阶梯不能为空`);
//TODO:对于小规模个体户提供默认的税价的梯度
}
else
{
}
else
{
params
.
special_other_ladder
=
this
.
formatMoney
(
params
.
special_other_ladder
);
params
.
special_other_ladder
=
this
.
formatMoney
(
params
.
special_other_ladder
);
}
}
if
(
!
params
.
add_value_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
add_value_up_type
))
==
-
1
)
{
if
(
!
params
.
add_value_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
add_value_up_type
))
==
-
1
)
{
return
system
.
getResult
(
null
,
`参数错误 增值税累计类型不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 增值税累计类型不能为空`
);
}
}
...
...
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