fix bug đồng bộ dữ liệu

This commit is contained in:
dongpd 2020-12-09 11:54:10 +07:00
parent bc8812ebed
commit ecd76e6c58
2 changed files with 9 additions and 5 deletions

View File

@ -3,7 +3,7 @@
return [ return [
"hideInfomation" => false, "hideInfomation" => false,
"TCTECH" => true, "TCTECH" => true,
"CardService" => "192.168.1.245:2001", "CardService" => "192.168.1.244:2001",
"ServerIP" => "192.168.1.244:4004", "ServerIP" => "192.168.1.244:4004",
"dataPath" => "AC/", "dataPath" => "AC/",
"time" => 1623171599, "time" => 1623171599,

View File

@ -365,10 +365,14 @@ function syncStaffs(device_id, device_ip, page, fullData) {
data: device_id data: device_id
}, },
success: function (data) { success: function (data) {
appendLogs("[" + data.IP + "] Đồng bộ dữ liệu " + data.staff + " nhân viên từ " + data.from + " đến " + data.to + " tới thiết bị", "green", "check"); if (totalPage == 0)
processProgress(secondIncrement); appendLogs("[" + data.IP + "] Không có dữ liệu nhân viên đồng bộ tới thiết bị", "orange", "info-circle");
currentPage++; else {
if (currentPage <= totalPage) appendLogs("[" + data.IP + "] Đồng bộ dữ liệu " + data.staff + " nhân viên từ " + data.from + " đến " + data.to + " tới thiết bị", "green", "check");
processProgress(secondIncrement);
currentPage++;
}
if (totalPage > 0 && currentPage <= totalPage)
syncStaffs(device_id, device_ip, currentPage, fullData); syncStaffs(device_id, device_ip, currentPage, fullData);
else { else {
currentPage = 1; currentPage = 1;