Commit 4698883f by 王悦

fix

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