Commit 25817e40 by Wyh

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	component-print/src/main/res/layout/print_dialog_loading.xml
parents da8dbb14 7376ca17
......@@ -38,7 +38,7 @@ import com.gingersoft.gsa.cloud.common.function.FunctionManager;
import com.gingersoft.gsa.cloud.common.function.jump.ActivityJumpBean;
import com.gingersoft.gsa.cloud.common.function.jump.ActivityJumpStrategy;
import com.gingersoft.gsa.cloud.common.logan.LoganManager;
import com.gingersoft.gsa.cloud.common.service.GetInfoUpdateService;
import com.gingersoft.gsa.cloud.common.service.DataNotificationService;
import com.gingersoft.gsa.cloud.common.utils.AppDevices;
import com.gingersoft.gsa.cloud.common.utils.JsonUtils;
import com.gingersoft.gsa.cloud.common.utils.StytemUtils;
......@@ -218,24 +218,24 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
}
private void initService() {
// boolean deliveryOrderServiceRunning = StytemUtils.isServiceRunning("com.gingersoft.gsa.cloud.common.service.GetInfoUpdateService", this);
// if (!deliveryOrderServiceRunning) {
// Intent service = new Intent(GsaCloudApplication.getAppContext(), GetInfoUpdateService.class);
// service.putExtra(GetInfoUpdateService.CONNECTION_TYPE, GetInfoUpdateService.mCurrConnectionType);
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// startForegroundService(service);
// } else {
// startService(service);
// }
// }
boolean prjServiceRunning = StytemUtils.isServiceRunning("com.joe.print.mvp.print.service.PrjService", this);
if (!prjServiceRunning) {
//開啟Prj打印服務
CC.obtainBuilder(ComponentName.COMPONENT_PRINT)
.setActionName("openPrintService")
.build()
.call();
boolean deliveryOrderServiceRunning = StytemUtils.isServiceRunning("com.gingersoft.gsa.cloud.common.service.DataNotificationService", this);
if (!deliveryOrderServiceRunning) {
Intent service = new Intent(GsaCloudApplication.getAppContext(), DataNotificationService.class);
service.putExtra(DataNotificationService.CONNECTION_TYPE, DataNotificationService.mCurrConnectionType);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForegroundService(service);
} else {
startService(service);
}
}
// boolean prjServiceRunning = StytemUtils.isServiceRunning("com.joe.print.mvp.print.service.PrjService", this);
// if (!prjServiceRunning) {
// //開啟Prj打印服務
// CC.obtainBuilder(ComponentName.COMPONENT_PRINT)
// .setActionName("openPrintService")
// .build()
// .call();
// }
}
......
......@@ -266,6 +266,7 @@ public abstract class PrinterRoot<T extends PrintContent> implements PrintSocket
*/
private void sunmiPrint(List<Bitmap> bitmaps, PrintListener listener) {
//商米打印
PrinterPlugins.getOnPrinterFlowHandler().connectionSuccess();
AidlUtil.getInstance().printBitmaps(bitmaps, SUNMI_PAPER_WIDTH, new InnerResultCallbcak() {
@Override
public void onRunResult(boolean isSuccess) {
......
......@@ -133,6 +133,7 @@ public class PrjPtinterManager implements ReceiveListener {
* 請求prj數據
*/
public void getPrjInfo() {
LoganManager.w_printer(TAG, "heart ThreadName:"+Thread.currentThread().getName());
OkHttp3Utils.get(HttpsConstans.ROOT_SERVER_ADDRESS_FORMAL + "printerRecording/get?restaurantId=" + RestaurantInfoManager.newInstance().getRestaurantId())
.subscribeOn(Schedulers.io())//切换到io线程進行網絡請求
.observeOn(Schedulers.io())//切換到io线程處理請求結果
......@@ -140,24 +141,24 @@ public class PrjPtinterManager implements ReceiveListener {
@Override
public void onSubscribe(Disposable d) {
LoganManager.w_printer(TAG, "獲取Prj數據 Disposable");
LoganManager.w_printer(TAG, "heart 獲取Prj數據 Disposable");
}
@Override
public void onNext(String prjInfo) {
LoganManager.w_printer(TAG, "獲取Prj數據 onNext: " + prjInfo);
LoganManager.w_printer(TAG, "heart 獲取Prj數據 onNext: " + prjInfo);
//請求到數據,停止輪詢,開始打印,在打印完之後再重新開始輪詢
actionPrint(prjInfo);
}
@Override
public void onError(Throwable e) {
LoganManager.w_printer(TAG, "獲取Prj數據 onError:" + e.getMessage());
LoganManager.w_printer(TAG, "heart 獲取Prj數據 onError:" + e.getMessage());
}
@Override
public void onComplete() {
LoganManager.w_printer(TAG, "獲取Prj數據 onComplete");
LoganManager.w_printer(TAG, "heart 獲取Prj數據 onComplete");
}
});
}
......
......@@ -5,6 +5,7 @@ import android.graphics.Bitmap;
import java.util.Hashtable;
public class BytesUtil {
//字节流转16进制字符串
public static String getHexStringFromBytes(byte[] data) {
if (data == null || data.length <= 0) {
......
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.layout.QMUILinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/theme_white_color"
android:gravity="center"
android:background="@color/theme_white_color"
android:orientation="vertical">
<com.airbnb.lottie.LottieAnimationView
......@@ -70,7 +69,8 @@
android:layout_marginTop="@dimen/dp_10"
android:textColor="@color/red"
android:textSize="@dimen/font_small"
tools:text="連接打印機超時" />
android:text="連接打印機超時"
android:visibility="invisible"/>
</com.qmuiteam.qmui.layout.QMUILinearLayout>
\ No newline at end of file
......@@ -33,7 +33,7 @@
android:name="design_height_in_dp"
android:value="640"/>
<service
android:name="com.gingersoft.gsa.cloud.common.service.GetInfoUpdateService"
android:name="com.gingersoft.gsa.cloud.common.service.DataNotificationService"
android:enabled="true" />
</application>
</manifest>
......@@ -22,6 +22,7 @@
android:orientation="vertical">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ricepon pos"
......@@ -29,6 +30,7 @@
android:textSize="@dimen/dp_14" />
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="@dimen/dp_10">
<ImageView
android:id="@+id/iv_launch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_toEndOf="@id/iv_launch"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ricepon pos"
android:textColor="@color/color_3c"
android:textSize="@dimen/dp_14" />
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:text="connection service"
android:textColor="@color/color_3c"
android:textSize="@dimen/dp_14" />
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
package com.gingersoft.gsa.cloud.pay.pos.hywebpos.bean.request.pos;
import lombok.Data;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2019-11-15
* 修订历史:2019-11-15
* 描述:
*/
@Data
public class WaitRequest {
private long id;
private String type;
private String orderId;
private String payId;
//支付所需
private String orderXml;
//調整貼士所需
private String TXN_ID = "";
private double tipAmount = 0.0;
//清机所需
private String settlementTime;
//公共字段
private String MachineCode;
private String LoginID;
private String LoginName;
private String SessionID;
private String Station_id;
private String ShopID;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment