Compare commits
3 Commits
80594be6f9
...
c3faee2eb0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3faee2eb0 | ||
|
|
f08702125c | ||
|
|
81e383798f |
@ -16,14 +16,13 @@ import com.utsmyanmar.ecr.ECRHelper
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation
|
||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.flow.receiveAsFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import sunmi.sunmiui.utils.LogUtil
|
||||
|
||||
class CardWaitingViewModel(
|
||||
private val cardReadViewModel: CardReaderViewModel,
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package com.mob.utsmyanmar.ui.dashboard
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.AccountBalanceWallet
|
||||
import androidx.compose.material.icons.filled.CreditCard
|
||||
@ -7,7 +10,6 @@ import androidx.compose.material.icons.filled.Lock
|
||||
import androidx.compose.material.icons.filled.LockOpen
|
||||
import androidx.compose.material.icons.filled.Replay
|
||||
import androidx.compose.material.icons.filled.SwapHoriz
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
@ -15,6 +17,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.mob.utsmyanmar.R
|
||||
import com.mob.utsmyanmar.ui.theme.Color
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation
|
||||
|
||||
class DashboardMenuItem(
|
||||
val title: String,
|
||||
@ -22,13 +25,26 @@ class DashboardMenuItem(
|
||||
val onClick: () -> Unit
|
||||
)
|
||||
|
||||
val settlementEnabled = false
|
||||
val voidEnabled = true
|
||||
val refundEnabled = true
|
||||
val preAuthEnabled = true
|
||||
val preAuthVoidEnabled = true
|
||||
val preAuthCompleteEnabled = true
|
||||
val preAuthCompleteVoidEnabled = true
|
||||
val cashAdvEnabled = true
|
||||
|
||||
fun buildMenuItems(
|
||||
onNavigateAmount: (String) -> Unit,
|
||||
onNavigateSignOn: () -> Unit,
|
||||
onNavigateSettlement: () -> Unit,
|
||||
onNavigateHistory: () -> Unit,
|
||||
onNavigateAction: (String) -> Unit
|
||||
): List<DashboardMenuItem> = listOf(
|
||||
): List<DashboardMenuItem> = buildList {
|
||||
|
||||
val mmqrEnabled = SystemParamsOperation.getInstance().mmqrStatus
|
||||
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Sale",
|
||||
{
|
||||
@ -38,7 +54,26 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(40.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAmount("Sale") },
|
||||
}
|
||||
) { onNavigateAmount("Sale") }
|
||||
)
|
||||
|
||||
|
||||
if (mmqrEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"MMQR",
|
||||
{
|
||||
Image(
|
||||
painter = painterResource(R.drawable.ic_mmqr_logo),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.height(48.dp)
|
||||
)
|
||||
}
|
||||
) { }
|
||||
)
|
||||
}
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"History",
|
||||
{
|
||||
@ -48,7 +83,11 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateHistory() },
|
||||
}
|
||||
) { onNavigateHistory() }
|
||||
)
|
||||
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Sign On",
|
||||
{
|
||||
@ -58,7 +97,12 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateSignOn() },
|
||||
}
|
||||
) { onNavigateSignOn() }
|
||||
)
|
||||
|
||||
if (settlementEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Settlement",
|
||||
{
|
||||
@ -68,7 +112,13 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateSettlement() },
|
||||
}
|
||||
) { onNavigateSettlement() }
|
||||
)
|
||||
}
|
||||
|
||||
if (voidEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Void",
|
||||
{
|
||||
@ -78,7 +128,13 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAction("Void") },
|
||||
}
|
||||
) { onNavigateAction("Void") }
|
||||
)
|
||||
}
|
||||
|
||||
if (refundEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Refund",
|
||||
{
|
||||
@ -88,7 +144,13 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAction("Refund") },
|
||||
}
|
||||
) { onNavigateAction("Refund") }
|
||||
)
|
||||
}
|
||||
|
||||
if (preAuthEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Pre-Auth",
|
||||
{
|
||||
@ -98,7 +160,13 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAmount("Pre-Auth") },
|
||||
}
|
||||
) { onNavigateAmount("Pre-Auth") }
|
||||
)
|
||||
}
|
||||
|
||||
if (preAuthVoidEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Pre-Auth Void",
|
||||
{
|
||||
@ -108,7 +176,13 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAction("Pre-Auth Void") },
|
||||
}
|
||||
) { onNavigateAction("Pre-Auth Void") }
|
||||
)
|
||||
}
|
||||
|
||||
if (preAuthCompleteEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Pre-Auth Complete",
|
||||
{
|
||||
@ -118,7 +192,13 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAction("Pre-Auth Complete") },
|
||||
}
|
||||
) { onNavigateAction("Pre-Auth Complete") }
|
||||
)
|
||||
}
|
||||
|
||||
if (preAuthCompleteVoidEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Pre-Auth Comp Void",
|
||||
{
|
||||
@ -128,7 +208,13 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAction("Pre-Auth Complete Void") },
|
||||
}
|
||||
) { onNavigateAction("Pre-Auth Complete Void") }
|
||||
)
|
||||
}
|
||||
|
||||
if (cashAdvEnabled) {
|
||||
add(
|
||||
DashboardMenuItem(
|
||||
"Cash Adv",
|
||||
{
|
||||
@ -138,5 +224,10 @@ fun buildMenuItems(
|
||||
modifier = Modifier.size(32.dp),
|
||||
tint = Color.LegacyRed
|
||||
)
|
||||
}) { onNavigateAmount("Cash Adv") },
|
||||
}
|
||||
) { onNavigateAmount("Cash Adv") }
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -23,6 +23,9 @@ import androidx.compose.material.icons.filled.Menu
|
||||
import androidx.compose.material.icons.filled.Notifications
|
||||
import androidx.compose.material.icons.filled.Sync
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.CardDefaults
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.DrawerValue
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
@ -47,6 +50,7 @@ import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import com.mob.utsmyanmar.R
|
||||
import com.mob.utsmyanmar.ui.components.appbar.AppBar
|
||||
import com.mob.utsmyanmar.ui.device_info.DeviceInfoUiState
|
||||
@ -176,6 +180,29 @@ fun DashboardScreen2(
|
||||
)
|
||||
}
|
||||
|
||||
if (dashboardUiState.isSyncing) {
|
||||
Dialog(onDismissRequest = {}) {
|
||||
Card(
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
colors = CardDefaults.cardColors(containerColor = Color.White),
|
||||
elevation = CardDefaults.cardElevation(8.dp)
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(32.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
CircularProgressIndicator(color = Color.LegacyRed)
|
||||
Spacer(Modifier.height(16.dp))
|
||||
Text(
|
||||
text = dashboardUiState.syncStatusText,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = Color.Black
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ModalNavigationDrawer(
|
||||
drawerState = drawerState,
|
||||
drawerContent = {
|
||||
|
||||
@ -17,5 +17,7 @@ data class DashboardUiState(
|
||||
val totalSaleCount: Int = 0,
|
||||
val totalSaleAmount: Long = 0L,
|
||||
val settlementStatusText: String = "Pending",
|
||||
val settlementDateTimeText: String = "--/-- --:--"
|
||||
val settlementDateTimeText: String = "--/-- --:--",
|
||||
val isSyncing: Boolean = false,
|
||||
val syncStatusText: String = "Connecting to TMS server..."
|
||||
)
|
||||
|
||||
@ -72,6 +72,18 @@ class DashboardViewModel @Inject constructor(
|
||||
.takeIf { it > 0L }
|
||||
_uiState.update { it.copy(lastSyncTime = time) }
|
||||
}
|
||||
|
||||
fun startSync() {
|
||||
_uiState.update { it.copy(isSyncing = true, syncStatusText = "Connecting to TMS server...") }
|
||||
}
|
||||
|
||||
fun finishSync(message: String) {
|
||||
_uiState.update { it.copy(syncStatusText = message) }
|
||||
viewModelScope.launch {
|
||||
kotlinx.coroutines.delay(1500)
|
||||
_uiState.update { it.copy(isSyncing = false) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun PayDetail.toRecord(): TrnxRecord {
|
||||
|
||||
@ -125,6 +125,15 @@ fun AppNavGraph(
|
||||
LaunchedEffect(tmsSetupViewModel) {
|
||||
tmsSetupViewModel.onSyncCompleted.collect {
|
||||
dashboardViewModel.refreshLastSyncTime()
|
||||
dashboardViewModel.finishSync("Sync completed")
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(tmsSetupUiState.isLoading, tmsSetupUiState.isError) {
|
||||
if (dashboardUiState.isSyncing && !tmsSetupUiState.isLoading) {
|
||||
if (tmsSetupUiState.isError) {
|
||||
dashboardViewModel.finishSync(tmsSetupUiState.statusText.ifBlank { "Download failed!" })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,6 +153,7 @@ fun AppNavGraph(
|
||||
dashboardUiState = dashboardUiState,
|
||||
deviceInfo = deviceInfoUiState,
|
||||
onClickLastSync = {
|
||||
dashboardViewModel.startSync()
|
||||
tmsSetupViewModel.downloadConfigs()
|
||||
},
|
||||
onNavigateRecentTransaction = { record ->
|
||||
|
||||
@ -7,7 +7,6 @@ import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.mob.utsmyanmar.model.CardTransactionType
|
||||
import com.mob.utsmyanmar.ui.pinpad.PinPadViewModel
|
||||
import com.mob.utsmyanmar.utils.MockCardData
|
||||
import com.mob.utsmyanmar.utils.MockData
|
||||
import com.mob.utsmyanmar.utils.TransactionUtil
|
||||
import com.mob.utsmyanmar.viewmodel.CardReaderViewModel
|
||||
|
||||
@ -6,7 +6,6 @@ import com.mob.utsmyanmar.model.ecr.ECRResultStatus
|
||||
import com.mob.utsmyanmar.utils.CoreUtils
|
||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
||||
import com.utsmyanmar.baselib.emv.EmvParamOperation
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusRequest
|
||||
import com.utsmyanmar.ecr.ECRHelper
|
||||
import com.utsmyanmar.ecr.ECRProcess
|
||||
import com.utsmyanmar.ecr.data.model.TransactionsResp
|
||||
|
||||
@ -131,7 +131,7 @@ class TMSSetupsImpl : TMSSetups {
|
||||
}
|
||||
|
||||
//Properties
|
||||
for (prop in siriusProperty.orEmpty()) {
|
||||
for (prop in siriusProperty) {
|
||||
val name = prop.name
|
||||
val data = prop.property
|
||||
|
||||
@ -221,6 +221,7 @@ class TMSSetupsImpl : TMSSetups {
|
||||
"speedup_contactless_enable" -> ops.setSpeedUpContactless(parseBoolean(data))
|
||||
"manual_entry_pin_enable" -> ops.isManualEntryPinEnable = parseBoolean(data)
|
||||
"cmhl_enabled" -> ops.setCMHLEnable(parseBoolean(data))
|
||||
"mmqr_enable" -> ops.setMmqrStatus(parseBoolean(data))
|
||||
}
|
||||
}
|
||||
ops.carouselUrls = imgUrls.joinToString(",")
|
||||
|
||||
@ -4,6 +4,7 @@ import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.text.TextUtils
|
||||
import com.mob.utsmyanmar.model.TransResultStatus
|
||||
import com.utsmyanmar.baselib.emv.EmvParamOperation
|
||||
import com.utsmyanmar.baselib.repo.Repository
|
||||
import com.utsmyanmar.baselib.util.enums.EmvResultStatus
|
||||
@ -24,7 +25,6 @@ import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import sunmi.sunmiui.utils.LogUtil
|
||||
import javax.inject.Inject
|
||||
import com.mob.utsmyanmar.model.TransResultStatus
|
||||
|
||||
@HiltViewModel
|
||||
class EmvTransactionProcessViewModel @Inject constructor(
|
||||
|
||||
@ -25,7 +25,6 @@ import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
|
||||
@HiltViewModel
|
||||
class TransProcessViewModel @Inject constructor(
|
||||
|
||||
@ -1,17 +1,12 @@
|
||||
package com.utsmyanmar.ecr
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.google.gson.Gson
|
||||
import com.utsmyanmar.ecr.data.ResultOf
|
||||
import com.utsmyanmar.ecr.data.TransType
|
||||
import com.utsmyanmar.ecr.data.mapper.RequestTransMapper
|
||||
import com.utsmyanmar.ecr.data.mapper.ResponseTransMapper
|
||||
import com.utsmyanmar.ecr.data.model.RequestTrans
|
||||
import com.utsmyanmar.ecr.data.model.ResponseTrans
|
||||
import com.utsmyanmar.ecr.data.model.Transactions
|
||||
import com.utsmyanmar.ecr.data.model.TransactionsResp
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation
|
||||
import java.lang.Exception
|
||||
|
||||
//@Keep
|
||||
object ECRProcess {
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
package com.utsmyanmar.paylibs.utils.core_utils;
|
||||
|
||||
import static com.utsmyanmar.paylibs.utils.core_utils.SystemParamsSettings.TRANSACTION_MANAGER_KEY;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.utsmyanmar.paylibs.utils.enums.CurrencyType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import sunmi.sunmiui.utils.LogUtil;
|
||||
|
||||
import static com.utsmyanmar.paylibs.utils.core_utils.SystemParamsSettings.TRANSACTION_MANAGER_KEY;
|
||||
|
||||
import com.utsmyanmar.paylibs.utils.enums.CurrencyType;
|
||||
|
||||
public class SystemParamsOperation {
|
||||
|
||||
public static final String TAG = "SystemParamsOperation";
|
||||
@ -33,54 +33,6 @@ public class SystemParamsOperation {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/* public void init(String serialNumStart,
|
||||
String batchNumStart,
|
||||
int purchaseOrderStyle,
|
||||
int correctFrequency,
|
||||
int transactionNumber,
|
||||
boolean printNegative,
|
||||
int nonConnection,
|
||||
boolean stateSecret,
|
||||
boolean shieldAuthorizationCard,
|
||||
int nonConnectionChoice,
|
||||
boolean eCashVisaExemption) {
|
||||
SystemParamsSettings bean = getSystemParamsSettings();
|
||||
bean.setSerialNum(serialNumStart);
|
||||
bean.setBatchNumStart(batchNumStart);
|
||||
bean.setPurchaseOrderStyle(purchaseOrderStyle);
|
||||
bean.setCorrectFrequency(correctFrequency);
|
||||
bean.setTransactionNumber(transactionNumber);
|
||||
bean.setPrintNegative(printNegative);
|
||||
bean.setNonConnection(nonConnection);
|
||||
bean.setStateSecret(stateSecret);
|
||||
bean.setShieldAuthorizationCard(shieldAuthorizationCard);
|
||||
bean.setNonConnectionChoice(nonConnectionChoice);
|
||||
bean.setCashVisaExemption(eCashVisaExemption);
|
||||
saveSystemParamsSettings(bean);
|
||||
}*/
|
||||
|
||||
/*public boolean isDownloadParamsOnce() {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
return params.isDownloadParamsOnce();
|
||||
}
|
||||
|
||||
public void saveDownloadParamsOnce(boolean downloadParamsOnce) {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
params.setDownloadParamsOnce(downloadParamsOnce);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
public boolean isNeedDownLoadICParams() {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
return params.isNeedDownLoadICParams();
|
||||
}
|
||||
|
||||
public void saveNeedDownLoadICParams(boolean needDownLoadICParams) {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
params.setNeedDownLoadICParams(needDownLoadICParams);
|
||||
saveSystemParamsSettings(params);
|
||||
}*/
|
||||
|
||||
public boolean isInjectOnce(){
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
return params.isInjectOnce();
|
||||
@ -91,13 +43,6 @@ public class SystemParamsOperation {
|
||||
params.setInjectOnce(injectOnce);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set serial number
|
||||
*
|
||||
* @param serialNumber Starting serial number
|
||||
*/
|
||||
public void saveSerialNumber(String serialNumber) {
|
||||
if (TextUtils.isEmpty(serialNumber)) {
|
||||
return;
|
||||
@ -106,12 +51,6 @@ public class SystemParamsOperation {
|
||||
params.setSerialNum(serialNumber);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set invoice number
|
||||
*
|
||||
* @param invoiceNumber Starting invoice number
|
||||
*/
|
||||
public void saveInvoiceNumber(String invoiceNumber) {
|
||||
if (TextUtils.isEmpty(invoiceNumber)) {
|
||||
return;
|
||||
@ -120,13 +59,6 @@ public class SystemParamsOperation {
|
||||
params.setInvoiceNum(invoiceNumber);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set batch number
|
||||
*
|
||||
* @param batchNumber Starting batch number
|
||||
*/
|
||||
public void saveBatchNumber(String batchNumber) {
|
||||
if (TextUtils.isEmpty(batchNumber)) {
|
||||
return;
|
||||
@ -136,11 +68,6 @@ public class SystemParamsOperation {
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Serial number increment
|
||||
*/
|
||||
private void incrementSerialNum() {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
String currentSerialNum = params.getCurrentSerialNum();
|
||||
@ -172,10 +99,6 @@ public class SystemParamsOperation {
|
||||
params.setSerialNum(transNumFormat);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoice number increment
|
||||
*/
|
||||
private void incrementInvoiceNum() {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
String currentInvoiceNum = params.getCurrentInvoiceNum();
|
||||
@ -952,6 +875,17 @@ public class SystemParamsOperation {
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
public void setMmqrStatus(boolean status) {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
params.setMmqrEnabled(status);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
public boolean getMmqrStatus(){
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
return params.getMmqrEnabled();
|
||||
}
|
||||
|
||||
public boolean isCMHLEnabled(){
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
return params.isCmhlEnabled();
|
||||
|
||||
@ -233,6 +233,7 @@ public class SystemParamsSettings implements Serializable {
|
||||
private byte[] pik_value;
|
||||
|
||||
private byte[] pik_kcv;
|
||||
private boolean mmqrEnabled;
|
||||
|
||||
protected String getSecHostName() {
|
||||
return secHostName;
|
||||
@ -902,6 +903,14 @@ public class SystemParamsSettings implements Serializable {
|
||||
this.emvEnabled = emvEnabled;
|
||||
}
|
||||
|
||||
public void setMmqrEnabled(boolean status) {
|
||||
this.mmqrEnabled = status;
|
||||
}
|
||||
|
||||
public boolean getMmqrEnabled(){
|
||||
return mmqrEnabled;
|
||||
}
|
||||
|
||||
/* // 流水号起始
|
||||
private String serialNum = Configs.getInstance().SERIAL_NUM();
|
||||
// 批次号起始
|
||||
|
||||
Loading…
Reference in New Issue
Block a user