Commit 4a3d8537 by 兰国旗

恢复查询手机号

parent 566b68c9
...@@ -33,21 +33,29 @@ class RegCenterOrderService{ ...@@ -33,21 +33,29 @@ class RegCenterOrderService{
// 获取需求详情 // 获取需求详情
async selectNeedInfo(pobj){ async selectNeedInfo(pobj){
pobj.actionType = "selectNeedInfo" pobj.actionType = "selectNeedInfo"
if(pobj.actionBody.orderNo){
var orderinfo = await this.orderinfoDao.findOne({ channelOrderNo: pobj.actionBody.orderNo }); var orderinfo = await this.orderinfoDao.findOne({ channelOrderNo: pobj.actionBody.orderNo });
if (!orderinfo || !orderinfo.orderNo) { if (!orderinfo || !orderinfo.orderNo) {
return system.getResult(null, "订单数据为空,30210"); return system.getResult(null, "订单数据为空,30210");
} }
var needsolution = await this.needsolutionDao.findOne({ orderNo: orderinfo.orderNo }); var needsolution = await this.needsolutionDao.findOne({ orderNo: orderinfo.orderNo });
var needinfo = await this.needinfoDao.findOne({ channelNeedNo: needsolution.channelNeedNo }); if (!needsolution || !needsolution.channelSolutionNo) {
if (!needinfo && !needsolution) { return system.getResult(null, "方案数据为空,30211");
return system.getResult(null, "需求/方案数据为空,30211");
} }
if(!needinfo && needsolution){ var needinfo = await this.needinfoDao.findOne({ channelNeedNo: needsolution.channelNeedNo });
needinfo = {} if (!needinfo || !needinfo.channelNeedNo) {
needinfo.publishMobile = needsolution.solutionContent.customerInfo.publishMobile return system.getResult(null, "需求数据为空,30212");
} }
}
if(pobj.actionBody.channelNeedNo){
var needinfo = await this.needinfoDao.findOne({ channelNeedNo: pobj.actionBody.channelNeedNo });
if (!needinfo || !needinfo.channelNeedNo) {
return system.getResult(null, "需求数据为空,30213");
}
}
return system.getResultSuccess(needinfo); return system.getResultSuccess(needinfo);
} }
//提交需求 //提交需求
async submitRegNeed(pobj, actionBody, req) { async submitRegNeed(pobj, actionBody, req) {
var needNo = await this.getBusUid("n"); var needNo = await this.getBusUid("n");
...@@ -209,24 +217,27 @@ class RegCenterOrderService{ ...@@ -209,24 +217,27 @@ class RegCenterOrderService{
//渠道方案号获取需求详情 //渠道方案号获取需求详情
async getItemByChannelSolutionNo(pobj) { async getItemByChannelSolutionNo(pobj) {
console.log('getItemByChannelSolutionNo---',pobj) console.log('getItemByChannelSolutionNo---',pobj)
var solutionitem = {}
var orderinfo = {}
var item = {}
if(pobj.actionBody.channelSolutionId ){ if(pobj.actionBody.channelSolutionId ){
var solutionitem = await this.needsolutionDao.findOne({ channelSolutionNo: pobj.actionBody.channelSolutionId }); solutionitem = await this.needsolutionDao.findOne({ channelSolutionNo: pobj.actionBody.channelSolutionId });
console.log('solutionitem---',solutionitem) console.log('solutionitem---',solutionitem)
if (!solutionitem) { if (!solutionitem) {
return system.getResult(null, "方案数据为空,30210"); return system.getResult(null, "方案数据为空,30210");
} }
} }
var orderinfo = await this.orderinfoDao.findOne({ channelOrderNo: pobj.actionBody.orderNo }); if(pobj.actionBody.orderNo ){
var solutionitem = {} orderinfo = await this.orderinfoDao.findOne({ channelOrderNo: pobj.actionBody.orderNo });
if(orderinfo){ if(orderinfo){
var solutionitem = await this.needsolutionDao.findOne({ orderNo: orderinfo.orderNo }); solutionitem = await this.needsolutionDao.findOne({ orderNo: orderinfo.orderNo });
}
} }
var item = await this.needinfoDao.getItemByNeedNo(solutionitem.needNo); item = await this.needinfoDao.getItemByNeedNo(solutionitem.needNo);
if (!item && !solutionitem) { if (!item && !solutionitem) {
return system.getResult(null, "需求或者方案不存在,30211"); return system.getResult(null, "需求或者方案不存在,30211");
} }
if (!item && solutionitem) { if (!item && solutionitem) {
item = {}
item.publishMobile = solutionitem.solutionContent.customerInfo.publishMobile item.publishMobile = solutionitem.solutionContent.customerInfo.publishMobile
} }
item.solutionProvince = solutionitem.solutionContent.solution.area; item.solutionProvince = solutionitem.solutionContent.solution.area;
......
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