Commit 1febb1b9 authored by yaobeibei's avatar yaobeibei

reset

parent 1530b8ef
......@@ -703,7 +703,7 @@ app.post('/checkCall', async function (req, res) {
let dataArr = []
callName.forEach(x => {
let item = {}
item.oem = '微聚'
item.oem = '微聚'
item.preNum = x.preNum / 3
if (x.pre === false) {
item.sendNum = x.number / 3
......@@ -898,7 +898,7 @@ app.post('/send', async function (req, res) {
// getSession(sessionID, res)
if (status === 8) {
if (oem === '微聚合') {
if (oem === '微聚合' || oem === null || oem === undefined) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $unset: { 'checkStatus': '' } })
} else {
await db_oem_mtty.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $unset: { 'checkStatus': '' } })
......@@ -907,7 +907,7 @@ app.post('/send', async function (req, res) {
}
if (status === 0) {
if (oem === '微聚合') {
if (oem === '微聚合' || oem === null || oem === undefined) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 0, pre: false, number: 0 } })
} else {
await db_oem_mtty.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 0, pre: false, number: 0 } })
......@@ -915,7 +915,7 @@ app.post('/send', async function (req, res) {
res.send({ status: 200, message: '审核未通过' })
}
if (status === 1) {
if (oem === '微聚合') {
if (oem === '微聚合' || oem === null || oem === undefined) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 1 } })
await db.collection('dspCallGroups').update({ '_id': mongodb.ObjectId(groupId) }, { $set: { 'interestlist': interestlist, 'hostlist': hostlist } })
} else {
......@@ -1171,10 +1171,10 @@ app.post('/sendCheckNote', async function (req, res) {
res.send({ status: 200, message: '状态已重置' })
}
if (operatorId === '联通') {
if (operatorId === '联通' || operatorId === null || operatorId === undefined) {
await db.collection('dspTask').find({ '_id': mongodb.ObjectId(taskId) }).toArray(async (err, rep) => {
if (status === 1) {
if (oem === '微聚合') {
if (oem === '微聚合' || oem === null || oem === undefined) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 0 } })
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'status': 1 } })
await db.collection('bills').update({ taskID: mongodb.ObjectId(taskId), pre: true }, { $set: { pre: false, number: 0 } })
......@@ -1186,7 +1186,7 @@ app.post('/sendCheckNote', async function (req, res) {
res.send({ status: 200, message: '审核未通过' })
}
if (status === 2) {
if (oem === '微聚合') {
if (oem === '微聚合' || oem === null || oem === undefined) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 1 } })
} else {
await db_oem_mtty.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 1 } })
......@@ -1200,7 +1200,7 @@ app.post('/sendCheckNote', async function (req, res) {
console.log(rep)
if (!rep[0].status) {
if (status === 2) {
if (oem === '微聚合') {
if (oem === '微聚合' || oem === null || oem === undefined) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'status': 2, 'sendNum': sendNum } })
await db.collection('bills').update({ taskID: mongodb.ObjectId(taskId), pre: true }, { $set: { pre: false, number: sendNum * 0.5 } });
} else {
......@@ -1211,7 +1211,7 @@ app.post('/sendCheckNote', async function (req, res) {
res.send({ status: 200, message: '审核通过,短信发送中' })
}
if (status === 1) {
if (oem === '微聚合') {
if (oem === '微聚合' || oem === null || oem === undefined) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'status': 1 } })
await db.collection('bills').update({ taskID: mongodb.ObjectId(taskId), pre: true }, { $set: { pre: false, number: 0 } });
} else {
......
......@@ -350,7 +350,7 @@
let interestlist = this.interestlist
let hostlist = this.hostlist
let currentdata = this.currentdata
let oem = currentdata ? currentdata.name : row.oem
let oem = currentdata ? currentdata.oem : row.oem
let taskId = currentdata ? currentdata.name : row.name
let groupId = currentdata ? currentdata.groupID : row.groupID
this.dialogFormVisible = false
......
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