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
80e8813e
Commit
80e8813e
authored
Aug 07, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
d795ffc0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
34 deletions
+66
-34
center-channel/app/base/api/impl/action/opNeed.js
+58
-0
center-channel/app/base/api/impl/opreceive/need.js
+4
-3
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+4
-31
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+0
-0
No files found.
center-channel/app/base/api/impl/action/opNeed.js
0 → 100644
View file @
80e8813e
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
OpNeed
extends
APIBase
{
constructor
()
{
super
();
this
.
utilsNeedSve
=
system
.
getObject
(
"service.utilsSve.utilsNeedSve"
);
this
.
centerorderSve
=
system
.
getObject
(
"service.common.centerorderSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionProcess
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_process
,
action_type
,
action_body
,
req
)
{
pobj
.
requestId
=
req
.
requestId
;
var
self
=
this
;
var
opResult
=
null
;
switch
(
action_type
)
{
case
"submitNeed"
:
//提交需求
opResult
=
await
this
.
utilsNeedSve
.
submitNeed
(
pobj
,
pobj
.
actionBody
);
break
;
// case "submitNeed"://需求列表
// opResult = await this.utilsNeedSve.submitNeed(pobj, pobj.actionBody);
// break;
case
"needClose"
:
//关闭需求
opResult
=
await
this
.
utilsNeedSve
.
needClose
(
pobj
,
pobj
.
actionBody
);
break
;
case
"needDetailByChannelNo"
:
//需求详情--包含方案
opResult
=
await
this
.
utilsNeedSve
.
needDetailByChannelNo
(
pobj
,
pobj
.
actionBody
);
break
;
// case "getItemByChannelNeedNo"://方案反馈
// opResult = await this.utilsNeedSve.getItemByChannelNeedNo(pobj, pobj.actionBody);
// break;
// case "receiveFeedback"://关闭方案
// opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
// break;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
OpNeed
;
\ No newline at end of file
center-channel/app/base/api/impl/opreceive/need.js
View file @
80e8813e
...
@@ -29,12 +29,13 @@ class Need extends APIBase {
...
@@ -29,12 +29,13 @@ class Need extends APIBase {
var
self
=
this
;
var
self
=
this
;
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"submitNeedH5"
:
//提交需求----del
opResult
=
await
this
.
utilsNeedSve
.
submitNeedH5
(
pobj
,
pobj
.
actionBody
);
break
;
//--------------------------------------跟ali合作---------------------------
case
"submitNeed"
:
//提交需求
case
"submitNeed"
:
//提交需求
opResult
=
await
this
.
utilsNeedSve
.
submitNeed
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
submitNeed
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"submitNeedH5"
:
//提交需求
opResult
=
await
this
.
utilsNeedSve
.
submitNeedH5
(
pobj
,
pobj
.
actionBody
);
break
;
case
"needClose"
:
//关闭需求
case
"needClose"
:
//关闭需求
opResult
=
await
this
.
utilsNeedSve
.
needClose
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
needClose
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
80e8813e
...
@@ -3,7 +3,7 @@ var settings = require("../../../../config/settings");
...
@@ -3,7 +3,7 @@ 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"
);
const
{
json
}
=
require
(
"sequelize"
);
//需求操作类
//需求操作类
----ali对接的需求
class
UtilsNeedService
extends
AppServiceBase
{
class
UtilsNeedService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
...
@@ -52,21 +52,6 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -52,21 +52,6 @@ class UtilsNeedService extends AppServiceBase {
}
else
{
}
else
{
pobj
.
actionBody
.
type
=
"ali.edi"
;
pobj
.
actionBody
.
type
=
"ali.edi"
;
}
}
// // 2020 0806 lin 新增推送
// var reqParams = {
// actionType: "produceData",// Y 功能名称
// actionBody: {
// pushUrl: interface_params_info.pushUrl,// Y 推送地址
// actionType: "addChance",// Y 推送地址接收时的功能名称
// notifyUrl: "",// N 推送成功后通知的Url
// identifyCode: "ali.vat",// Y 操作的业务标识
// messageBody: pobj.actionBody, // Y 推送的业务消息,必须有一项对象属性值
// headData: ""//N 请求头信息,Json格式,如:{token:"XXXXXXX"}
// },
// requestId: pobj.requestId || "" // N 请求id
// }
// this.opQueuePushClientPost(pobj, this.opPushQueueUrl, reqParams);
var
reqParams
=
{
var
reqParams
=
{
actionBody
:
pobj
.
actionBody
,
actionBody
:
pobj
.
actionBody
,
appInfo
:
pobj
.
appInfo
appInfo
:
pobj
.
appInfo
...
@@ -102,7 +87,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -102,7 +87,7 @@ class UtilsNeedService extends AppServiceBase {
}
}
/**
/**
* 提交需求
* 提交需求
-----del
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
...
@@ -112,11 +97,11 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -112,11 +97,11 @@ class UtilsNeedService extends AppServiceBase {
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
sobj
,
url
);
var
rtn
=
await
this
.
execClient
.
execPost
(
sobj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5015
,
"需求
類
型查询失败"
);
return
system
.
getResultFail
(
-
5015
,
"需求
类
型查询失败"
);
}
}
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
data
.
status
!=
0
)
{
if
(
data
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5015
,
"需求
類
型查询失败"
);
return
system
.
getResultFail
(
-
5015
,
"需求
类
型查询失败"
);
}
}
pobj
.
actionBody
.
type_code
=
data
.
data
.
type_code
;
pobj
.
actionBody
.
type_code
=
data
.
data
.
type_code
;
pobj
.
actionBody
.
type_name
=
data
.
data
.
type_name
;
pobj
.
actionBody
.
type_name
=
data
.
data
.
type_name
;
...
@@ -141,18 +126,6 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -141,18 +126,6 @@ class UtilsNeedService extends AppServiceBase {
return
result
;
return
result
;
}
}
// //调用center-order icp需求反馈
// async reqCenterOrderApi(pobj, reqUrl) {
// var url = this.centerOrderUrl + "action/icpapi/springBoard";
// if (reqUrl) {
// var url = this.centerOrderUrl + reqUrl;
// }
// pobj.actionType = "receiveIcpFeedback";
// var rtn = await this.execClient.execPost(pobj, url);
// var data = JSON.parse(rtn.stdout);
// return data;
// }
/**
/**
* 获取需求详情
* 获取需求详情
* @param {*} pobj
* @param {*} pobj
...
...
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
0 → 100644
View file @
80e8813e
This diff is collapsed.
Click to expand it.
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