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
4cf33156
Commit
4cf33156
authored
Mar 16, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ic
parent
57f71c3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
17 deletions
+26
-17
center-order/app/base/api/impl/action/icapi.js
+3
-0
center-order/app/base/db/models/dbneed/needinfo.js
+1
-1
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+22
-16
No files found.
center-order/app/base/api/impl/action/icapi.js
View file @
4cf33156
...
@@ -34,6 +34,9 @@ class IcAPI extends APIBase {
...
@@ -34,6 +34,9 @@ class IcAPI extends APIBase {
case
"submitProgramme"
:
//提交公司注册方案
case
"submitProgramme"
:
//提交公司注册方案
opResult
=
await
this
.
needsolutionSve
.
submitProgramme
(
pobj
);
opResult
=
await
this
.
needsolutionSve
.
submitProgramme
(
pobj
);
break
;
break
;
case
"receiveProgrammeNo"
:
//接收方案编号(方案推送至阿里后,接收保存方案信息)
opResult
=
await
this
.
needsolutionSve
.
receiveProgrammeNo
(
pobj
);
break
;
case
"getProgrammeInfoByNeedNo"
:
//根据需求查看方案列表
case
"getProgrammeInfoByNeedNo"
:
//根据需求查看方案列表
opResult
=
await
this
.
needsolutionSve
.
getProgrammeInfoByNeedNo
(
pobj
);
opResult
=
await
this
.
needsolutionSve
.
getProgrammeInfoByNeedNo
(
pobj
);
break
;
break
;
...
...
center-order/app/base/db/models/dbneed/needinfo.js
View file @
4cf33156
...
@@ -7,7 +7,7 @@ module.exports = (db, DataTypes) => {
...
@@ -7,7 +7,7 @@ module.exports = (db, DataTypes) => {
channelNeedNo
:
DataTypes
.
STRING
(
128
),
//渠道需求号(页面中列表中显示该需求号)
channelNeedNo
:
DataTypes
.
STRING
(
128
),
//渠道需求号(页面中列表中显示该需求号)
needNo
:
DataTypes
.
STRING
(
128
),
//需求号--用于服务商或需求表中创建订单
needNo
:
DataTypes
.
STRING
(
128
),
//需求号--用于服务商或需求表中创建订单
channelUserId
:
DataTypes
.
INTEGER
,
//发布者id
channelUserId
:
DataTypes
.
INTEGER
,
//发布者id
publish
er
Name
:
DataTypes
.
STRING
,
//发布者姓名
publishName
:
DataTypes
.
STRING
,
//发布者姓名
publisherOnlyCode
:
DataTypes
.
STRING
(
50
),
//发布者唯一码
publisherOnlyCode
:
DataTypes
.
STRING
(
50
),
//发布者唯一码
publishContent
:
DataTypes
.
STRING
,
//发布内容
publishContent
:
DataTypes
.
STRING
,
//发布内容
publishMobile
:
DataTypes
.
STRING
,
//发布者手机号
publishMobile
:
DataTypes
.
STRING
,
//发布者手机号
...
...
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
4cf33156
...
@@ -41,22 +41,32 @@ class NeedsolutionService extends ServiceBase {
...
@@ -41,22 +41,32 @@ class NeedsolutionService extends ServiceBase {
var
solutionNo
=
await
this
.
getBusUid
(
"ns"
);
var
solutionNo
=
await
this
.
getBusUid
(
"ns"
);
ab
[
"solutionNo"
]
=
solutionNo
;
ab
[
"solutionNo"
]
=
solutionNo
;
ab
[
"status"
]
=
"ytj"
;
ab
[
"status"
]
=
"ytj"
;
ab
.
solutionContent
=
JSON
.
stringify
(
ab
.
solutionContent
);
var
od
=
await
this
.
dao
.
create
(
ab
);
var
od
=
await
this
.
dao
.
create
(
ab
);
if
(
od
&&
od
.
id
){
if
(
od
&&
od
.
id
){
// //推送数据至阿里(暂无)
return
system
.
getResultSuccess
({
needinfo
:
needinfo
,
needsolution
:
od
});
// var pushObj = {
// intentionBizId:needinfo.channelNeedNo,bizType:bizType,solution:ab.solutionContent.solution
// };
// var pushRes = await this.push2aliSve.pushData2Ali({url:"xxx/xxx/asdasd",pushObj:pushObj,appInfo:pobj.appInfo});
// //推送后获取方案id 存到方案
// if(pushRes && pushRes.status==0 && pushRes.data && pushRes.data.SolutionBizId){
// await this.dao.update({channelSolutionNo:pushRes.data.SolutionBizId,id:od.id});//保存渠道方案id
// }
return
system
.
getResultSuccess
(
od
);
}
else
{
}
else
{
return
system
.
getResultFail
(
-
202
,
"提交方案失败"
);
return
system
.
getResultFail
(
-
202
,
"提交方案失败"
);
}
}
}
}
//接收方案编号(方案推送至阿里后,接收保存方案信息)
async
receiveProgrammeNo
(
pobj
){
var
ab
=
pobj
.
actionBody
;
if
(
!
ab
.
solutionBizId
){
return
system
.
getResultFail
(
-
101
,
"渠道方案业务编号不能为空"
);
}
if
(
!
ab
.
solutionNo
){
return
system
.
getResultFail
(
-
102
,
"方案业务编号不能为空"
);
}
var
ns
=
await
this
.
dao
.
model
.
findOne
({
where
:{
solutionNo
:
ab
.
solutionNo
},
raw
:
true
});
if
(
!
ns
||
!
ns
.
id
){
return
system
.
getResultFail
(
-
103
,
"未知方案"
);
}
await
this
.
dao
.
model
.
update
({
channelSolutionNo
:
ab
.
solutionBizId
},
{
where
:
{
id
:
ns
.
id
}});
//修改方案信息
return
system
.
getResultSuccess
();
}
//根据需求查看方案列表
//根据需求查看方案列表
async
getProgrammeInfoByNeedNo
(
pobj
){
async
getProgrammeInfoByNeedNo
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
ab
=
pobj
.
actionBody
;
...
@@ -71,7 +81,8 @@ class NeedsolutionService extends ServiceBase {
...
@@ -71,7 +81,8 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
}
}
var
ns
=
await
this
.
dao
.
model
.
findAll
({
var
ns
=
await
this
.
dao
.
model
.
findAll
({
where
:{
needNo
:
ab
.
needNo
},
raw
:
true
where
:{
needNo
:
ab
.
needNo
},
raw
:
true
,
attributes
:[
"needNo"
,
"solutionNo"
,
"orderNo"
,
"solutionContent"
,
"status"
,
"statusName"
]
});
});
return
system
.
getResultSuccess
(
ns
);
return
system
.
getResultSuccess
(
ns
);
}
}
...
@@ -129,11 +140,6 @@ class NeedsolutionService extends ServiceBase {
...
@@ -129,11 +140,6 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
102
,
"未知方案"
);
return
system
.
getResultFail
(
-
102
,
"未知方案"
);
}
}
await
this
.
dao
.
update
({
id
:
ns
.
id
,
status
:
"yzf"
});
//方案废弃
await
this
.
dao
.
update
({
id
:
ns
.
id
,
status
:
"yzf"
});
//方案废弃
// //推送至阿里
// var pushObj = {
// solutionBizId:ns.channelSolutionNo,note:ab.note||""
// };
// var pushRes = await this.push2aliSve.pushData2Ali({url:"xxx/xxx/asdasd",pushObj:pushObj,appInfo:pobj.appInfo});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
...
...
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