Commit 3aa9ffa3 by 王栋源

wdy

parent f93e5843
...@@ -7,6 +7,7 @@ module.exports = (db, DataTypes) => { ...@@ -7,6 +7,7 @@ module.exports = (db, DataTypes) => {
needNo :DataTypes.STRING(64), //需求单号 needNo :DataTypes.STRING(64), //需求单号
needDesc :DataTypes.STRING(255), // needDesc :DataTypes.STRING(255), //
needUserMoblie :DataTypes.STRING(20), // needUserMoblie :DataTypes.STRING(20), //
needUserName :DataTypes.STRING(20), //
notes :DataTypes.STRING(255), // notes :DataTypes.STRING(255), //
opNotes :DataTypes.STRING(500), // opNotes :DataTypes.STRING(500), //
channelUserName :DataTypes.STRING(50), // 渠道用户登录名 channelUserName :DataTypes.STRING(50), // 渠道用户登录名
......
...@@ -7,29 +7,30 @@ class NeedInfoService extends ServiceBase { ...@@ -7,29 +7,30 @@ class NeedInfoService extends ServiceBase {
super("dbneed", ServiceBase.getDaoName(NeedInfoService)); super("dbneed", ServiceBase.getDaoName(NeedInfoService));
} }
async subNeed(obj,req){ async subNeed(obj, req) {
var user = obj.channelUser; var user = obj.channelUser;
var app = req.app; var app = req.app;
// if(!user){ // if(!user){
// return system.getResultFail(-100, "未知用户"); // return system.getResultFail(-100, "未知用户");
// } // }
if(!app){ if (!app) {
return system.getResultFail(-101, "未知渠道"); return system.getResultFail(-101, "未知渠道");
} }
var needNo=await this.getBusUid("ni"); var needNo = await this.getBusUid("ni");
var needObj={ var needObj = {
app_id :app.id, app_id: app.id,
needNo :needNo, needNo: needNo,
needDesc :obj.needDesc, needDesc: obj.needDesc,
needUserMoblie :obj.needUserMoblie, needUserMoblie: obj.needUserMoblie,
notes :obj.notes, needUserName: obj.needUserName,
channelUserName :user.channelUserName, notes: obj.notes,
auditStatus :"00", channelUserName: user.channelUserName,
createuser_id :user.channelUserId, auditStatus: "00",
itemCode:obj.itemCode createuser_id: user.channelUserId,
itemCode: obj.itemCode
}; };
var need = await this.dao.create(needObj); var need = await this.dao.create(needObj);
return system.getResultSuccess(need); return system.getResultSuccess(need);
} }
} }
module.exports=NeedInfoService; module.exports = NeedInfoService;
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