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
6b6c66c0
Commit
6b6c66c0
authored
Jun 17, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
68c7555a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
134 additions
and
4 deletions
+134
-4
xgg-deliver/app/base/controller/impl/order/orderCtl.js
+106
-1
xgg-deliver/app/base/controller/impl/uc/userCtl.js
+2
-2
xgg-deliver/app/base/service/impl/order/orderSve.js
+24
-0
xgg-deliver/app/base/system.js
+1
-1
xgg-deliver/app/config/routes/web.js
+1
-0
No files found.
xgg-deliver/app/base/controller/impl/order/orderCtl.js
View file @
6b6c66c0
...
...
@@ -9,6 +9,51 @@ class OrderCtl extends CtlBase {
this
.
deliverSve
=
system
.
getObject
(
"service.common.deliverSve"
);
this
.
businessmenSve
=
system
.
getObject
(
"service.business.businessmenSve"
);
//方案字典
this
.
schemeType
=
[
{
"id"
:
"3000"
,
"name"
:
"方案一"
},
{
"id"
:
"4000"
,
"name"
:
"方案二"
}
]
//个税梯度 3000:方案一 4000:方案二 10:按月 20:按季度
this
.
schemeTaxMap
=
{
"3000"
:{
"10"
:{
"tax_ladder"
:[{
"minValue"
:
"0"
,
"maxValue"
:
"5000000"
,
"rate"
:
"1"
,
"quiCalDed"
:
"0"
}]
},
"20"
:{
"tax_ladder"
:[{
"minValue"
:
"0"
,
"maxValue"
:
"5000000"
,
"rate"
:
"1"
,
"quiCalDed"
:
"0"
}]
}
},
"4000"
:{
"10"
:{
"tax_ladder"
:
null
},
"20"
:{
"tax_ladder"
:
null
}
}
};
//增值税&附加税梯度 10:按月 20:按季度 1000:普票 2000:专票
this
.
schemeValueAddMap
=
{
"10"
:{
common_other_ladder
:[{
"minValue"
:
"0"
,
"maxValue"
:
"100000"
,
"zengzhiRate"
:
"0"
,
"fujiaRate"
:
"6"
},{
"minValue"
:
"100001"
,
"maxValue"
:
"9999999999999"
,
"zengzhiRate"
:
"1"
,
"fujiaRate"
:
"6"
}],
special_other_ladder
:[{
"minValue"
:
"0"
,
"maxValue"
:
"5000000"
,
"zengzhiRate"
:
"1"
,
"fujiaRate"
:
"6"
}]
},
"20"
:{
common_other_ladder
:[{
"minValue"
:
"0"
,
"maxValue"
:
"300000"
,
"zengzhiRate"
:
"0"
,
"fujiaRate"
:
"6"
},{
"minValue"
:
"300001"
,
"maxValue"
:
"9999999999999"
,
"zengzhiRate"
:
"1"
,
"fujiaRate"
:
"6"
}],
special_other_ladder
:[{
"minValue"
:
"0"
,
"maxValue"
:
"5000000"
,
"zengzhiRate"
:
"1"
,
"fujiaRate"
:
"6"
}]
}
}
}
async
processList
(
pobj
,
pobj2
,
req
)
{
...
...
@@ -245,7 +290,7 @@ class OrderCtl extends CtlBase {
/**
* 刻章办理已完成
* @param {*}
pobj
* @param {*}
- pobj
* @param {*} pobj2
* @param {*} req
*/
...
...
@@ -785,5 +830,64 @@ class OrderCtl extends CtlBase {
this
.
doTimeCondition
(
condition
,
[
"createdBegin"
,
"createdEnd"
]);
return
await
this
.
orderSve
.
aliOrderPage
(
condition
);
}
/**
* fn:根据来源ID查询订单状态
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async
queryOrderStatusBySourceNo
(
pobj
,
pobj2
,
req
){
try
{
return
this
.
orderSve
.
queryOrderStatusBySourceNo
(
pobj
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
/**
* fn:核定税种通用方案字典
* @returns {Promise<void>}
*/
async
schemeDisc
(){
return
system
.
getResult
(
this
.
schemeType
);
}
/**
* fn:根据方案编码查询个税
* @param params
* @returns {Promise<{msg: string, data: (*|null), bizmsg: string, status: number}>}
*/
async
queryTaxSchemeByType
(
params
){
if
(
!
params
.
code
){
return
system
.
getResult
(
null
,
`参数错误 方案编码不能为空`
);
}
if
(
!
params
.
tax_up_type
){
return
system
.
getResult
(
null
,
`参数错误 计费模式不能为空`
);
}
let
bean
=
this
.
schemeTaxMap
[
params
.
code
];
if
(
!
bean
||
!
bean
[
params
.
tax_up_type
]){
return
system
.
getResult
(
null
,
`方案不存在`
);
}
return
system
.
getResult
(
bean
[
params
.
tax_up_type
]);
}
/**
* fn:根据查询增值税和附加税
* @param params
* @returns {Promise<void>}
*/
async
queryValueAndAddSchemeByType
(
params
){
if
(
!
params
.
add_value_up_type
){
return
system
.
getResult
(
null
,
`参数错误 计费模式不能为空`
);
}
let
bean
=
this
.
schemeValueAddMap
[
params
.
add_value_up_type
];
if
(
!
bean
){
return
system
.
getResult
(
null
,
`方案不存在`
);
}
return
system
.
getResult
(
bean
);
}
}
module
.
exports
=
OrderCtl
;
\ No newline at end of file
xgg-deliver/app/base/controller/impl/uc/userCtl.js
View file @
6b6c66c0
...
...
@@ -126,7 +126,7 @@ class UserCtl extends CtlBase {
{
"name"
:
"刻章办理"
,
"path"
:
"/trading/glyHandle"
},
{
"name"
:
"银行开户"
,
"path"
:
"/trading/glyBank"
},
{
"name"
:
"税务报道"
,
"path"
:
"/trading/glyReport"
},
{
"name"
:
"代理记账"
,
"path"
:
"/trading/glyAccount"
},
//
{"name": "代理记账", "path": "/trading/glyAccount"},
{
"name"
:
"我的业务订单"
,
"path"
:
"/trading/glyorderInformation"
},
]
},
...
...
@@ -171,7 +171,7 @@ class UserCtl extends CtlBase {
{
"name"
:
"刻章办理"
,
"path"
:
"/trading/glyHandle"
},
{
"name"
:
"银行开户"
,
"path"
:
"/trading/glyBank"
},
{
"name"
:
"税务报道"
,
"path"
:
"/trading/glyReport"
},
{
"name"
:
"代理记账"
,
"path"
:
"/trading/glyAccount"
},
//
{"name": "代理记账", "path": "/trading/glyAccount"},
{
"name"
:
"我的业务订单"
,
"path"
:
"/trading/glyorderInformation"
},
]
},
...
...
xgg-deliver/app/base/service/impl/order/orderSve.js
View file @
6b6c66c0
...
...
@@ -247,6 +247,29 @@ class OrderService extends ServiceBase {
}
}
/**
* fn:根据来源ID查询订单状态
* @param params
* @returns {Promise<void>}
*/
async
queryOrderStatusBySourceNo
(
params
){
try
{
let
rs
=
await
this
.
callms
(
"order"
,
"queryOrderStatusBySourceNo"
,
params
);
return
rs
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* fn:核定成本费用类方案
* @param params
* @returns {Promise<void>}
*/
async
taxCategoryDetermineScheme
(
params
){
}
}
module
.
exports
=
OrderService
;
\ No newline at end of file
xgg-deliver/app/base/system.js
View file @
6b6c66c0
...
...
@@ -195,7 +195,7 @@ class System {
// merchant: "http://127.0.0.1:3101" + path,
// 订单服务
order
:
domain
2
+
":3103"
+
path
,
order
:
domain
+
":3103"
+
path
,
// order: domain2 + ":3103"+ path,
// 发票服务
...
...
xgg-deliver/app/config/routes/web.js
View file @
6b6c66c0
...
...
@@ -24,6 +24,7 @@ module.exports = function (app) {
req
.
url
.
indexOf
(
"common/captchaCtl/captcha"
)
>
0
||
req
.
url
.
indexOf
(
"invoice/invoiceCtl/jizhang"
)
>
0
||
req
.
url
.
indexOf
(
"order/orderCtl/addSourceOrder"
)
>
0
||
req
.
url
.
indexOf
(
"order/orderCtl/queryOrderStatusBySourceNo"
)
>
0
||
req
.
url
.
indexOf
(
"getRsConfig"
)
>
0
)
{
if
(
jsonUser
)
{
req
.
loginUser
=
jsonUser
;
...
...
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