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
5f561eb5
Commit
5f561eb5
authored
Nov 16, 2020
by
兰国旗
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-order' of gitlab.gongsibao.com:jiangyong/zhichan into center-order
parents
45f2656f
37c25121
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
12 deletions
+65
-12
center-order/app/base/api/impl/action/need.js
+3
-0
center-order/app/base/service/impl/dbneed/needinfoSve.js
+17
-2
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+42
-7
center-order/app/base/service/impl/qcutils/baiduqcSve.js
+3
-3
No files found.
center-order/app/base/api/impl/action/need.js
View file @
5f561eb5
...
...
@@ -50,6 +50,9 @@ class IcAPI extends APIBase {
case
"getItemByChannelSolutionNo"
:
//渠道方案号获取需求详情
opResult
=
await
this
.
needinfoSve
.
getItemByChannelSolutionNo
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"getSolutionByChannelOrderNo"
:
//渠道订单号获取方案详情
opResult
=
await
this
.
needinfoSve
.
getSolutionByChannelOrderNo
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"writeCommunicationLog"
:
//渠道方案号获取需求详情
opResult
=
await
this
.
needinfoSve2
.
writeCommunicationLog
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
...
...
center-order/app/base/service/impl/dbneed/needinfoSve.js
View file @
5f561eb5
...
...
@@ -10,6 +10,7 @@ class NeedinfoService extends ServiceBase {
this
.
needsolutionSve
=
system
.
getObject
(
"service.dbneed.needsolutionSve"
);
this
.
needsolutionDao
=
system
.
getObject
(
"db.dbneed.needsolutionDao"
);
this
.
needinfoDao
=
system
.
getObject
(
"db.dbneed.needinfoDao"
);
this
.
orderinfoDao
=
system
.
getObject
(
"db.dbcorder.orderinfoDao"
);
}
async
getItemByNeedNo
(
pobj
)
{
var
item
=
await
this
.
dao
.
getItemByNeedNo
(
pobj
.
actionBody
.
needNo
);
...
...
@@ -171,16 +172,30 @@ class NeedinfoService extends ServiceBase {
async
getItemByChannelSolutionNo
(
pobj
)
{
var
solutionitem
=
await
this
.
needsolutionDao
.
findOne
({
channelSolutionNo
:
pobj
.
actionBody
.
bizId
});
if
(
!
solutionitem
)
{
return
system
.
getResult
(
null
,
"
需求
数据为空,30210"
);
return
system
.
getResult
(
null
,
"
方案
数据为空,30210"
);
}
var
item
=
await
this
.
dao
.
getItemByNeedNo
(
solutionitem
.
needNo
);
if
(
!
item
)
{
return
system
.
getResult
(
null
,
"需求数据为空,30210"
);
}
// fixme 阿里直购需要更改
item
.
solutionProvince
=
solutionitem
.
solutionContent
.
solution
.
Area
//item.solutionProvince = solutionitem.solutionContent.solution.Area + `(${solutionitem.solutionContent.solution.actionType})`//北京(新办);
item
.
solutionContent
=
solutionitem
.
solutionContent
item
.
channelSolutionNo
=
solutionitem
.
channelSolutionNo
return
system
.
getResultSuccess
(
item
);
}
async
getSolutionByChannelOrderNo
(
pobj
){
var
orderinfo
=
await
this
.
orderinfoDao
.
findOne
({
channelOrderNo
:
pobj
.
actionBody
.
orderNo
});
if
(
!
orderinfo
||
!
orderinfo
.
orderNo
)
{
return
system
.
getResult
(
null
,
"订单数据为空,30210"
);
}
var
item
=
await
this
.
needsolutionDao
.
model
.
findOne
({
where
:{
orderNo
:
orderinfo
.
orderNo
}
});
if
(
!
item
)
{
return
system
.
getResult
(
null
,
"
需求
数据为空,30210"
);
return
system
.
getResult
(
null
,
"
方案
数据为空,30210"
);
}
return
system
.
getResultSuccess
(
item
);
}
...
...
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
5f561eb5
...
...
@@ -489,16 +489,51 @@ class NeedsolutionService extends ServiceBase {
// 2020 1021 lin 修改 if (ab.isDirectBuy 为 ==true 原因 实际传的是字符串不是布尔
if
(
ab
.
isDirectBuy
===
"true"
){
//直购先创建空方案
var
solutionNo
=
await
this
.
getBusUid
(
"ns"
);
ns
=
await
this
.
create
({
solutionNo
,
...
ab
,
status
:
"ywc"
,
solutionContent
:
JSON
.
stringify
({
totalSum
:
Number
(
ab
.
orderPrice
||
"0"
),
var
oldNs
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
orderNo
:
ab
.
orderNo
}
});
var
solutionContent
=
{
"status"
:
"PAID"
,
"bizType"
:
ab
.
product_info
&&
ab
.
product_info
.
item_code
?
ab
.
product_info
.
item_code
:
""
,
"solution"
:
{
"Area"
:
ab
.
area
||
""
,
"IcpType"
:
ab
.
bizId
.
startsWith
(
"EDI"
)?
7
:
5
,
"CompanyName"
:
ab
.
companyName
||
""
,
"CompanyAddress"
:
ab
.
area
||
""
,
actionType
:
ab
.
actionType
,
Source
:
ab
.
source
},
"totalSum"
:
ab
.
totalSum
||
Number
(
ab
.
orderPrice
||
"0"
),
"typeCode"
:
ab
.
product_info
&&
ab
.
product_info
.
item_code
?
ab
.
product_info
.
item_code
:
""
,
"typeName"
:
ab
.
product_info
&&
ab
.
product_info
.
item_name
?
ab
.
product_info
.
item_name
:
""
,
"needStatus"
:
"3"
,
"statusName"
:
"用户支付"
,
"customerInfo"
:
{
"publishName"
:
pobj
.
userInfo
.
channel_nickname
||
""
,
"publishMobile"
:
pobj
.
userInfo
.
mobile
||
""
},
"customerRemark"
:
""
,
"needStatusName"
:
"处理中"
,
"customerMaterial"
:
{},
"solutionFlowList"
:
[
{
"status"
:
"PAID"
,
"statusName"
:
"用户支付"
,
"updated_at"
:
new
Date
()
}
]
};
if
(
oldNs
&&
oldNs
.
id
){
oldNs
.
solutionContent
=
JSON
.
stringify
(
solutionContent
)
ns
=
await
oldNs
.
save
();
}
else
{
ns
=
await
this
.
create
({
solutionNo
,
...
ab
,
status
:
"ywc"
,
solutionContent
:
JSON
.
stringify
(
solutionContent
)
})
}
)
}
}
else
{
if
(
!
ab
.
channelSolutionNo
)
{
return
system
.
getResultFail
(
-
101
,
"渠道方案编号不能为空"
);
...
...
center-order/app/base/service/impl/qcutils/baiduqcSve.js
View file @
5f561eb5
...
...
@@ -201,12 +201,12 @@ class BaiduQcService {
}
//关闭ICP订单 百度icp 2.4
async
icpOrderClose
(
pobj
)
{
var
ab
=
pobj
;
if
(
!
ab
.
channelO
rderNo
)
{
var
ab
=
pobj
.
actionBody
;
if
(
!
ab
.
o
rderNo
)
{
return
system
.
getResultFail
(
-
101
,
"渠道订单号不能为空"
);
}
var
orderInfo
=
await
this
.
orderinfoDao
.
model
.
findOne
({
where
:{
channelOrderNo
:
ab
.
channelO
rderNo
},
raw
:
true
where
:{
channelOrderNo
:
ab
.
o
rderNo
},
raw
:
true
});
if
(
!
orderInfo
||
!
orderInfo
.
id
)
{
return
system
.
getResultFail
(
-
103
,
"未知订单"
);
...
...
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