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
f71fdc86
Commit
f71fdc86
authored
Mar 20, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-order' of gitlab.gongsibao.com:jiangyong/zhichan into center-order
parents
6aa83998
69397723
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
31 deletions
+84
-31
center-order/app/base/api/impl/action/icapi.js
+12
-0
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+72
-31
No files found.
center-order/app/base/api/impl/action/icapi.js
View file @
f71fdc86
...
@@ -60,6 +60,18 @@ class IcAPI extends APIBase {
...
@@ -60,6 +60,18 @@ class IcAPI extends APIBase {
case
"solutionClose"
:
//需求关闭
case
"solutionClose"
:
//需求关闭
opResult
=
await
this
.
needinfoSve
.
solutionClose
(
pobj
);
opResult
=
await
this
.
needinfoSve
.
solutionClose
(
pobj
);
break
;
break
;
case
"abolishProgrammeByNeed"
:
//根据需求关闭方案(关闭需求后调用)
opResult
=
await
this
.
needsolutionSve
.
abolishProgrammeByNeed
(
pobj
);
break
;
case
"createSolutionByOrder"
:
//立即支付下单保存方案
opResult
=
await
this
.
needsolutionSve
.
createSolutionByOrder
(
pobj
);
break
;
case
"receiveSolutionPayInfo"
:
//接收方案状态及支付信息(方案支付后创建订单时调用)
opResult
=
await
this
.
needsolutionSve
.
receiveSolutionPayInfo
(
pobj
);
break
;
case
"updateStausByRefundOrder"
:
//修改退款方案状态
opResult
=
await
this
.
needsolutionSve
.
updateStausByRefundOrder
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
f71fdc86
...
@@ -294,10 +294,10 @@ class NeedsolutionService extends ServiceBase {
...
@@ -294,10 +294,10 @@ class NeedsolutionService extends ServiceBase {
}
else
{
}
else
{
return
system
.
getResultFail
(
-
104
,
"操作类型有误"
);
return
system
.
getResultFail
(
-
104
,
"操作类型有误"
);
}
}
var
solution_status
=
{
"dqr"
:
"待确认"
,
"ywc"
:
"已完成"
,
"yzf"
:
"已作废"
};
//
var solution_status={"dqr":"待确认","ywc":"已完成","yzf":"已作废"};
solutionContent
[
"deliveryStatus"
]
=
status
;
//
solutionContent["deliveryStatus"] = status;
solutionContent
[
"deliveryStatusName"
]
=
solution_status
[
status
];
//
solutionContent["deliveryStatusName"] = solution_status[status];
solutionContent
[
"updated"
]
=
new
Date
();
//
solutionContent["updated"] = new Date();
if
(
ab
.
note
){
if
(
ab
.
note
){
solutionContent
[
"notes"
]
=
ab
.
note
;
solutionContent
[
"notes"
]
=
ab
.
note
;
}
}
...
@@ -369,15 +369,6 @@ class NeedsolutionService extends ServiceBase {
...
@@ -369,15 +369,6 @@ class NeedsolutionService extends ServiceBase {
if
(
!
app
||
!
app
.
uapp_id
){
if
(
!
app
||
!
app
.
uapp_id
){
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
}
if
(
!
ab
.
solutionBizid
){
return
system
.
getResultFail
(
-
101
,
"需求编号不能为空"
);
}
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
where
:{
channelNeedNo
:
ab
.
intentionBizId
,
uapp_id
:
app
.
uapp_id
},
raw
:
true
});
if
(
!
needinfo
||
!
needinfo
.
id
){
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
}
var
solution
=
""
;
var
solution
=
""
;
var
bizType
=
"esp.companyreg"
;
var
bizType
=
"esp.companyreg"
;
if
(
ab
.
companyName
){
if
(
ab
.
companyName
){
...
@@ -409,26 +400,77 @@ class NeedsolutionService extends ServiceBase {
...
@@ -409,26 +400,77 @@ class NeedsolutionService extends ServiceBase {
// ab["solutionNo"] = solutionNo;
// ab["solutionNo"] = solutionNo;
var
solutionNo
=
await
this
.
getBusUid
(
"ns"
);
var
solutionNo
=
await
this
.
getBusUid
(
"ns"
);
var
reqObj
=
{
var
reqObj
=
{
solutionContent
:
solutionContent
,
solutionNo
:
solutionNo
,
status
:
"ywc"
,
needNo
:
needinfo
.
needNo
,
solutionContent
:
solutionContent
,
solutionNo
:
solutionNo
,
status
:
"ywc"
,
orderNo
:
ab
.
orderNo
channelNeedNo
:
needinfo
.
channelNeedNo
,
orderNo
:
ab
.
orderNo
,
createUserId
:
needinfo
.
followManUserId
};
};
await
this
.
dao
.
create
(
reqObj
);
var
ns
=
await
this
.
dao
.
create
(
reqObj
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
(
ns
);
}
//接收方案状态及支付信息
async
receiveSolutionPayInfo
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
if
(
!
app
||
!
app
.
uapp_id
){
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
if
(
!
ab
.
channelSolutionNo
){
return
system
.
getResultFail
(
-
101
,
"渠道方案编号不能为空"
);
}
// if(!ab.status){
// return system.getResultFail(-102,"状态不能为空");
// }
var
needsolutioninfo
=
await
this
.
dao
.
model
.
findOne
({
where
:{
channelSolutionNo
:
ab
.
channelSolutionNo
},
raw
:
true
});
if
(
!
needsolutioninfo
||
!
needsolutioninfo
.
id
){
return
system
.
getResultFail
(
-
400
,
"未知方案"
);
}
var
solutionContent
=
needsolutioninfo
.
solutionContent
;
if
(
ab
.
orderPrice
){
// solutionContent = JSON.parse(solutionContent);
solutionContent
[
"totalSum"
]
=
ab
.
orderPrice
;
needsolutioninfo
.
solutionContent
=
JSON
.
stringify
(
solutionContent
);
}
if
(
ab
.
status
){
needsolutioninfo
.
status
=
ab
.
status
;
}
await
this
.
dao
.
update
(
needsolutioninfo
);
var
ns
=
await
this
.
dao
.
model
.
findOne
({
where
:{
channelSolutionNo
:
ab
.
channelSolutionNo
},
raw
:
true
});
return
system
.
getResultSuccess
(
ns
);
}
}
//修改退款方案状态
async
updateStausByRefundOrder
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
if
(
!
ab
.
orderNo
){
return
system
.
getResultFail
(
-
101
,
"订单号不能为空"
);
}
var
ns
=
await
this
.
dao
.
model
.
findOne
({
where
:{
orderNo
:
ab
.
orderNo
},
raw
:
true
});
if
(
!
ns
||
!
ns
.
id
){
return
system
.
getResultFail
(
-
103
,
"未知方案"
);
}
var
status
=
"yzf"
;
var
reqObj
=
{
status
:
status
,
id
:
ns
.
id
};
await
this
.
dao
.
model
.
update
(
reqObj
,
{
where
:
{
id
:
ns
.
id
}});
//修改方案信息
return
system
.
getResultSuccess
();
}
}
}
module
.
exports
=
NeedsolutionService
;
module
.
exports
=
NeedsolutionService
;
// var task = new NeedsolutionService();
// task.dao.model.findOne({
// where:{solutionNo: "NS202003181420k00Oec"},raw:true
// }).then(needsolutioninfo=>{
// console.log(needsolutioninfo,"1111111111111111111111111");
// var solutionContent = needsolutioninfo.solutionContent;
// console.log(solutionContent,"222222222222222222222");
// // var so = JSON.parse(solutionContent);
// console.log(solutionContent.bizType,"333333333333333333333");
// });
// orderNo
// orderPrice
// phone
// companyName
// city
// area
// companyCategory
// companyType
// orgType
// industryType
// scope
// remark
// solutionBizidchannelNeedNo
\ No newline at end of file
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