Compare commits

..

47 Commits

Author SHA1 Message Date
youys bf2afe0d06 Update ExampleUnitTest.java
2 years ago
Xie Changrong 2adfd79d75 update
3 years ago
Xie Changrong 8a34df1f9b update
3 years ago
Xie Changrong e07320c2b0 update
3 years ago
Xie Changrong 24373b4580 update
3 years ago
Xie Changrong b529f2013b update
3 years ago
Xie Changrong c65e56df64 update
3 years ago
Xie Changrong b208d0aea3 update
3 years ago
HuaTao 4d08d4be05 update
3 years ago
LiTianhong 584478398e update
3 years ago
XieChangrong 8a2553b463 update
3 years ago
Fanyiwen 2627a361b6 update
3 years ago
Fanyiwen c98ab30e64 update
3 years ago
Fanyiwen c0b243ba73 update
3 years ago
Fanyiwen f6cb0a130f update
3 years ago
fanyiwen 76e33a15d4 修改布局
3 years ago
pyxu2pz5g 1348a3b6b6 Merge pull request '代码' (#18) from Fanyiwen_branch into master
3 years ago
Xie Changrong 69e9e55aac update
3 years ago
Xie Changrong d1f1936b09 update
3 years ago
Xie Changrong 7889a9e970 update
3 years ago
meickrq7f 0346955015 Merge pull request 'update' (#16) from dev into master
3 years ago
Xie Changrong fe9633f168 update
3 years ago
Xie Changrong 515900cd21 update
3 years ago
meickrq7f 907367270c Merge pull request '更新模型' (#15) from Litianhong_branch into master
3 years ago
Li Tianhong a8f0156c52 更新模型
3 years ago
meickrq7f 78e75ccd7b Merge pull request '更新文档' (#14) from Huatao_branch into master
3 years ago
HuaTao 6a708f9eb5 更新文档
3 years ago
Xie Changrong 31287ba213 Initial commit
3 years ago
Xie Changrong c9b91966e7 核心功能实现
3 years ago
Xie Changrong 1bee5f4b6d 加入模型
3 years ago
Xie Changrong 6d497797da 文档修改
3 years ago
FanYiWe 432db2dbd9 modle
3 years ago
FanYiWe 999025cef6 代码
3 years ago
FanYiWe f710a75090 文档
3 years ago
meickrq7f 3b1e54fea7 Merge pull request '设计书' (#12) from dev into master
3 years ago
XCR dde3be2d62 设计书
3 years ago
meickrq7f 1061e38ead Merge pull request '设计书' (#11) from dev into master
3 years ago
XCR 9f18899626 设计书
3 years ago
pyxu2pz5g 13c0def691 Merge pull request '添加功能:查询快件' (#9) from Fanyiwen_branch into dev
3 years ago
Fan Yiwen 18f7e176f2 查询功能
3 years ago
px24s7v3i 02c974bb75 Merge pull request '添加功能' (#8) from Huatao_branch into dev
3 years ago
Hua Tao 51f29639b8 tijoao
3 years ago
mjf2cowiz 2014c1e00e Merge pull request '添加功能:注册' (#7) from Litianhong_branch into dev
3 years ago
Li Tianhong 939e826907 注册功能
3 years ago
XCR 48ad34fe33 a
3 years ago
XCR 767361e98d delete
3 years ago
XCR 5875a28e74 注册
3 years ago

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="E:\SDK\avd\.android\avd\Pixel_XL_API_30.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-07-10T02:39:23.302314100Z" />
</component>
</project>

@ -9,6 +9,48 @@
<entry key="..\:/Logistics/app/src/main/res/layout/activity_main.xml" value="0.10126582278481013" /> <entry key="..\:/Logistics/app/src/main/res/layout/activity_main.xml" value="0.10126582278481013" />
<entry key="..\:/Logistics/app/src/main/res/layout/activity_sign_up.xml" value="0.1" /> <entry key="..\:/Logistics/app/src/main/res/layout/activity_sign_up.xml" value="0.1" />
<entry key="..\:/Logistics/app/src/main/res/layout/buttom.xml" value="0.15" /> <entry key="..\:/Logistics/app/src/main/res/layout/buttom.xml" value="0.15" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/border_input_box.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/button_shape.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/ic_launcher_background.xml" value="0.194" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/tab_menu_better.xml" value="0.1135" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/tab_menu_text.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/translucent_button.xml" value="0.194" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/translucent_edit.xml" value="0.1135" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_history.xml" value="0.22" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_main.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_main2.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_menu.xml" value="0.25" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_no_pick.xml" value="0.2" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_sign_up.xml" value="0.22" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_wait.xml" value="0.18" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/buttom.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/forget.xml" value="0.2630208333333333" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/fragment_my.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/item.xml" value="0.22" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment1.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment2.xml" value="0.18489583333333334" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment3.xml" value="0.2" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/pickup.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/tab1.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/top.xml" value="0.3717105263157895" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.1" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/drawable/bg_go.xml" value="0.255" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/drawable/border_input_box.xml" value="0.1" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/drawable/button_shape.xml" value="0.1" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/drawable/ic_launcher_background.xml" value="0.1" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/drawable/translucent_edit.xml" value="0.1555" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/activity_history.xml" value="0.2" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/activity_main.xml" value="0.264" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/activity_menu.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/activity_no_pick.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/activity_sign_up.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/forget.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/item.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment1.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment2.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment3.xml" value="0.20652173913043478" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/layout/pickup.xml" value="0.2" />
<entry key="..\:/无人物流/xcr_se/src/Logistics/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.255" />
</map> </map>
</option> </option>
</component> </component>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

@ -28,12 +28,20 @@ android {
} }
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
implementation files('libs/json-simple-1.1.jar')
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
implementation 'androidx.appcompat:appcompat:1.3.0' implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0' implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation files('libs\\mysql-connector-java-5.0.7.jar') implementation files('libs\\mysql-connector-java-5.0.7.jar')
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation "org.java-websocket:Java-WebSocket:1.4.0"
} }

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.logistics",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}

@ -1,16 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.logistics"> package="com.example.logistics">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@drawable/logo"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:usesCleartextTraffic="true"
android:name="com.example.logistics.tools.RCApplication"
android:roundIcon="@drawable/logo"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Logistics"> android:theme="@style/Theme.Logistics">
<activity <activity
android:name=".ui.MainActivity" android:name=".ui.HistoryUI"
android:exported="false" />
<activity
android:name=".ui.SearchUI"
android:exported="false" />
<activity
android:name=".ui.MenuActivity"
android:exported="false" />
<activity
android:name=".ui.LoginUI"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -18,7 +33,11 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".ui.SignUpActivity" /> <activity android:name=".ui.SignUpUI" />
<activity
android:name="com.journeyapps.barcodescanner.CaptureActivity"
android:screenOrientation="portrait"
tools:replace="screenOrientation" />
</application> </application>
</manifest> </manifest>

File diff suppressed because one or more lines are too long

@ -0,0 +1,120 @@
<!DOCTYPE html>
<html>
<head title="pickup">
<meta charset="utf-8" />
<script type="text/javascript" type="text/javascript">
function callJS(){
var ros = new ROSLIB.Ros({
url : 'ws://192.168.43.20:9090'
});
ros.on('connection', function() {
console.log('Connected to websocket server.');
});
ros.on('error', function(error) {
console.log('Error connecting to websocket server: ', error);
});
ros.on('close', function() {
console.log('Connection to websocket server closed.');
});
// 发布一个话题
var move_base= new ROSLIB.ActionClient({
ros : ros,
serverName : '/move_base',
actionName : 'move_base_msgs/MoveBaseAction'
});
var currentTime = new Date();
var secs = Math.floor(currentTime.getTime()/1000)
var nsecs = Math.round(1000000000*(currentTime.getTime()/1000-secs))
var goal = new ROSLIB.Goal({
actionClient: move_base,
goalMessage:{
target_pose:{
header:{
frame_id:'map',
stamp:{
secs: secs,
nsecs:nsecs
}
},
pose:{
position:{
x:-3.97, //-0.743 -0.0273 取件点
y:1.68, //3.00 -0.09
z:0.000
},
orientation:{
x:0.000,
y:0.000,
z:0.000,
w:1.000
}
}
}
}
});
goal.on('feedback', function(feedback) {
console.log('Feedback: ' + feedback.sequence);
});
goal.on('result', function(result) {
console.log('Final Result: ' + result.sequence);
});
ros.on('connection', function() {
console.log('Connected to websocket server.');
});
ros.on('error', function(error) {
console.log('Error connecting to websocket server: ', error);
});
ros.on('close', function() {
console.log('Connection to websocket server closed.');
});
//goal.send();
var cmdVel = new ROSLIB.Topic({
ros : ros,
name : '/cmd_vel',
messageType : 'geometry_msgs/Twist'
});
var twist = new ROSLIB.Message({
linear : {
x : 0.2,
y : 0.0,
z : 0.0
},
angular : {
x : 0.0,
y : 0.0,
z : 0.0
}
});
cmdVel.publish(twist);
}
</script>
</head>
<body>
<h1>Simple roslib Example</h1>
<p>Check your Web Console for output.</p>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -1,139 +0,0 @@
package com.example.logistics.dao;
import android.util.Log;
import com.example.logistics.entity.User;
import com.example.logistics.mysqlconnection.DBOpenHelper;
import com.google.android.material.behavior.HideBottomViewOnScrollBehavior;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.HashMap;
import java.sql.ResultSet;
import java.sql.Connection;
public class userDao {
private static final String TAG = "userDao";
public int login(String username, String password){
HashMap<String, Object> map = new HashMap<>();
Connection connection = DBOpenHelper.getConn();
int msg = 0;
try{
String sql = "select * from users where username = ?";
if(connection != null){
PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){
Log.e(TAG, "username: " + username);
ps.setString(1,username);
ResultSet rs = ps.executeQuery();
int count = rs.getMetaData().getColumnCount();
while(rs.next()){
for(int i = 1; i <= count; i++){
String field = rs.getMetaData().getColumnName(i);
map.put(field, rs.getString(field));
}
}
connection.close();
ps.close();
if(map.size() != 0){
StringBuilder s = new StringBuilder();
for(String key:map.keySet()){
if(key.equals("password")){
if(password.equals(map.get(key))){
msg = 1; //password correct
}else{
msg = 2; //password incorrect
}
break;
}
}
}else{
Log.e(TAG, "result is null");
msg = 3; //result is null
}
}else{
Log.e(TAG, "ps is null");
msg = 0;
}
}else{
Log.e(TAG, "connection is null");
msg = 0;
}
}catch (Exception e){
e.printStackTrace();
Log.d(TAG, "login bug: " + e.getMessage());
msg = 0;
}
return msg;
}
public User findUser(String username){
Connection connection = DBOpenHelper.getConn();
User user = null;
try{
String sql = "select * from users where username = ?";
if(connection != null){
PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){
ps.setString(1, username);
ResultSet rs = ps.executeQuery();
while(rs.next()){
int userId = rs.getInt(1);
String userName = rs.getString(2);
String passWord = rs.getString(3);
String phoneNum = rs.getString(4);
user = new User(userId, userName, passWord, phoneNum);
}
}
}
} catch (SQLException throwables) {
throwables.printStackTrace();
}
return user;
}
public boolean register(User user){
HashMap<String, Object> map = new HashMap<>();
Connection connection = DBOpenHelper.getConn();
try{
String sql = "insert into users(username, password, phonenum) values (?,?,?)";
if(connection != null){
PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){
ps.setString(1, user.getUserName());
ps.setString(2, user.getPassWord());
ps.setString(3, user.getPhoneNum());
int rs = ps.executeUpdate();
if(rs > 0){
return true;
}else{
return false;
}
}else{
return false;
}
}else{
return false;
}
}catch(Exception e){
e.printStackTrace();
Log.e(TAG, "异常 register");
return false;
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save