Commit 43e8eea2 by 兰国旗

laolan

parents 400c6b63 306c5823
...@@ -44,6 +44,9 @@ class IcAPI extends APIBase { ...@@ -44,6 +44,9 @@ class IcAPI extends APIBase {
case "getItemByChannelNeedNo"://获取需求详情 case "getItemByChannelNeedNo"://获取需求详情
opResult = await this.needinfoSve.getItemByChannelNeedNo(pobj); opResult = await this.needinfoSve.getItemByChannelNeedNo(pobj);
break; break;
case "getSolutionByChannelSolutionNo"://获取方案详情
opResult = await this.needinfoSve.getSolutionByChannelSolutionNo(pobj);
break;
case "needClose"://需求关闭 case "needClose"://需求关闭
opResult = await this.needinfoSve.needClose(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.needClose(pobj, pobj.actionBody, req);
break; break;
......
...@@ -27,6 +27,15 @@ class NeedinfoService extends ServiceBase { ...@@ -27,6 +27,15 @@ class NeedinfoService extends ServiceBase {
} }
return system.getResultSuccess(item); return system.getResultSuccess(item);
} }
async getSolutionByChannelSolutionNo(pobj) {
var item = await this.needsolutionDao.model.findOne({
where:{channelSolutionNo: pobj.actionBody.bizId}
});
if (!item) {
return system.getResult(null, "方案数据为空,30210");
}
return system.getResultSuccess(item);
}
async needinfo2fq(pobj) { async needinfo2fq(pobj) {
pobj.actionBody.needNo = await this.getBusUid("n"); pobj.actionBody.needNo = await this.getBusUid("n");
pobj.actionBody.uapp_id = pobj.appInfo.id; pobj.actionBody.uapp_id = pobj.appInfo.id;
...@@ -179,7 +188,7 @@ class NeedinfoService extends ServiceBase { ...@@ -179,7 +188,7 @@ class NeedinfoService extends ServiceBase {
return system.getResult(null, "需求数据为空,30210"); return system.getResult(null, "需求数据为空,30210");
} }
// fixme 阿里直购需要更改 // fixme 阿里直购需要更改
item.solutionProvince = solutionitem.solutionContent.solution.Area item.solutionProvince = solutionitem.solutionContent.solution.Area || solutionitem.solutionContent.solution.area ;
//item.solutionProvince = solutionitem.solutionContent.solution.Area + `(${solutionitem.solutionContent.solution.actionType})`//北京(新办); //item.solutionProvince = solutionitem.solutionContent.solution.Area + `(${solutionitem.solutionContent.solution.actionType})`//北京(新办);
item.solutionContent = solutionitem.solutionContent item.solutionContent = solutionitem.solutionContent
item.channelSolutionNo = solutionitem.channelSolutionNo item.channelSolutionNo = solutionitem.channelSolutionNo
......
...@@ -665,14 +665,16 @@ class AliyunQcService { ...@@ -665,14 +665,16 @@ class AliyunQcService {
if (!ns || !ns.id) { if (!ns || !ns.id) {
return system.getResultFail(-102, "未知方案"); return system.getResultFail(-102, "未知方案");
} }
var needinfo = await this.needinfoDao.model.findOne({ if (ab.isDirectBuy !== "true") {
where: { needNo: ns.needNo }, raw: true var needinfo = await this.needinfoDao.model.findOne({
}); where: {needNo: ns.needNo}, raw: true
if (!needinfo) { });
return system.getResultFail(-104, "未知方案需求"); if (!needinfo) {
} return system.getResultFail(-104, "未知方案需求");
if (needinfo.status == "ygb") { }
return system.getResultFail(-105, "该方案需求状态为" + needinfo.statusName + ",不能执行此操作"); if (needinfo.status == "ygb") {
return system.getResultFail(-105, "该方案需求状态为" + needinfo.statusName + ",不能执行此操作");
}
} }
// if (ns.status == "yzf" || ns.status == "ywc") { // if (ns.status == "yzf" || ns.status == "ywc") {
// return system.getResultFail(-103, "该方案状态为" + ns.statusName + ",不能执行此操作"); // return system.getResultFail(-103, "该方案状态为" + ns.statusName + ",不能执行此操作");
......
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