|
@@ -30,6 +30,7 @@ import com.example.bpa.config.ConfigName; |
|
|
import com.example.bpa.config.DataBus; |
|
|
import com.example.bpa.config.DataBus; |
|
|
import com.example.bpa.config.MessageName; |
|
|
import com.example.bpa.config.MessageName; |
|
|
import com.example.bpa.db.QueryDB; |
|
|
import com.example.bpa.db.QueryDB; |
|
|
|
|
|
import com.example.bpa.db.mode.BPA_GOODS; |
|
|
import com.example.bpa.db.mode.BPA_ORDER; |
|
|
import com.example.bpa.db.mode.BPA_ORDER; |
|
|
import com.example.bpa.db.mode.BPA_SUBORDER; |
|
|
import com.example.bpa.db.mode.BPA_SUBORDER; |
|
|
import com.example.bpa.helper.Json; |
|
|
import com.example.bpa.helper.Json; |
|
@@ -186,13 +187,14 @@ public class MainActivity extends FragmentActivity implements View.OnClickListen |
|
|
ShowFragment(systemSetFragment, "系统设置"); |
|
|
ShowFragment(systemSetFragment, "系统设置"); |
|
|
break; |
|
|
break; |
|
|
case R.id.SystemHelp://系统帮助按钮 |
|
|
case R.id.SystemHelp://系统帮助按钮 |
|
|
if(OrderID.isEmpty()) |
|
|
|
|
|
{ |
|
|
|
|
|
T.show(MainActivity.this, "无制作中饮品!"); |
|
|
|
|
|
}else |
|
|
|
|
|
{ |
|
|
|
|
|
ShowDialog(OrderID); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
Main.getInstance().GetOrder("455283032140681216"); |
|
|
|
|
|
// if(OrderID.isEmpty()) |
|
|
|
|
|
// { |
|
|
|
|
|
// T.show(MainActivity.this, "无制作中饮品!"); |
|
|
|
|
|
// }else |
|
|
|
|
|
// { |
|
|
|
|
|
// ShowDialog(OrderID); |
|
|
|
|
|
// } |
|
|
//ShowFragment(heplerFragment, "系统帮助"); |
|
|
//ShowFragment(heplerFragment, "系统帮助"); |
|
|
break; |
|
|
break; |
|
|
case R.id.HomeMain://主页 |
|
|
case R.id.HomeMain://主页 |
|
@@ -317,27 +319,41 @@ public class MainActivity extends FragmentActivity implements View.OnClickListen |
|
|
for (BPA_SUBORDER k : sub) { |
|
|
for (BPA_SUBORDER k : sub) { |
|
|
ResGoodsMake make = new ResGoodsMake(); |
|
|
ResGoodsMake make = new ResGoodsMake(); |
|
|
make.recipes = QueryDB.GetGoodsSrecipeList(k.goodsID); |
|
|
make.recipes = QueryDB.GetGoodsSrecipeList(k.goodsID); |
|
|
make.good = QueryDB.GetGoodsId(k.goodsID); |
|
|
|
|
|
make.subOrder = k; |
|
|
|
|
|
|
|
|
|
|
|
make.makeMs = ""; |
|
|
|
|
|
make.makeProcess = 0; |
|
|
|
|
|
if (k.status == 0) { |
|
|
|
|
|
make.makeStatus = MakeStatus.等待制作; |
|
|
|
|
|
} else if (k.status == 1) { |
|
|
|
|
|
make.makeStatus = MakeStatus.制作中; |
|
|
|
|
|
} else { |
|
|
|
|
|
make.makeStatus = MakeStatus.制作完成; |
|
|
|
|
|
|
|
|
BPA_GOODS good= QueryDB.GetGoodsId(k.goodsID); |
|
|
|
|
|
if(good.name!=null) |
|
|
|
|
|
{ |
|
|
|
|
|
make.good = QueryDB.GetGoodsId(k.goodsID); |
|
|
|
|
|
make.subOrder = k; |
|
|
|
|
|
|
|
|
make.makeMs = ""; |
|
|
make.makeMs = ""; |
|
|
make.makeProcess = 100; |
|
|
|
|
|
for (ResGoodsRecipe recipe : make.recipes) { |
|
|
|
|
|
recipe.makeProcess = 100; |
|
|
|
|
|
|
|
|
make.makeProcess = 0; |
|
|
|
|
|
if (k.status == 0) { |
|
|
|
|
|
make.makeStatus = MakeStatus.等待制作; |
|
|
|
|
|
} else if (k.status == 1) { |
|
|
|
|
|
make.makeStatus = MakeStatus.制作中; |
|
|
|
|
|
} else { |
|
|
|
|
|
make.makeStatus = MakeStatus.制作完成; |
|
|
|
|
|
make.makeMs = ""; |
|
|
|
|
|
make.makeProcess = 100; |
|
|
|
|
|
for (ResGoodsRecipe recipe : make.recipes) { |
|
|
|
|
|
recipe.makeProcess = 100; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// if(!make.makeStatus.equals(MakeStatus.制作完成)) |
|
|
|
|
|
{ |
|
|
|
|
|
DataBus.getInstance().GoodsSMMake.add(make); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// if(!make.makeStatus.equals(MakeStatus.制作完成)) |
|
|
|
|
|
{ |
|
|
|
|
|
DataBus.getInstance().GoodsSMMake.add(make); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if(DataBus.getInstance().GoodsSMMake.size()<=0) |
|
|
|
|
|
{ |
|
|
|
|
|
runOnUiThread(new Runnable() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void run() { |
|
|
|
|
|
T.show(MainActivity.this, "无可制作的订单!"); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (alg == null) { |
|
|
if (alg == null) { |
|
|