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
175545f0
Commit
175545f0
authored
Jul 23, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 退费管理
parent
25276eb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
2 deletions
+59
-2
icp-deliver/app/base/service/impl/delivery/deliverSve.js
+2
-1
icp-deliver/app/base/utils/totxClient.js
+50
-1
icp-deliver/app/config/settings.js
+7
-0
No files found.
icp-deliver/app/base/service/impl/delivery/deliverSve.js
View file @
175545f0
...
@@ -244,7 +244,8 @@ class DeliverService extends ServiceBase {
...
@@ -244,7 +244,8 @@ class DeliverService extends ServiceBase {
await
pushTx
.
pushChangeOrder
(
pushTx
.
TXSTATUS
.
CLOSED
,
deliverData
.
delivery_code
,
{
await
pushTx
.
pushChangeOrder
(
pushTx
.
TXSTATUS
.
CLOSED
,
deliverData
.
delivery_code
,
{
close_reason
:
pobj
.
close_reason
close_reason
:
pobj
.
close_reason
});
});
// 推送 退费
await
pushTx
.
returnPremium
(
deliverData
.
delivery_code
);
// 年报逻辑
// 年报逻辑
let
annualReportData
;
let
annualReportData
;
if
(
deliverData
.
master_source_number
&&
deliverData
.
delivery_info
&&
deliverData
.
delivery_info
.
annualReport
)
{
if
(
deliverData
.
master_source_number
&&
deliverData
.
delivery_info
&&
deliverData
.
delivery_info
.
annualReport
)
{
...
...
icp-deliver/app/base/utils/totxClient.js
View file @
175545f0
...
@@ -17,6 +17,7 @@ const TXSTATUS = {
...
@@ -17,6 +17,7 @@ const TXSTATUS = {
WAITDECLARE
:
"25"
,
//待申报
WAITDECLARE
:
"25"
,
//待申报
DECLARESUCCESS
:
"26"
,
//申报成功
DECLARESUCCESS
:
"26"
,
//申报成功
}
}
// 推送到 控制台
const
porApi
=
axios
.
create
({
const
porApi
=
axios
.
create
({
baseURL
:
settings
.
txurl
(),
// api 的 base_url
baseURL
:
settings
.
txurl
(),
// api 的 base_url
timeout
:
2000
,
// request timeout
timeout
:
2000
,
// request timeout
...
@@ -25,6 +26,15 @@ const porApi = axios.create({
...
@@ -25,6 +26,15 @@ const porApi = axios.create({
}
}
})
})
// 推送公共服务
const
publicApi
=
axios
.
create
({
baseURL
:
settings
.
requrl
(),
// api 的 base_url
timeout
:
2000
,
// request timeout
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
/**
...
@@ -139,6 +149,42 @@ const pushDeclareReport = async (annualReport, deliverData) => {
...
@@ -139,6 +149,42 @@ const pushDeclareReport = async (annualReport, deliverData) => {
await
pushChangeOrder
(
status
,
deliverData
.
delivery_code
,
{
annualReport
:
result
})
await
pushChangeOrder
(
status
,
deliverData
.
delivery_code
,
{
annualReport
:
result
})
}
}
/**
* 退费
* @param {*} orderNum
*/
const
returnPremium
=
async
(
orderNum
)
=>
{
try
{
let
data
=
{
"actionType"
:
"produceData"
,
"actionBody"
:
{
"pushUrl"
:
settings
.
txurl
()
+
"/api/action/order/springBoard"
,
"actionType"
:
"refundOrder"
,
"identifyCode"
:
"icp-manage"
,
"messageBody"
:
{
"orderNum"
:
orderNum
//订单编码
}
}
}
console
.
log
(
"请求数据 ------- "
);
console
.
log
(
data
);
let
result
=
await
publicApi
.
post
(
'api/queueAction/producer/springBoard'
,
data
);
result
=
result
.
data
;
console
.
log
(
"返回数据 ------- "
);
console
.
log
(
result
);
if
(
result
.
status
===
1
)
{
return
result
}
else
{
throw
new
Error
(
result
.
message
)
}
}
catch
(
err
)
{
console
.
log
(
"------ err -----"
);
console
.
log
(
err
)
throw
(
err
)
}
}
/**
/**
...
@@ -169,11 +215,13 @@ const postRequest = async (url, data) => {
...
@@ -169,11 +215,13 @@ const postRequest = async (url, data) => {
module
.
exports
=
{
module
.
exports
=
{
pushScheme
,
pushScheme
,
pushCloseNeed
,
pushCloseNeed
,
submitMaterials
,
submitMaterials
,
pushChangeOrder
,
pushChangeOrder
,
pushDeclareReport
,
pushDeclareReport
,
TXSTATUS
TXSTATUS
,
returnPremium
}
}
\ No newline at end of file
icp-deliver/app/config/settings.js
View file @
175545f0
...
@@ -31,6 +31,13 @@ var settings = {
...
@@ -31,6 +31,13 @@ var settings = {
return
"http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
return
"http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
}
}
},
},
requrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.1.128:4018"
;
}
else
{
return
"http://sytxpublic-msgq-service"
;
}
},
pmappid
:
1
,
pmappid
:
1
,
pmcompanyid
:
1
,
pmcompanyid
:
1
,
pmroleid
:
{
"ta"
:
1
,
"pr"
:
2
},
pmroleid
:
{
"ta"
:
1
,
"pr"
:
2
},
...
...
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