Merge branch 'main' of http://203.171.20.94:3000/SafeBag/Safebag_De70
This commit is contained in:
@@ -101,19 +101,26 @@ namespace SafeBagDE70.Admin
|
||||
private void btnSoftImportantError_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var state = AppData.GetCDMState();
|
||||
|
||||
if (state.IsNotesInEscrow>0||
|
||||
state.IsNotesInRejectPocket>0||
|
||||
state.IsNotesInHopper>0)
|
||||
{
|
||||
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Red);
|
||||
lblCounterStatus.Text = "Vẫn còn tiền trong máy, đề nghị lấy tiền ra khỏi các ngăn và kiểm tra tiền kẹt";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Green);
|
||||
lblCounterStatus.Text = "Đang thực hiện Reset lỗi";
|
||||
|
||||
Log.Information("[ADMIN] Reset CDM Error");
|
||||
var bSuccess = AppData.ResetAbnormalStorage605();
|
||||
if (bSuccess)
|
||||
{
|
||||
Log.Information("[ADMIN] Reset CDM AbnormalStorage successfully");
|
||||
|
||||
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Green);
|
||||
lblCounterStatus.Text = "Reset lỗi thành công";
|
||||
((MainWindow)Application.Current.MainWindow).ShowWelcomeScreen();
|
||||
Task.Run(() =>
|
||||
@@ -125,6 +132,11 @@ namespace SafeBagDE70.Admin
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Red);
|
||||
lblCounterStatus.Text = "Reset lỗi không thành công";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+29
-9
@@ -709,14 +709,17 @@ namespace SafeBagDE70
|
||||
public static bool ResetAbnormalStorage605()
|
||||
{
|
||||
|
||||
|
||||
var cCmdRsp = AppData.cCmdRsp;
|
||||
bool bSuccess = false;
|
||||
|
||||
if (cCmdRsp != null)
|
||||
{
|
||||
Log.Information("START ABNORMAL STORAGE RESET PROC");
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
|
||||
LogCmdData();
|
||||
if (cCmdRsp.recv_dat != null &&(cCmdRsp.recv_dat.dat[1] == 0x1C && cCmdRsp.recv_dat.dat[2] == 0x4C))
|
||||
if (cCmdRsp.recv_dat != null &&
|
||||
((cCmdRsp.recv_dat.dat[18] & 0xF0) == 0xE0))
|
||||
{
|
||||
//0. Check notes in escrow or not?
|
||||
|
||||
@@ -748,38 +751,55 @@ namespace SafeBagDE70
|
||||
LogCmdData();
|
||||
recvData = cCmdRsp.recv_dat;
|
||||
var SR2 = recvData.dat[1];
|
||||
var S2 = recvData.dat[recvData.leng - 1];
|
||||
var S2 = recvData.dat[18];
|
||||
|
||||
if (SR2 == 0x1C && (S2==0xE2 || S2==0xE4))
|
||||
{
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_RESET);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
for (int i=0;i<10;i++)
|
||||
{
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
S2 = recvData.dat[recvData.leng - 1];
|
||||
if (S2 == 0xE7)
|
||||
S2 = recvData.dat[18];
|
||||
SR2 = recvData.dat[1];
|
||||
if (SR2 == 0x07)
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(2000);
|
||||
|
||||
Thread.Sleep(1000);
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_CNTSTART);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(2000);
|
||||
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_STORESTART);
|
||||
Thread.Sleep(2000);
|
||||
LogCmdData();
|
||||
if (cCmdRsp.recv_dat.dat[1] == 0x04 && cCmdRsp.recv_dat.dat[2] == 0x41)
|
||||
if ((cCmdRsp.recv_dat.dat[1] == 0x07 || cCmdRsp.recv_dat.dat[1]==0x09) && cCmdRsp.recv_dat.dat[2] == 0x41)
|
||||
{
|
||||
//Wait until SR2=0x04
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
|
||||
SR2 = recvData.dat[1];
|
||||
if (SR2 == 0x04)
|
||||
{
|
||||
bSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Log.Information("END ABNORMAL STORAGE RESET PROC");
|
||||
}
|
||||
}
|
||||
return bSuccess;
|
||||
@@ -1072,7 +1092,7 @@ namespace SafeBagDE70
|
||||
public int PrintingCountFromNPO = 0;//Transaction Count From Near Paper Out
|
||||
public bool IsStopPrinting()
|
||||
{
|
||||
if (IsPrinterNearPaperOut && PrintingCountFromNPO >= 20)
|
||||
if (IsPrinterNearPaperOut && PrintingCountFromNPO >= 50)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1151,10 +1151,11 @@ namespace SafeBagDE70
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
var customerId = AppData.CurrentCustomerAccount == null ? "" : AppData.CurrentCustomerAccount.CustomerId;
|
||||
str = $"PHIÊN GIAO DỊCH KHÔNG HỢP LỆ (SỐ TIỀN GIAO DỊCH KHÔNG KHỚP), VUI LÒNG BÁO CÁO LẠI CHI NHÁNH" +
|
||||
$"\r\nMÃ GD: {AppData.GetTransactionCode()} " +
|
||||
$"\r\nMÁY: {Environment.MachineName}" +
|
||||
$"\r\nMÃ NV: {AppData.CurrentCustomerAccount.CustomerId}";
|
||||
$"\r\nMÃ NV: {customerId}";
|
||||
Log.Information(str);
|
||||
ShowError(str);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user