Commit aab008c4 by 王悦

Merge remote-tracking branch 'origin/center-order' into center-order

# Conflicts:
#	center-order/app/base/service/impl/dbneed/needinfoSve.js
parents 00a677ec 31b13561
...@@ -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,
......
...@@ -87,6 +87,8 @@ class NeedinfoService extends ServiceBase { ...@@ -87,6 +87,8 @@ class NeedinfoService extends ServiceBase {
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 || "",
notes: actionBody.notes notes: actionBody.notes
} }
if (nobj.channelTypeCode == 7 || nobj.channelTypeCode == 5) { if (nobj.channelTypeCode == 7 || nobj.channelTypeCode == 5) {
...@@ -189,14 +191,14 @@ class NeedinfoService extends ServiceBase { ...@@ -189,14 +191,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) {
...@@ -244,7 +246,7 @@ class NeedinfoService extends ServiceBase { ...@@ -244,7 +246,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