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
39812357
Commit
39812357
authored
Aug 03, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update reqCenterOrderQcApi. if the order has been closed, inform fq
parent
40411fb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+26
-0
No files found.
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
39812357
...
@@ -2,6 +2,7 @@ var system = require("../../../system");
...
@@ -2,6 +2,7 @@ var system = require("../../../system");
var
settings
=
require
(
"../../../../config/settings"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
fs
=
require
(
"fs"
);
const
fs
=
require
(
"fs"
);
const
{
json
}
=
require
(
"sequelize"
);
//需求操作类
//需求操作类
class
UtilsNeedService
extends
AppServiceBase
{
class
UtilsNeedService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
...
@@ -64,6 +65,13 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -64,6 +65,13 @@ class UtilsNeedService extends AppServiceBase {
var
url
=
this
.
centerOrderUrl
+
reqUrl
;
var
url
=
this
.
centerOrderUrl
+
reqUrl
;
}
}
pobj
.
actionType
=
"receiveIcpFeedback"
;
pobj
.
actionType
=
"receiveIcpFeedback"
;
// 2020 0803 lin 修改;
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
}
}
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
data
;
return
data
;
...
@@ -286,6 +294,14 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -286,6 +294,14 @@ class UtilsNeedService extends AppServiceBase {
try
{
try
{
var
tmpFileName
=
docUrl
.
substring
(
0
,
docUrl
.
lastIndexOf
(
"?"
));
var
tmpFileName
=
docUrl
.
substring
(
0
,
docUrl
.
lastIndexOf
(
"?"
));
var
fileName
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"/"
)
+
1
,
tmpFileName
.
lenght
);
var
fileName
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"/"
)
+
1
,
tmpFileName
.
lenght
);
// 2020 0803 lin 修改;
var
urlJson
=
this
.
urlSplit
(
docUrl
);
if
(
urlJson
[
"Expires"
]){
// url中过期时间与服务器时间对比结果为已过期
if
(
urlJson
[
"Expires"
]
<
new
Date
().
getTime
())
{
return
""
+
fileName
;
}
}
//解码后的文件全名:xxx.pdf
//解码后的文件全名:xxx.pdf
var
fileAllName
=
decodeURIComponent
(
fileName
);
//为xxx.pdf
var
fileAllName
=
decodeURIComponent
(
fileName
);
//为xxx.pdf
var
saveFilePath
=
'/tmp/'
+
fileAllName
;
var
saveFilePath
=
'/tmp/'
+
fileAllName
;
...
@@ -373,6 +389,16 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -373,6 +389,16 @@ class UtilsNeedService extends AppServiceBase {
return
res
;
return
res
;
}
}
urlSplit
(
url
)
{
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
var
arr2
=
arr
[
1
].
split
(
"&"
);
//根据&重新分割参数
var
jsonarr
=
{};
//定义一个json对象放置url 参数
for
(
var
i
=
0
;
i
<
arr2
.
length
;
i
++
){
//循环将参数放到json里面
jsonarr
[
arr2
[
i
].
substring
(
0
,
1
)]
=
arr2
[
i
].
substring
(
2
,
3
);
}
return
jsonarr
;
}
// async test1() {
// async test1() {
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
...
...
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