| | |
| | | import android.widget.Toast; |
| | | import androidx.appcompat.app.AppCompatActivity; |
| | | |
| | | import com.blankj.utilcode.util.CacheDiskUtils; |
| | | import com.blankj.utilcode.util.LogUtils; |
| | | import com.lotaai.canguiayw.device.DeviceMessage; |
| | | import com.lotaai.canguiayw.device.MessageType; |
| | | import com.lotaai.canguiayw.sqllitedb.Order; |
| | | import com.lotaai.canguiayw.sqllitedb.SqlliteDbManage; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | |
| | | Toast.makeText(context, "取餐码不能为空。", Toast.LENGTH_SHORT).show(); |
| | | return; |
| | | } else { |
| | | if (gridNo.length() > 5) { |
| | | if (gridNo.length() !=6) { |
| | | Toast.makeText(context, "取餐码输入错误,请重试。", Toast.LENGTH_SHORT).show(); |
| | | return; |
| | | } |
| | | //调用判断是否可以取餐 |
| | | takeCheckCode(""); |
| | | } |
| | | } else { |
| | | Button button = (Button) v; |
| | |
| | | finish(); |
| | | } |
| | | |
| | | public void takeCheckCode(String code){ |
| | | Order order = SqlliteDbManage.getInstance().selectOrtderByTakeCode(code); |
| | | if (order == null || order.getGridNo() == ""){ |
| | | //代表取餐码错误 |
| | | |
| | | }else { |
| | | //开门取餐,并弹出取餐号 |
| | | |
| | | } |
| | | } |
| | | |
| | | } |