Commit b6368feb by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents 73758599 f7a0f04c
...@@ -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;
......
...@@ -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;
......
...@@ -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
...@@ -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"] || "";
......
<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,6 +37,77 @@ ...@@ -36,6 +37,77 @@
{ {
"status": 0,//操作状态0:操作成功-1:操作失败 "status": 0,//操作状态0:操作成功-1:操作失败
"msg": "操作成功",//操作信息 "msg": "操作成功",//操作信息
"data": {
"count":16,
"rows":[
{
"code": "01",//尼斯大类编码
"name": "",//大类名称
"pcode": "",//父类编码 大类要为父类则为空
"type": 1,
"children": [//尼斯群组信息
{
"code": "0106",//群组编码
"name": "化学试剂",//群组名称
"pcode": "01",//群组父类编码 即其所属大类编码
"type": 1,
"children": [//尼斯小类
{
"code": "010122",//小类编码
"name": "生物化学催化剂",//小类名称
"pcode": "0106"//小类父类编码 即其所属群组编码
}
]
}
]
},
{
"code": "42",
"name": "",
"pcode": "",
"type": 1,
"children": [
{
"code": "4211",
"name": "提供化学研究服务",
"pcode": "42",
"type": 1,
"children": [
{
"code": "",
"name": "生物化学研究和分析",
"pcode": "4211"
}
]
}
]
}
]
},
"requestId": "8cd7e91ec607453c805da8302f3e068c"
}
```
## **<a name="getNclTwo"> 尼斯查询(二)</a>**
[返回到目录](#menu)
##### URL
[/action/tmTools/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getNcl
``` javascript
{
"name": "生物化学",//Y strin 尼斯名称
"ncls ": ["01"]//N List 尼斯大类编码列表
}
```
#### 返回结果
```javascript
{
"status": 0,//操作状态0:操作成功-1:操作失败
"msg": "操作成功",//操作信息
"data": [ "data": [
{ {
"code": "01",//尼斯大类编码 "code": "01",//尼斯大类编码
...@@ -84,71 +156,94 @@ ...@@ -84,71 +156,94 @@
} }
``` ```
## **<a name="getNclTwo"> 尼斯查询(二)</a>** ## **<a name="getNclByLikeNameAndNcl"> 尼斯查询(模糊查询)</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/action/tmTools/springBoard] [/action/tmTools/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getNcl #### 渠道执行的类型 actionType:getNclByLikeNameAndNcl
``` javascript ``` javascript
{ {
"name": "生物化学",//Y strin 尼斯名称 "name": "砷",
"ncls ": ["01"]//N List 尼斯大类编码列表 "ncls": []
} }
``` ```
#### 返回结果 #### 返回结果
```javascript ``` javascript
{ {
"status": 0,//操作状态0:操作成功-1:操作失败 "status": 0,
"msg": "操作成功",//操作信息 "msg": "操作成功",
"data": [ "data": [
{ {
"code": "01",//尼斯大类编码 "code": "01",
"name": "",//大类名称 "name": "化学原料",
"pcode": "",//父类编码 大类要为父类则为空 "pcode": "",
"type": 1, "type": 1,
"children": [//尼斯群组信息 "children": [
{ {
"code": "0106",//群组编码 "code": "0101",
"name": "化学试剂",//群组名称 "name": "工业气体,单质",
"pcode": "01",//群组父类编码 即其所属大类编码 "pcode": "01",
"type": 1, "type": 1,
"children": [//尼斯小类 "children": [
{ {
"code": "010122",//小类编码 "code": "010084",
"name": "生物化学催化剂",//小类名称 "name": "砷",
"pcode": "0106"//小类父类编码 即其所属群组编码 "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": "42", "code": "05",
"name": "", "name": "医药",
"pcode": "", "pcode": "",
"type": 1, "type": 1,
"children": [ "children": [
{ {
"code": "4211", "code": "0501",
"name": "提供化学研究服务", "name": "药品,消毒剂,中药药材,药酒",
"pcode": "42", "pcode": "05",
"type": 1, "type": 1,
"children": [ "children": [
{ {
"code": "", "code": "",
"name": "生物化学研究和分析", "name": "医用砷解毒剂",
"pcode": "4211" "pcode": "0501"
} }
] ]
} }
] ]
} }
], ],
"requestId": "8cd7e91ec607453c805da8302f3e068c" "bizmsg": "empty",
"requestId": "66d5695bccbd4a168e6e4823542b4a65"
} }
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment