Commit 20508a9c by 王栋源

wdy

parent 771ad335
...@@ -45,6 +45,9 @@ class IcAPI extends APIBase { ...@@ -45,6 +45,9 @@ class IcAPI extends APIBase {
case "needClose"://需求关闭 case "needClose"://需求关闭
opResult = await this.needinfoSve.needClose(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.needClose(pobj, pobj.actionBody, req);
break; break;
case "getItemByChannelSolutionNo"://渠道方案号获取需求详情
opResult = await this.needinfoSve.needClose(pobj, pobj.actionBody, req);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -7,6 +7,7 @@ class NeedinfoService extends ServiceBase { ...@@ -7,6 +7,7 @@ class NeedinfoService extends ServiceBase {
super("dbneed", ServiceBase.getDaoName(NeedinfoService)); super("dbneed", ServiceBase.getDaoName(NeedinfoService));
this.execlient = system.getObject("util.execClient"); this.execlient = system.getObject("util.execClient");
this.needsolutionSve = system.getObject("service.dbneed.needsolutionSve"); this.needsolutionSve = system.getObject("service.dbneed.needsolutionSve");
this.needsolutionDao = system.getObject("db.dbneed.needsolutionDao");
} }
async getItemByNeedNo(pobj) { async getItemByNeedNo(pobj) {
var item = await this.dao.getItemByNeedNo(pobj.actionBody.needNo); var item = await this.dao.getItemByNeedNo(pobj.actionBody.needNo);
...@@ -159,6 +160,18 @@ class NeedinfoService extends ServiceBase { ...@@ -159,6 +160,18 @@ class NeedinfoService extends ServiceBase {
} }
async getItemByChannelSolutionNo(pobj){
var solutionitem = await this.needsolutionDao.findOne({where: {channelSolutionNo: pobj.actionBody.bizId}});
if (!solutionitem) {
return system.getResult(null, "需求数据为空,30210");
}
var item = await this.dao.getItemByNeedNo(solutionitem.needNo);
if (!item) {
return system.getResult(null, "需求数据为空,30210");
}
return system.getResultSuccess(item);
}
} }
module.exports = NeedinfoService; module.exports = NeedinfoService;
......
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