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
fb7f0af6
Commit
fb7f0af6
authored
Nov 04, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
0842707f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
1 deletions
+52
-1
center-order/app/base/api/impl/action/need.js
+4
-0
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+48
-1
No files found.
center-order/app/base/api/impl/action/need.js
View file @
fb7f0af6
...
...
@@ -5,6 +5,7 @@ class IcAPI extends APIBase {
constructor
()
{
super
();
this
.
needinfoSve
=
system
.
getObject
(
"service.dbneed.needinfoSve"
);
this
.
needsolutionSve
=
system
.
getObject
(
"service.dbneed.needsolutionSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -63,6 +64,9 @@ class IcAPI extends APIBase {
case
"getUnCreated"
:
// 获取需求列表
opResult
=
await
this
.
needinfoSve
.
getUnCreated
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"createSolution"
:
//创建方案
opResult
=
await
this
.
needsolutionSve
.
createNewSolution
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
fb7f0af6
...
...
@@ -1251,7 +1251,54 @@ class NeedsolutionService extends ServiceBase {
}
// --------------庄冰2020.10.23-------百度Icp接入使用--------end------------------
//创建方案信息
async
createNewSolution
(
pobj
){
let
ab
=
pobj
.
actionBody
;
let
app
=
pobj
.
appInfo
;
if
(
!
app
||
!
app
.
uapp_id
)
{
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
if
(
!
ab
.
channelSolutionNo
)
{
return
system
.
getResultFail
(
-
101
,
"渠道方案编号不能为空"
);
}
let
newNsObj
=
{
orderNo
:
ab
.
orderNo
,
channelSolutionNo
:
ab
.
channelSolutionNo
,
solutionNo
:
ab
.
channelSolutionNo
,
needNo
:
ab
.
bizId
,
channelNeedNo
:
ab
.
bizId
,
status
:
"ywc"
};
let
newSolutionCount
=
{
"status"
:
"PAID"
,
"bizType"
:
ab
.
product_info
&&
ab
.
product_info
.
channel_item_code
?
ab
.
product_info
.
channel_item_code
:
""
,
"solution"
:
{
"Area"
:
ab
.
product_info
.
price_item
.
price_desc
||
""
,
"IcpType"
:
''
,
"CompanyName"
:
ab
.
companyName
||
""
,
"CompanyAddress"
:
ab
.
area
||
""
},
"totalSum"
:
ab
.
order_info
.
totalSum
||
""
,
"typeCode"
:
ab
.
product_info
&&
ab
.
product_info
.
channel_item_code
?
ab
.
product_info
.
channel_item_code
:
""
,
"typeName"
:
ab
.
product_info
&&
ab
.
product_info
.
channel_item_name
?
ab
.
product_info
.
channel_item_name
:
""
,
"needStatus"
:
"3"
,
"statusName"
:
"用户支付"
,
"customerInfo"
:
{
"publishName"
:
""
,
"publishMobile"
:
""
},
"customerRemark"
:
""
,
"needStatusName"
:
"处理中"
,
"customerMaterial"
:
{},
"solutionFlowList"
:
[
{
"status"
:
"PAID"
,
"statusName"
:
"用户支付"
,
"updated_at"
:
new
Date
()
}
]
};
newNsObj
.
solutionContent
=
JSON
.
stringify
(
newSolutionCount
);
let
ns
=
await
this
.
dao
.
create
(
newNsObj
);
return
system
.
getResultSuccess
(
ns
)
}
}
module
.
exports
=
NeedsolutionService
;
// var task = new NeedsolutionService();
...
...
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