Commit f5bce7b2 by 兰国旗

yiming

parent 6d5e0e33
......@@ -127,6 +127,9 @@ class Need extends APIBase {
case "importNeeds":
opResult = await this.utilsNeedSve.importNeeds(pobj,req);
break;
case "getymicpProduce"://获取易名的icp产品信息
opResult = await this.centerorderSve.getymicpProduce(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -86,6 +86,7 @@ class BaseCenterOrderService extends AppServiceBase {
//提交Icp注册方案
async submitIcpProgramme(pobj) {
console.log('提交Icp注册方案---',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data && res.data.needinfo && res.data.needsolution) {
var needinfo = res.data.needinfo;//需求信息
......@@ -158,8 +159,9 @@ class BaseCenterOrderService extends AppServiceBase {
if(needinfo.uapp_id == uappId.ename){
//推送数据至易名
// var bizType = needinfo.channelTypeCode;//业务类型里
solution.Area = cityLetter[solution.Area]
// solution.Area = cityLetter[solution.Area]
console.log('solution.Area++',solution.Area)
console.log('solution++',solution)
var pushObj = {
IntentionBizId: needinfo.channelNeedNo,
CompanyName: solution.CompanyName,
......@@ -319,7 +321,7 @@ class BaseCenterOrderService extends AppServiceBase {
};
var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id
console.log("保存渠道方案id aaaa++ ",a)
if (a && a.status == 0 && resData.ConfirmUrl) {
if (a && a.status == 0 && pushRes.ConfirmUrl) {
var reqObj3 = {
actionType: "receiveIcpConfirmUrl",
appInfo: appInfo,
......
......@@ -650,9 +650,14 @@ class CenterorderService extends AppServiceBase {
if(pobj && pobj.appInfo && pobj.appInfo.uapp_id && pobj.appInfo.uapp_id=='52'){
if (pobj.actionBody.channelItemCode == '5') {
pobj.actionBody.regType = "ename.icp";
pobj.actionBody.regType = "yiming.icp";
} else if (pobj.actionBody.channelItemCode == '7') {
pobj.actionBody.regType = "ename.edi";
pobj.actionBody.regType = "yiming.edi";
}
else if (pobj.actionBody.channelItemCode == 'icpnb') {
pobj.actionBody.regType = "yiming.icpnb";
}else if (pobj.actionBody.channelItemCode == 'edinb') {
pobj.actionBody.regType = "yiming.edinb";
}
}
var fqobj = {
......@@ -715,9 +720,18 @@ class CenterorderService extends AppServiceBase {
}
return system.getResultSuccess();
}
//获取易名的icp产品信息
async getymicpProduce(pobj) {
pobj.actionType = 'getymicpProduce'
let url = settings.centerAppUrl() + "action/opProduct/springBoard";
return await this.restPostUrl(pobj, url);
}
}
module.exports = CenterorderService;
// var task = new CenterorderService();
// var pobj={
// "actionType":"submitProgramme",
// "actionBody":{
......
......@@ -1436,11 +1436,17 @@ class UtilsNeedService extends AppServiceBase {
if(pobj.appInfo && pobj.appInfo.uapp_id && pobj.appInfo.uapp_id=="52"){
if (pobj.actionBody.channel_type_code == 5) {
pobj.actionBody.type = "ename.icp";
pobj.actionBody.idempotentSource = "ename_icp";
pobj.actionBody.type = "yiming.icp";
pobj.actionBody.idempotentSource = "yiming.icp";
} else if (pobj.actionBody.channel_type_code == 7) {
pobj.actionBody.type = "ename.edi";
pobj.actionBody.idempotentSource = "ename_edi";
pobj.actionBody.type = "yiming.edi";
pobj.actionBody.idempotentSource = "yiming.edi";
} else if (pobj.actionBody.channel_type_code == "icpnb") {
pobj.actionBody.type = "yiming.icpnb";
pobj.actionBody.idempotentSource = "yiming.icpnb";
} else if (pobj.actionBody.channel_type_code == "edinb") {
pobj.actionBody.type = "yiming.edinb";
pobj.actionBody.idempotentSource = "yiming.edinb";
}
}
if (pobj.actionBody.description && pobj.actionBody.description.indexOf("备#") < 0) {
......
......@@ -6,8 +6,9 @@ const { json } = require("sequelize");
const { getResult, getResultSuccess } = require("../../../system");
//区分渠道的uappid
const uappId = {
'ali': "18", //(阿里icp、edi)
'baidu': "44" //(百度icp、edi)
'ali': 18, //(阿里icp、edi)
'baidu': 44, //(百度icp、edi)
'ename':52
}
//需求操作类----ali对接的需求
class UtilsNeedService2 extends AppServiceBase {
......@@ -517,6 +518,11 @@ class UtilsNeedService2 extends AppServiceBase {
var ress = await self.baiduclient.baiduReqbyget({ path: "/api/bla/provider/communication", reqbody: { requirementId: pobj.actionBody.intentionBizId, content: pobj.actionBody.note } });
console.log("baidu+res", ress)
}
if (result.data == uappId.ename) {
console.log('settings.enameClientUrl()+"WriteCommunicationLog"----',settings.enameClientUrl()+"WriteCommunicationLog")
var resss = await self.execClient.execEnamePost({ IntentionBizId: pobj.actionBody.intentionBizId, Note: pobj.actionBody.note }, settings.enameClientUrl()+"WriteCommunicationLog");
console.log("ename+resss", resss)
}
}
//推送交付系统
......@@ -546,7 +552,7 @@ class UtilsNeedService2 extends AppServiceBase {
async queryExpertApplyCommunicationLogs(pobj) {
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
console.log('jilu+++result++++', result)
console.log('jilu+++result++++1--', result)
if (result && result.status == 0 && result.data && result.data.uapp_id) {
if (result.data.uapp_id == uappId.ali) {
var res = await this.aliclient.reqbyget({
......@@ -576,6 +582,20 @@ class UtilsNeedService2 extends AppServiceBase {
});
console.log('xxcc+++', res)
}
if (result.data.uapp_id == uappId.ename) {// yiming / ename
console.log("queryExpertApplyCommunicationLogs---ename---pobj--", pobj)
console.log('settings.enameClientUrl()+"queryExpertApplyCommunicationLogs"----',settings.enameClientUrl()+"queryExpertApplyCommunicationLogs")
var res = await self.execClient.execEnamePost({
BeginTime: pobj.actionBody.BeginTime ? pobj.actionBody.BeginTime : "",
EndTime: pobj.actionBody.EndTime ? pobj.actionBody.EndTime : "",
BizId: pobj.actionBody.intentionBizId,
UserFeedBack: pobj.actionBody.userFeedBack || true,
PageNum: pobj.actionBody.pageNum || 1,
PageSize: pobj.actionBody.pageSize || 10,
}, settings.enameClientUrl()+"queryExpertApplyCommunicationLogs");
console.log('ename+++queryExpertApplyCommunicationLogs---res---', res)
}
}
if(res && res.data && res.data.result){
......
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