Compare commits

...

9 Commits

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 488 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

@ -7,11 +7,11 @@
<deviceKey> <deviceKey>
<Key> <Key>
<type value="VIRTUAL_DEVICE_PATH" /> <type value="VIRTUAL_DEVICE_PATH" />
<value value="E:\SDK\avd\.android\avd\Pixel_XL_API_30.avd" /> <value value="D:\AndroidSDK\.android\.android\avd\Pixel_2_API_31.avd" />
</Key> </Key>
</deviceKey> </deviceKey>
</Target> </Target>
</targetSelectedWithDropDown> </targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-05-08T06:33:21.724571700Z" /> <timeTargetWasSelectedWithDropDown value="2022-06-14T12:27:15.523840400Z" />
</component> </component>
</project> </project>

@ -33,6 +33,24 @@
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/pickup.xml" value="0.5" /> <entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/pickup.xml" value="0.5" />
<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/tab1.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/top.xml" value="0.3717105263157895" /> <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>

@ -8,18 +8,18 @@
<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:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
android:name="com.example.logistics.tools.RCApplication" android:name="com.example.logistics.tools.RCApplication"
android:roundIcon="@mipmap/ic_launcher_round" 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.HistoryActivity" android:name=".ui.HistoryActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".ui.NoPickActivity" android:name=".ui.SearchActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".ui.MenuActivity" android:name=".ui.MenuActivity"

@ -20,7 +20,9 @@ public class goodManager {
private static final String TAG = "goodDao"; private static final String TAG = "goodDao";
public int search(String id, String phonenum, Context context){ public int search(String id, String phonenum, Context context){//搜索快件位置id手机号
Log.d(TAG, "search");
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
Connection connection = DBOpenHelper.getConn(); Connection connection = DBOpenHelper.getConn();
@ -28,9 +30,11 @@ public class goodManager {
int msg = 0; int msg = 0;
try{ try{
Log.d(TAG, "select goods");
String sql = "select * from goods where id = ?"; String sql = "select * from goods where id = ?";
if(connection != null){ if(connection != null){
Log.d(TAG, "connection!");
PreparedStatement ps = connection.prepareStatement(sql); PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){ if(ps != null){
Log.e(TAG, "id: " + id); Log.e(TAG, "id: " + id);
@ -47,13 +51,15 @@ public class goodManager {
connection.close(); connection.close();
ps.close(); ps.close();
if(map.size() != 0){ if(map.size() != 0){
Log.d(TAG, "map isnot null");
StringBuilder s = new StringBuilder(); StringBuilder s = new StringBuilder();
for(String key:map.keySet()){ for(String key:map.keySet()){
if(key.equals("phonenum")){ if(key.equals("phonenum")){
String strphone = String.valueOf(map.get(key)); String strphone = String.valueOf(map.get(key));
Log.d("abc", strphone); Log.d(TAG, strphone);
if(phonenum.equals(strphone.substring(7,11))){ if(phonenum.equals(strphone.substring(7,11))){
msg = 1; //phonenum correct msg = 1; //phonenum correct
Log.d(TAG, "phonenum correct");
AlertDialog.Builder builder = new AlertDialog.Builder(context); AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle("快件位置"); builder.setTitle("快件位置");
builder.setMessage("\n第 "+ map.get("shelfnum")+ " 号货架\n第 " + map.get("floornum")+ " 层"); builder.setMessage("\n第 "+ map.get("shelfnum")+ " 号货架\n第 " + map.get("floornum")+ " 层");
@ -61,6 +67,7 @@ public class goodManager {
builder.show(); builder.show();
Looper.loop(); Looper.loop();
}else{ }else{
Log.d(TAG, "phonenum incorrect");
msg = 2; //phonenum incorrect msg = 2; //phonenum incorrect
} }
break; break;
@ -90,9 +97,11 @@ public class goodManager {
Connection connection = DBOpenHelper.getConn(); Connection connection = DBOpenHelper.getConn();
try{ try{
Log.d(TAG, "delete");
String sql = "delete from goods where id = ?"; String sql = "delete from goods where id = ?";
if(connection != null){ if(connection != null){
Log.d(TAG, "successCon");
PreparedStatement ps = connection.prepareStatement(sql); PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){ if(ps != null){
Log.e(TAG, "pickupcode: " + pickupcode); Log.e(TAG, "pickupcode: " + pickupcode);
@ -121,13 +130,15 @@ public class goodManager {
public List<Map<String, Object>> nopick(String phonenum){ public List<Map<String, Object>> nopick(String phonenum){
Connection connection = DBOpenHelper.getConn(); Connection connection = DBOpenHelper.getConn();
Log.d(TAG, "nopick goods");
List<Map<String, Object>> datalist; List<Map<String, Object>> datalist;
datalist = new ArrayList<Map<String, Object>>(); datalist = new ArrayList<Map<String, Object>>();
try{ try{
Log.d(TAG, "select");
String sql = "select * from goods where phonenum = ?"; String sql = "select * from goods where phonenum = ?";
if(connection != null){ if(connection != null){
Log.d(TAG, "successCon");
PreparedStatement ps = connection.prepareStatement(sql); PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){ if(ps != null){
Log.e(TAG, "phonenum: " + phonenum); Log.e(TAG, "phonenum: " + phonenum);
@ -136,13 +147,18 @@ public class goodManager {
int count = rs.getMetaData().getColumnCount(); int count = rs.getMetaData().getColumnCount();
while(rs.next()){ while(rs.next()){
Log.d(TAG, "getResult");
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
for(int i = 1; i <= count; i++){ for(int i = 1; i <= count; i++){
String field = rs.getMetaData().getColumnName(i); String field = rs.getMetaData().getColumnName(i);
if(field.equals("id")){ if(field.equals("id")){
Log.d(TAG, "id");
map.put(field, rs.getString(field)); map.put(field, rs.getString(field));
} }
if(field.equals("time")) { if(field.equals("time")) {
Log.d(TAG, "time");
map.put(field, rs.getString(field)); map.put(field, rs.getString(field));
} }
} }
@ -170,9 +186,11 @@ public class goodManager {
int msg = 0; int msg = 0;
try{ try{
Log.d(TAG, "pickup");
String sql = "select * from goods where id=?"; String sql = "select * from goods where id=?";
if(connection != null){ if(connection != null){
Log.d(TAG, "successCon");
PreparedStatement ps = connection.prepareStatement(sql); PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){ if(ps != null){
Log.e(TAG, "pickupcode: " + pickupcode); Log.e(TAG, "pickupcode: " + pickupcode);
@ -189,6 +207,7 @@ public class goodManager {
connection.close(); connection.close();
ps.close(); ps.close();
if(map.size() != 0){ if(map.size() != 0){
Log.d(TAG, "map has value");
StringBuilder s = new StringBuilder(); StringBuilder s = new StringBuilder();
for(String key:map.keySet()){ for(String key:map.keySet()){
if(key.equals("phonenum")){ if(key.equals("phonenum")){

@ -7,9 +7,9 @@ import java.sql.SQLException;
public class DBOpenHelper { public class DBOpenHelper {
private static String diver = "com.mysql.jdbc.Driver"; private static String diver = "com.mysql.jdbc.Driver";
//加入utf-8是为了后面往表中输入中文表中不会出现乱码的情况 //加入utf-8是为了后面往表中输入中文表中不会出现乱码的情况
private static String url = "jdbc:mysql://192.168.43.203:3306/logistics?characterEncoding=utf-8"; private static String url = "jdbc:mysql://192.168.43.139:3306/logistics?characterEncoding=utf-8";
private static String user = "root";//用户名 private static String user = "root";//用户名
private static String password = "";//密码 private static String password = "123...iamfan";//密码
/* /*
* *
* */ * */

@ -20,13 +20,13 @@ import androidx.fragment.app.Fragment;
import com.example.logistics.R; import com.example.logistics.R;
import com.example.logistics.manager.goodManager; import com.example.logistics.manager.goodManager;
public class SearchUI extends Fragment implements View.OnClickListener{ public class FindActivity extends Fragment implements View.OnClickListener{
private Context mContext; private Context mContext;
private Button mButton; private Button mButton;
private EditText mPickUpCode; private EditText mPickUpCode;
private EditText mPhoneNum; private EditText mPhoneNum;
public SearchUI(){ public FindActivity(){
} }
@Nullable @Nullable

@ -93,7 +93,7 @@ public class MenuActivity extends AppCompatActivity implements View.OnClickListe
mTextView1.setSelected(true); mTextView1.setSelected(true);
mTextNum1.setVisibility(View.INVISIBLE); mTextNum1.setVisibility(View.INVISIBLE);
if (mFrag1 == null) { if (mFrag1 == null) {
mFrag1 = new SearchUI(); mFrag1 = new FindActivity();
transaction.add(R.id.fragment_container, mFrag1); transaction.add(R.id.fragment_container, mFrag1);
@ -106,7 +106,7 @@ public class MenuActivity extends AppCompatActivity implements View.OnClickListe
mTextView2.setSelected(true); mTextView2.setSelected(true);
mTextNum2.setVisibility(View.INVISIBLE); mTextNum2.setVisibility(View.INVISIBLE);
if (mFrag2 == null) { if (mFrag2 == null) {
mFrag2 = new PickUpUI(); mFrag2 = new PickUpActivity();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("user", owner); bundle.putString("user", owner);
mFrag2.setArguments(bundle); mFrag2.setArguments(bundle);
@ -120,7 +120,7 @@ public class MenuActivity extends AppCompatActivity implements View.OnClickListe
mTextView3.setSelected(true); mTextView3.setSelected(true);
mTextNum3.setVisibility(View.INVISIBLE); mTextNum3.setVisibility(View.INVISIBLE);
if (mFrag3 == null) { if (mFrag3 == null) {
mFrag3 = new MeUI(); mFrag3 = new SetActivity();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("user", owner); bundle.putString("user", owner);
mFrag3.setArguments(bundle); mFrag3.setArguments(bundle);

@ -38,7 +38,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URI; import java.net.URI;
public class PickUpUI extends Fragment implements View.OnClickListener{ public class PickUpActivity extends Fragment implements View.OnClickListener{
private Button mButton; private Button mButton;
private Context mContext; private Context mContext;
@ -58,7 +58,7 @@ public class PickUpUI extends Fragment implements View.OnClickListener{
int flag = 0; //flag=0:chushi int flag = 0; //flag=0:chushi
public PickUpUI(){ public PickUpActivity(){
} }
@Nullable @Nullable

@ -25,7 +25,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class NoPickActivity extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener { public class SearchActivity extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener {
private String TAG = "NoPickActivity"; private String TAG = "NoPickActivity";
private ListView lv_nopick; private ListView lv_nopick;
@ -113,7 +113,7 @@ public class NoPickActivity extends Activity implements OnItemClickListener, OnS
@Override @Override
public void handleMessage(Message msg){ public void handleMessage(Message msg){
if(msg.what == 1){ if(msg.what == 1){
simp_adapter=new SimpleAdapter(NoPickActivity.this, dataList, R.layout.item, new String[]{"id","time"}, new int[]{R.id.np_id,R.id.np_time}); simp_adapter=new SimpleAdapter(SearchActivity.this, dataList, R.layout.item, new String[]{"id","time"}, new int[]{R.id.np_id,R.id.np_time});
lv_nopick.setAdapter(simp_adapter); lv_nopick.setAdapter(simp_adapter);
} }
} }

@ -15,14 +15,14 @@ import androidx.annotation.Nullable;
import com.example.logistics.R; import com.example.logistics.R;
public class MeUI extends Fragment implements View.OnClickListener{ public class SetActivity extends Fragment implements View.OnClickListener{
private LinearLayout ll_waiting; private LinearLayout ll_waiting;
private LinearLayout ll_history; private LinearLayout ll_history;
private LinearLayout ll_exit; private LinearLayout ll_exit;
private Context mContext; private Context mContext;
private String user; private String user;
public MeUI(){ public SetActivity(){
} }
@Nullable @Nullable
@ -52,7 +52,7 @@ public class MeUI extends Fragment implements View.OnClickListener{
Intent intent; Intent intent;
switch(view.getId()){ switch(view.getId()){
case R.id.waiting: case R.id.waiting:
intent = new Intent(mContext, NoPickActivity.class); intent = new Intent(mContext, SearchActivity.class);
intent.putExtra("user", user); intent.putExtra("user", user);
startActivity(intent); startActivity(intent);
break; break;

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

Loading…
Cancel
Save