Commit 31b13561 by 王栋源

wdy

parent 5dd8ee5d
...@@ -36,6 +36,8 @@ module.exports = (db, DataTypes) => { ...@@ -36,6 +36,8 @@ module.exports = (db, DataTypes) => {
typeName: DataTypes.STRING(50), //类型产品名称', typeName: DataTypes.STRING(50), //类型产品名称',
channelTypeCode: DataTypes.STRING(50), //渠道产品类型编码', channelTypeCode: DataTypes.STRING(50), //渠道产品类型编码',
channelTypeName: DataTypes.STRING(255), //渠道产品类型名称', channelTypeName: DataTypes.STRING(255), //渠道产品类型名称',
level: DataTypes.STRING(20), //商机等级
probability: DataTypes.STRING(20), //商机概率
}, { }, {
paranoid: true,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
......
...@@ -86,7 +86,9 @@ class NeedinfoService extends ServiceBase { ...@@ -86,7 +86,9 @@ class NeedinfoService extends ServiceBase {
typeName: actionBody.type_name, typeName: actionBody.type_name,
channelTypeCode: actionBody.channel_type_code, channelTypeCode: actionBody.channel_type_code,
channelTypeName: actionBody.channel_type_name, channelTypeName: actionBody.channel_type_name,
status: "wts" status: "wts",
level: actionBody.level || "",
probability: actionBody.probability || ""
} }
if (nobj.channelTypeCode == 7 || nobj.channelTypeCode == 5) { if (nobj.channelTypeCode == 7 || nobj.channelTypeCode == 5) {
nobj.province = nobj.city, nobj.province = nobj.city,
...@@ -188,14 +190,14 @@ class NeedinfoService extends ServiceBase { ...@@ -188,14 +190,14 @@ class NeedinfoService extends ServiceBase {
return system.getResult("没有这个需求单"); return system.getResult("没有这个需求单");
} }
// 如果未推送/以推送 修改为已跟进 // 如果未推送/以推送 修改为已跟进
if(needRes.status == "wts" || needRes.status == "yts") { if (needRes.status == "wts" || needRes.status == "yts") {
var sql = "update n_need_info set status=:status, statusName=:statusName where channelNeedNo=:BizId" var sql = "update n_need_info set status=:status, statusName=:statusName where channelNeedNo=:BizId"
var paramWhere = { var paramWhere = {
statusName: '已跟进', statusName: '已跟进',
status: 'ygj', status: 'ygj',
BizId: actionBody.intentionBizId BizId: actionBody.intentionBizId
}; };
var updateRes = await this.customUpdate(sql, paramWhere); var updateRes = await this.customUpdate(sql, paramWhere);
} }
// 有需求单但没有沟通记录 直接set // 有需求单但没有沟通记录 直接set
if (!needRes.followContent) { if (!needRes.followContent) {
...@@ -243,7 +245,7 @@ class NeedinfoService extends ServiceBase { ...@@ -243,7 +245,7 @@ class NeedinfoService extends ServiceBase {
} }
if (nobj.channelTypeCode == 7 || nobj.channelTypeCode == 5) { if (nobj.channelTypeCode == 7 || nobj.channelTypeCode == 5) {
nobj.province = nobj.city, nobj.province = nobj.city,
nobj.city = ""; nobj.city = "";
} }
await this.dao.create(nobj); await this.dao.create(nobj);
return system.getResultSuccess(); return system.getResultSuccess();
......
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