Commit 9c0b5034 authored by yaobeibei's avatar yaobeibei

change checkState to oemCheckState

parent 4e4c82bd
......@@ -657,20 +657,20 @@ app.post('/checkCall', async function (req, res) {
}
})
if (item.popover) {
if (choose === 'zero' && x.checkStatus === undefined) {
if (choose === 'zero' && x.oemCheckStatus === undefined) {
console.log(choose)
item.status = '未审核'
dataArr.push(item)
item = {}
}
if (choose === 'one' && x.checkStatus === 0) {
if (choose === 'one' && x.oemCheckStatus === 0) {
console.log(choose)
item.status = '审核未通过'
item.disable = true
dataArr.push(item)
item = {}
}
if (choose === 'two' && (x.checkStatus === 1)) {
if (choose === 'two' && (x.oemCheckStatus === 1)) {
console.log(choose)
item.status = '审核通过'
item.disable = true
......@@ -679,15 +679,15 @@ app.post('/checkCall', async function (req, res) {
}
if (choose === 'all') {
console.log(choose)
if (x.checkStatus === undefined) {
if (x.oemCheckStatus === undefined) {
item.status = '未审核'
item.disable = false
}
if (x.checkStatus === 0) {
if (x.oemCheckStatus === 0) {
item.status = '审核未通过'
item.disable = true
}
if (x.checkStatus === 1) {
if (x.oemCheckStatus === 1) {
item.status = '审核通过'
item.disable = true
}
......@@ -712,16 +712,17 @@ app.post('/send', async function (req, res) {
let { taskId, groupId, interestlist, hostlist, status } = req.body
if (status === 8) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $unset: { 'checkStatus': '' } })
res.send({ status: 200, message: '状态已重置' })
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $unset: { 'oemCheckStatus': '' } })
res.send({ status: 200, message: '状态已重置(防止误通过)' })
}
if (status === 0) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 0, pre: false, number: 0 } })
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 0, pre: false, number: 0 } })
res.send({ status: 200, message: '审核未通过' })
}
if (status === 1) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 1 } })
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 1 } })
await db.collection('dspCallGroups').update({ '_id': mongodb.ObjectId(groupId) }, { $set: { 'interestlist': interestlist, 'hostlist': hostlist } })
res.send({ status: 200, message: '审核通过' })
}
......@@ -794,10 +795,10 @@ app.post('/getCheckNote', async function (req, res) {
}
})
if (operatorId + '' === '联通' + '' && (item.popover.operator === undefined || item.popover.operator === '联通' + '')) {
if (x.checkStatus === 0) {
if (x.oemCheckStatus === 0) {
item.status = '审核未通过'
item.disable = true
} else if (x.checkStatus === 1) {
} else if (x.oemCheckStatus === 1) {
item.status = '审核通过'
item.disable = true
} else {
......@@ -879,13 +880,13 @@ app.post('/sendCheckNote', async function (req, res) {
if (operatorId === '联通') {
await db.collection('dspTask').find({ '_id': mongodb.ObjectId(taskId) }).toArray(async (err, rep) => {
if (status === 1) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 0 } })
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 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 } })
res.send({ status: 200, message: '审核未通过' })
}
if (status === 2) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 1 } })
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 1 } })
res.send({ status: 200, message: '审核通过' })
}
})
......
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