Commit 4698883f by 王悦

fix

parent a22f890e
...@@ -6,31 +6,27 @@ const tmSpringboard = require("../../base/controller/tm.springboard"); ...@@ -6,31 +6,27 @@ const tmSpringboard = require("../../base/controller/tm.springboard");
// var userCtl = system.getObject("web.auth.userCtl"); // var userCtl = system.getObject("web.auth.userCtl");
const utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve"); const utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve");
module.exports = function (app) { module.exports = function (app) {
app.post('/tm/springboard', async function(req, res) { app.post('/tm/springboard', async function (req, res) {
let body = req.body || {}; let body = req.body || {};
let _tmSpringboard = new tmSpringboard(body); let _tmSpringboard = new tmSpringboard(body);
try { try {
verify.notNull(body.ActionProcess, 'ActionProcess 不能为空!'); let data = await _tmSpringboard.transferRequest();
verify.notNull(body.ActionType, 'ActionType 不能为空!'); body.BizId = data.BizId//TM_单号
verify.notNull(body.ActionBody, 'ActionBody 不能为空!'); body.needNo = body.IntentionBizId
let data = await _tmSpringboard.transferRequest(); //body.serviceOrderNo//云服单号
if (body.ActionType === "SaveTradeMarkProductSolution") {//提交注册方案到阿里 //body.IntentionBizId//needid需求号
body.ActionBody.BizId = data.BizId//TM_单号 body.bizId = body.IntentionBizId
body.ActionBody.needNo = body.ActionBody.IntentionBizId let result = await utilsNeedSve.tmNotifyChannel(body)//通知启服通保存
//body.ActionBody.serviceOrderNo//云服单号 console.log("/tm/springboard result",result)
//body.ActionBody.IntentionBizId//needid需求号 if (!result.success)
body.ActionBody.bizId = body.ActionBody.IntentionBizId return CtxBody.error(res, {});
let result = await utilsNeedSve.tmNotifyChannel(body.ActionBody)//通知启服通保存 CtxBody.success(res, data);
if (!result.success) console.log("----返回成功");
return CtxBody.error(res, {}); } catch (error) {
} console.error("------error", error);
CtxBody.success(res, data); await _tmSpringboard.addErrorLog(error);
console.log("----返回成功"); CtxBody.error(res, error);
} catch (error) { }
console.error("------error", error); });
await _tmSpringboard.addErrorLog(error);
CtxBody.error(res, error);
}
});
}; };
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