pull/29/head
Xie Changrong 3 years ago
parent c65e56df64
commit b529f2013b

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

@ -1,7 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head title="pickup">
<meta charset="utf-8" /> <meta charset="utf-8" />
<script type="text/javascript" type="text/javascript"> <script type="text/javascript" type="text/javascript">

@ -18,7 +18,7 @@ import java.util.Map;
public class goodManager { public class goodManager {
private static final String TAG = "goodDao"; private static final String TAG = "goodManager";
public int search(String id, String phonenum, Context context){//搜索快件位置id手机号 public int search(String id, String phonenum, Context context){//搜索快件位置id手机号
@ -89,6 +89,8 @@ public class goodManager {
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "search bug: " + e.getMessage()); Log.d(TAG, "search bug: " + e.getMessage());
msg = 0; msg = 0;
} finally {
} }
return msg; return msg;
} }
@ -121,8 +123,11 @@ public class goodManager {
return false; return false;
} }
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "delete bug" + e.getMessage()); Log.d(TAG, "delete bug" + e.getMessage());
}finally {
} }
return false; return false;
} }
@ -175,6 +180,8 @@ public class goodManager {
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "search bug: " + e.getMessage()); Log.d(TAG, "search bug: " + e.getMessage());
} finally {
} }
return datalist; return datalist;
} }
@ -235,6 +242,8 @@ public class goodManager {
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "login bug: " + e.getMessage()); Log.d(TAG, "login bug: " + e.getMessage());
msg = 0; msg = 0;
} finally {
} }
return msg; return msg;
} }

@ -15,7 +15,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class operationManager { public class operationManager {
private static final String TAG = "operationDao"; private static final String TAG = "operationManager";
public boolean add(String pickupcode, String phonenum){ public boolean add(String pickupcode, String phonenum){
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
@ -54,6 +54,8 @@ public class operationManager {
e.printStackTrace(); e.printStackTrace();
Log.e(TAG, "异常 add operation"); Log.e(TAG, "异常 add operation");
return false; return false;
}finally {
} }
} }
@ -98,6 +100,8 @@ public class operationManager {
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "search bug: " + e.getMessage()); Log.d(TAG, "search bug: " + e.getMessage());
}finally {
} }
return datalist; return datalist;
} }

@ -14,7 +14,7 @@ import java.sql.Connection;
public class userManager { public class userManager {
private static final String TAG = "userDao"; private static final String TAG = "userManager";
public int login(String username, String password){ public int login(String username, String password){
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
@ -71,6 +71,8 @@ public class userManager {
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "login bug: " + e.getMessage()); Log.d(TAG, "login bug: " + e.getMessage());
msg = 0; msg = 0;
} finally {
} }
return msg; return msg;
} }
@ -130,6 +132,8 @@ public class userManager {
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "login bug: " + e.getMessage()); Log.d(TAG, "login bug: " + e.getMessage());
msg = 0; msg = 0;
} finally {
} }
return msg; return msg;
} }
@ -158,6 +162,8 @@ public class userManager {
} }
} catch (SQLException throwables) { } catch (SQLException throwables) {
throwables.printStackTrace(); throwables.printStackTrace();
} finally {
} }
return user; return user;
} }
@ -193,6 +199,8 @@ public class userManager {
e.printStackTrace(); e.printStackTrace();
Log.e(TAG, "异常 register"); Log.e(TAG, "异常 register");
return false; return false;
} finally {
} }
} }
@ -230,6 +238,8 @@ public class userManager {
e.printStackTrace(); e.printStackTrace();
Log.d(TAG, "login bug: " + e.getMessage()); Log.d(TAG, "login bug: " + e.getMessage());
msg = 0; msg = 0;
} finally {
} }
return msg; return msg;
} }

@ -22,6 +22,8 @@ public class DBOpenHelper {
e.printStackTrace(); e.printStackTrace();
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
} finally {
} }
return conn; return conn;
} }

@ -32,6 +32,8 @@ public class MD5Utils {
e.printStackTrace(); e.printStackTrace();
//发送异常return空字符串 //发送异常return空字符串
return ""; return "";
} finally {
} }
} }
} }

@ -27,7 +27,7 @@ import java.util.Map;
public class HistoryUI extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener { public class HistoryUI extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener {
private String TAG = "HistoryActivity"; private String TAG = "HistoryUI";
private ListView lv_history; private ListView lv_history;
private ArrayAdapter<String> arr_adapter; private ArrayAdapter<String> arr_adapter;
private SimpleAdapter simp_adapter; private SimpleAdapter simp_adapter;

@ -32,7 +32,7 @@ public class LoginUI extends Activity {
int flag = 0; //flag = 0 是用户名登录;=1是手机号 int flag = 0; //flag = 0 是用户名登录;=1是手机号
// 调用Actvity // 调用Actvity
private String TAG = "LoginActivity"; private String TAG = "LoginUI";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);

@ -18,6 +18,8 @@ import com.example.logistics.R;
public class MenuActivity extends AppCompatActivity implements View.OnClickListener{ public class MenuActivity extends AppCompatActivity implements View.OnClickListener{
private String TAG = "MenuActivity";
private LinearLayout ly_one,ly_two,ly_three; private LinearLayout ly_one,ly_two,ly_three;
private TextView mTextView1,mTextView2,mTextView3; private TextView mTextView1,mTextView2,mTextView3;
private TextView mTextNum1,mTextNum2,mTextNum3; private TextView mTextNum1,mTextNum2,mTextNum3;

@ -93,6 +93,8 @@ public class PickUpUI extends Fragment implements View.OnClickListener{
js.put("op", "confirm"); js.put("op", "confirm");
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} finally {
} }
flag = 1; flag = 1;
@ -113,6 +115,8 @@ public class PickUpUI extends Fragment implements View.OnClickListener{
js.put("op", "confirm"); js.put("op", "confirm");
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} finally {
} }
client.send(js.toString()); client.send(js.toString());
@ -154,6 +158,8 @@ public class PickUpUI extends Fragment implements View.OnClickListener{
client.connectBlocking(); client.connectBlocking();
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
}finally {
} }
} }
}.start(); }.start();
@ -196,6 +202,8 @@ public class PickUpUI extends Fragment implements View.OnClickListener{
} catch (JSONException jsonException) { } catch (JSONException jsonException) {
jsonException.printStackTrace(); jsonException.printStackTrace();
} finally {
} }
} }
@ -296,6 +304,8 @@ public class PickUpUI extends Fragment implements View.OnClickListener{
js.put("op", "connect"); js.put("op", "connect");
} catch (JSONException jsonException) { } catch (JSONException jsonException) {
jsonException.printStackTrace(); jsonException.printStackTrace();
} finally {
} }
if (null != client) { if (null != client) {

@ -27,7 +27,8 @@ import java.util.Map;
public class SearchUI extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener { public class SearchUI extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener {
private String TAG = "NoPickActivity"; private String TAG = "SearchUI";
private ListView lv_nopick; private ListView lv_nopick;
private ArrayAdapter<String> arr_adapter; private ArrayAdapter<String> arr_adapter;
private SimpleAdapter simp_adapter; private SimpleAdapter simp_adapter;

@ -16,6 +16,9 @@ import androidx.annotation.Nullable;
import com.example.logistics.R; import com.example.logistics.R;
public class SetUI extends Fragment implements View.OnClickListener{ public class SetUI extends Fragment implements View.OnClickListener{
private String TAG = "SetUI";
private LinearLayout ll_waiting; private LinearLayout ll_waiting;
private LinearLayout ll_history; private LinearLayout ll_history;
private LinearLayout ll_exit; private LinearLayout ll_exit;

@ -89,6 +89,8 @@ public class Example {
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
System.out.println("Process was interrupted."); System.out.println("Process was interrupted.");
} finally {
} }
/* /*
Service<Empty, Topics> topicService = Service<Empty, Topics> topicService =
@ -123,12 +125,16 @@ public class Example {
Topic<Clock> clockTopic = new Topic<Clock>("/clock", Clock.class, client); Topic<Clock> clockTopic = new Topic<Clock>("/clock", Clock.class, client);
clockTopic.subscribe(); clockTopic.subscribe();
try { try {
Thread.sleep(20000);} catch(InterruptedException ex) {} Thread.sleep(20000);} catch(InterruptedException ex) {}finally {
}
Clock cl = null; Clock cl = null;
try { try {
cl = clockTopic.take(); // just gets one cl = clockTopic.take(); // just gets one
} }
catch (InterruptedException ex) {} catch (InterruptedException ex) {}finally {
}
cl.print(); cl.print();
cl.clock.nsecs++; cl.clock.nsecs++;
clockTopic.unsubscribe(); clockTopic.unsubscribe();

@ -136,6 +136,8 @@ public class Topic<T extends Message> extends LinkedBlockingQueue<T> implements
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
break; break;
} finally {
} }
} }
} }

@ -53,6 +53,8 @@ public abstract class Message {
catch (MessageException ex) { catch (MessageException ex) {
// should be changed to be a hooked method to give library user control // should be changed to be a hooked method to give library user control
System.out.println(ex.getMessage()); System.out.println(ex.getMessage());
}finally {
} }
} }
@ -165,6 +167,9 @@ public abstract class Message {
} }
catch (IllegalAccessException ex) { catch (IllegalAccessException ex) {
ex.printStackTrace(); ex.printStackTrace();
}
finally {
} }
return fo; return fo;
} }
@ -190,6 +195,9 @@ public abstract class Message {
} }
catch (ClassCastException ex) { catch (ClassCastException ex) {
throw new RuntimeException("copyFrom error", ex); throw new RuntimeException("copyFrom error", ex);
}
finally {
} }
// ReflectiveOperationException is not available on Android (Java 1.6) // ReflectiveOperationException is not available on Android (Java 1.6)
/* /*

@ -58,7 +58,12 @@ public class ROSBridgeClient extends ROSClient {
try { try {
result = client.connectBlocking(); result = client.connectBlocking();
} }
catch (InterruptedException ex) {} catch (InterruptedException ex) {
}
finally {
}
} }
return result; return result;
} }
@ -68,7 +73,12 @@ public class ROSBridgeClient extends ROSClient {
try { try {
client.closeBlocking(); client.closeBlocking();
} }
catch (InterruptedException ex) {} catch (InterruptedException ex) {
}
finally {
}
} }
@Override @Override

@ -162,6 +162,9 @@ public class JSON {
} }
catch (IllegalAccessException ex) { catch (IllegalAccessException ex) {
ex.printStackTrace(); ex.printStackTrace();
}
finally {
} }
return fo; return fo;
} }
@ -178,6 +181,9 @@ public class JSON {
} }
catch (Throwable t) { catch (Throwable t) {
System.out.println(t.getMessage()); System.out.println(t.getMessage());
}
finally {
} }
r.close(); r.close();
return result; return result;
@ -214,7 +220,10 @@ public class JSON {
catch (Exception ex) { catch (Exception ex) {
//ex.printStackTrace(); //ex.printStackTrace();
return null; return null;
} }
finally {
}
} }
// Convert the JSON-Simple array to the indicated message, element-by-element // Convert the JSON-Simple array to the indicated message, element-by-element
@ -260,7 +269,10 @@ public class JSON {
catch (Exception ex) { catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
return null; return null;
} }
finally {
}
} }
// Convert an individual array or object element to a field in the Message, // Convert an individual array or object element to a field in the Message,

@ -61,6 +61,8 @@ public class ROSBridgeWebSocketClient extends WebSocketClient {
client = new ROSBridgeWebSocketClient(uri); client = new ROSBridgeWebSocketClient(uri);
} catch (URISyntaxException ex) { } catch (URISyntaxException ex) {
ex.printStackTrace(); ex.printStackTrace();
} finally {
} }
return client; return client;
} }
@ -114,6 +116,8 @@ public class ROSBridgeWebSocketClient extends WebSocketClient {
EventBus.getDefault().post(new PublishEvent(operation, publish.topic, content)); EventBus.getDefault().post(new PublishEvent(operation, publish.topic, content));
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} finally {
} }
System.out.println("Publish " + publish.topic); System.out.println("Publish " + publish.topic);
@ -126,6 +130,8 @@ public class ROSBridgeWebSocketClient extends WebSocketClient {
EventBus.getDefault().post(new PublishEvent(operation, serviceResponse.service, content)); EventBus.getDefault().post(new PublishEvent(operation, serviceResponse.service, content));
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} finally {
} }
System.out.println("Service Response " + serviceResponse.service); System.out.println("Service Response " + serviceResponse.service);
@ -167,6 +173,8 @@ public class ROSBridgeWebSocketClient extends WebSocketClient {
} catch (Exception ex) { } catch (Exception ex) {
System.out.println("Exception in Websocket close hack."); System.out.println("Exception in Websocket close hack.");
ex.printStackTrace(); ex.printStackTrace();
} finally {
} }
} }

@ -24,17 +24,17 @@ import java.util.concurrent.atomic.AtomicInteger;
@Slf4j @Slf4j
@ServerEndpoint("/result") @ServerEndpoint("/result")
@Component @Component
public class MessageManager { public class QueueManager {
@Autowired @Autowired
private GoodManager gmanager; private GoodManager gmanager;
private static String TAG = "SendObjectMessage"; private static String TAG = "SendObjectMessage";
private static AtomicInteger onlineCount = new AtomicInteger(0); private static AtomicInteger onlineCount = new AtomicInteger(0);
private static ConcurrentLinkedQueue<MessageManager> socket = new ConcurrentLinkedQueue<MessageManager>(); private static ConcurrentLinkedQueue<QueueManager> socket = new ConcurrentLinkedQueue<QueueManager>();
private Session session; private Session session;
private MessageManager mObject = null; private QueueManager mObject = null;
@OnOpen @OnOpen
public void onOpen(Session session) { public void onOpen(Session session) {
Loading…
Cancel
Save