address 3 added
This commit is contained in:
parent
9e8315050a
commit
29073c0ef8
@ -14,8 +14,8 @@ android {
|
|||||||
applicationId "com.utsmm.kbz"
|
applicationId "com.utsmm.kbz"
|
||||||
minSdk 24
|
minSdk 24
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 6
|
versionCode 7
|
||||||
versionName "1.05"
|
versionName "1.06"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -156,6 +156,10 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
SystemParamsOperation.getInstance().setMerchantAddress2("");
|
SystemParamsOperation.getInstance().setMerchantAddress2("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(siriusResponse.getAddress3() != null && siriusResponse.getAddress3().isEmpty()){
|
||||||
|
SystemParamsOperation.getInstance().setMerchantAddress3("");
|
||||||
|
}
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
if(siriusMerchant != null) {
|
if(siriusMerchant != null) {
|
||||||
@ -163,6 +167,7 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
SystemParamsOperation.getInstance().setMerchantName(siriusMerchant.getName());
|
SystemParamsOperation.getInstance().setMerchantName(siriusMerchant.getName());
|
||||||
SystemParamsOperation.getInstance().setMerchantAddress(siriusMerchant.getAddress());
|
SystemParamsOperation.getInstance().setMerchantAddress(siriusMerchant.getAddress());
|
||||||
SystemParamsOperation.getInstance().setMerchantAddress2(siriusMerchant.getAddress2());
|
SystemParamsOperation.getInstance().setMerchantAddress2(siriusMerchant.getAddress2());
|
||||||
|
SystemParamsOperation.getInstance().setMerchantAddress3(siriusMerchant.getAddress3());
|
||||||
SystemParamsOperation.getInstance().setMerchantPhoneNo(siriusMerchant.getMobile());
|
SystemParamsOperation.getInstance().setMerchantPhoneNo(siriusMerchant.getMobile());
|
||||||
SystemParamsOperation.getInstance().setTerminalName(siriusMerchant.getDescription());
|
SystemParamsOperation.getInstance().setTerminalName(siriusMerchant.getDescription());
|
||||||
SystemParamsOperation.getInstance().setTerminalIdForEreceipt(siriusTerminal.getId());
|
SystemParamsOperation.getInstance().setTerminalIdForEreceipt(siriusTerminal.getId());
|
||||||
|
|||||||
@ -12,16 +12,19 @@ public class SiriusMerchant {
|
|||||||
|
|
||||||
private String address2;
|
private String address2;
|
||||||
|
|
||||||
|
private String address3;
|
||||||
|
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
public SiriusMerchant(String id, String name, String description, String address,String address2,String phone,String mobile) {
|
public SiriusMerchant(String id, String name, String description, String address,String address2, String address3,String phone,String mobile) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.address = address;
|
this.address = address;
|
||||||
this.address2 = address2;
|
this.address2 = address2;
|
||||||
|
this.address3 = address3;
|
||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
this.mobile = mobile;
|
this.mobile = mobile;
|
||||||
}
|
}
|
||||||
@ -42,6 +45,12 @@ public class SiriusMerchant {
|
|||||||
return address2;
|
return address2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAddress3(){ return address3; }
|
||||||
|
|
||||||
|
public void setAddress3(String address3){
|
||||||
|
this.address3 = address3;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPhone() {
|
public String getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.utsmyanmar.baselib.network.model.sirius;
|
package com.utsmyanmar.baselib.network.model.sirius;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SiriusResponse {
|
public class SiriusResponse {
|
||||||
@ -12,6 +14,8 @@ public class SiriusResponse {
|
|||||||
|
|
||||||
private String address2;
|
private String address2;
|
||||||
|
|
||||||
|
private String address3;
|
||||||
|
|
||||||
private SiriusMerchant merchant;
|
private SiriusMerchant merchant;
|
||||||
|
|
||||||
private List<SiriusHost> hosts;
|
private List<SiriusHost> hosts;
|
||||||
@ -20,11 +24,12 @@ public class SiriusResponse {
|
|||||||
|
|
||||||
private SiriusTerminal terminal;
|
private SiriusTerminal terminal;
|
||||||
|
|
||||||
public SiriusResponse(String serial, String ecrKey,String address,String address2, SiriusMerchant merchant, List<SiriusHost> hosts, List<SiriusProperty> properties, SiriusTerminal terminal) {
|
public SiriusResponse(String serial, String ecrKey,String address,String address2, SiriusMerchant merchant, List<SiriusHost> hosts, List<SiriusProperty> properties, SiriusTerminal terminal, String address3) {
|
||||||
this.serial = serial;
|
this.serial = serial;
|
||||||
this.ecrKey = ecrKey;
|
this.ecrKey = ecrKey;
|
||||||
this.address = address;
|
this.address = address;
|
||||||
this.address2 = address2;
|
this.address2 = address2;
|
||||||
|
this.address3 = address3;
|
||||||
this.merchant = merchant;
|
this.merchant = merchant;
|
||||||
this.hosts = hosts;
|
this.hosts = hosts;
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
@ -39,6 +44,8 @@ public class SiriusResponse {
|
|||||||
this.address2 = address2;
|
this.address2 = address2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAddress3(String address3) { this.address3 = address3; }
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
@ -47,6 +54,8 @@ public class SiriusResponse {
|
|||||||
return address2;
|
return address2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAddress3(){ return address3; }
|
||||||
|
|
||||||
public void setSerial(String serial) {
|
public void setSerial(String serial) {
|
||||||
this.serial = serial;
|
this.serial = serial;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,11 +174,13 @@ public class PrintReceipt {
|
|||||||
String merchantName = "";
|
String merchantName = "";
|
||||||
String merchantAddress = "";
|
String merchantAddress = "";
|
||||||
String merchantAddress2 = "";
|
String merchantAddress2 = "";
|
||||||
|
String merchantAddress3 = "";
|
||||||
String merchantPhoneNo = "";
|
String merchantPhoneNo = "";
|
||||||
|
|
||||||
merchantName = SystemParamsOperation.getInstance().getMerchantName();
|
merchantName = SystemParamsOperation.getInstance().getMerchantName();
|
||||||
merchantAddress = SystemParamsOperation.getInstance().getMerchantAddress();
|
merchantAddress = SystemParamsOperation.getInstance().getMerchantAddress();
|
||||||
merchantAddress2 = SystemParamsOperation.getInstance().getMerchantAddress2();
|
merchantAddress2 = SystemParamsOperation.getInstance().getMerchantAddress2();
|
||||||
|
merchantAddress3 = SystemParamsOperation.getInstance().getMerchantAddress3();
|
||||||
merchantPhoneNo = SystemParamsOperation.getInstance().getMerchantPhoneNo();
|
merchantPhoneNo = SystemParamsOperation.getInstance().getMerchantPhoneNo();
|
||||||
|
|
||||||
if (TextUtils.equals(merchantName, "") || merchantName == null) {
|
if (TextUtils.equals(merchantName, "") || merchantName == null) {
|
||||||
@ -190,6 +192,9 @@ public class PrintReceipt {
|
|||||||
if (TextUtils.equals(merchantAddress2, "") || merchantAddress2 == null) {
|
if (TextUtils.equals(merchantAddress2, "") || merchantAddress2 == null) {
|
||||||
merchantAddress2 = "MERCHANT ADDRESS2";
|
merchantAddress2 = "MERCHANT ADDRESS2";
|
||||||
}
|
}
|
||||||
|
if (TextUtils.equals(merchantAddress3, "") || merchantAddress3 == null) {
|
||||||
|
merchantAddress3 = "MERCHANT ADDRESS3";
|
||||||
|
}
|
||||||
if (TextUtils.equals(merchantPhoneNo, "") || merchantPhoneNo == null) {
|
if (TextUtils.equals(merchantPhoneNo, "") || merchantPhoneNo == null) {
|
||||||
merchantPhoneNo = "MERCHANT PHONENO";
|
merchantPhoneNo = "MERCHANT PHONENO";
|
||||||
}
|
}
|
||||||
@ -205,6 +210,7 @@ public class PrintReceipt {
|
|||||||
sunmiPrinterService.setFontSize(textSize, innerResultCallback);
|
sunmiPrinterService.setFontSize(textSize, innerResultCallback);
|
||||||
sunmiPrinterService.printText(merchantAddress + "\n", innerResultCallback);
|
sunmiPrinterService.printText(merchantAddress + "\n", innerResultCallback);
|
||||||
sunmiPrinterService.printText(merchantAddress2 + "\n", innerResultCallback);
|
sunmiPrinterService.printText(merchantAddress2 + "\n", innerResultCallback);
|
||||||
|
sunmiPrinterService.printText(merchantAddress3 + "\n", innerResultCallback);
|
||||||
sunmiPrinterService.printText(merchantPhoneNo + "\n", innerResultCallback);
|
sunmiPrinterService.printText(merchantPhoneNo + "\n", innerResultCallback);
|
||||||
sunmiPrinterService.lineWrap(1, innerResultCallback);
|
sunmiPrinterService.lineWrap(1, innerResultCallback);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
@ -879,13 +879,16 @@ public abstract class BaseXPrint {
|
|||||||
String merchantName = "";
|
String merchantName = "";
|
||||||
String merchantAddress = "";
|
String merchantAddress = "";
|
||||||
String merchantAddress2 = "";
|
String merchantAddress2 = "";
|
||||||
|
String merchantAddress3 = "";
|
||||||
String merchantPhoneNo = "";
|
String merchantPhoneNo = "";
|
||||||
String terminalName = "";
|
String terminalName = "";
|
||||||
|
|
||||||
|
|
||||||
merchantName = SystemParamsOperation.getInstance().getMerchantName();
|
merchantName = SystemParamsOperation.getInstance().getMerchantName();
|
||||||
receiptHeader = SystemParamsOperation.getInstance().getReceiptHeader();
|
receiptHeader = SystemParamsOperation.getInstance().getReceiptHeader();
|
||||||
merchantAddress = SystemParamsOperation.getInstance().getMerchantAddress();
|
merchantAddress = SystemParamsOperation.getInstance().getMerchantAddress();
|
||||||
merchantAddress2 = SystemParamsOperation.getInstance().getMerchantAddress2();
|
merchantAddress2 = SystemParamsOperation.getInstance().getMerchantAddress2();
|
||||||
|
merchantAddress3 = SystemParamsOperation.getInstance().getMerchantAddress3();
|
||||||
merchantPhoneNo = SystemParamsOperation.getInstance().getMerchantPhoneNo();
|
merchantPhoneNo = SystemParamsOperation.getInstance().getMerchantPhoneNo();
|
||||||
terminalName = SystemParamsOperation.getInstance().getTerminalName();
|
terminalName = SystemParamsOperation.getInstance().getTerminalName();
|
||||||
|
|
||||||
@ -898,6 +901,9 @@ public abstract class BaseXPrint {
|
|||||||
if (TextUtils.equals(merchantAddress2, "") || merchantAddress2 == null) {
|
if (TextUtils.equals(merchantAddress2, "") || merchantAddress2 == null) {
|
||||||
merchantAddress2 = "MERCHANT ADDRESS2";
|
merchantAddress2 = "MERCHANT ADDRESS2";
|
||||||
}
|
}
|
||||||
|
if (TextUtils.equals(merchantAddress3, "") || merchantAddress3 == null) {
|
||||||
|
merchantAddress3 = "MERCHANT ADDRESS3";
|
||||||
|
}
|
||||||
// if (TextUtils.equals(merchantPhoneNo, "") || merchantPhoneNo == null) {
|
// if (TextUtils.equals(merchantPhoneNo, "") || merchantPhoneNo == null) {
|
||||||
// merchantPhoneNo = "MERCHANT PHONENO";
|
// merchantPhoneNo = "MERCHANT PHONENO";
|
||||||
// }
|
// }
|
||||||
@ -909,6 +915,7 @@ public abstract class BaseXPrint {
|
|||||||
printer.appendPrnStr(terminalName, fontNormal, AlignEnum.CENTER, false);
|
printer.appendPrnStr(terminalName, fontNormal, AlignEnum.CENTER, false);
|
||||||
printer.appendPrnStr(merchantAddress, fontNormal, AlignEnum.CENTER,false);
|
printer.appendPrnStr(merchantAddress, fontNormal, AlignEnum.CENTER,false);
|
||||||
printer.appendPrnStr(merchantAddress2, fontNormal, AlignEnum.CENTER,false);
|
printer.appendPrnStr(merchantAddress2, fontNormal, AlignEnum.CENTER,false);
|
||||||
|
printer.appendPrnStr(merchantAddress3, fontNormal, AlignEnum.CENTER,false);
|
||||||
// printer.appendPrnStr(merchantPhoneNo, fontNormal, AlignEnum.CENTER,false);
|
// printer.appendPrnStr(merchantPhoneNo, fontNormal, AlignEnum.CENTER,false);
|
||||||
// emptyLine(1);
|
// emptyLine(1);
|
||||||
// dashBreak();
|
// dashBreak();
|
||||||
|
|||||||
@ -989,6 +989,12 @@ public class SystemParamsOperation {
|
|||||||
saveSystemParamsSettings(params);
|
saveSystemParamsSettings(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setMerchantAddress3(String merchantAddress3){
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
params.setMerchantAddress3(merchantAddress3);
|
||||||
|
saveSystemParamsSettings(params);
|
||||||
|
}
|
||||||
|
|
||||||
public void setMerchantPhoneNo(String merchantPhoneNo) {
|
public void setMerchantPhoneNo(String merchantPhoneNo) {
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
params.setMerchantPhoneNo(merchantPhoneNo);
|
params.setMerchantPhoneNo(merchantPhoneNo);
|
||||||
@ -1687,4 +1693,9 @@ public class SystemParamsOperation {
|
|||||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
||||||
return paramsSettings.getSecHostId();
|
return paramsSettings.getSecHostId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMerchantAddress3() {
|
||||||
|
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
||||||
|
return paramsSettings.getMerchantAddress3();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -67,6 +67,8 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
private String merchantAddress2 = "";
|
private String merchantAddress2 = "";
|
||||||
|
|
||||||
|
private String merchantAddress3 = "";
|
||||||
|
|
||||||
private String merchantPhoneNo = "";
|
private String merchantPhoneNo = "";
|
||||||
|
|
||||||
private String systemPassword = "";
|
private String systemPassword = "";
|
||||||
@ -862,6 +864,14 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
this.merchantAddress2 = merchantAddress2;
|
this.merchantAddress2 = merchantAddress2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void setMerchantAddress3(String merchantAddress3){
|
||||||
|
this.merchantAddress3 = merchantAddress3;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getMerchantAddress3(){
|
||||||
|
return merchantAddress3;
|
||||||
|
}
|
||||||
|
|
||||||
protected String getMerchantAddress2() {
|
protected String getMerchantAddress2() {
|
||||||
return merchantAddress2;
|
return merchantAddress2;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user