Commit 368593ea by wkliang

need

parent 7b18f95c
...@@ -4,8 +4,9 @@ class DiagnosisNeedBusAPI extends APIBase { ...@@ -4,8 +4,9 @@ class DiagnosisNeedBusAPI extends APIBase {
constructor () { constructor () {
super(); super();
this.dnbSve = system.getObject("service.dbneed.diagnosisneedbusSve"); this.dnbSve = system.getObject("service.dbneed.diagnosisneedbusSve");
this.needSve = system.getObject('service.dbneed.opneedinfoSve')
} }
async springBoard (pobj, qobj, req) { async springBoard (pobj, qobj, req) {
// if (!pobj.actionType) { // if (!pobj.actionType) {
// return system.getResult(null, "actionType参数不能为空"); // return system.getResult(null, "actionType参数不能为空");
...@@ -33,6 +34,12 @@ class DiagnosisNeedBusAPI extends APIBase { ...@@ -33,6 +34,12 @@ class DiagnosisNeedBusAPI extends APIBase {
case "doEAV": // 审核 case "doEAV": // 审核
opResult = await this.dnbSve.doEAV(pobj, pobj.actionBody, req); opResult = await this.dnbSve.doEAV(pobj, pobj.actionBody, req);
break; break;
case 'getNeedList': // 需求列表
opResult = await this.needSve.opNeedListBak(pobj, pobj.actionBody, req);
break
case 'getNeedDetail': // 需求详情
opResult = await this.needSve.getItemByNeedNo(pobj);
break
default: default:
opResult = system.getResult(null, "actionType参数错误"); opResult = system.getResult(null, "actionType参数错误");
break; break;
......
...@@ -70,6 +70,41 @@ class NeedinfoService extends ServiceBase { ...@@ -70,6 +70,41 @@ class NeedinfoService extends ServiceBase {
return system.getResultSuccess(r); return system.getResultSuccess(r);
} }
async opNeedListBak(pobj, actionBody, req) {
let statusDic = ['wts','yts','ygj','ygb','ycd']
var sobj = {
search: {
},
pageInfo: {
pageNo: Number(actionBody.pageNumber) || 1,
pageSize: Number(actionBody.pageSize) || 10
}
}
if (pobj.appInfo.uapp_id) {
sobj.search.uapp_id = pobj.appInfo.uapp_id
}
if (actionBody.typeCode) {
sobj.search.typeCode = actionBody.typeCode;
}
if (actionBody.status && statusDic.indexOf(actionBody.status) != -1) {
sobj.search.status = actionBody.status;
}
if (actionBody.needNo) {
sobj.search.needNo = actionBody.needNo
}
if (actionBody.publishName) {
sobj.search.publishName = actionBody.publishName
}
if (actionBody.publishMobile) {
sobj.search.publishMobile = actionBody.publishMobile
}
if (actionBody.updatedAt) {
sobj.search.updatedAt = actionBody.updatedAt
}
var r = await this.dao.findAndCountAll(sobj);
return system.getResultSuccess(r);
}
async opNeedClose(pobj, actionBody, req) { async opNeedClose(pobj, actionBody, req) {
var needinfo = await this.findOne({ channelNeedNo: actionBody.needNo }); var needinfo = await this.findOne({ channelNeedNo: actionBody.needNo });
if (!needinfo) { if (!needinfo) {
......
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