Commit 94822cc4 by linboxuan

lin update produceNoticeAliEsp

parent 9d7bd73d
......@@ -26,6 +26,9 @@ class UtilsNeedService extends AppServiceBase {
* @param {*} actionBody
*/
async submitNeed(pobj, actionBody) {
if(actionBody.type == "esp.wangwen") {
actionBody.area = this.wangwenAreaChange(actionBody.area)
}
if (!actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100380");
}
......@@ -813,6 +816,81 @@ class UtilsNeedService extends AppServiceBase {
return "35"
}
}
// 2020 1012 lin 新增 针对网文的地区转换。转换根据是栋源1012 11:22钉钉发来的
wangwenAreaChange(area) {
switch (area) {
case "110000":
return "北京市";
case "120000":
return "天津市"
case "130000":
return "河北省"
case "140000":
return "山西省"
case "150000":
return "内蒙古自治区"
case "210000":
return "辽宁省"
case "220000":
return "吉林省"
case "230000":
return "黑龙江省"
case "310000":
return "上海市"
case "320000":
return "江苏省"
case "330000":
return "浙江省"
case "340000":
return "安徽省"
case "350000":
return "福建省"
case "360000":
return "江西省"
case "370000":
return "山东省"
case "410000":
return "河南省"
case "420000":
return "湖北省"
case "430000":
return "湖南省"
case "440000":
return "广东省"
case "450000":
return "广西壮族自治区"
case "460000":
return "海南省"
case "500000":
return "重庆市"
case "510000":
return "四川省"
case "520000":
return "贵州省"
case "530000":
return "云南省"
case "540000":
return "西藏自治区"
case "610000":
return "陕西省"
case "620000":
return "甘肃省"
case "630000":
return "青海省"
case "640000":
return "宁夏回族自治区"
case "650000":
return "新疆维吾尔自治区"
// case "全外资":
// return "32"
// case "香港":
// return "33"
// case "海南":
// return "34"
// default:
// return "35"
}
}
bizTypeChange(bizType) {
switch(bizType) {
case "ICP许可证":
......@@ -893,7 +971,7 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.2 关闭需求通知服务商
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.3 服务单通知服务商
* @param {*} pobj
* @param {*} actionBody
*/
......@@ -935,6 +1013,25 @@ class UtilsNeedService extends AppServiceBase {
return system.getResult(null, "needInfo is empty");
}
// 第二部 询价
// 询价前县查出方案
pobj.actionBody.channelSolutionNo = pobj.actionBody.solutionBizId;
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;
}
// 具体询价操作
pobj.actionBody.city = needInfoResult.data.city
pobj.actionBody.channelItemCode = needInfoResult.data.channelTypeCode
pobj.actionBody.pathCode = "/zzfw/wangwen/"// 写死 needInfo不支持
......@@ -1015,24 +1112,7 @@ class UtilsNeedService extends AppServiceBase {
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 = {
......@@ -1161,8 +1241,8 @@ class UtilsNeedService extends AppServiceBase {
*/
async soulutionFeebackAliEsp(pobj, actionBody) {
// 待定
solutionBizId
note
// solutionBizId
// note
if(actionBody.operateType == "INVALID") {
var url = settings.centerOrderUrl() + "action/ediApi/springBoard";
var rtn = await this.restPostUrl(pobj, url);
......
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