Просмотр исходного кода

Merge branch '调味吧台' of http://10.2.1.24:10244/fyf/AndroidSmartClient into 调味吧台

调味吧台
liup 5 месяцев назад
Родитель
Сommit
7d103b7779
3 измененных файлов: 23 добавлений и 23 удалений
  1. +3
    -10
      app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java
  2. +19
    -12
      app/src/main/java/com/bonait/bnframework/common/utils/AlertDialogUtils.java
  3. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/loadinggood_adapter.java

+ 3
- 10
app/src/main/java/com/bonait/bnframework/HttpModel/APIService.java Просмотреть файл

@@ -12,10 +12,7 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
@@ -36,20 +33,16 @@ public class APIService {
}

private static void GetGoodsInfo(){
String url = "https://cfv.black-pa.com/api/goods/getbyidgoods?deviceId=03192d70-bd37-40b2-8c03-2721c236e8f2";
// String url = "http://192.168.1.50:5007/api/goods/Getdevicegoods?deviceId=1a2a1d72-752f-44cf-87f8-ec9fe4ea15b8";

APIHelper.GetT(url,null,new TypeReference<APIResultT<List<DeviceGoodInfo>>>(){}).OnSource(s->{
String url = "https://cfv.black-pa.com/kitchbase/api/goods/Getdevicegoods?deviceId=73a4aa15-72d8-4ed1-b220-6878cd7297d4";
APIHelper.PostT(url,null,null,new TypeReference<APIResultT<List<DeviceGoodInfo>>>(){}).OnSource(s->{
deviceGoodInfo=s.Content;
UpdateLocalGoodsInfo();
});
}

private static void GetMaterialInfo(){
String url = "https://cfv.black-pa.com/api/ExternalPlatform/Material/GetMaterialPageList";
// String url = "http://192.168.1.50:5006/api/ExternalPlatform/Material/GetMaterialPageList";
String url = "https://cfv.black-pa.com/saasbase/api/ExternalPlatform/Material/GetMaterialPageList";
String key ="2c39bc05-25c2-46c4-b5c6-dba349058492";
// String key ="962a5892-0f7f-47b4-a1ec-925bd7914a6d";
APIHelper.PostT(url,new MaterialRequestPar(1,100),key,new TypeReference<APIResultT<MaterialData>>(){}).OnSource(s->{
materialModels=s.Content;
UpdateLocalMaterial();


+ 19
- 12
app/src/main/java/com/bonait/bnframework/common/utils/AlertDialogUtils.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.bonait.bnframework.common.utils;

import android.content.Context;

import com.bonait.bnframework.HBL.Logs.MessageLog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

@@ -63,18 +64,24 @@ public class AlertDialogUtils {
* 对话框,有取消确定按钮
* */
public static void showDialog(Context context, String title, String message, QMUIDialogAction.ActionListener onClickListener) {
new QMUIDialog.MessageDialogBuilder(context)
.setCancelable(false)
.setTitle(title)
.setMessage(message)
.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
dialog.dismiss();
}
})
.addAction("确定", onClickListener)
.create(mCurrentDialogStyle).show();
try{
new QMUIDialog.MessageDialogBuilder(context)
.setCancelable(false)
.setTitle(title)
.setMessage(message)
.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
dialog.dismiss();
}
})
.addAction("确定", onClickListener)
.create(mCurrentDialogStyle).show();
}catch(Exception e){
MessageLog.ShowError(e);

}

}

public static QMUIDialog showDialog111(Context context, String title, String message, QMUIDialogAction.ActionListener onClickListener) {


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/home/adapter/loadinggood_adapter.java Просмотреть файл

@@ -119,7 +119,7 @@ public class loadinggood_adapter extends RecyclerView.Adapter<RecyclerView.ViewH
public void onClick(View view) {
String title = "温馨提示!";
String message = "客官确定要取消制作【"+goodsMake.good.name+"】吗?";
AlertDialogUtils.showDialog(MainApplication.getContext(), title, message, new QMUIDialogAction.ActionListener() {
AlertDialogUtils.showDialog( mLayoutInflater.getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
DataBus.getInstance().DeleteGoodsMake(goodsMake.subOrder.id);


Загрузка…
Отмена
Сохранить