|
|
@@ -403,8 +403,8 @@ public class MainActivity extends BaseActivity {
|
|
|
private void pushTask(){
|
|
|
String title = sendMsg[0];
|
|
|
String robot = sendMsg[1];
|
|
|
- String target = sendMsg[2];
|
|
|
- String shelf = sendMsg[3];
|
|
|
+ String from = sendMsg[2];
|
|
|
+ String target = sendMsg[3];
|
|
|
if(StringUtils.isEmpty(title)){
|
|
|
ToastUtils.showToast(context, "功能码不能为空");
|
|
|
return;
|
|
|
@@ -413,22 +413,20 @@ public class MainActivity extends BaseActivity {
|
|
|
ToastUtils.showToast(context, "请指定机器人");
|
|
|
return;
|
|
|
}
|
|
|
- if("0".equals(target)){
|
|
|
- ToastUtils.showToast(context, "请指定目的地");
|
|
|
+ if("0".equals(from)){
|
|
|
+ ToastUtils.showToast(context, "请指来源地");
|
|
|
return;
|
|
|
}
|
|
|
- if("0".equals(shelf)){
|
|
|
- ToastUtils.showToast(context, "请指定货架");
|
|
|
+ if("0".equals(target)){
|
|
|
+ ToastUtils.showToast(context, "请指定目的地");
|
|
|
return;
|
|
|
}
|
|
|
if(robot==null)robot="";
|
|
|
+ if(from==null)from="";
|
|
|
if(target==null)target="";
|
|
|
- if(shelf==null)shelf="";
|
|
|
- String qrcode = title+","+robot+","+target+","+shelf;
|
|
|
+ String qrcode = title+","+robot+","+from+","+target;
|
|
|
SiteModel siteModel = null;
|
|
|
- if(!StringUtils.isEmpty(shelf)){
|
|
|
- siteModel = MainDao.getInstance().querySiteName(context, shelf);
|
|
|
- }else if(!StringUtils.isEmpty(target)){
|
|
|
+ if(!StringUtils.isEmpty(target)){
|
|
|
siteModel = MainDao.getInstance().querySiteName(context, target);
|
|
|
}
|
|
|
if(siteModel!=null) {
|