Commit 43e8eea2 by 兰国旗

laolan

parents 400c6b63 306c5823
......@@ -44,6 +44,9 @@ class IcAPI extends APIBase {
case "getItemByChannelNeedNo"://获取需求详情
opResult = await this.needinfoSve.getItemByChannelNeedNo(pobj);
break;
case "getSolutionByChannelSolutionNo"://获取方案详情
opResult = await this.needinfoSve.getSolutionByChannelSolutionNo(pobj);
break;
case "needClose"://需求关闭
opResult = await this.needinfoSve.needClose(pobj, pobj.actionBody, req);
break;
......
......@@ -27,6 +27,15 @@ class NeedinfoService extends ServiceBase {
}
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) {
pobj.actionBody.needNo = await this.getBusUid("n");
pobj.actionBody.uapp_id = pobj.appInfo.id;
......@@ -179,7 +188,7 @@ class NeedinfoService extends ServiceBase {
return system.getResult(null, "需求数据为空,30210");
}
// 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.solutionContent = solutionitem.solutionContent
item.channelSolutionNo = solutionitem.channelSolutionNo
......
......@@ -665,8 +665,9 @@ class AliyunQcService {
if (!ns || !ns.id) {
return system.getResultFail(-102, "未知方案");
}
if (ab.isDirectBuy !== "true") {
var needinfo = await this.needinfoDao.model.findOne({
where: { needNo: ns.needNo }, raw: true
where: {needNo: ns.needNo}, raw: true
});
if (!needinfo) {
return system.getResultFail(-104, "未知方案需求");
......@@ -674,6 +675,7 @@ class AliyunQcService {
if (needinfo.status == "ygb") {
return system.getResultFail(-105, "该方案需求状态为" + needinfo.statusName + ",不能执行此操作");
}
}
// if (ns.status == "yzf" || ns.status == "ywc") {
// 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