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
b6368feb
Commit
b6368feb
authored
Oct 12, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
73758599
f7a0f04c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
567 additions
and
10 deletions
+567
-10
center-channel/app/base/api/impl/action/qcapi.js
+17
-3
center-channel/app/base/api/impl/opreceive/edi.js
+16
-1
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+153
-3
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+281
-0
center-channel/app/config/routes/api.js
+3
-1
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
+97
-2
No files found.
center-channel/app/base/api/impl/action/qcapi.js
View file @
b6368feb
...
@@ -23,7 +23,7 @@ class QcAPI extends APIBase {
...
@@ -23,7 +23,7 @@ class QcAPI extends APIBase {
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"getNeedSolutionDetailByUser"
:
//获取方案详情
case
"getNeedSolutionDetailByUser"
:
//获取方案详情
opResult
=
await
this
.
centerorderSve
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
opResult
=
await
this
.
centerorderSve
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
break
;
break
;
case
"submitIcpProgramme"
:
//icp方案提交
case
"submitIcpProgramme"
:
//icp方案提交
opResult
=
await
this
.
centerorderSve
.
submitIcpProgramme
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
submitIcpProgramme
(
pobj
);
...
@@ -41,9 +41,8 @@ class QcAPI extends APIBase {
...
@@ -41,9 +41,8 @@ class QcAPI extends APIBase {
opResult
=
await
this
.
centerorderSve
.
abolishIcpProgramme
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
abolishIcpProgramme
(
pobj
);
break
;
break
;
case
"getProgrammeInfoByChannelNeedNo"
:
//获取需求方案列表
case
"getProgrammeInfoByChannelNeedNo"
:
//获取需求方案列表
opResult
=
await
this
.
centerorderSve
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
opResult
=
await
this
.
centerorderSve
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
break
;
break
;
case
"serviceProviderSubmitMaterial"
:
//交付商提交材料信息
case
"serviceProviderSubmitMaterial"
:
//交付商提交材料信息
opResult
=
await
this
.
centerorderSve
.
serviceProviderSubmitMaterial
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
serviceProviderSubmitMaterial
(
pobj
);
break
;
break
;
...
@@ -53,6 +52,21 @@ class QcAPI extends APIBase {
...
@@ -53,6 +52,21 @@ class QcAPI extends APIBase {
case
"closeOrderDelivery"
:
//交付商关闭交付单
case
"closeOrderDelivery"
:
//交付商关闭交付单
opResult
=
await
this
.
centerorderSve
.
closeOrderDelivery
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
closeOrderDelivery
(
pobj
);
break
;
break
;
case
"serviceSubmitOption"
:
//服务商提交服务操作(文网文)2020-9-26
opResult
=
await
this
.
centerorderSve
.
serviceSubmitOption
(
pobj
);
break
;
case
"submitWangwenSolution"
:
//提交方案(文网文)2020-9-26
opResult
=
await
this
.
centerorderSve
.
submitWangwenSolution
(
pobj
);
break
;
case
"closeNeed"
:
//关闭需求(文网文)2020-9-28
opResult
=
await
this
.
centerorderSve
.
closeNeed
(
pobj
);
break
;
case
"recordLog"
:
//提交沟通记录(文网文)2020-9-28
opResult
=
await
this
.
centerorderSve
.
recordLog
(
pobj
);
break
;
case
"recordLogList"
:
//查询沟通记录(文网文)2020-9-29
opResult
=
await
this
.
centerorderSve
.
recordLogList
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/api/impl/opreceive/edi.js
View file @
b6368feb
...
@@ -25,9 +25,24 @@ class edi extends APIBase {
...
@@ -25,9 +25,24 @@ class edi extends APIBase {
async
opActionProcess
(
pobj
,
action_type
,
action_body
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
action_body
,
req
)
{
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"submitNeedAliEsp"
:
//支付回调
case
"submitNeedAliEsp"
:
opResult
=
await
this
.
utilsNeedSve
.
submitNeedAliEsp
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
submitNeedAliEsp
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"needCloseAliEsp"
:
opResult
=
await
this
.
utilsNeedSve
.
needCloseAliEsp
(
pobj
,
pobj
.
actionBody
);
break
;
case
"produceNoticeAliEsp"
:
opResult
=
await
this
.
utilsNeedSve
.
ediNotify
(
pobj
,
pobj
.
actionBody
);
if
(
opResult
.
status
==
0
)
{
opResult
=
await
this
.
utilsNeedSve
.
produceNoticeAliEsp
(
pobj
,
pobj
.
actionBody
);
}
break
;
case
"soulutionFeebackAliEsp"
:
// opResult = await this.utilsNeedSve.ediNotify(pobj, pobj.actionBody);
// opResult = await this.utilsNeedSve.soulutionFeebackAliEsp(pobj,pobj.actionBody);
pobj
.
actionType
=
"receiveFeedback"
opResult
=
await
this
.
centerorderSve
.
reqCenterOrderApi
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
b6368feb
...
@@ -77,13 +77,13 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -77,13 +77,13 @@ class QcCenterOrderService extends AppServiceBase {
requestId
:
pobj
.
requestId
||
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/common/qcCenterOrderSve.js/submitIcpProgramme"
,
op
:
"service/impl/common/qcCenterOrderSve.js/submitIcpProgramme"
,
content
:
JSON
.
stringify
(
pobj
),
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
needinfo
),
resultInfo
:
JSON
.
stringify
(
needinfo
),
optitle
:
"createSolution推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
optitle
:
"createSolution推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
});
var
reqParams
=
{
var
reqParams
=
{
actionBody
:
{
actionBody
:
{
intentionBizId
:
needinfo
.
channelNeedNo
,
intentionBizId
:
needinfo
.
channelNeedNo
,
status
:
"createSolution"
status
:
"createSolution"
},
},
appInfo
:
pobj
.
appInfo
appInfo
:
pobj
.
appInfo
}
}
...
@@ -219,5 +219,154 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -219,5 +219,154 @@ class QcCenterOrderService extends AppServiceBase {
}
}
return
res
;
return
res
;
}
}
//服务商提交服务操作(文网文)2020-9-26
async
serviceSubmitOption
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
//推送数据至阿里
var
pushObj
=
{
BizId
:
res
.
data
.
solutionNo
,
BizType
:
res
.
data
.
channelTpye
,
OperateType
:
res
.
data
.
ApplicationStatus
};
//推送状态变更
this
.
aliclient
.
reqbyget
({
action
:
"OperateProduceForPartner"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-03-06"
});
return
system
.
getResultSuccess
();
}
return
res
;
}
//提交方案(文网文)2020-9-27
async
submitWangwenSolution
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
//推送数据至阿里
var
pushObj
=
{
intentionBizId
:
res
.
data
.
channelNeedNo
,
bizType
:
res
.
data
.
bizType
,
solution
:
res
.
data
.
solutionContent
};
//推送状态变更
this
.
aliclient
.
reqbyget
({
action
:
"SubmitSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-03-06"
});
return
system
.
getResultSuccess
();
}
return
res
;
}
//关闭需求
async
closeNeed
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100395"
);
}
if
(
!
pobj
.
actionBody
.
note
)
{
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100395"
);
}
var
self
=
this
;
pobj
.
actionBody
.
intentionBizId
=
pobj
.
actionBody
.
needNo
;
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsNeedSve.js/closeNeed"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
result
),
optitle
:
"abolishIcpProgrammeByNeed推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
if
(
result
.
status
==
0
)
{
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
}
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"closeNeed"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//日志记录
self
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsNeedSve.js/closeNeed"
,
content
:
JSON
.
stringify
(
reqParams
),
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
},
apiVersion
:
"2019-03-06"
});
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResult
(
null
,
"close fail 100389 "
);
}
}
//提交沟通记录
async
recordLog
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100491"
);
}
if
(
!
pobj
.
actionBody
.
note
)
{
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100492"
);
}
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"followingUp"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//推送数据至阿里
var
pushObj
=
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
note
:
pobj
.
actionBody
.
note
};
//提交沟通记录
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIntentionNote"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-03-06"
});
return
system
.
getResultSuccess
();
}
//查看沟通记录
async
recordLogList
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100493"
);
}
let
res
=
await
this
.
aliclient
.
reqbyget
({
action
:
"ListIntentionNote"
,
reqbody
:
{
BeginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
PageNum
:
pobj
.
actionBody
.
pageNum
||
1
,
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2019-03-06"
});
return
system
.
getResultSuccess
(
res
);
}
}
}
module
.
exports
=
QcCenterOrderService
;
module
.
exports
=
QcCenterOrderService
;
\ No newline at end of file
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
b6368feb
...
@@ -3,6 +3,7 @@ var settings = require("../../../../config/settings");
...
@@ -3,6 +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"
);
const
{
getResult
,
getResultSuccess
}
=
require
(
"../../../system"
);
//需求操作类----ali对接的需求
//需求操作类----ali对接的需求
class
UtilsNeedService
extends
AppServiceBase
{
class
UtilsNeedService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
...
@@ -16,6 +17,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -16,6 +17,7 @@ class UtilsNeedService extends AppServiceBase {
this
.
utilsneedSve
=
system
.
getObject
(
"service.common.gatewaypushlogSve"
);
this
.
utilsneedSve
=
system
.
getObject
(
"service.common.gatewaypushlogSve"
);
this
.
qcCenterOrderSve
=
system
.
getObject
(
"service.common.qcCenterOrderSve"
);
this
.
qcCenterOrderSve
=
system
.
getObject
(
"service.common.qcCenterOrderSve"
);
this
.
opPushQueueUrl
=
settings
.
opPushQueueUrl
();
this
.
opPushQueueUrl
=
settings
.
opPushQueueUrl
();
this
.
utilsAuthSve
=
system
.
getObject
(
"service.utilsSve.utilsAuthSve"
);
}
}
/**
/**
...
@@ -882,12 +884,291 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -882,12 +884,291 @@ class UtilsNeedService extends AppServiceBase {
"intentionBizId"
:
actionBody
.
intentionBizId
,
"intentionBizId"
:
actionBody
.
intentionBizId
,
"mobile"
:
actionBody
.
mobile
"mobile"
:
actionBody
.
mobile
}
}
pobj
.
actionType
=
"needClose"
;
var
res
=
await
this
.
needClose
(
pobj
,
obj
);
var
res
=
await
this
.
needClose
(
pobj
,
obj
);
if
(
res
.
status
==
0
)
{
if
(
res
.
status
==
0
)
{
return
system
.
getResultSuccess
(
res
.
data
);
return
system
.
getResultSuccess
(
res
.
data
);
}
}
return
system
.
getResult
(
null
,
res
)
return
system
.
getResult
(
null
,
res
)
}
}
/**
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.2 关闭需求通知服务商
* @param {*} pobj
* @param {*} actionBody
*/
async
produceNoticeAliEsp
(
pobj
,
actionBody
)
{
// 如果状态为USER_UPLOAD_PRODUCE需要转换url
// if(actionBody.operationType == "USER_UPLOAD_PRODUCE" ) {
// if(actionBody.extInfo) {
// // businessLicense:['business_license/12195411 61213057/1599115976393/p08xo9frgzj.png']
// // idCardList:[' ["card/1219541161213057/1599115980036/s1nn3sozulo.png"] ']
// // 注意idCardList 是二维数组 需要再转换一下 不知道为什么
// var extJson = JSON.parse(actionBody.extInfo);
// var businessLicenseArr = [];
// if(extJson.idCardList) {
// // 抽出数组
// var idCardListA = JSON.parse(extJson.idCardList);
// var idCardListArr = [];
// for(var i = 0; i < idCardListA.lenght; i++) {
// idCardListArr.push(await this.opDownFileInfo(idCardListA[i]));
// }
// }
// for(var i = 0; i < extJson.businessLicense.lenght; i++) {
// businessLicenseArr.push(await this.opDownFileInfo(extJson.businessLicense[i]));
// }
// actionBody.extInfo = {
// businessLicenseArr,
// idCardListArr
// }
// }
// }
switch
(
actionBody
.
operationType
)
{
case
"USER_PAY_PRODUCE"
:
// 修改需求,方案 订单状态
// 第一步查处需求单 原因 询价/创建 需要商品数据 用户数据
pobj
.
actionBody
.
needNo
=
pobj
.
actionBody
.
intentionBizId
pobj
.
actionType
=
"getItemByChannelNeedNo"
;
var
url
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
needInfoResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
needInfoResult
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
"needInfo is empty"
);
}
// 第二部 询价
pobj
.
actionBody
.
city
=
needInfoResult
.
data
.
city
pobj
.
actionBody
.
channelItemCode
=
needInfoResult
.
data
.
channelTypeCode
pobj
.
actionBody
.
pathCode
=
"/zzfw/wangwen/"
// 写死 needInfo不支持
pobj
.
actionType
=
"getProductPrice"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productPriceResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
productPriceResult
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
"productPrice is empty"
);
}
// 获取userpin 为什么在这里获取?原因:getWay获取不到手机号 再去调用其他接口浪费资源
pobj
.
actionType
=
"getLoginByUserName"
;
pobj
.
actionBody
.
channelUserId
=
needInfoResult
.
data
.
publishMobile
;
// 即:86_18512345678
pobj
.
actionBody
.
userName
=
needInfoResult
.
data
.
publishMobile
;
pobj
.
actionBody
.
mobile
=
needInfoResult
.
data
.
publishMobile
;
pobj
.
actionBody
.
userpin
=
pobj
.
actionBody
.
userpin
||
this
.
getUUID
();
var
tmpOpResult
=
await
this
.
utilsAuthSve
.
getLoginByUserName
(
pobj
,
pobj
.
actionBody
);
pobj
.
userInfo
=
tmpOpResult
.
data
// 第三步 走addOrder流程
// var pobjStr = JSON.stringify(pobj);
// var qobj = JSON.parse(pobjStr);
// qobj.actionBody = {
// "bizId": actionBody.bizId,
// "userName": needInfoResult.data.publishName,
// "mobile": needInfoResult.data.publishMobile,
// "price": qobj.Price,
// "channelItemCode":needInfoResult.data.channelTypeCode,
// "payCode": productPriceResult.data.payCode,
// "quantity":1,
// "totalSum": productPriceResult.data.price,
// "payTotalSum": productPriceResult.data.Price,
// "channelOrder":{
// "channelServiceNo": actionBody.bizId,
// "channelOrderNo": actionBody.bizId
// }
// }
// qobj.actionType = "getProductDetail";
// var url = settings.centerAppUrl() + "action/opProduct/springBoard";
// var productItemResult = await this.restPostUrl(qobj, url);
// if (productItemResult.status != 0) {
// return productItemResult;
// }
// qobj.actionBody.product_info = productItemResult.data;
// var verifyResult = await this.utilsOrderSve.isOrderVerify(qobj, qobj.actionBody);
// if (verifyResult.status != 0) {
// return verifyResult;
// }
// qobj.actionType = "getProductInterface";
// qobj.actionBody.product_id = qobj.actionBody.product_info.id;
// var productItemInterfaceResult = await this.restPostUrl(qobj, url);
// qobj.actionBody.product_info.interface_info = productItemInterfaceResult.data;
// qobj.actionType = "addOrder";
// var reqUrl = this.centerOrderUrl + "action/order/springBoard";
// qobj.actionBody.channelOrder.orderStatus = 2;// 2作为orderinfo的orderStatus的值。含义为已付款
// var result = await this.restPostUrl(qobj, reqUrl);
pobj
.
actionBody
.
bizId
=
actionBody
.
bizId
,
pobj
.
actionBody
.
userName
=
needInfoResult
.
data
.
publishName
,
pobj
.
actionBody
.
mobile
=
needInfoResult
.
data
.
publishMobile
,
pobj
.
actionBody
.
orderNo
=
actionBody
.
bizId
;
pobj
.
actionBody
.
totalSum
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
orderPrice
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
payTotalSum
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
price
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
productPriceResult
.
data
.
payCode
;
pobj
.
actionBody
.
channelItemCode
=
needInfoResult
.
data
.
channelTypeCode
;
pobj
.
actionBody
.
channelNeedNo
=
needInfoResult
.
data
.
channelNeedNo
;
pobj
.
actionBody
.
needNo
=
needInfoResult
.
data
.
needNo
;
pobj
.
actionBody
.
quantity
=
1
;
pobj
.
actionBody
.
channelOrder
=
{
channelServiceNo
:
actionBody
.
bizId
,
channelOrderNo
:
actionBody
.
bizId
,
orderStatus
:
2
}
var
orderrtn
=
await
this
.
utilsOrderSve
.
addOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
!=
0
&&
orderrtn
.
status
!=
-
1
)
{
return
system
.
getResultFail
(
-
5012
,
"订单创建失败"
);
}
if
(
orderrtn
.
data
)
{
pobj
.
actionBody
.
orderNo
=
orderrtn
.
data
.
orderNo
;
}
pobj
.
actionBody
.
channelSolutionNo
=
pobj
.
actionBody
.
bizId
;
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
var
solutiondata
=
JSON
.
parse
(
solutionrtn
.
stdout
);
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
if
(
!
solutiondata
.
data
)
{
return
system
.
getResultFail
(
-
5012
,
"方案查询数据为空"
);
}
if
(
solutiondata
.
data
&&
solutiondata
.
data
.
channelNeedNo
)
{
pobj
.
actionBody
.
needId
=
solutiondata
.
data
.
channelNeedNo
;
}
// 第四步 整合推送参数 并推送
var
fqobj
=
{
actionBody
:
{
area
:
needInfoResult
.
data
.
city
,
city
:
needInfoResult
.
data
.
city
,
regType
:
"esp.wangwen"
,
//1
orderNo
:
actionBody
.
bizId
,
orderPrice
:
Number
(
pobj
.
actionBody
.
orderPrice
/
100
),
phone
:
needInfoResult
.
data
.
publishMobile
,
needId
:
solutiondata
.
data
.
channelNeedNo
,
companyName
:
solutiondata
.
data
.
solutionContent
.
solution
.
CompanyName
||
''
//1
},
appInfo
:
pobj
.
appInfo
}
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
orderrtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
needsolution
:
solutiondata
.
data
.
solutionContent
,
channelNeedNo
:
solutiondata
.
data
.
channelNeedNo
,
channelSolutionNo
:
solutiondata
.
data
.
channelSolutionNo
,
skuCode
:
productPriceResult
.
data
.
payCode
,
servicer
:
{
code
:
'gsb'
,
name
:
'公司宝'
}
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
fqobj
,
"pushOrderICPBusiness"
);
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
break
;
case
"USER_CONFIRM_PRODUCE"
:
break
;
case
"USER_REFUSE_PRODUCE"
:
break
;
case
"ABC_CLOSE_PRODUCE"
:
break
;
case
"USER_UPLOAD_PRODUCE"
:
break
;
default
:
return
system
.
getResult
(
null
,
"operationType参数错误"
);
}
return
getResultSuccess
(
orderrtn
);
}
// 2020 0927 lin 新增 edi状态更新
async
ediNotify
(
pobj
,
actionBody
)
{
if
(
actionBody
.
operationType
==
"USER_UPLOAD_PRODUCE"
)
{
if
(
actionBody
.
extInfo
)
{
// businessLicense:['business_license/12195411 61213057/1599115976393/p08xo9frgzj.png']
// idCardList:[' ["card/1219541161213057/1599115980036/s1nn3sozulo.png"] ']
// 注意idCardList 是二维数组 需要再转换一下 不知道为什么
var
extJson
=
JSON
.
parse
(
actionBody
.
extInfo
);
var
businessLicenseArr
=
[];
if
(
extJson
.
idCardList
)
{
// 抽出数组
var
idCardListA
=
JSON
.
parse
(
extJson
.
idCardList
);
var
idCardListArr
=
[];
for
(
var
i
=
0
;
i
<
idCardListA
.
lenght
;
i
++
)
{
idCardListArr
.
push
(
await
this
.
opDownFileInfo
(
idCardListA
[
i
]));
}
}
for
(
var
i
=
0
;
i
<
extJson
.
businessLicense
.
lenght
;
i
++
)
{
businessLicenseArr
.
push
(
await
this
.
opDownFileInfo
(
extJson
.
businessLicense
[
i
]));
}
actionBody
.
extInfo
=
{
businessLicenseArr
,
idCardListArr
}
}
}
var
self
=
this
;
actionBody
.
BizId
=
actionBody
.
bizId
;
pobj
.
actionType
=
"receiveEdiStatusNotify"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/ediApi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
rtn
.
status
)
{
return
rtn
;
}
if
((
actionBody
.
operationType
==
"USER_PAY_PRODUCE"
||
actionBody
.
operationType
==
"USER_UPLOAD_PRODUCE"
)
&&
rtn
.
data
)
{
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
rtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
needsolution
:
rtn
.
data
.
solutionContent
,
channelNeedNo
:
rtn
.
data
.
channelNeedNo
,
channelSolutionNo
:
rtn
.
data
.
channelSolutionNo
,
servicer
:
{
code
:
'gsb'
,
name
:
'公司宝'
}
},
appInfo
:
pobj
.
appInfo
}
console
.
log
(
deliveryObj
)
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
}
if
(
rtn
.
status
==
0
&&
actionBody
.
operationType
!=
"USER_PAY_PRODUCE"
&&
actionBody
.
operationType
!=
"USER_UPLOAD_PRODUCE"
&&
rtn
.
data
)
{
var
tmpObj
=
{
actionBody
:
{
orderNo
:
rtn
.
data
.
orderNo
,
channelNeedNo
:
rtn
.
data
.
channelNeedNo
,
needsolution
:
rtn
.
data
.
solutionContent
},
appInfo
:
pobj
.
appInfo
}
console
.
log
(
tmpObj
)
this
.
utilsPushSve
.
aliBusiness2Delivery
(
tmpObj
,
"pushDeliveryStatusNotify"
);
pobj
.
actionBody
.
orderNo
=
rtn
.
data
.
orderNo
;
if
(
actionBody
.
operationType
==
"ABC_CLOSE_PRODUCE"
)
{
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
tmpObj
.
actionBody
.
orderNo
=
rtn
.
data
.
channelSolutionNo
;
self
.
utilsPushSve
.
aliBusiness2Fq
(
tmpObj
,
"pushOrderICPClose"
);
}
}
//通知更新状态
return
rtn
;
}
/**
* 2020 0928 lin 新增 阿里文网文 服务商侧提供接口2.4 ⽤户⽅案反馈通知服务商
* @param {*} pobj
* @param {*} actionBody
*/
async
soulutionFeebackAliEsp
(
pobj
,
actionBody
)
{
// 待定
solutionBizId
note
if
(
actionBody
.
operateType
==
"INVALID"
)
{
var
url
=
settings
.
centerOrderUrl
()
+
"action/ediApi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
}
return
rtn
}
}
}
module
.
exports
=
UtilsNeedService
;
module
.
exports
=
UtilsNeedService
;
...
...
center-channel/app/config/routes/api.js
View file @
b6368feb
...
@@ -281,7 +281,9 @@ module.exports = function (app) {
...
@@ -281,7 +281,9 @@ module.exports = function (app) {
"manualEvaluation"
,
"diagnosisInfo"
,
"check"
,
"enterpriseInfo"
,
"diagnosisDetail"
,
"manualEvaluation"
,
"diagnosisInfo"
,
"check"
,
"enterpriseInfo"
,
"diagnosisDetail"
,
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"tmAccept"
,
"tmStatus"
,
"tmAccept"
,
"tmStatus"
,
"needBatchUpload"
"needBatchUpload"
,
"serviceSubmitOption"
,
"submitWangwenSolution"
,
"closeNeed"
,
"recordLog"
,
"recordLogList"
];
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
View file @
b6368feb
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
尼斯查询(一)
](
#getNcl
)
1.
[
尼斯查询(一)
](
#getNcl
)
1.
[
尼斯查询(二)
](
#getNclTwo
)
1.
[
尼斯查询(二)
](
#getNclTwo
)
1.
[
尼斯查询(模糊查询)
](
#getNclByLikeNameAndNcl
)
1.
[
文字转图片
](
#word2pic
)
1.
[
文字转图片
](
#word2pic
)
1.
[
商标样式转换
](
#uploadStandardTm
)
1.
[
商标样式转换
](
#uploadStandardTm
)
1.
[
图片转pdf
](
#pic2pdf
)
1.
[
图片转pdf
](
#pic2pdf
)
...
@@ -36,7 +37,9 @@
...
@@ -36,7 +37,9 @@
{
{
"status"
:
0
,
//操作状态0:操作成功-1:操作失败
"status"
:
0
,
//操作状态0:操作成功-1:操作失败
"msg"
:
"操作成功"
,
//操作信息
"msg"
:
"操作成功"
,
//操作信息
"data"
:
[
"data"
:
{
"count"
:
16
,
"rows"
:[
{
{
"code"
:
"01"
,
//尼斯大类编码
"code"
:
"01"
,
//尼斯大类编码
"name"
:
""
,
//大类名称
"name"
:
""
,
//大类名称
...
@@ -79,7 +82,8 @@
...
@@ -79,7 +82,8 @@
}
}
]
]
}
}
],
]
},
"requestId"
:
"8cd7e91ec607453c805da8302f3e068c"
"requestId"
:
"8cd7e91ec607453c805da8302f3e068c"
}
}
```
```
...
@@ -152,6 +156,97 @@
...
@@ -152,6 +156,97 @@
}
}
```
```
## **<a name="getNclByLikeNameAndNcl"> 尼斯查询(模糊查询)</a>**
[
返回到目录
](
#menu
)
##### URL
[
/action/tmTools/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getNclByLikeNameAndNcl
```
javascript
{
"name"
:
"砷"
,
"ncls"
:
[]
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"操作成功"
,
"data"
:
[
{
"code"
:
"01"
,
"name"
:
"化学原料"
,
"pcode"
:
""
,
"type"
:
1
,
"children"
:
[
{
"code"
:
"0101"
,
"name"
:
"工业气体,单质"
,
"pcode"
:
"01"
,
"type"
:
1
,
"children"
:
[
{
"code"
:
"010084"
,
"name"
:
"砷"
,
"pcode"
:
"0101"
}
]
},
{
"code"
:
"0102"
,
"name"
:
"用于工业、科学、农业、园艺、林业的工业化工原料"
,
"pcode"
:
"01"
,
"type"
:
1
,
"children"
:
[
{
"code"
:
"010083"
,
"name"
:
"砷酸铅"
,
"pcode"
:
"0102"
},
{
"code"
:
"010085"
,
"name"
:
"亚砷酸"
,
"pcode"
:
"0102"
},
{
"code"
:
""
,
"name"
:
"有机砷化合物"
,
"pcode"
:
"0102"
}
]
}
]
},
{
"code"
:
"05"
,
"name"
:
"医药"
,
"pcode"
:
""
,
"type"
:
1
,
"children"
:
[
{
"code"
:
"0501"
,
"name"
:
"药品,消毒剂,中药药材,药酒"
,
"pcode"
:
"05"
,
"type"
:
1
,
"children"
:
[
{
"code"
:
""
,
"name"
:
"医用砷解毒剂"
,
"pcode"
:
"0501"
}
]
}
]
}
],
"bizmsg"
:
"empty"
,
"requestId"
:
"66d5695bccbd4a168e6e4823542b4a65"
}
```
## **<a name="word2pic"> 文字转图片</a>**
## **<a name="word2pic"> 文字转图片</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
...
...
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