diff --git a/clear_data.sh b/clear_data.sh index f8b9611..3864ee7 100644 --- a/clear_data.sh +++ b/clear_data.sh @@ -96,4 +96,24 @@ adb -s 2140c70c shell am start -n com.android.chrome/com.google.android.apps.chr #asus zenfone 3 adb -s G7AZCY07H415CT3 shell pm clear com.android.chrome adb -s G7AZCY07H415CT3 shell am set-debug-app --persistent com.android.chrome -adb -s G7AZCY07H415CT3 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main \ No newline at end of file +adb -s G7AZCY07H415CT3 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#xiao mi +adb -s 192.168.56.107:5555 shell pm clear com.android.chrome +adb -s 192.168.56.107:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.56.107:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#xiao mi +adb -s 192.168.56.105:5555 shell pm clear com.android.chrome +adb -s 192.168.56.105:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.56.105:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#xiao mi +adb -s 192.168.56.109:5555 shell pm clear com.android.chrome +adb -s 192.168.56.109:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.56.109:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#xiao mi +adb -s 192.168.56.110:5555 shell pm clear com.android.chrome +adb -s 192.168.56.110:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.56.110:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main \ No newline at end of file diff --git a/src/appointment.js b/src/appointment.js index bc25640..f1540e4 100644 --- a/src/appointment.js +++ b/src/appointment.js @@ -145,28 +145,27 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT return } mongoManager.connect().then(r => { - filterAlreadyAccepteddContacts(contactList).then(notAcceptedContacts => { + filterAlreadyBookedContacts(contactList).then((listToBook)=>{ + filterAlreadyAccepteddContacts(listToBook).then(notAcceptedContacts => { filterBlacklistedContacts(notAcceptedContacts).then(listWithoutBlackContact => { - filterAlreadyBookedContacts(listWithoutBlackContact).then(listToBook => { - console.log("number of contacts to book:" + listToBook.length) + console.log("number of contacts to book:" + listWithoutBlackContact.length) android.devices().then((devices) => { if (devices.length === 0) { alert("未找到连接的设备"); return } - let segmentNumber = listToBook.length / devices.length; + let segmentNumber = listWithoutBlackContact.length / devices.length; console.log("connected device number:" + devices.length) console.log("segmentNumber:" + segmentNumber) for (let i = 0; i < devices.length; i++) { - startWithList(listToBook.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep); + startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep); } }) }) } ) }) - } - ) + }); } module.exports = startBookWithNumbers \ No newline at end of file