Commit a087b173 by 庄冰

icp

parent 140f3226
......@@ -60,6 +60,9 @@ class IcpAPI extends APIBase {
case "getIcpProgrammeDetail"://获取方案详情(内部调用)
opResult = await this.needsolutionSve.getIcpProgrammeDetail(pobj);
break;
case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.needsolutionSve.getProgrammeInfoByChannelNeedNo(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -535,6 +535,38 @@ class NeedsolutionService extends ServiceBase {
//---------------------公司注册-end-----------------------------------------------------------------
//---------------------icp注册-start-----------------------------------------------------------------
//根据需求查看方案列表
async getProgrammeInfoByChannelNeedNo(pobj){
var ab = pobj.actionBody;
var user = pobj.userInfo;
if(!user || !user.id){
return system.getResultFail(-100,"未知用户");
}
ab["createUserId"]=user.id;
// followManMobile: DataTypes.STRING,//跟进人手机号(合伙人)
// followManOnlyCode: DataTypes.STRING(50),//跟进者唯一码
if(!ab.needNo){
return system.getResultFail(-101,"需求号不能为空");
}
// if(!ab.followManMobile){
// return system.getResultFail(-102,"跟进人手机号不能为空");
// }
// if(!ab.followManOnlyCode){
// return system.getResultFail(-103,"跟进人唯一码不能为空");
// }
//获取需求信息
var needinfo = await this.needinfoDao.model.findOne({
where:{channelNeedNo:ab.needNo},raw:true
});
if(!needinfo || !needinfo.id){
return system.getResultFail(-102,"未知需求信息");
}
var ns = await this.dao.model.findAll({
where:{channelNeedNo:needinfo.needNo,createUserId:user.id},raw:true,
attributes:["needNo","solutionNo","channelSolutionNo","orderNo","solutionContent","status","statusName"]
});
return system.getResultSuccess(ns);
}
//提交方案
async submitIcpProgramme(pobj){
var ab = pobj.actionBody;
......
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