asv2022.3.1
wanghao 2 weeks ago
parent 604b1800eb
commit 9c8cfb1467

@ -3,6 +3,297 @@
<component name="WizardSettings">
<option name="children">
<map>
<entry key="imageWizard">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="imageAssetPanel">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="actionbar">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="clipArt">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
<entry key="imagePath" value="C:\Users\wanghao\AppData\Local\Temp\ic_android_black_24dp.xml" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="text">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="textAsset">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="launcher">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="foregroundClipArt">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="imagePath" value="C:\Users\wanghao\AppData\Local\Temp\ic_android_black_24dp.xml" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="foregroundImage">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
<entry key="imagePath" value="D:\Vector.svg" />
<entry key="scalingPercent" value="77" />
<entry key="trimmed" value="true" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="foregroundText">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="foregroundTextAsset">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
<option name="values">
<map>
<entry key="backgroundAssetType" value="COLOR" />
<entry key="backgroundColor" value="ffffff" />
<entry key="outputName" value="ic_logo" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="launcherLegacy">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="clipArt">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
<entry key="imagePath" value="C:\Users\wanghao\AppData\Local\Temp\ic_android_black_24dp.xml" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="text">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="textAsset">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="notification">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="clipArt">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
<entry key="imagePath" value="C:\Users\wanghao\AppData\Local\Temp\ic_android_black_24dp.xml" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="text">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="textAsset">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="tvBanner">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="foregroundText">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="tvChannel">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="foregroundClipArt">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="imagePath" value="C:\Users\wanghao\AppData\Local\Temp\ic_android_black_24dp.xml" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="foregroundImage">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="foregroundText">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="foregroundTextAsset">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="color" value="000000" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
<entry key="vectorWizard">
<value>
<PersistentState>

@ -10,8 +10,8 @@ android {
applicationId "com.example.tyre"
minSdk 26
targetSdk 34
versionCode 1
versionName "1.0"
versionCode 2
versionName "2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

@ -3,6 +3,10 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.example.tyre">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
@ -14,49 +18,54 @@
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/logo"
android:icon="@mipmap/ic_logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/logo"
android:roundIcon="@mipmap/ic_logo"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".maintenance.TireScrapActivity"
android:exported="false" />
android:exported="false"
android:theme="@style/news" />
<activity
android:name=".maintenance.TireRepairActivity"
android:exported="false" />
android:exported="true"
android:theme="@style/MaterialComponents_style">
</activity>
<activity
android:name=".maintenance.WorkExecuteActivity"
android:exported="true"
android:theme="@style/news">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
android:theme="@style/news" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".maintenance.CreateWorkOrderActivity"
android:exported="false"
android:theme="@style/news" />
<activity
android:name=".maintenance.WorkOrderActivity"
android:exported="false"
android:theme="@style/news" />
android:exported="true"
android:theme="@style/news">
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
</activity>
<activity
android:name=".maintenance.NewHomePageActivity"
android:exported="true"
android:theme="@style/news">
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
</activity>
<activity android:name=".MainActivity2">
@ -85,16 +94,24 @@
</activity>
<activity
android:name=".HomePageActivity"
android:exported="true" />
android:exported="true"
android:theme="@style/news">
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
</activity>
<activity android:name=".TyreSearchActivity" />
<activity
android:name=".MainActivity"
android:exported="true">
android:exported="true"
android:theme="@style/Material3">
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".OutStoreHouseActivity"
@ -117,10 +134,10 @@
<activity
android:name=".SwitchActivity"
android:exported="false" />
<!-- android:authorities="${applicationId}.fileprovider"-->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:authorities="com.example.tyre"
android:exported="false"
android:grantUriPermissions="true">
<meta-data

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -306,7 +306,7 @@ public class DownActivity extends AppCompatActivity {
private void unregisterReceiver() {
unregisterReceiver(keyReceiver);
}
private void find(String epc) {
private void find(String epc) {//查询epc
OkGo.<String>post(MyUrl.url + "/tyre/tyre/pdaQueryTyreInfo").tag(this).params("tyreEpc", epc)
.execute(new StringCallback() {
@Override

@ -46,7 +46,7 @@ public class HomePageActivity extends AppCompatActivity {
chuku = binding.chuku;
zhuangxie = binding.zhuangxie;
huanwei = binding.huanwei;
zhijian = binding.zhijian;
// zhijian = binding.zhijian;
logout = binding.logout;
}
@ -76,10 +76,10 @@ public class HomePageActivity extends AppCompatActivity {
startActivity(intent);
});
binding.zhijian.setOnClickListener(v -> {
Intent intent = new Intent(this, CheckActivity.class);
startActivity(intent);
});
// binding.zhijian.setOnClickListener(v -> {
// Intent intent = new Intent(this, CheckActivity.class);
// startActivity(intent);
// });
binding.xxbd.setOnClickListener(v -> {
Intent intent = new Intent(this, TestActivity.class);

@ -372,7 +372,7 @@ public class InStoreHouseActivity extends AppCompatActivity implements AdapterVi
hideLoadingDialog();
String body = response.body();
Gson gson = new Gson();
InStoreSpinnerVo inStoreSpinnerVo = new InStoreSpinnerVo();
InStoreSpinnerVo inStoreSpinnerVo ;
inStoreSpinnerVo = gson.fromJson(body, InStoreSpinnerVo.class);
List<String> stringList = inStoreSpinnerVo.getKindList();
List<String> patternList = inStoreSpinnerVo.getPatternList();

@ -1,72 +1,97 @@
package com.example.tyre;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.DownloadManager;
import android.app.ProgressDialog;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Process;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import com.example.tyre.databinding.ActivityMainBinding;
import com.example.tyre.entity.AjaxResult;
import com.example.tyre.util.CommonDialog;
import com.example.tyre.util.MyUrl;
import com.example.tyre.util.SharedPreferencesUtils;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.FileCallback;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Progress;
import com.lzy.okgo.model.Response;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import org.json.JSONObject;
import java.io.File;
import cn.pda.serialport.Tools;
import com.example.tyre.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
private static final int PERMISSION_REQUEST_CODE = 1001;
private static final int REQUEST_PERMISSIONS = 100;
EditText loginName;
EditText loginPass;
Button loginLog;
CheckBox cbRemember;
TextView version;
private ActivityMainBinding binding;
// 声明进度条变量
private ProgressDialog progressDialog;
private static final int PERMISSION_REQUEST_CODE = 1001;
private BroadcastReceiver downloadReceiver;
private static final int REQUEST_PERMISSIONS = 100;
private long downloadId;
private DownloadManager downloadManager;
private String newVersionName;
private BroadcastReceiver onDownloadComplete = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
if (downloadId == id) {
SharedPreferencesUtils.putstring("local_app_version", newVersionName);
runOnUiThread(() -> {
// 这里更新界面上的 TextView
version.setText("当前版本: " + newVersionName); // ⭐ 修改:直接显示新版本
});
DownloadManager.Query query = new DownloadManager.Query();
query.setFilterById(id);
Cursor cursor = downloadManager.query(query);
if (cursor.moveToFirst()) {
int status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
if (status == DownloadManager.STATUS_SUCCESSFUL) {
String localUri =
cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
installApk(Uri.parse(localUri).getPath());
} else {
int reason = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_REASON));
Toast.makeText(context, "下载失败,错误码: " + reason, Toast.LENGTH_SHORT).show();
}
}
cursor.close();
}
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -104,6 +129,7 @@ public class MainActivity extends AppCompatActivity {
login(name, pass, isRemember);
});
}
/**
*
*/
@ -124,6 +150,7 @@ public class MainActivity extends AppCompatActivity {
checkAppUpdate();
}
}
/**
*
*/
@ -184,20 +211,30 @@ public class MainActivity extends AppCompatActivity {
}
});
}
/**
*
*/
private void showUpdateDialog(String downloadUrl, String serverVersion) {
this.newVersionName = serverVersion;
new AlertDialog.Builder(this)
AlertDialog alertDialog = new AlertDialog.Builder(this)
.setTitle("发现新版本 " + serverVersion)
.setMessage("检测到最新版本,是否立即下载并安装?")
.setPositiveButton("立即下载", (dialog, which) -> startDownload(downloadUrl))
.setNegativeButton("取消", null)
.setNegativeButton("取消", null).create();
alertDialog.setOnShowListener(dialogInterface -> {
// 修改确定按钮颜色
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE)
.setTextColor(getResources().getColor(android.R.color.black));
// 修改取消按钮颜色
alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE)
.setTextColor(getResources().getColor(android.R.color.darker_gray));
});
alertDialog
.show();
}
private String getVersionName() {
private String getVersionName() {
// 1. 先尝试从 SP 读取(这个值是上次下载更新时存进去的最新版本)
// 3. 如果 SP 里没有(说明是第一次安装或没更新过),读取 build.gradle 里的 versionName
@ -209,6 +246,7 @@ public class MainActivity extends AppCompatActivity {
}
return "1.0";
}
private int compareVersion(String v1, String v2) {
// 如果两个版本号完全相同直接返回0
if (v1.equals(v2)) {
@ -236,8 +274,10 @@ public class MainActivity extends AppCompatActivity {
}
return 0; // 相等
}
/**
*
*
* @param isRemember
*/
private void login(String name, String pass, boolean isRemember) {
@ -313,8 +353,10 @@ public class MainActivity extends AppCompatActivity {
break;
}
}
/**
* APK
*
* @param fileName (: "app-release.apk" "resourceName")
*/
private void startDownload(String fileName) {
@ -337,39 +379,6 @@ public class MainActivity extends AppCompatActivity {
Toast.makeText(this, "开始下载...", Toast.LENGTH_SHORT).show();
}
private BroadcastReceiver onDownloadComplete = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
if (downloadId == id) {
SharedPreferencesUtils.putstring("local_app_version", newVersionName);
runOnUiThread(() -> {
// 这里更新界面上的 TextView
version.setText("当前版本: " + newVersionName); // ⭐ 修改:直接显示新版本
});
DownloadManager.Query query = new DownloadManager.Query();
query.setFilterById(id);
Cursor cursor = downloadManager.query(query);
if (cursor.moveToFirst()) {
int status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
if (status == DownloadManager.STATUS_SUCCESSFUL) {
String localUri = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
installApk(Uri.parse(localUri).getPath());
} else {
int reason = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_REASON));
Toast.makeText(context, "下载失败,错误码: " + reason, Toast.LENGTH_SHORT).show();
}
}
cursor.close();
}
}
};
private void installApk(String apkPath) {
File file = new File(apkPath);
if (!file.exists()) {
@ -396,11 +405,13 @@ public class MainActivity extends AppCompatActivity {
Toast.makeText(this, "无法安装应用: " + e.getMessage(), Toast.LENGTH_LONG).show();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
// unregisterReceiver(onDownloadComplete);
// unregisterReceiver(onDownloadComplete);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
@ -412,4 +423,31 @@ public class MainActivity extends AppCompatActivity {
}
}
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
boolean isKeyboardShown = v != null && (v instanceof EditText) && isKeyboardShowing(getCurrentFocus(), this);
if (isKeyboardShown) {
Rect outRect = new Rect();
v.getGlobalVisibleRect(outRect);
if (!outRect.contains((int)ev.getRawX(), (int)ev.getRawY())) {
hideSoftKeyboard(this);
}
}
}
return super.dispatchTouchEvent(ev);
}
private void hideSoftKeyboard(Activity activity) {
InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
}
private boolean isKeyboardShowing(View v, Context context) {
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
return imm.isAcceptingText();
}
}

@ -21,19 +21,20 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.android.hdhe.uhf.reader.UhfReader;
import com.android.hdhe.uhf.readerInterface.TagModel;
import com.example.tyre.databinding.ActivityUpBinding;
import com.example.tyre.entity.AjaxResult;
import com.example.tyre.entity.BaseCar;
import com.example.tyre.entity.BaseTyre;
import com.example.tyre.entity.EPC;
import com.example.tyre.entity.InStoreSpinnerVo;
import com.example.tyre.entity.Tyre;
import com.example.tyre.entity.UpTyre;
import com.example.tyre.maintenance.base.MyRecultCall;
import com.example.tyre.maintenance.base.MyResult;
import com.example.tyre.util.CarSelectionDialog;
import com.example.tyre.util.CommonDialog;
import com.example.tyre.util.MyUrl;
import com.example.tyre.util.PlayMusic;
import com.example.tyre.util.SharedPreferencesUtils;
import com.example.tyre.util.Util;
import com.google.gson.Gson;
@ -43,18 +44,15 @@ import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import androidx.appcompat.app.AppCompatActivity;
import cn.pda.serialport.Tools;
import com.example.tyre.databinding.ActivityUpBinding;
public class UpActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener{
private ActivityUpBinding binding;
public class UpActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener {
// 防抖延迟时间 (毫秒)
private static final long DEBOUNCE_DELAY = 500;
TextView EPC;
TextView azlw;
Spinner condition;
@ -65,6 +63,11 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
TextView th;
TextView zbh;
EditText car;
long lastTime;
long nextTime;
String min = "EC0001012026010100000001"; // 左边界(包含)
String max = "EC0001012026010100100000"; // 右边界(包含)
private ActivityUpBinding binding;
private boolean isStart = true;
private ProgressDialog progressDialog;
private boolean runFlag = true;
@ -72,13 +75,52 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
private UhfReader manager; // UHF manager,UHF Operating handle
private ArrayList<EPC> listEPC;
private ArrayList<String> listepc = new ArrayList<String>();
long lastTime;
long nextTime;
private Toast mToast;
private Toast toast;
private KeyReceiver keyReceiver;
String min = "EC0001012026010100000001"; // 左边界(包含)
String max = "EC0001012026010100100000"; // 右边界(包含)
// 用于存储最后一次扫描到的 EPC
private String lastScannedEpc;
// 用于处理防抖逻辑的 Handler
private Handler debounceHandler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
if (msg.what == 1 && lastScannedEpc != null) {
// 延迟时间到,执行查询
showLoadingDialog();
if (isInRange(lastScannedEpc, min, max)) {
// 查询车辆数据方法
findCar(lastScannedEpc);
} else {
find(lastScannedEpc);
}
lastScannedEpc = null; // 清空,等待下一次扫描
}
return true;
}
});
/**
*
*
* @param target
* @param min
* @param max
* @return true=false=
*/
public static boolean isInRange(String target, String min, String max) {
// 空值校验,避免空指针异常
if (target == null || min == null || max == null) {
return false;
}
// compareTo规则
// 1. 字符串相等返回0
// 2. 目标字符串 > 对比字符串 返回正数;
// 3. 目标字符串 < 对比字符串 返回负数。
// 因此target >= min 等价于 target.compareTo(min) >= 0
// target <= max 等价于 target.compareTo(max) <= 0。
return target.compareTo(min) >= 0 && target.compareTo(max) <= 0;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -112,38 +154,33 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
private void setupClickListeners() {
binding.ok.setOnClickListener(v -> {
String rfid=EPC.getText().toString();
String rfid = EPC.getText().toString();
String carNo = car.getText().toString();
String millage = start.getText().toString();
String wheel = azlw.getText().toString();
String selfNo = zbh.getText().toString();
if (rfid == null || rfid.isEmpty())
{
if (rfid == null || rfid.isEmpty()) {
new CommonDialog(UpActivity.this).setMessage("请扫描轮胎!").show();
return;
}
if (carNo == null || carNo.isEmpty())
{
if (carNo == null || carNo.isEmpty()) {
new CommonDialog(UpActivity.this).setMessage("请选择安装车辆!").show();
return;
}
if (millage == null || millage.isEmpty())
{
if (millage == null || millage.isEmpty()) {
new CommonDialog(UpActivity.this).setMessage("请输入起始里程!").show();
return;
}
if (wheel == null || wheel.isEmpty())
{
if (wheel == null || wheel.isEmpty()) {
new CommonDialog(UpActivity.this).setMessage("请选择安装轮位!").show();
return;
}
if (selfNo == null || selfNo.isEmpty())
{
if (selfNo == null || selfNo.isEmpty()) {
new CommonDialog(UpActivity.this).setMessage("请输入自编号!").show();
return;
}
up_insert(rfid,carNo,millage,wheel,selfNo);
up_insert(rfid, carNo, millage, wheel, selfNo);
showLoadingDialog();
});
@ -154,8 +191,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
binding.searchButton.setOnClickListener(v -> {
String carNo = car.getText().toString();
if (carNo == null || carNo.isEmpty())
{
if (carNo == null || carNo.isEmpty()) {
new CommonDialog(UpActivity.this).setMessage("请输入车牌号!").show();
return;
}
@ -164,9 +200,6 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
});
}
@Override
public void onResume() {
super.onResume();
@ -178,13 +211,13 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
registerReceiver();
}
@Override
public void onPause() {
startFlag = false;
super.onPause();
unregisterReceiver();
}
@Override
protected void onDestroy() {
startFlag = false;
@ -192,44 +225,6 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
super.onDestroy();
}
class InventoryThread extends Thread {
private List<TagModel> tagList;
byte[] accessPassword = Tools.HexString2Bytes("00000000");
@Override
public void run() {
super.run();
while (runFlag) {
if (startFlag) {
tagList = manager.inventoryRealTime(); //实时盘存
if (tagList != null && !tagList.isEmpty()) {
//播放提示音
Util.play(1, 0);
for (TagModel tag : tagList) {
if (tag == null) {
String epcStr = "";
// String epcStr = new String(epc);
addToList(listEPC, epcStr, (byte) -1);
} else {
String epcStr = Tools.Bytes2HexString(tag.getmEpcBytes(), tag.getmEpcBytes().length);
// String epcStr = new String(epc);
byte rssi = tag.getmRssi();
addToList(listEPC, epcStr, rssi);
}
}
}
tagList = null;
try {
Thread.sleep(20);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
// EPC add to LISTVIEW
private void addToList(final List<EPC> list, final String epc, final byte rssi) {
runOnUiThread(new Runnable() {
@ -244,7 +239,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
list.add(epcTag);
listepc.add(epc);
}else {
} else {
for (int i = 0; i < list.size(); i++) {
EPC mEPC = list.get(i);
// list contain this epc
@ -266,23 +261,23 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
}
// play sound
lastTime = SystemClock.elapsedRealtime();
lastTime = SystemClock.elapsedRealtime();
long time = lastTime - nextTime;
if (time >= 60) {
Util.play(1, 0);
nextTime = lastTime;
Log.e("TAG", "run: " + time);
}
if (listepc != null && !listepc.isEmpty()){
if (listepc != null && !listepc.isEmpty()) {
startFlag = false;
String currentEpc = listepc.get(0);
if (isInRange(currentEpc, min, max)) {
//请求后台 查询车辆信息
// car.setText(currentEpc);
//请求后台
}else {
// 请求后台 查询车辆信息
// car.setText(currentEpc);
// 请求后台
} else {
EPC.setText(currentEpc);
//请求后台
// 请求后台
debounceHandler.removeMessages(1);
}
debounceHandler.removeMessages(1);
@ -295,58 +290,19 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
});
Log.e("EPC", "listepc:+ " + listepc);
}
/**
*
* @param target
* @param min
* @param max
* @return true=false=
*/
public static boolean isInRange(String target, String min, String max) {
// 空值校验,避免空指针异常
if (target == null || min == null || max == null) {
return false;
}
// compareTo规则
// 1. 字符串相等返回0
// 2. 目标字符串 > 对比字符串 返回正数;
// 3. 目标字符串 < 对比字符串 返回负数。
// 因此target >= min 等价于 target.compareTo(min) >= 0
// target <= max 等价于 target.compareTo(max) <= 0。
return target.compareTo(min) >= 0 && target.compareTo(max) <= 0;
}
// 防抖延迟时间 (毫秒)
private static final long DEBOUNCE_DELAY = 500;
// 用于存储最后一次扫描到的 EPC
private String lastScannedEpc;
// 用于处理防抖逻辑的 Handler
private Handler debounceHandler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
if (msg.what == 1 && lastScannedEpc != null) {
// 延迟时间到,执行查询
showLoadingDialog();
if (isInRange(lastScannedEpc, min, max)){
//查询车辆数据方法
findCar(lastScannedEpc);
}else {
find(lastScannedEpc);
}
lastScannedEpc = null; // 清空,等待下一次扫描
}
return true;
}
});
private void clearData() {
listEPC.removeAll(listEPC);
listepc.removeAll(listepc);
}
private void showLoadingDialog() {
progressDialog = new ProgressDialog(this);
progressDialog.setMessage("数据加载中...");
progressDialog.setCancelable(false);
progressDialog.show();
}
private void hideLoadingDialog() {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
@ -360,19 +316,14 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
}
}
// 添加缺失的方法
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
private void up_insert(String rfid,String carNo,String millage,String wheel,String selfNo) {
OkGo.<String>post(MyUrl.url + "/tyre/install/PdaInstallTyre").tag(this)
.params("tyreRfid", rfid)
.params("mileage", millage)
.params("carNo", carNo)
.params("wheelPostion", wheel)
.params("selfNo", selfNo)
.params("CreateBy", SharedPreferencesUtils.getstring("user","admin"))
.execute(new StringCallback() {
private void up_insert(String rfid, String carNo, String millage, String wheel, String selfNo) {
OkGo.<String>post(MyUrl.url + "/tyre/install/PdaInstallTyre").tag(this).params("tyreRfid", rfid).params("mileage", millage).params("carNo", carNo).params("wheelPostion", wheel).params("selfNo", selfNo).params("CreateBy", SharedPreferencesUtils.getstring("user", "admin")).execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
hideLoadingDialog();
@ -394,6 +345,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
}
});
}
private void handleResponse(AjaxResult result) {
switch (result.getCode()) {
case "500":
@ -404,6 +356,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
break;
}
}
// 基本信息查询
private void findCar(String carNumber) {
OkGo.<String>post(MyUrl.url + "/tyre/car/queryCarByRfid").tag(this).params("rfid", carNumber).execute(new StringCallback() {
@ -418,7 +371,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
// 空值处理:若字段为 null 则显示空字符串
String carNo = safeGetString(baseCar.getCarNo());
car.setText(carNo);
}else {
} else {
new CommonDialog(UpActivity.this).setMessage("请检查车辆芯片绑定数据!").show();
}
} catch (JsonSyntaxException e) {
@ -427,6 +380,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
}
});
}
// 基本信息查询
private void find(String epc) {
OkGo.<String>post(MyUrl.url + "/tyre/tyre/pdaQueryTyreInfo").tag(this).params("tyreEpc", epc).execute(new StringCallback() {
@ -442,7 +396,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
String TyreNo = safeGetString(baseTyre.getTyreNo());
th.setText(TyreNo);
zbh.setText(baseTyre.getSelfNo());
}else {
} else {
new CommonDialog(UpActivity.this).setMessage("系统无此轮胎!").show();
th.setText("");
zbh.setText("");
@ -453,37 +407,11 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
}
});
}
private String safeGetString(String value) {
return value == null || "null".equals(value) ? "" : value;
}
private class KeyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
int keyCode = intent.getIntExtra("keyCode", 0);
if (keyCode == 0) {
keyCode = intent.getIntExtra("keycode", 0);
}
boolean keyDown = intent.getBooleanExtra("keydown", false);
if (keyDown) {
if (toast == null) {
// toast = Toast.makeText(OutStoreHouseActivity.this, "KeyReceiver:keyCode = down" + keyCode, Toast.LENGTH_SHORT);
} else {
// toast.setText("KeyReceiver:keyCode = down" + keyCode);
}
// toast.show();
switch (keyCode) {
case KeyEvent.KEYCODE_F1:
case KeyEvent.KEYCODE_F2:
case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5:
//扫描
startFlag = true;
break;
}
}
}
}
private void registerReceiver() {
keyReceiver = new KeyReceiver();
IntentFilter filter = new IntentFilter();
@ -491,21 +419,23 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
filter.addAction("android.intent.action.FUN_KEY");
registerReceiver(keyReceiver, filter);
}
private void unregisterReceiver() {
unregisterReceiver(keyReceiver);
}
private void check_spinner() {
Gson gson = new Gson();
OkGo.<String>post(MyUrl.url + "/system/dict/data//wheelPositionList").execute(new StringCallback() {
OkGo.<String>post(MyUrl.url + "/system/dict/data/wheelPositionList").execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
hideLoadingDialog();
String body = response.body();
List<String> stringList =new ArrayList<>();
List<String> stringList = new ArrayList<>();
stringList = gson.fromJson(body, new TypeToken<List<String>>() {
}.getType());
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(UpActivity.this, android.R.layout.simple_list_item_1, stringList);
ArrayAdapter<String> arrayAdapter =
new ArrayAdapter<>(UpActivity.this, android.R.layout.simple_list_item_1, stringList);
condition.setAdapter(arrayAdapter);
}
});
@ -522,24 +452,28 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
});
}
private void car_spinner(String carNo) {
OkGo.<String>post(MyUrl.url + "/tyre/car/PdaQueryCarList")
.tag(this).params("carNo", carNo)
.execute(new StringCallback() {
OkGo.<MyResult>post(MyUrl.url + "/tyre/car/PdaQueryCarList").tag(this).params("carNo", carNo)
.execute(new MyRecultCall(progressDialog, this) {
@Override
public void onSuccess(Response<String> response) {
hideLoadingDialog();
String body = response.body();
Gson gson=new Gson();
List<BaseCar> baseCarList = gson.fromJson(body, new TypeToken<List<BaseCar>>(){}.getType());
Log.e("EPC", "listepc:+ " + baseCarList.size());
if (baseCarList!=null && baseCarList.size()>0){
List<String> carNoList = new ArrayList<>();
for (BaseCar car : baseCarList) {
carNoList.add(car.getCarNo());
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var myResult = response.body();
if (myResult.getCode() == 0) {
Gson gson = new Gson();
List<BaseCar> baseCarList = gson.fromJson(myResult.getJson(), new TypeToken<List<BaseCar>>() {
}.getType());
Log.e("EPC", "listepc:+ " + baseCarList.size());
if (baseCarList != null && baseCarList.size() > 0) {
List<String> carNoList = new ArrayList<>();
for (BaseCar car : baseCarList) {
carNoList.add(car.getCarNo());
}
// 显示自定义弹窗
showCarSelectionDialog(carNoList);
}
// 显示自定义弹窗
showCarSelectionDialog(carNoList);
}
}
});
@ -570,4 +504,72 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
// });
class InventoryThread extends Thread {
byte[] accessPassword = Tools.HexString2Bytes("00000000");
private List<TagModel> tagList;
@Override
public void run() {
super.run();
while (runFlag) {
if (startFlag) {
tagList = manager.inventoryRealTime(); // 实时盘存
if (tagList != null && !tagList.isEmpty()) {
// 播放提示音
Util.play(1, 0);
for (TagModel tag : tagList) {
if (tag == null) {
String epcStr = "";
// String epcStr = new String(epc);
addToList(listEPC, epcStr, (byte) -1);
} else {
String epcStr =
Tools.Bytes2HexString(tag.getmEpcBytes(), tag.getmEpcBytes().length);
// String epcStr = new String(epc);
byte rssi = tag.getmRssi();
addToList(listEPC, epcStr, rssi);
}
}
}
tagList = null;
try {
Thread.sleep(20);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
private class KeyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
int keyCode = intent.getIntExtra("keyCode", 0);
if (keyCode == 0) {
keyCode = intent.getIntExtra("keycode", 0);
}
boolean keyDown = intent.getBooleanExtra("keydown", false);
if (keyDown) {
if (toast == null) {
// toast = Toast.makeText(OutStoreHouseActivity.this, "KeyReceiver:keyCode = down" + keyCode, Toast.LENGTH_SHORT);
} else {
// toast.setText("KeyReceiver:keyCode = down" + keyCode);
}
// toast.show();
switch (keyCode) {
case KeyEvent.KEYCODE_F1:
case KeyEvent.KEYCODE_F2:
case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5:
// 扫描
startFlag = true;
break;
}
}
};
}
}

@ -21,6 +21,15 @@ public class BaseCar
/** 所属车队 */
private String team;
private String line;
public String getLine() {
return line;
}
public void setLine(String line) {
this.line = line;
}
public void setId(Long id)
{

@ -1,45 +0,0 @@
package com.example.tyre.maintenance;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.google.gson.Gson;
import java.text.SimpleDateFormat;
public class BaseActivity extends AppCompatActivity {
public SimpleDateFormat dateFormat ;
public ProgressDialog dialog;
public Context context;
public Gson gson;
@SuppressLint("SimpleDateFormat")
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
context = this;
dateFormat = new SimpleDateFormat("yyyy-MM-dd");
gson=new Gson();
initDialog();
}
public void onBackClick(View view) {
finish();
}
private void initDialog() {
dialog = new ProgressDialog(context);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCanceledOnTouchOutside(false);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("loading...");
}
}

@ -1,6 +1,8 @@
package com.example.tyre.maintenance;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
@ -13,25 +15,36 @@ import androidx.databinding.DataBindingUtil;
import com.example.tyre.R;
import com.example.tyre.databinding.ActivityCreateWorkOrderBinding;
import com.example.tyre.entity.BaseCar;
import com.example.tyre.maintenance.base.BaseActivity;
import com.example.tyre.maintenance.base.MyRecultCall;
import com.example.tyre.maintenance.base.MyResult;
import com.example.tyre.maintenance.dialog.TipResultDialog;
import com.example.tyre.util.MyUrl;
import com.example.tyre.util.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import okhttp3.RequestBody;
public class CreateWorkOrderActivity extends BaseActivity {
private TipResultDialog tipDialog;
private ActivityCreateWorkOrderBinding binding;
private ListPopupWindow lpw;
private boolean isSearch = false;
private List<BaseCar> baseCarList;
private Map<String, Object> submitMap;
private final Handler handler = new Handler(Looper.getMainLooper());
private Runnable searchRunnable;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityCreateWorkOrderBinding binding;
binding = DataBindingUtil.setContentView(this, R.layout.activity_create_work_order);
tipDialog = new TipResultDialog(this, this);
binding.createWorkCarNo.addTextChangedListener(new TextWatcher() {
@ -48,42 +61,59 @@ public class CreateWorkOrderActivity extends BaseActivity {
@Override
public void afterTextChanged(Editable s) {
Log.e("TAG", "afterTextChanged:" + s);
if (isSearch && s.length() >= 4) {
// 搜索
selectCarNo(s.toString());
if (searchRunnable != null) {
handler.removeCallbacks(searchRunnable);
}
isSearch=true;
// Start search after 1 second delay
searchRunnable = () -> selectCarNo(s.toString());
handler.postDelayed(searchRunnable, 1000);
// 搜索
// selectCarNo(s.toString());
isSearch = true;
}
});
lpw = new ListPopupWindow(this);
lpw.setAnchorView(binding.createWorkCarNo);
lpw.setWidth(400);
lpw.setHeight(400);
submitMap = new HashMap<>();
lpw.setOnItemClickListener((parent, view, position, id) -> {
isSearch=false;
binding.createWorkCarNo.setText(parent.getItemAtPosition(position).toString());
isSearch = false;
BaseCar baseCar = baseCarList.get(position);
submitMap.put("vehicleId", baseCar.getId());
String carNo = baseCar.getCarNo();
submitMap.put("plateNumber", carNo);
binding.createWorkCarNo.setText(carNo);
lpw.dismiss();
});
}
private void selectCarNo(String carNo) {
OkGo.<String>post(MyUrl.url + "/tyre/car/PdaQueryCarList")
.tag(this)
.params("carNo", carNo)
.execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
String body = response.body();
List<BaseCar> baseCarList = gson.fromJson(body, new TypeToken<List<BaseCar>>() {
}.getType());
OkGo.<MyResult>post(MyUrl.url + "/tyre/car/PdaQueryCarList").tag(this).params("carNo", carNo).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 0) {
if (baseCarList == null || baseCarList.isEmpty())
return;
List<String> carNoList = new ArrayList<>(baseCarList.size());
baseCarList.forEach(car -> carNoList.add(car.getCarNo()));
lpw.setAdapter(new ArrayAdapter<>(context, android.R.layout.simple_list_item_1, carNoList));
lpw.show();
}
});
baseCarList = gson.fromJson(body.getJson(), new TypeToken<List<BaseCar>>() {
}.getType());
if (baseCarList == null || baseCarList.isEmpty()) return;
List<String> carNoList = new ArrayList<>(baseCarList.size());
baseCarList.forEach(car -> carNoList.add(car.getCarNo()));
lpw.setAdapter(new ArrayAdapter<>(context, android.R.layout.simple_list_item_1, carNoList));
lpw.show();
return;
}
tipDialog.show(false,null, body.getMsg(), false);
}
});
}
@ -91,8 +121,27 @@ public class CreateWorkOrderActivity extends BaseActivity {
}
// 提交数据
public void generateWorkOrder(View view) {
// dialog.show(true, "工单生成成功", true);
submitMap.put("typeCode", getTypeCode(binding.orderCreateType.getSelectedItem().toString()));
submitMap.put("factoryId", getDeptId(binding.orderCreateSite.getSelectedItem().toString()));
submitMap.put("createBy", SharedPreferencesUtils.getstring("user", "admin"));
submitMap.put("status", "PROCESSING");
submitMap.put("maintainDate",dateFormat.format(new Date()));
OkGo.<MyResult>post(MyUrl.url + "/tyre/order/PDAAddMaintenanceOrder")
.upRequestBody(RequestBody.create(JSON, gson.toJson(submitMap)))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 0) {
tipDialog.show(true,"发起成功!", "已加入【未完成】列表", true);
} else {
tipDialog.show(false,null, body.getMsg(), false);
}
}
});
}
}

@ -8,6 +8,7 @@ import androidx.databinding.DataBindingUtil;
import com.example.tyre.R;
import com.example.tyre.databinding.ActivityNewHomePageBinding;
import com.example.tyre.maintenance.base.BaseActivity;
public class NewHomePageActivity extends BaseActivity {
private ActivityNewHomePageBinding binding;
@ -22,41 +23,50 @@ public class NewHomePageActivity extends BaseActivity {
public void goActivity1(View view) {
intent.putExtra("title", "二级保养");
intent.putExtra("typeCode", "1");
startActivity(intent);
}
public void goActivity2(View view) {
intent.putExtra("title", "小修");
intent.putExtra("typeCode", "5");
startActivity(intent);
}
public void goActivity3(View view) {
intent.putExtra("title", "抢碎修");
intent.putExtra("typeCode", "2");
startActivity(intent);
}
public void goActivity4(View view) {
intent.putExtra("title", "月检");
intent.putExtra("typeCode", "4");
startActivity(intent);
}
public void goActivity5(View view) {
intent.putExtra("title", "拆报废车");
intent.putExtra("typeCode", "3");
startActivity(intent);
}
public void goActivity6(View view) {
intent.putExtra("title", "轮胎修补");
intent.putExtra("typeCode", "6");
startActivity(intent);
}
public void goActivity7(View view) {
intent.putExtra("title", "轮胎报废");
intent.putExtra("typeCode", "7");
startActivity(intent);
}
public void goAllWorkOrder(View view) {
intent.putExtra("title", "总工单列表");
intent.putExtra("typeCode", "");
startActivity(intent);
}

@ -1,16 +1,26 @@
package com.example.tyre.maintenance;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ObservableBoolean;
import android.os.Bundle;
import android.view.View;
import com.example.tyre.R;
import com.example.tyre.databinding.ActivityTireRepairBinding;
import com.example.tyre.maintenance.base.BaseActivity;
public class TireRepairActivity extends AppCompatActivity {
public class TireRepairActivity extends BaseActivity {
private ObservableBoolean blockState1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tire_repair);
ActivityTireRepairBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_tire_repair);
blockState1=new ObservableBoolean(false);
binding.setBlockState1(blockState1);
}
public void blockClick_1(View view) {
blockState1.set(!blockState1.get());
}
}

@ -5,8 +5,9 @@ import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.tyre.R;
import com.example.tyre.maintenance.base.BaseActivity;
public class TireScrapActivity extends AppCompatActivity {
public class TireScrapActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {

@ -1,17 +1,291 @@
package com.example.tyre.maintenance;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
import androidx.databinding.DataBindingUtil;
import android.os.Bundle;
import com.example.tyre.R;
import com.example.tyre.UpActivity;
import com.example.tyre.databinding.ActivityWorkExecuteBinding;
import com.example.tyre.entity.AjaxResult;
import com.example.tyre.entity.BaseCar;
import com.example.tyre.maintenance.base.BaseActivity;
import com.example.tyre.maintenance.base.MyRecultCall;
import com.example.tyre.maintenance.base.MyResult;
import com.example.tyre.maintenance.been.BaseTyre;
import com.example.tyre.maintenance.been.BizOrderTireDetail;
import com.example.tyre.maintenance.been.Order;
import com.example.tyre.maintenance.dialog.TipResultDialog;
import com.example.tyre.maintenance.dialog.TireChangeDialog;
import com.example.tyre.maintenance.dialog.TireUpdateDialog;
import com.example.tyre.util.CommonDialog;
import com.example.tyre.util.MyUrl;
import com.example.tyre.util.SharedPreferencesUtils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
public class WorkExecuteActivity extends AppCompatActivity {
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class WorkExecuteActivity extends BaseActivity {
private ActivityWorkExecuteBinding binding;
private Map<String, BaseTyre> tyreMap;
private TireUpdateDialog tireUpdateDialog;//点击轮胎弹窗
private Map<String, Object> orderSubmitMap;
private List<BizOrderTireDetail> tireDetails;
private List<File> fileList;
private TipResultDialog tipDialog;
private List<BaseTyre> baseTyreList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DataBindingUtil. setContentView(this,R.layout.activity_work_execute);
binding = DataBindingUtil.setContentView(this, R.layout.activity_work_execute);
Intent intent = getIntent();
String carNo = intent.getStringExtra("carNo");
binding.setCarNo(carNo);
tyreMap = new HashMap<>();
selectCarNo(carNo);
selectTire(carNo);
orderSubmitMap = new HashMap<>();
Order order = gson.fromJson(intent.getStringExtra("json"), Order.class);
orderSubmitMap.put("order", order);
tireDetails = new ArrayList<>();
fileList = new ArrayList<>();
orderSubmitMap.put("tireDetails", tireDetails);
binding.setSite(intent.getStringExtra("site"));
binding.setDate(intent.getStringExtra("maintainDate"));
tireUpdateDialog = new TireUpdateDialog(this, new TireUpdateDialog.TireUpdateDialogSaveListener() {
@Override
public void onSave(BizOrderTireDetail bizOrderTireDetail, File image) {
// 返回轮胎信息
bizOrderTireDetail.setOrderId(order.getOrderId());
tireDetails.add(bizOrderTireDetail);
fileList.add(image);
tireUpdateDialog.dismiss();
}
@Override
public void onTakePhoto() {
// 拍照
try {
teke_photo();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onChengeTong(String location) {
// 同车互换
}
});
tireClick();
tipDialog = new TipResultDialog(this, this);
}
// 点击轮胎
private void tireClick() {
binding.tireClick1.layoutTireInfo.setOnClickListener(view -> {
showDialog("左前轮");
});
binding.tireClick2.layoutTireInfo.setOnClickListener(view -> {
showDialog("右前轮");
});
binding.tireClick3.layoutTireInfo.setOnClickListener(view -> {
showDialog("左外轮");
});
binding.tireClick4.layoutTireInfo.setOnClickListener(view -> {
showDialog("左内轮");
});
binding.tireClick5.layoutTireInfo.setOnClickListener(view -> {
showDialog("右内轮");
});
binding.tireClick6.layoutTireInfo.setOnClickListener(view -> {
showDialog("右外轮");
});
}
// 显示轮胎弹窗
private void showDialog(String location) {
String s = binding.workLicheng.getText().toString();
if (s.isEmpty()) {
Toast.makeText(context, "先填写里程信息", Toast.LENGTH_SHORT).show();
return;
}
BaseTyre baseTyre = tyreMap.get(location);
if (baseTyre == null) {
Intent intent = new Intent(this, UpActivity.class);
intent.putExtra("state", true);
startActivity(intent);
}
tireUpdateDialog.setBaseTyre(baseTyre);
}
// 查询轮胎信息
private void selectTire(String carNo) {
OkGo.<String>post(MyUrl.url + "/tyre/tyre/getCarBingTire").tag(this).params("carNo", carNo)
.execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
baseTyreList = gson.fromJson(response.body(), new TypeToken<List<BaseTyre>>() {
}.getType());
tireUpdateDialog.setBaseTyreList(baseTyreList);
if (baseTyreList == null || baseTyreList.isEmpty()) return;
baseTyreList.forEach(tire -> {
String wheelPostion = tire.getWheelPostion();
tyreMap.put(wheelPostion, tire);
initTire(wheelPostion, tire);
});
}
});
/* .execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
// if (body.getCode() == 0) {
List<BaseTyre> baseTyreList =
gson.fromJson(body.getJson(), new TypeToken<List<BaseTyre>>() {
}.getType());
if (baseTyreList == null || baseTyreList.isEmpty()) return;
baseTyreList.forEach(tire -> {
String wheelPostion = tire.getWheelPostion();
tyreMap.put(wheelPostion, tire);
initTire(wheelPostion, tire);
});
// }
}
});*/
}
// 初始化轮胎信息
private void initTire(String wheelPostion, BaseTyre baseTyre) {
switch (wheelPostion) {
case "左前轮":
binding.setTire1(baseTyre);
break;
case "右前轮":
binding.setTire2(baseTyre);
break;
case "左外轮":
binding.setTire3(baseTyre);
break;
case "左内轮":
binding.setTire4(baseTyre);
break;
case "右内轮":
binding.setTire5(baseTyre);
break;
case "右外轮":
binding.setTire6(baseTyre);
break;
}
}
// 查询车辆信息
private void selectCarNo(String carNo) {
OkGo.<MyResult>post(MyUrl.url + "/tyre/car/PdaQueryCarList").tag(this).params("carNo", carNo).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 0) {
List<BaseCar> baseCarList = gson.fromJson(body.getJson(), new TypeToken<List<BaseCar>>() {
}.getType());
binding.setLine(baseCarList.get(0).getLine());
}
}
});
}
// 提交处理
public void submitWorkExecute(View view) {
Order order = (Order) orderSubmitMap.get("order");
order.setInputMileage(binding.workLicheng.getText().toString());
order.setDescription(binding.workBuchong.getText().toString());
Log.e("TAG", "提交:" + fileList.size());
Log.e("TAG", "提交:" + fileList.get(0).getPath());
OkGo.<MyResult>post(MyUrl.url + "/tyre/order/PDASaveMaintenanceOrder")
.params("json", gson.toJson(orderSubmitMap))
.addFileParams("files", fileList)
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 0) {
tipDialog.show(true, "处理完成!", "状态已变更为【已完成】,不可再次修改。", true);
return;
}
tipDialog.show(false, null, body.getMsg(), false);
}
});
}
// 返回照片
@Override
public void tekePhotoResult(String fileUrl, File file) {
super.tekePhotoResult(fileUrl, file);
Log.e("TAG", "拍照成功,路径是:" + fileUrl);
tireUpdateDialog.setImage(file);
}
// 删除实时表、卸车记录表
private void down_insert(String rfid, String carNo, String millage, String wheel, String patternDepth) {
OkGo.<String>post(MyUrl.url + "/tyre/install/PdaUnInstallTyre").tag(this)
.params("tyreRfid", rfid)
.params("mileage", millage)
.params("carNo", carNo)
.params("wheelPostion", wheel)
.params("patternDepth", patternDepth)
.params("CreateBy", SharedPreferencesUtils.getstring("user", "admin"))
.execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
String body = response.body();
Gson gson = new Gson();
AjaxResult ajaxResult = gson.fromJson(body, AjaxResult.class);
handleResponse(ajaxResult);
}
});
}
private void handleResponse(AjaxResult result) {
switch (result.getCode()) {
case "500":
new CommonDialog(this).setMessage(result.getMsg()).show();
break;
case "0":
new CommonDialog(this).setMessage(result.getMsg()).show();
break;
}
}
}

@ -13,14 +13,30 @@ import androidx.databinding.ObservableBoolean;
import com.example.tyre.R;
import com.example.tyre.databinding.ActivityWorkOrderBinding;
import com.example.tyre.maintenance.adapter.OrderAdapter;
import com.example.tyre.maintenance.base.BaseActivity;
import com.example.tyre.maintenance.base.MyRecultCall;
import com.example.tyre.maintenance.base.MyResult;
import com.example.tyre.maintenance.been.Order;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class WorkOrderActivity extends BaseActivity {
import okhttp3.RequestBody;
public class WorkOrderActivity extends BaseActivity implements OrderAdapter.SelectTagAdapterListener {
private ActivityWorkOrderBinding binding;
private ObservableBoolean status;
private DatePickerDialog datePickerDialog;
private ListPopupWindow listPopupWindow;
private List<Order> list;
private OrderAdapter adapter;
private String typeCode;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -28,7 +44,10 @@ public class WorkOrderActivity extends BaseActivity {
binding = DataBindingUtil.setContentView(this, R.layout.activity_work_order);
status = new ObservableBoolean(false);
binding.setStatus(status);
String title = getIntent().getStringExtra("title");
Intent intent = getIntent();
String title = intent.getStringExtra("title");
typeCode = intent.getStringExtra("typeCode");
binding.setTitle(title);
// 获取当前日期
Calendar calendar = Calendar.getInstance();
@ -36,33 +55,65 @@ public class WorkOrderActivity extends BaseActivity {
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
binding.workOrderDate.setText(dateFormat.format(calendar.getTime()));
datePickerDialog = new DatePickerDialog(this,
(view1, year1, monthOfYear, dayOfMonth) -> {
@SuppressLint("DefaultLocale")
String selectedDate =
year1 + "-" + String.format("%02d", (monthOfYear + 1)) + "-" + String.format("%02d", dayOfMonth);
binding.workOrderDate.setText(selectedDate);
}, year, month, day);
datePickerDialog = new DatePickerDialog(this, (view1, year1, monthOfYear, dayOfMonth) -> {
@SuppressLint("DefaultLocale") String selectedDate =
year1 + "-" + String.format("%02d", (monthOfYear + 1)) + "-" + String.format("%02d", dayOfMonth);
binding.workOrderDate.setText(selectedDate);
selectWorkOrder(selectedDate, getDeptId(binding.workOrderSite.getText().toString()), status.get() ? "COMPLETED" : "PROCESSING");
}, year, month, day);
// 初始化选择框
listPopupWindow = new ListPopupWindow(this);
listPopupWindow.setAnchorView(binding.workOrderSite);
String[] stringArray = getResources().getStringArray(R.array.zxzd);
listPopupWindow.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, stringArray));
listPopupWindow.setOnItemClickListener((parent, view, position, id) -> {
binding.workOrderSite.setText(stringArray[position]);
String text = stringArray[position];
binding.workOrderSite.setText(text);
listPopupWindow.dismiss();
selectWorkOrder(binding.workOrderDate.getText().toString(), getDeptId(text), status.get() ? "COMPLETED" : "PROCESSING");
});
adapter = new OrderAdapter(this, this);
binding.setAdapter(adapter);
}
private void selectWorkOrder(String selectedDate, int deptId, String state) {
Map<String, Object> params = new HashMap<>();
params.put("status", state);
params.put("maintainDate", selectedDate);
params.put("factoryId", deptId);
if (typeCode != null && !typeCode.isEmpty()) {
params.put("typeCode", typeCode);
}
OkGo.<MyResult>post(url + "/tyre/order/PDAGetMaintenanceOrder")
.upRequestBody(RequestBody.create(JSON, gson.toJson(params)))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 0) {
list = gson.fromJson(body.getJson(), new TypeToken<List<Order>>() {
}.getType());
adapter.setList(list);
adapter.notifyDataSetChanged();
}
}
});
}
// 选日期
public void selectDate(View view) {
datePickerDialog.show();
}
// 选站点
public void selectOrderSite(View view) {
listPopupWindow.show();
}
// 创建
public void goCreateWorkOrder(View view) {
startActivity(new Intent(this, CreateWorkOrderActivity.class));
@ -70,6 +121,33 @@ public class WorkOrderActivity extends BaseActivity {
public void switchStatus(View view) {
status.set(!status.get());
selectWorkOrder(binding.workOrderDate.getText().toString(), getDeptId(binding.workOrderSite.getText().toString()), status.get() ? "COMPLETED" : "PROCESSING");
}
// 执行工单
@Override
public void onTagClick(int position) {
Order order = list.get(position);
Intent intent = null;
String typeCode1 = order.getTypeCode();
if (typeCode1.equals("6")) {
intent = new Intent(this, TireRepairActivity.class);
}else if (typeCode1.equals("7")){
intent = new Intent(this, TireScrapActivity.class);
}else {
intent = new Intent(this, WorkExecuteActivity.class);
}
intent.putExtra("site", binding.workOrderSite.getText().toString());
intent.putExtra("carNo", order.getPlateNumber());
intent.putExtra("maintainDate", order.getMaintainDate());
intent.putExtra("json", gson.toJson(order));
startActivity(intent);
}
@Override
protected void onResume() {
super.onResume();
selectWorkOrder(binding.workOrderDate.getText().toString(), getDeptId(binding.workOrderSite.getText().toString()), "PROCESSING");
}
}

@ -0,0 +1,73 @@
package com.example.tyre.maintenance.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.example.tyre.BR;
import com.example.tyre.R;
import com.example.tyre.databinding.ItemOrderInfoBinding;
import com.example.tyre.maintenance.been.Order;
import java.util.List;
public class OrderAdapter extends RecyclerView.Adapter<OrderAdapter.MyViewHolder> {
private List<Order> list;
private Context context;
private LayoutInflater inflater;
private SelectTagAdapterListener listener;
public OrderAdapter(Context context, SelectTagAdapterListener listener) {
this.context = context;
inflater = LayoutInflater.from(context);
this.listener = listener;
}
public void setList(List<Order> list) {
this.list = list;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ItemOrderInfoBinding binding =
DataBindingUtil.inflate(inflater, R.layout.item_order_info, parent, false);
return new MyViewHolder(binding);
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
var tag = list.get(position);
holder.binding.setVariable(BR.item, tag);
holder.binding.itemOrderLayout.setOnClickListener(v -> {
listener.onTagClick(position);
});
}
@Override
public int getItemCount() {
return list == null ? 0 : list.size();
}
public interface SelectTagAdapterListener {
void onTagClick(int position);
}
public class MyViewHolder extends RecyclerView.ViewHolder {
private ItemOrderInfoBinding binding;
public MyViewHolder(@NonNull ItemOrderInfoBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
}
}

@ -0,0 +1,182 @@
package com.example.tyre.maintenance.base;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import com.example.tyre.util.MyUrl;
import com.google.gson.Gson;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import okhttp3.MediaType;
public class BaseActivity extends AppCompatActivity {
public SimpleDateFormat dateFormat;
public ProgressDialog dialog;
public Context context;
public Gson gson;
public String url;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");
// 拍照
private Uri img_uri;
private File outputImage;
@SuppressLint("SimpleDateFormat")
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
context = this;
dateFormat = new SimpleDateFormat("yyyy-MM-dd");
gson = new Gson();
initDialog();
url = MyUrl.url;
}
public void onBackClick(View view) {
finish();
}
private void initDialog() {
dialog = new ProgressDialog(context);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCanceledOnTouchOutside(false);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("loading...");
}
public int getDeptId(String name) {
if (name.equals("光明修理厂"))
return 200;
return 201;
}
public String getTypeCode(String typeName) {
if (typeName.equals("二级保养")) {
return "1";
} else if (typeName.equals("抢碎修")) {
return "2";
} else if (typeName.equals("拆报废车")) {
return "3";
} else if (typeName.equals("月检")) {
return "4";
} else if (typeName.equals("小修")) {
return "5";
} else if (typeName.equals("轮胎修补")) {
return "6";
}
return "7";
}
public static final int CAMERA_PHOTO = 1;
@SuppressLint("SimpleDateFormat")
public SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd_HHmmss");
public void teke_photo() throws IOException {
outputImage = new File(getExternalCacheDir(), "output_imgage" + format.format(new Date()) + ".jpg");
outputImage.createNewFile();
if (Build.VERSION.SDK_INT >= 24) {
img_uri = FileProvider.getUriForFile(this, "com.example.tyre", outputImage);
} else {
img_uri = Uri.fromFile(outputImage);
}
if (PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)) {
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra(MediaStore.EXTRA_OUTPUT, img_uri);
startActivityForResult(intent, CAMERA_PHOTO);
} else {
// 提示用户开户权限 拍照和读写sd卡权限
String[] perms =
{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA};
ActivityCompat.requestPermissions(this, perms, CAMERA_PHOTO);
}
}
// 拍照的回调
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
/* Bitmap compressedImageBitmap = BitmapFactory.decodeFile(outputImage.getPath());
// 选择压缩质量
int quality = 10;
// 创建一个字节数组输出流
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 将Bitmap压缩成JPEG格式并将压缩后的数据保存到字节数组输出流中
compressedImageBitmap.compress(Bitmap.CompressFormat.JPEG, quality, baos);
// 将字节数组输出流中的数据转换为字节数组
byte[] compressedImageData = baos.toByteArray();
// 清空字节数组输出流
baos.reset();
// 将压缩后的字节数组保存到文件中
FileOutputStream fos = null;
try {
fos = new FileOutputStream(outputImage);
fos.write(compressedImageData);
fos.flush();
fos.close();*/
tekePhotoResult(img_uri.toString(), outputImage);
/* } catch (FileNotFoundException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
}*/
}
}
public void tekePhotoResult(String fileUrl, File file) {
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
boolean isKeyboardShown = v != null && (v instanceof EditText) && isKeyboardShowing(getCurrentFocus(), this);
if (isKeyboardShown) {
Rect outRect = new Rect();
v.getGlobalVisibleRect(outRect);
if (!outRect.contains((int)ev.getRawX(), (int)ev.getRawY())) {
hideSoftKeyboard(this);
}
}
}
return super.dispatchTouchEvent(ev);
}
private void hideSoftKeyboard(Activity activity) {
InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
}
private boolean isKeyboardShowing(View v, Context context) {
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
return imm.isAcceptingText();
}
}

@ -0,0 +1,65 @@
package com.example.tyre.maintenance.base;
import android.app.ProgressDialog;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
import com.google.gson.Gson;
import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.model.Response;
import com.lzy.okgo.request.base.Request;
import okhttp3.ResponseBody;
/**
* @author wanghao
* @date 2023/11/20 14:27
*/
public class MyRecultCall extends AbsCallback<MyResult> {
private ProgressDialog dialog;
private Context context;
public MyRecultCall(ProgressDialog dialog, Context context) {
this.dialog = dialog;
this.context = context;
}
@Override
public MyResult convertResponse(okhttp3.Response response) throws Throwable {
ResponseBody body = response.body();
if (body == null) return null;
Gson gson = new Gson();
MyResult resust = gson.fromJson(body.string(), MyResult.class);
resust.setJson(gson.toJson(resust.getData()));
return resust;
}
@Override
public void onSuccess(Response<MyResult> response) {
dialog.dismiss();
// Log.e("网络请求情况", "onSuccess:");
}
@Override
public void onError(Response<MyResult> response) {
super.onError(response);
dialog.dismiss();
Log.e("网络请求情况", "onError:" );
Toast.makeText(context, "网络连接错误", Toast.LENGTH_SHORT).show();
}
@Override
public void onStart(Request<MyResult, ? extends Request> request) {
super.onStart(request);
dialog.show();
// Log.e("网络请求情况", "onStart:" );
}
@Override
public void onFinish() {
super.onFinish();
dialog.dismiss();
Log.e("网络请求情况", "onFinish:" );
}
}

@ -0,0 +1,62 @@
package com.example.tyre.maintenance.base;
/**
* @author wanghao
* @date 2023/12/21 15:31
*/
public class MyResult {
private int code;
private String msg;
private String json;
private Object data;
private Object rows;
private int total;
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public Object getRows() {
return rows;
}
public void setRows(Object rows) {
this.rows = rows;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
}

@ -64,6 +64,9 @@ public class BaseTyre extends BaseObservable {
private Long deptId;
public String getPatternDepth() {
if (patternDepth != null && !patternDepth.isEmpty()) {
return patternDepth + " mm";
}
return patternDepth;
}

@ -0,0 +1,156 @@
package com.example.tyre.maintenance.been;
import java.io.File;
import java.math.BigDecimal;
/**
* biz_order_tire_detail
*
* @author ruoyi
* @date 2026-04-17
*/
public class BizOrderTireDetail {
/**
* ID
*/
private Long detailId;
/**
* ID
*/
private Long orderId;
/**
* ID
*/
private Long positionId;
private String positionName;
/**
* ID
*/
private Long tireId;
/**
*
*/
private String tireCode;
/**
* mm10mm
*/
private String treadDepth;
private String remark;
/**
*
*/
private String tirePress;
/**
*
*/
private String tireStatus;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public void setDetailId(Long detailId) {
this.detailId = detailId;
}
public Long getDetailId() {
return detailId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Long getOrderId() {
return orderId;
}
public void setPositionId(Long positionId) {
this.positionId = positionId;
}
public Long getPositionId() {
return positionId;
}
public void setTireId(Long tireId) {
this.tireId = tireId;
}
public Long getTireId() {
return tireId;
}
public void setTireCode(String tireCode) {
this.tireCode = tireCode;
}
public String getTireCode() {
return tireCode;
}
public void setTreadDepth(String treadDepth) {
this.treadDepth = treadDepth;
}
public String getTreadDepth() {
return treadDepth;
}
public void setTirePress(String tirePress) {
this.tirePress = tirePress;
}
public String getTirePress() {
return tirePress;
}
public void setTireStatus(String tireStatus) {
this.tireStatus = tireStatus;
}
public String getTireStatus() {
return tireStatus;
}
public String getPositionName() {
return positionName;
}
public void setPositionName(String positionName) {
this.positionName = positionName;
// 118 右外轮
// 119 右内轮
// 120 左内轮
// 121 左外轮
// 122 右前轮
// 123 左前轮
if (positionName.equals("右外轮")) {
setPositionId(118L);
} else if (positionName.equals("右内轮")) {
setPositionId(119L);
} else if (positionName.equals("左内轮")) {
setPositionId(120L);
} else if (positionName.equals("左外轮")) {
setPositionId(121L);
} else if (positionName.equals("右前轮")) {
setPositionId(122L);
} else if (positionName.equals("左前轮")) {
setPositionId(123L);
}
}
}

@ -0,0 +1,200 @@
package com.example.tyre.maintenance.been;
import java.math.BigDecimal;
/**
* biz_maintenance_order
*
* @author yangwl
* @date 2026-04-16
*/
public class Order {
/**
* ID
*/
private Long orderId;
/**
*
*/
private String orderNo;
/**
* ID/ID
*/
private Long vehicleId;
/**
* 便
*/
private String plateNumber;
/**
*
*/
private String typeCode;
private String typeName;
/**
* /ID
*/
private Long factoryId;
/**
*
*/
private String inputMileage;
/**
*
*/
private BigDecimal lastMileage;
/**
*
*/
private String maintainDate;
/**
*
*/
private String description;
/**
* UNSTARTED, PROCESSING, COMPLETED
*/
private String status;
/**
* 12
*/
private String orderType;
private String createBy;
public String getCreateBy() {
return createBy;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public Long getVehicleId() {
return vehicleId;
}
public void setVehicleId(Long vehicleId) {
this.vehicleId = vehicleId;
}
public String getPlateNumber() {
return plateNumber;
}
public void setPlateNumber(String plateNumber) {
this.plateNumber = plateNumber;
}
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getTypeName() {
if (typeCode == null) {
typeName = "";
} else if (typeCode.equals("1")) {
typeName ="二级保养";
}else if (typeCode.equals("2")) {
typeName ="抢碎修";
}else if (typeCode.equals("3")) {
typeName ="拆报废车";
}else if (typeCode.equals("4")) {
typeName ="月检";
}else if (typeCode.equals("5")) {
typeName ="小修";
}else if (typeCode.equals("6")) {
typeName ="轮胎修补";
}else if (typeCode.equals("7")) {
typeName ="轮胎报废";
}
return typeName;
}
public Long getFactoryId() {
return factoryId;
}
public void setFactoryId(Long factoryId) {
this.factoryId = factoryId;
}
public String getInputMileage() {
return inputMileage;
}
public void setInputMileage(String inputMileage) {
this.inputMileage = inputMileage;
}
public BigDecimal getLastMileage() {
return lastMileage;
}
public void setLastMileage(BigDecimal lastMileage) {
this.lastMileage = lastMileage;
}
public String getMaintainDate() {
return maintainDate;
}
public void setMaintainDate(String maintainDate) {
this.maintainDate = maintainDate;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getOrderType() {
return orderType;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
}

@ -81,9 +81,10 @@ public class TipResultDialog extends Dialog {
};
}
public void show(boolean state, String info, boolean closeType) {
public void show(boolean state, String stateText, String info, boolean closeType) {
super.show();
binding.dialogState.setVisibility(state ? View.VISIBLE : View.GONE);
binding.dialogStateText.setText(stateText);
binding.dialogTip.setText(info);
if (closeType) {
countDownTimer.start();

@ -0,0 +1,148 @@
package com.example.tyre.maintenance.dialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import com.example.tyre.R;
import com.example.tyre.databinding.DialogTireChangeBinding;
import com.example.tyre.maintenance.been.BaseTyre;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class TireChangeDialog extends Dialog {
private DialogTireChangeBinding binding;
private List<BaseTyre> baseTyreList;
private Map<String, BaseTyre> tyreMap;
private String locationOld;
public TireChangeDialog(@NonNull Context context) {
super(context, R.style.MyMiddleDialogStyle);
binding =
DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_tire_change, null, false);
binding.dialogTitle1.setOnClickListener(view -> dismiss());
setContentView(binding.getRoot());
}
public void setLocationOld(String locationOld) {
this.locationOld = locationOld;
}
public void setBaseTyreList(List<BaseTyre> baseTyreList) {
this.baseTyreList = baseTyreList;
tyreMap = new HashMap<>();
baseTyreList.forEach(tire -> {
String wheelPostion = tire.getWheelPostion();
tyreMap.put(wheelPostion, tire);
if (tire.getTyreNo()==null||tire.getTyreNo().equals("")){
tire.setTyreNo("t:"+wheelPostion);
}
initTire(wheelPostion, tire);
});
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initDialogStyle();
binding.tireClick1.layoutTireInfo.setOnClickListener(view -> {
tireLayoutCllick("左前轮");
});
binding.tireClick2.layoutTireInfo.setOnClickListener(view -> {
tireLayoutCllick("右前轮");
});
binding.tireClick3.layoutTireInfo.setOnClickListener(view -> {
tireLayoutCllick("左外轮");
});
binding.tireClick4.layoutTireInfo.setOnClickListener(view -> {
tireLayoutCllick("左内轮");
});
binding.tireClick5.layoutTireInfo.setOnClickListener(view -> {
tireLayoutCllick("右内轮");
});
binding.tireClick6.layoutTireInfo.setOnClickListener(view -> {
tireLayoutCllick("右外轮");
});
}
private void tireLayoutCllick(String location) {
if (location.equals(this.locationOld)) {
Toast.makeText(getContext(), "当前轮胎位置与选择位置相同", Toast.LENGTH_SHORT).show();
return;
}
BaseTyre baseTyre = tyreMap.get(location);
BaseTyre baseTyreOld = tyreMap.get(this.locationOld);
if (baseTyre==null) {
Toast.makeText(getContext(), "当前轮胎位置不存在", Toast.LENGTH_SHORT).show();
return;
}
initTire(this.locationOld, baseTyre);
Log.e("TAG", "tireLayoutCllick:" + location+","+baseTyre.toString());
initTire(location, baseTyreOld);
Log.e("TAG", "tireLayoutCllick:" + location+","+baseTyreOld.toString());
}
/**
*
*/
private void initDialogStyle() {
Window window = getWindow();
if (window != null) {
window.setGravity(Gravity.BOTTOM);
WindowManager.LayoutParams params = window.getAttributes();
DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
params.width = displayMetrics.widthPixels;
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
window.setAttributes(params);
window.setBackgroundDrawableResource(android.R.color.transparent);
}
// 点击外部不关闭
setCanceledOnTouchOutside(false);
}
// 初始化轮胎信息
private void initTire(String wheelPostion, BaseTyre baseTyre) {
switch (wheelPostion) {
case "左前轮":
binding.setTire1(baseTyre);
break;
case "右前轮":
binding.setTire2(baseTyre);
break;
case "左外轮":
binding.setTire3(baseTyre);
break;
case "左内轮":
binding.setTire4(baseTyre);
break;
case "右内轮":
binding.setTire5(baseTyre);
break;
case "右外轮":
binding.setTire6(baseTyre);
break;
}
}
}

@ -0,0 +1,138 @@
package com.example.tyre.maintenance.dialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ObservableBoolean;
import com.example.tyre.R;
import com.example.tyre.databinding.DialogTireUpdateBinding;
import com.example.tyre.maintenance.been.BaseTyre;
import com.example.tyre.maintenance.been.BizOrderTireDetail;
import java.io.File;
import java.util.List;
public class TireUpdateDialog extends Dialog {
private DialogTireUpdateBinding binding;
private BaseTyre baseTyre;
private ObservableBoolean isupdate;
private BizOrderTireDetail bizOrderTireDetail;
private TireUpdateDialogSaveListener listener;
private File image;
private ObservableBoolean photoState;
private TireChangeDialog tireChangeDialog;
private List<BaseTyre> baseTyreList;
public void setBaseTyreList(List<BaseTyre> baseTyreList) {
this.baseTyreList = baseTyreList;
}
public TireUpdateDialog(@NonNull Context context, TireUpdateDialogSaveListener listener) {
super(context, R.style.MyMiddleDialogStyle);
binding =
DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_tire_update, null, false);
isupdate = new ObservableBoolean(false);
binding.setIsUpdate(isupdate);
bizOrderTireDetail = new BizOrderTireDetail();
binding.dialogTitle.setOnClickListener(view -> dismiss());
binding.dialogIsupdateSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> {
isupdate.set(isChecked);
});
// 保存按钮点击事件
binding.dialogTireUpdateSave.setOnClickListener(view -> {
String shendu = binding.dialogTireShendu1.getText().toString();
String taiya = binding.dialogTireTaiya1.getText().toString();
if (shendu.isEmpty() || taiya.isEmpty()) {
Toast.makeText(context, "请输入花纹深度和胎压", Toast.LENGTH_SHORT).show();
return;
}
if (image == null) {
Toast.makeText(context, "请上传轮胎照片", Toast.LENGTH_SHORT).show();
return;
}
bizOrderTireDetail.setRemark(binding.dialogTireRemark1.getText().toString());
bizOrderTireDetail.setTreadDepth(shendu);// 花纹深度
bizOrderTireDetail.setTirePress(taiya);// 胎压
listener.onSave(bizOrderTireDetail, image);
});
// 同车互换
binding.dialogButtonTong.setOnClickListener(view -> {
// listener.onChengeTong(baseTyre.getWheelPostion());
tireChangeDialog.setBaseTyreList(baseTyreList);
tireChangeDialog.setLocationOld(baseTyre.getWheelPostion());
tireChangeDialog.show();
});
// 拍照按钮点击事件
binding.dialogUpdatePhoto.setOnClickListener(view -> listener.onTakePhoto());
photoState = new ObservableBoolean(false);
binding.setPhotoState(photoState);
setContentView(binding.getRoot());
tireChangeDialog=new TireChangeDialog(context);
}
public void setBaseTyre(BaseTyre baseTyre) {
this.baseTyre = baseTyre;
binding.setTire(baseTyre);
bizOrderTireDetail = new BizOrderTireDetail();
bizOrderTireDetail.setTireId(baseTyre.getTyreId());
bizOrderTireDetail.setTireCode(baseTyre.getTyreNo());
bizOrderTireDetail.setPositionName(baseTyre.getWheelPostion());
photoState.set(false);
binding.dialogUpdatePhoto.setImageResource(R.mipmap.ic_xiangji);
show();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initDialogStyle();
}
/**
*
*/
private void initDialogStyle() {
Window window = getWindow();
if (window != null) {
window.setGravity(Gravity.BOTTOM);
WindowManager.LayoutParams params = window.getAttributes();
DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
params.width = displayMetrics.widthPixels;
params.height = (int) (displayMetrics.heightPixels * 0.9);
window.setAttributes(params);
window.setBackgroundDrawableResource(android.R.color.transparent);
}
// 点击外部不关闭
setCanceledOnTouchOutside(false);
}
public void setImage(File image) {
this.image = image;
photoState.set(true);
binding.dialogUpdatePhoto.setImageResource(R.mipmap.ic_duihao);
}
public interface TireUpdateDialogSaveListener {
void onSave(BizOrderTireDetail bizOrderTireDetail, File image);
void onTakePhoto();
void onChengeTong(String location);
}
}

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 选中状态的颜色 -->
<item android:color="@color/blue1_2" android:state_checked="true"/>
<!-- 未选中状态的颜色 -->
<item android:color="@color/blue1_3"/>
</selector>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 选中状态的颜色 -->
<item android:color="@color/blue1_1" android:state_checked="true"/>
<!-- 未选中状态的颜色 -->
<item android:color="@color/blue1_3"/>
</selector>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/blue1_1" android:state_selected="true"/>
<item android:color="@color/black"/>
</selector>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true">
<shape android:shape="rectangle">
<solid android:color="#E7F7F4" />
<corners android:radius="8dp" />
<stroke android:width="1dp" android:color="#58D48C" android:dashWidth="4dp" android:dashGap="2dp"/>
</shape>
</item>
<!-- 未选中状态:深色透明背景 -->
<item>
<shape android:shape="rectangle">
<corners android:radius="8dp" />
<solid android:color="@color/blue1_3" /> <!-- 浅白边框 -->
<stroke android:width="1dp" android:color="@color/textColor2" android:dashWidth="4dp" android:dashGap="2dp"/>
</shape>
</item>
</selector>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true">
<shape android:shape="rectangle">
<solid android:color="@color/blue1_2" />
<corners android:radius="8dp" />
<stroke android:width="1dp" android:color="@color/blue1_1" />
</shape>
</item>
<!-- 未选中状态:深色透明背景 -->
<item>
<shape android:shape="rectangle">
<corners android:radius="8dp" />
<solid android:color="@color/blue1_3" /> <!-- 浅白边框 -->
</shape>
</item>
</selector>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/blue1_2"/>
<corners android:radius="4dp"/>
</shape>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/black"/>
<corners android:radius="16dp"/>
</shape>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#4B84FE"/>
<solid android:color="@color/blue1_1"/>
<corners android:radius="10dp"/>
</shape>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<corners android:radius="16dp"/>
</shape>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/green1_2"/>
<corners android:radius="4dp"/>
</shape>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#E3E6EC"
<solid android:color="#F7F8F9"
/>
<corners android:radius="6dp"/>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F7F8F9"
/>
<corners android:topLeftRadius="12dp" android:topRightRadius="12dp"/>
</shape>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/orange1_2"/>
<corners android:radius="4dp"/>
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/bg_state_2"/>
<!-- 未选中状态:深色透明背景 -->
<item android:drawable="@drawable/bg_state_1" />
</selector>

@ -9,7 +9,7 @@
<shape>
<stroke
android:width="1dp"
android:color="#4B84FE" />
android:color="@color/blue1_1" />
<corners android:radius="8dp" />
<solid android:color="@color/white" />
</shape>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/buttonColor2" />
<corners android:radius="8dp" />
</shape>

@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#4B84FE" />
android:color="@color/blue1_1" />
<corners android:radius="8dp" />
</shape>

@ -0,0 +1,26 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="767"
android:viewportHeight="826">
<group android:scaleX="0.43694445"
android:scaleY="0.47055554"
android:translateX="215.93181"
android:translateY="218.66055">
<path
android:pathData="M232.9,627H508.68V654.58C508.68,669.81 521.03,682.15 536.26,682.15H563.84C579.07,682.15 591.42,669.81 591.42,654.58V627H619V406.36H646.58V296.05H619V213.31C619,182.85 594.3,158.15 563.84,158.15H177.74C147.27,158.15 122.58,182.85 122.58,213.31V296.05H95V406.36H122.58V627H150.16V654.58C150.16,669.81 162.51,682.15 177.74,682.15H205.32C220.55,682.15 232.9,669.81 232.9,654.58V627ZM177.74,406.36V213.31H563.84V406.36H177.74ZM177.74,461.52H563.84V571.84H177.74V461.52ZM536.26,489.1H425.95V544.26H536.26V489.1ZM315.63,489.1H205.32V544.26H315.63V489.1Z"
android:fillColor="#262626"/>
<path
android:pathData="M656.15,200.56C706,200.56 746.41,160.15 746.41,110.31L766.46,110.31C766.46,171.23 717.08,220.62 656.15,220.62V200.56ZM656.15,20.06C606.31,20.06 565.9,60.46 565.9,110.31L545.85,110.31C545.85,49.39 595.23,-0 656.15,0L656.15,20.06ZM656.16,160.45C683.85,160.45 706.29,138 706.29,110.31L726.35,110.31C726.35,149.08 694.92,180.5 656.16,180.5V160.45ZM656.16,60.17C628.46,60.17 606.02,82.62 606.02,110.31L585.96,110.31C585.96,71.54 617.39,40.11 656.16,40.11L656.16,60.17ZM641.97,124.49C649.8,132.32 662.5,132.32 670.34,124.49C678.17,116.66 678.17,103.96 670.34,96.13C662.5,88.29 649.8,88.29 641.97,96.13C634.14,103.96 634.14,116.66 641.97,124.49Z"
android:fillColor="#262626"/>
<path
android:pathData="M287,681.65C287,760.91 222.75,825.15 143.5,825.15C64.25,825.15 0,760.91 0,681.65C0,602.4 64.25,538.15 143.5,538.15C222.75,538.15 287,602.4 287,681.65Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M143.87,556.15C74.35,556.15 18,612.51 18,682.02C18,751.53 74.35,807.88 143.87,807.88C213.38,807.88 269.73,751.53 269.73,682.02C269.73,612.51 213.38,556.15 143.87,556.15ZM143.87,602.99C187.51,602.99 222.9,638.37 222.9,682.02C222.9,725.67 187.51,761.05 143.87,761.05C100.22,761.05 64.83,725.67 64.83,682.02C64.83,638.37 100.22,602.99 143.87,602.99Z"
android:fillColor="#262626"/>
<path
android:pathData="M118.87,707.08L95.56,720.52C105.31,732.65 119.29,740.63 134.69,742.85V716.02C128.72,714.47 123.26,711.39 118.87,707.07V707.08ZM152.26,716.02V742.85C167.74,740.62 181.79,732.56 191.54,720.32L168.26,706.89C163.84,711.3 158.31,714.46 152.26,716.02ZM143.47,658.59C137.26,658.59 131.3,661.05 126.91,665.44C122.52,669.84 120.05,675.79 120.05,682C120.05,688.21 122.52,694.17 126.91,698.56C131.3,702.95 137.26,705.42 143.47,705.42C149.68,705.42 155.63,702.95 160.03,698.56C164.42,694.17 166.88,688.21 166.88,682C166.88,675.79 164.42,669.84 160.03,665.44C155.63,661.05 149.68,658.59 143.47,658.59ZM82,682C82,690.29 83.64,698.2 86.61,705.41L109.8,692.03C108.83,688.77 108.34,685.4 108.34,682C108.34,678.88 108.75,675.84 109.51,672.96L86.24,659.53C83.5,666.49 82,674.07 82,682ZM200.79,659.77L177.49,673.22C179.06,679.32 178.96,685.72 177.22,691.77L200.42,705.17C203.42,697.82 204.95,689.95 204.94,682C204.94,674.16 203.47,666.66 200.79,659.77ZM152.26,621.15L152.26,647.98C158.65,649.64 164.45,653.06 168.98,657.85L192.16,644.48C182.4,631.8 168.09,623.44 152.26,621.15H152.26ZM94.94,644.27L118.14,657.66C122.65,652.97 128.38,649.62 134.69,647.99V621.16C118.95,623.43 104.7,631.72 94.95,644.27L94.94,644.27Z"
android:fillColor="#262626"/>
</group>
</vector>

@ -4,6 +4,6 @@
android:viewportWidth="12"
android:viewportHeight="8">
<path
android:fillColor="#4B84FE"
android:fillColor="@color/blue1_1"
android:pathData="M0,0 L12,0 L6,8 Z"/>
</vector>

@ -25,7 +25,7 @@
<!-- android:top="35dp">-->
<!-- <shape>-->
<!-- <corners android:bottomLeftRadius="8dp" android:bottomRightRadius="8dp" />-->
<!-- <solid android:color="#4B84FE" />-->
<!-- <solid android:color="@color/blue1_1" />-->
<!-- </shape>-->
<!-- </item>-->
</layer-list>

@ -39,6 +39,8 @@
android:gravity="center|start"
android:paddingStart="16dp"
android:textSize="16sp"
android:inputType="number"
android:hint="输入最少四位开始检索"
android:layout_marginTop="8dp"
android:background="@drawable/bg_stroke_blue_1"
@ -53,6 +55,7 @@
android:text="* 工单类型" />
<Spinner
android:id="@+id/order_create_type"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"
@ -69,6 +72,7 @@
android:text="* 执行站点" />
<Spinner
android:id="@+id/order_create_site"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"

@ -1,152 +1,161 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/homepagebg">
android:background="@color/white"
android:orientation="vertical">
<TextView
style="@style/tablebarStyle"
android:layout_width="match_parent"
android:layout_height="30dp"
android:text="首 页"
android:textColor="@color/black"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="55dp"
android:text="公交轮胎管理系统"
android:textColor="@color/black"
android:gravity="center"
android:textSize="25sp"
android:layout_marginTop="20dp"
android:textStyle="bold"
android:letterSpacing="0.1"
/>
<RadioGroup
android:id="@+id/homePage_Frist"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_alignParentBottom="true"
android:layout_marginStart="10dp"
android:layout_marginTop="50dp"
android:orientation="horizontal" >
android:layout_marginEnd="10dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/chaxun"
style="@style/TabRadioButton"
android:drawableTop="@mipmap/serach"
android:text="信息查询"
/>
android:drawableTop="@mipmap/icon_home1"
android:text="轮胎信息" />
<RadioButton
android:id="@+id/ruku"
style="@style/TabRadioButton"
android:text="轮胎入库"
android:drawableTop="@mipmap/ru"
android:textColor="@color/white"/>
android:drawableTop="@mipmap/icon_home2"
android:text="轮胎入库" />
<RadioButton
android:id="@+id/chuku"
style="@style/TabRadioButtonTwo"
style="@style/TabRadioButton"
android:drawableTop="@mipmap/icon_home3"
android:text="轮胎出库"
android:drawableTop="@mipmap/chu"
android:textColor="@color/white"
/>
<!--<RadioButton-->
<!--android:id="@+id/zhijian"-->
<!--style="@style/TabRadioButton"-->
<!--android:text="质检管理"-->
<!--android:drawableTop="@mipmap/zhijian"-->
<!--android:textColor="@color/white"/>-->
<!--android:id="@+id/zhijian"-->
<!--style="@style/TabRadioButton"-->
<!--android:text="质检管理"-->
<!--android:drawableTop="@mipmap/zhijian"-->
<!--/>-->
</RadioGroup>
<RadioGroup
android:id="@+id/homePage_Second"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_alignParentBottom="true"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:orientation="horizontal" >
android:layout_marginEnd="10dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/zhuangxie"
style="@style/TabRadioButton"
android:text="轮胎装车"
android:drawableTop="@mipmap/up"
android:textColor="@color/white"/>
android:drawableTop="@mipmap/icon_home4"
android:text="轮胎装车" />
<RadioButton
android:id="@+id/huanwei"
style="@style/TabRadioButton"
android:text="轮胎卸车"
android:drawableTop="@mipmap/down"
android:textColor="@color/white"/>
<RadioButton
android:id="@+id/zhijian"
android:id="@+id/huanwei"
style="@style/TabRadioButton"
android:text="轮胎质检"
android:drawableTop="@mipmap/check"
android:textColor="@color/white"/>
android:drawableTop="@mipmap/icon_home5"
android:text="轮胎卸车" />
<RadioButton
android:id="@+id/in_new_system"
style="@style/TabRadioButton"
android:drawableTop="@mipmap/icon_home9"
android:text="维护保养" />
<!-- <RadioButton-->
<!-- android:id="@+id/zhijian"-->
<!-- style="@style/TabRadioButton"-->
<!-- android:text="轮胎质检"-->
<!-- android:drawableTop="@mipmap/check"-->
<!-- />-->
<!--<View-->
<!--style="@style/TabRadioButton" />-->
</RadioGroup>
<RadioGroup
android:id="@+id/homePage_Three"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_alignParentBottom="true"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:orientation="horizontal"
>
android:layout_marginEnd="10dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/test1"
style="@style/TabRadioButtonTwo"
android:textColor="@color/white"
android:drawableTop="@mipmap/test2"
android:text="安装查询"
/>
style="@style/TabRadioButton"
android:drawableTop="@mipmap/icon_home7"
android:text="车辆装胎查询" />
<RadioButton
android:id="@+id/xxbd"
style="@style/TabRadioButtonTwo"
android:textColor="@color/white"
android:drawableTop="@mipmap/bangding"
android:text="车绑定"
style="@style/TabRadioButton"
android:drawableTop="@mipmap/icon_home8"
android:text="车辆芯片绑定"
/>
<RadioButton
android:id="@+id/in_new_system"
style="@style/TabRadioButtonTwo"
android:textColor="@color/white"
android:drawableTop="@mipmap/test2"
android:text="车队维保系统"
/>
<!-- <RadioButton-->
<!-- android:id="@+id/test3"-->
<!-- style="@style/TabRadioButtonTwo"-->
<!-- android:textColor="@color/white"-->
<!-- android:drawableTop="@mipmap/bangding"-->
<!-- android:text="车牌绑定"-->
<!-- />-->
<!-- <RadioButton-->
<!-- android:id="@+id/test3"-->
<!-- style="@style/TabRadioButtonTwo"-->
<!-- android:textColor="@color/white"-->
<!-- android:drawableTop="@mipmap/bangding"-->
<!-- android:text="车牌绑定"-->
<!-- />-->
</RadioGroup>
<!--<ImageView-->
<!--android:layout_alignParentBottom="true"-->
<!--android:layout_width="100dp"-->
<!--android:layout_height="200dp"-->
<!--android:layout_marginTop="250dp"-->
<!--android:background="@mipmap/homepage" />-->
<!--<ImageView-->
<!--android:layout_alignParentBottom="true"-->
<!--android:layout_width="100dp"-->
<!--android:layout_height="200dp"-->
<!--android:layout_marginTop="250dp"-->
<!--android:background="@mipmap/homepage" />-->
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
android:id="@+id/logout"
style="@style/buttonStyle"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginLeft="50dp"
android:layout_alignParentBottom="true"
android:layout_marginTop="150dp"
android:layout_marginRight="50dp"
android:text="退 出" />
android:layout_marginStart="22dp"
android:layout_marginEnd="22dp"
android:layout_marginBottom="22dp"
android:background="@drawable/bg_button_black"
android:text="退出登录"
android:textColor="@color/white"
android:textSize="18sp" />
</LinearLayout>

@ -4,8 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg"
android:gravity="center"
android:background="@color/black"
android:gravity="center|top"
android:orientation="vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp"
@ -14,38 +14,96 @@
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:src="@mipmap/tyre" />
android:layout_height="120dp"
android:src="@mipmap/new_logo"
android:layout_marginTop="100dp" />
<ImageView
android:layout_width="300dp"
android:layout_height="80dp"
android:src="@mipmap/title" />
android:src="@mipmap/login_title" />
<EditText
android:id="@+id/login_name"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="23sp" />
android:layout_marginTop="8dp"
android:textColor="@color/white"
android:focusable="true"
android:focusableInTouchMode="true"
android:hint="工号"
android:textColorHint="@color/white">
<EditText
android:id="@+id/login_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@color/white"
android:inputType="textVisiblePassword"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
<EditText
android:id="@+id/login_pass"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="23sp"
android:inputType="textPassword"
android:layout_marginTop="12dp"/>
android:layout_marginTop="8dp"
android:textColor="@color/white"
android:focusable="true"
android:focusableInTouchMode="true"
android:hint="密码"
android:textColorHint="@color/white"
app:passwordToggleEnabled="true"
app:passwordToggleTint="@color/white">
<EditText
android:id="@+id/login_pass"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@color/white"
android:inputType="textVisiblePassword"/>
</com.google.android.material.textfield.TextInputLayout>
<!-- <EditText-->
<!-- android:id="@+id/login_pass"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:textSize="23sp"-->
<!-- android:inputType="textPassword"-->
<!-- android:layout_marginTop="12dp"/>-->
<!-- <Button-->
<!-- android:id="@+id/login_log"-->
<!-- style="@style/buttonStyle"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:background="@drawable/bg_button_w16"-->
<!-- android:textColor="@color/black"-->
<!-- android:backgroundTint="@color/white"-->
<!-- android:="@color/white"-->
<!-- android:text="登 陆" />-->
<Button
android:id="@+id/login_log"
style="@style/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="登 陆" />
android:layout_marginTop="20dp"
android:text="登 陆"
android:textSize="18sp"
android:background="@drawable/bg_button_w16"
/>
<CheckBox
android:id="@+id/checkbox_remember"
@ -54,7 +112,9 @@
android:text="记住用户名和密码"
android:textSize="18sp"
android:layout_marginTop="12dp"
android:layout_gravity="left"/>
android:layout_gravity="left"
android:textColor="@color/white"
android:checked="true" />
<TextView
@ -63,8 +123,8 @@
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:gravity="center"
android:textColor="@color/blue"
android:textSize="18sp"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent" />

@ -83,13 +83,14 @@
android:text="拆报废车"
app:layout_columnWeight="1" />
<RadioButton
<!-- <RadioButton
style="@style/home_page_radio_button"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:drawableTop="@mipmap/icon_6"
android:onClick="goActivity6"
android:text="轮胎修补"
app:layout_columnWeight="1" />
<RadioButton
@ -99,7 +100,7 @@
android:drawableTop="@mipmap/icon_7"
android:onClick="goActivity7"
android:text="轮胎报废"
app:layout_columnWeight="1" />
app:layout_columnWeight="1" />-->
</androidx.gridlayout.widget.GridLayout>

@ -1,9 +1,325 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".maintenance.TireRepairActivity">
xmlns:tools="http://schemas.android.com/tools">
</androidx.constraintlayout.widget.ConstraintLayout>
<data>
<variable
name="blockState1"
type="androidx.databinding.ObservableBoolean" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".maintenance.TireRepairActivity">
<include
layout="@layout/layout_activity_title"
app:title='@{"执行工单"}' />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:orientation="vertical">
<TextView
style="@style/text_title_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:letterSpacing="0.1"
android:text='"车牌"+"粤B01260D"' />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text='"◎"+"观湖修理厂"'
android:textColor="@color/textColor1" />
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
app:columnCount="3"
app:rowCount="4">
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="0.1"
android:text="* 修补类型"
android:textSize="16dp"
app:layout_columnSpan="3" />
<TextView
style="@style/text_block_style"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="站内修补"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_style"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{!blockState1}"
android:text="委外维修"
app:layout_columnWeight="1" />
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:letterSpacing="0.1"
android:text="* 当前状态"
android:textSize="16dp"
app:layout_columnSpan="3" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="待修补"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="修补成功"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_end_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="报废"
app:layout_columnWeight="1" />
</androidx.gridlayout.widget.GridLayout>
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
app:columnCount="3">
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="0.1"
android:text="#损伤记录"
android:textColor="@color/blue1_1"
app:layout_columnSpan="3" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="@color/blue1_3"
app:layout_columnSpan="3" />
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text="* 损伤位置"
android:textSize="16dp"
app:layout_columnSpan="3" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="胎冠"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="胎侧"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_end_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="趾口"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="胎肩"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_end_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="其他"
app:layout_columnWeight="1" />
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text="* 损伤原因"
android:textSize="16dp"
app:layout_columnSpan="3" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="刺穿"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="胎侧"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_end_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="趾口"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="咯伤"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="划伤"
app:layout_columnWeight="1" />
<TextView
style="@style/text_block_end_style"
android:layout_width="100dp"
android:layout_height="40dp"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
android:text="裂痕"
app:layout_columnWeight="1" />
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text="* 照片留档"
android:textSize="16dp"
app:layout_columnSpan="3" />
<!-- -->
<ImageView
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/bg_block_img_selector"
android:onClick="blockClick_1"
android:selected="@{blockState1}"
app:layout_columnWeight="1"
android:src="@mipmap/ic_xiangji"
android:padding="30dp"/>
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text="备注说明"
android:textSize="16dp"
app:layout_columnSpan="3" />
<EditText
android:id="@+id/et_remark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/bg_grey"
android:gravity="top"
android:hint="输入详细描述..."
android:minHeight="100dp"
android:padding="8dp"
android:textSize="16dp"
app:layout_columnSpan="3" />
</androidx.gridlayout.widget.GridLayout>
<Button
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="12dp"
android:text="完成处理"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

@ -1,9 +1,189 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".maintenance.TireScrapActivity">
xmlns:tools="http://schemas.android.com/tools">
</androidx.constraintlayout.widget.ConstraintLayout>
<data>
<variable
name="site"
type="String" />
<variable
name="carNo"
type="String" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:orientation="vertical"
tools:context=".maintenance.TireScrapActivity">
<include
layout="@layout/layout_activity_title"
app:title='@{"执行工单"}' />
<TextView
style="@style/text_title_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:letterSpacing="0.1"
android:text='@{"车牌\t"+carNo}' />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text='@{"◎"+site}'
android:textColor="@color/textColor1" />
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
app:columnCount="4"
app:rowCount="4">
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="0.1"
android:text="* 报废位置"
android:textSize="16dp"
app:layout_columnSpan="4" />
<Spinner
android:id="@+id/order_create_type"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"
android:background="@drawable/bg_select_grey"
android:paddingStart="12dp"
app:layout_columnSpan="4" />
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:letterSpacing="0.1"
android:text="* 鉴定图片"
android:textSize="16dp"
app:layout_columnSpan="4" />
<LinearLayout
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginEnd="10dp"
android:background="@drawable/bg_block_img_selector"
android:gravity="center"
android:onClick="blockClick_1"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="30dp"
android:src="@mipmap/ic_xiangji" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="*胎号" />
</LinearLayout>
<LinearLayout
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginEnd="10dp"
android:background="@drawable/bg_block_img_selector"
android:gravity="center"
android:onClick="blockClick_1"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="30dp"
android:src="@mipmap/ic_xiangji" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="*整体胎" />
</LinearLayout>
<LinearLayout
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginEnd="10dp"
android:background="@drawable/bg_block_img_selector"
android:gravity="center"
android:onClick="blockClick_1"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="30dp"
android:src="@mipmap/ic_xiangji" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="病象" />
</LinearLayout>
<TextView
style="@style/text_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:letterSpacing="0.1"
android:text="备注"
android:textSize="16dp"
app:layout_columnSpan="4" />
<EditText
android:id="@+id/dialog_tire_remark1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_grey"
android:gravity="top"
android:hint="输入报废原因描述..."
android:minHeight="100dp"
android:padding="8dp"
android:textColor="@color/textColor1"
android:textSize="14sp"
app:layout_columnSpan="4" />
</androidx.gridlayout.widget.GridLayout>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
android:id="@+id/dialog_tire_update_save"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_margin="12dp"
android:background="@drawable/bg_button_blue"
android:text="完成处理"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</layout>

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue2"
tools:context=".TestActivity">
<TextView
@ -61,43 +61,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2">
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="25dp"
android:layout_marginStart="8dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/in_iskey">
<Button
android:id="@+id/basemessage"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_height="45dp"
android:background="@color/xuebai"
android:textSize="18sp"
android:text="基本信息"
style="@style/buttonStyle"
android:textColor="@color/black"/>
android:text="基本信息"/>
<!--<Button-->
<!--style="@style/buttonStyle"-->
<!--android:id="@+id/record"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_weight="1"-->
<!--android:background="@color/xuebai"-->
<!--android:layout_marginLeft="3dp"-->
<!--android:textSize="18sp"-->
<!--android:textColor="@color/black"-->
<!--android:text="装卸记录"-->
<!--/>-->
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"

@ -254,8 +254,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:text="完成"
style="@style/buttonStyle"
android:textColor="@color/black"/>
style="@style/buttonStyle"/>
<View
android:layout_width="50dp"
android:layout_height="match_parent"
@ -266,8 +265,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:text="返回"
style="@style/buttonStyle"
android:textColor="@color/black"/>
style="@style/buttonStyle"/>
</LinearLayout>

@ -5,6 +5,46 @@
<data>
<variable
name="site"
type="String" />
<variable
name="carNo"
type="String" />
<variable
name="date"
type="String" />
<variable
name="line"
type="String" />
<variable
name="tire1"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire2"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire3"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire4"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire5"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire6"
type="com.example.tyre.maintenance.been.BaseTyre" />
</data>
<LinearLayout
@ -18,251 +58,279 @@
layout="@layout/layout_activity_title"
app:title='@{"执行工单"}' />
<TextView
style="@style/text_title_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:letterSpacing="0.1"
android:text='"车牌"+"粤B01260D"' />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text='"◎"+"观湖修理厂"'
android:textColor="@color/textColor1" />
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
app:columnCount="2"
app:rowCount="5">
<TextView
android:layout_height="40dp"
android:gravity="start|center"
android:letterSpacing="0.1"
android:text="*仪表盘里程(km)"
android:textColor="@color/textColor1"
android:textStyle="bold"
app:layout_columnWeight="1" />
<EditText
android:layout_height="40dp"
android:gravity="right|center"
android:hint="必填"
android:inputType="numberDecimal"
android:onClick="selectDate"
android:paddingEnd="10dp"
android:textColor="@color/textColor2"
android:textSize="15sp"
android:textStyle="bold"
app:layout_columnWeight="1"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:gravity="start|center"
android:text="上次里程"
android:textColor="@color/textColor2"
app:layout_columnSpan="2" />
</androidx.gridlayout.widget.GridLayout>
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
app:columnCount="2"
app:rowCount="5">
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="线路"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<TextView
android:layout_height="40dp"
android:gravity="right|center"
android:onClick="selectDate"
android:paddingEnd="10dp"
android:text="保养日期"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="补充说明"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<EditText
android:layout_height="40dp"
android:background="@color/white"
android:gravity="end|center"
android:hint="选填"
android:paddingEnd="10dp"
android:textColor="@color/textColor1"
android:textSize="14sp"
app:layout_columnWeight="1" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="保养日期"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<TextView
android:layout_height="40dp"
android:gravity="end|center"
android:onClick="switchStatus"
android:paddingEnd="10dp"
android:text="2026-04-09"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
</androidx.gridlayout.widget.GridLayout>
<LinearLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:orientation="vertical">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
android:layout_height="match_parent"
android:gravity="center|top"
android:orientation="vertical">
<include
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="100dp" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<TextView
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:text="1"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<include
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="100dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center">
<include
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="100dp" />
<include
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="100dp"
android:layout_marginStart="4dp" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
style="@style/text_title_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:letterSpacing="0.1"
android:text='@{"车牌\t"+carNo}' />
<TextView
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:text="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:letterSpacing="0.1"
android:text='@{"◎"+site}'
android:textColor="@color/textColor1" />
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
app:columnCount="2"
app:rowCount="5">
<TextView
android:layout_height="40dp"
android:gravity="start|center"
android:letterSpacing="0.1"
android:text="*仪表盘里程(km)"
android:textColor="@color/textColor1"
android:textStyle="bold"
app:layout_columnWeight="1" />
<EditText
android:id="@+id/work_licheng"
android:layout_height="40dp"
android:gravity="right|center"
android:hint="必填"
android:inputType="numberDecimal"
android:paddingEnd="10dp"
android:textColor="@color/textColor2"
android:textSize="15sp"
android:textStyle="bold"
app:layout_columnWeight="1"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<!-- <View-->
<!-- android:layout_height="1dp"-->
<!-- android:background="#F1F1F1"-->
<!-- app:layout_columnSpan="2" />-->
<!-- <TextView-->
<!-- android:layout_height="40dp"-->
<!-- android:gravity="start|center"-->
<!-- android:text="上次里程"-->
<!-- android:textColor="@color/textColor2"-->
<!-- app:layout_columnSpan="2" />-->
</androidx.gridlayout.widget.GridLayout>
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
app:columnCount="2"
app:rowCount="5">
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="线路"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<TextView
android:layout_height="40dp"
android:gravity="right|center"
android:paddingEnd="10dp"
android:text="@{line}"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="补充说明"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<EditText
android:id="@+id/work_buchong"
android:layout_height="40dp"
android:background="@color/white"
android:gravity="end|center"
android:hint="选填"
android:paddingEnd="10dp"
android:textColor="@color/textColor1"
android:textSize="14sp"
app:layout_columnWeight="1" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="保养日期"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<TextView
android:layout_height="40dp"
android:gravity="end|center"
android:paddingEnd="10dp"
android:text="@{date}"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
</androidx.gridlayout.widget.GridLayout>
<LinearLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<include
android:id="@+id/tireClick1"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire1}"
app:locationOld='@{"左前轮"}' />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<TextView
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:text="1"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<include
android:id="@+id/tireClick2"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire2}"
app:locationOld='@{"右前轮"}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center">
<include
android:id="@+id/tireClick3"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire3}"
app:locationOld='@{"左外轮"}' />
<include
android:id="@+id/tireClick4"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
app:data="@{tire4}"
app:locationOld='@{"左内轮"}' />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<TextView
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:text="2"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<include
android:id="@+id/tireClick5"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire5}"
app:locationOld='@{"右内轮"}' />
<include
android:id="@+id/tireClick6"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
app:data="@{tire6}"
app:locationOld='@{"右外轮"}' />
</LinearLayout>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_margin="16dp"
android:background="@drawable/bg_button_blue"
android:letterSpacing="0.3"
android:onClick="submitWorkExecute"
android:text="完成处理"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<include
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="100dp" />
<include
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="100dp"
android:layout_marginStart="4dp" />
</LinearLayout>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_margin="16dp"
android:background="@drawable/bg_button_blue"
android:letterSpacing="0.3"
android:onClick="generateWorkOrder"
android:text="完成处理"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout></layout>
</ScrollView>
</LinearLayout>
</layout>

@ -12,6 +12,9 @@
<variable
name="status"
type="androidx.databinding.ObservableBoolean" />
<variable
name="adapter"
type="com.example.tyre.maintenance.adapter.OrderAdapter" />
</data>
<LinearLayout
@ -78,6 +81,7 @@
android:textColor="@color/textColor2"
android:textStyle="bold"
app:layout_columnWeight="1"
android:text="光明修理厂"
android:onClick="selectOrderSite"
tools:ignore="RtlHardcoded,RtlSymmetry" />
@ -136,7 +140,7 @@
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adapter="@{adapter}"
android:padding="12dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
@ -147,7 +151,7 @@
android:layout_gravity="bottom|right"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:backgroundTint="#4B84FE"
android:backgroundTint="@color/blue1_1"
android:onClick="goCreateWorkOrder"
android:src="@mipmap/plus"
android:tint="@android:color/white" />

@ -35,12 +35,12 @@
android:src="@mipmap/huojian" />
<TextView
android:id="@+id/dialog_state_text"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:gravity="center"
android:text="发起成功!"
android:text=""
android:textColor="@color/textColor2"
android:textSize="18sp"
android:textStyle="bold" />
@ -49,7 +49,7 @@
<TextView
android:id="@+id/dialog_tip"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="选择车辆或者车票!"
android:textColor="@color/textColor2"

@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="tire1"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire2"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire3"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire4"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire5"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="tire6"
type="com.example.tyre.maintenance.been.BaseTyre" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_grey_top"
android:orientation="vertical">
<TextView
android:id="@+id/dialog_title1"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="5dp"
android:drawableEnd="@mipmap/ic_cha"
android:gravity="center"
android:paddingEnd="12dp"
android:text="位置互换"
android:textColor="@color/textColor1"
android:textSize="18sp" />
<LinearLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<include
android:id="@+id/tireClick1"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire1}"
app:locationOld='@{"左前轮"}' />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<TextView
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:text="1"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<include
android:id="@+id/tireClick2"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire2}"
app:locationOld='@{"右前轮"}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center">
<include
android:id="@+id/tireClick3"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire3}"
app:locationOld='@{"左外轮"}' />
<include
android:id="@+id/tireClick4"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
app:data="@{tire4}"
app:locationOld='@{"左内轮"}' />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<TextView
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:text="2"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_weight="1"
android:background="#E3E6EC" />
<include
android:id="@+id/tireClick5"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
app:data="@{tire5}"
app:locationOld='@{"右内轮"}' />
<include
android:id="@+id/tireClick6"
layout="@layout/layout_trae_info"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
app:data="@{tire6}"
app:locationOld='@{"右外轮"}' />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>

@ -0,0 +1,624 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="tire"
type="com.example.tyre.maintenance.been.BaseTyre" />
<variable
name="isUpdate"
type="androidx.databinding.ObservableBoolean" />
<variable
name="photoState"
type="androidx.databinding.ObservableBoolean" />
<import type="android.view.View" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_grey_top"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp">
<View
android:layout_width="4dp"
android:layout_height="30dp"
android:background="@color/blue1_1" />
<TextView
android:id="@+id/dialog_title"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginLeft="5dp"
android:drawableEnd="@mipmap/ic_cha"
android:gravity="center|left"
android:paddingEnd="12dp"
android:text="@{tire.wheelPostion}"
android:textColor="@color/textColor1"
android:textSize="14sp" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="12dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/card_bg"
android:padding="12dp">
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="是否更换轮胎"
android:textColor="@color/textColor1" />
<Switch
android:id="@+id/dialog_isupdate_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="@color/textColor1"
android:textOff="否"
android:textOn="是" />
</LinearLayout>
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:columnCount="2"
app:rowCount="5">
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="@{tire.tyreNo}"
android:textColor="@color/textColor1"
android:textSize="16sp"
app:layout_columnSpan="2" />
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_columnSpan="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_green1_2"
android:padding="4dp"
android:text="@{tire.tyreBrand}"
android:textColor="@color/buttonColor2"
android:textSize="13sp"
app:layout_columnSpan="2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:background="@drawable/bg_blue1_2"
android:padding="4dp"
android:text="@{tire.tyrePattern}"
android:textColor="@color/blue1_1"
android:textSize="13sp"
app:layout_columnSpan="2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:background="@drawable/bg_orange1_2"
android:padding="4dp"
android:text="@{tire.tyreModel}"
android:textColor="@color/buttonColor"
android:textSize="13sp"
app:layout_columnSpan="2" />
</LinearLayout>
<View
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="轮胎自编号"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<TextView
android:layout_height="40dp"
android:gravity="right|center"
android:onClick="selectDate"
android:text="@{tire.selfNo}"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:gravity="left|center"
android:text="轮胎与系统不一致"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<Switch
android:layout_height="40dp"
android:textColor="@color/textColor1"
app:layout_columnWeight="1"
tools:ignore="UseSwitchCompatOrMaterialXml" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_columnWeight="1">
<TextView
android:layout_width="10dp"
android:layout_height="wrap_content"
android:text="*"
android:textColor="#E53935" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="剩余花纹深度"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
</LinearLayout>
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
app:layout_columnWeight="1">
<EditText
android:id="@+id/dialog_tire_shendu1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/blue1_3"
android:gravity="center"
android:inputType="numberDecimal"
android:textColor="@color/textColor1" />
<TextView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:background="@drawable/bg_blue1_2"
android:gravity="center"
android:text="mm"
android:textColor="@color/blue1_1" />
</LinearLayout>
<!-- <View
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="left|center"
android:text="保养前胎压"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
app:layout_columnWeight="1">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:inputType="numberDecimal"
android:textColor="@color/textColor1" />
<TextView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:background="@drawable/bg_blue1_2"
android:gravity="center"
android:text="kpa"
android:textColor="@color/blue1_1" />
</LinearLayout>-->
<View
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="left|center"
android:text="胎压"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
app:layout_columnWeight="1">
<EditText
android:id="@+id/dialog_tire_taiya1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/blue1_3"
android:gravity="center"
android:inputType="numberDecimal"
android:textColor="@color/textColor1" />
<TextView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:background="@drawable/bg_blue1_2"
android:gravity="center"
android:text="kpa"
android:textColor="@color/blue1_1" />
</LinearLayout>
<View
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="left|center"
android:text="照片"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<ImageView
android:id="@+id/dialog_update_photo"
style="@style/text_block_style"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/bg_block_img_selector"
android:padding="30dp"
android:selected="@{photoState}"
app:layout_columnSpan="2" />
<View
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="left|center"
android:text="备注"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<EditText
android:id="@+id/dialog_tire_remark1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="top"
android:hint="输入备注"
android:minHeight="100dp"
android:padding="8dp"
android:textColor="@color/textColor1"
android:textSize="14sp"
app:layout_columnSpan="2" />
</androidx.gridlayout.widget.GridLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="换胎后"
android:textColor="@color/textColor1"
android:textSize="14sp"
android:visibility="@{isUpdate?View.VISIBLE:View.GONE}" />
<androidx.gridlayout.widget.GridLayout
style="@style/layout_card_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:visibility="@{isUpdate?View.VISIBLE:View.GONE}"
app:columnCount="2"
app:rowCount="5">
<Button
android:id="@+id/dialog_button_tong"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="@drawable/bg_button_blue"
android:text="同车轮胎互换"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
app:layout_columnSpan="2" />
<LinearLayout
android:layout_height="40dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_columnWeight="1">
<TextView
android:layout_width="10dp"
android:layout_height="wrap_content"
android:text="*"
android:textColor="#E53935" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="装车轮胎"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
</LinearLayout>
<TextView
android:layout_height="40dp"
android:gravity="right|center"
android:onClick="selectDate"
android:text="123@{line}"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_columnWeight="1">
<TextView
android:layout_width="10dp"
android:layout_height="wrap_content"
android:text="*"
android:textColor="#E53935" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="轮胎自编号"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
</LinearLayout>
<TextView
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<View
android:layout_height="1dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_columnWeight="1">
<TextView
android:layout_width="10dp"
android:layout_height="wrap_content"
android:text="*"
android:textColor="#E53935" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="剩余花纹深度"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
</LinearLayout>
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
app:layout_columnWeight="1">
<EditText
android:id="@+id/dialog_tire_shendu2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/blue1_3"
android:gravity="center"
android:inputType="numberDecimal"
android:textColor="@color/textColor1" />
<TextView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:background="@drawable/bg_blue1_2"
android:gravity="center"
android:text="mm"
android:textColor="@color/blue1_1" />
</LinearLayout>
<View
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#F1F1F1"
app:layout_columnSpan="2" />
<TextView
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:gravity="left|center"
android:text="胎压"
android:textColor="@color/textColor1"
app:layout_columnWeight="1" />
<LinearLayout
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:background="@drawable/bg_grey"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
app:layout_columnWeight="1">
<EditText
android:id="@+id/dialog_tire_taiya2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/blue1_3"
android:gravity="center"
android:inputType="numberDecimal"
android:textColor="@color/textColor1" />
<TextView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:background="@drawable/bg_blue1_2"
android:gravity="center"
android:text="kpa"
android:textColor="@color/blue1_1" />
</LinearLayout>
</androidx.gridlayout.widget.GridLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- <Button-->
<!-- android:id="@+id/dialog_tire_update_save1"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="55dp"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginBottom="12dp"-->
<!-- android:layout_weight="1"-->
<!-- android:background="@drawable/bg_button_blue"-->
<!-- android:text="保存信息并换胎"-->
<!-- android:textColor="@color/white"-->
<!-- android:textSize="16sp"-->
<!-- android:textStyle="bold" />-->
<Button
android:id="@+id/dialog_tire_update_save"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:layout_weight="1"
android:background="@drawable/bg_button_blue"
android:text="保存当前轮位"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="10dp" />
<View
android:layout_width="match_parent"
android:layout_height="10dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

@ -1,66 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="118dp"
android:layout_marginTop="12dp"
android:background="@drawable/card_bg">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<TextView
android:id="@+id/textView"
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="玲珑-B37060D"
android:textColor="@color/textColor1"
android:textSize="22sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<data>
<variable
name="item"
type="com.example.tyre.maintenance.been.Order" />
</data>
<TextView
android:id="@+id/textView3"
android:layout_width="100dp"
android:layout_height="30dp"
android:layout_marginStart="12dp"
android:gravity="center|left"
android:text="轮胎报废"
android:textColor="@color/textColor2"
android:textSize="16sp"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/item_order_layout"
android:layout_width="match_parent"
android:layout_height="115dp"
android:layout_marginTop="12dp"
android:background="@drawable/card_bg">
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintStart_toEndOf="@+id/textView" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="@{item.plateNumber}"
android:textColor="@color/textColor1"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:background="@drawable/item_bg_1"
android:gravity="center"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:text="操作人 深圳西部公司"
android:textColor="@color/textColor2"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<TextView
android:id="@+id/textView3"
android:layout_width="100dp"
android:layout_height="30dp"
android:layout_marginStart="12dp"
android:gravity="center|left"
android:text="@{item.typeName}"
android:textColor="@color/textColor2"
android:textSize="16sp"
<TextView
android:layout_width="100dp"
android:layout_height="45dp"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_state_1"
android:gravity="center"
android:letterSpacing="0.1"
android:text="未完成"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintStart_toEndOf="@+id/textView" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/item_bg_1"
android:gravity="center"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:text='@{"操作人\t"+item.createBy}'
android:textColor="@color/textColor2"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<TextView
android:layout_width="100dp"
android:layout_height="45dp"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_order_state_selector"
android:gravity="center"
android:letterSpacing="0.1"
android:text='@{item.status.equals("COMPLETED")?"已完成":"未完成"}'
android:selected='@{item.status.equals("COMPLETED")}'
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

@ -3,20 +3,53 @@
<data>
<variable
name="locationOld"
type="String" />
<variable
name="data"
type="com.example.tyre.maintenance.been.BaseTyre" />
</data>
<LinearLayout
android:id="@+id/layout_tire_info"
android:layout_width="100dp"
android:layout_height="150dp"
android:layout_height="wrap_content"
android:background="@drawable/layout_trae"
android:orientation="vertical">
android:orientation="vertical"
android:paddingStart="5dp"
android:clickable="true"
android:paddingEnd="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="35dp"
android:gravity="center"
android:text="左前"
android:textStyle="bold"
android:textColor="@color/white" />
android:text="@{locationOld}"
android:textColor="@color/white"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.tyreNo}" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.tyreBrand}" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.tyreModel}" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text='@{data.patternDepth }'
android:layout_marginBottom="5dp"/>
</LinearLayout>
</layout>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_logo_background"/>
<foreground android:drawable="@drawable/ic_logo_foreground"/>
</adaptive-icon>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_logo_background"/>
<foreground android:drawable="@drawable/ic_logo_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

@ -33,13 +33,14 @@
</string-array>
<string-array name="zxzd">
<item>一分公司修理厂</item>
<item>光明修理厂</item>
<item>石岩修理厂</item>
</string-array>
<string-array name="work_type">
<item>二级保养</item>
<item>小修</item>
<item>抢修</item>
<item></item>
<item>月检</item>
<item>拆报废车</item>
<item>轮胎修补</item>

@ -14,5 +14,11 @@
<color name="textColor2">#94A4A5</color>
<color name="allbg">#F3F4F6</color>
<color name="buttonColor">#F27B1D</color>
<color name="orange1_2">#FEF3E7</color>
<color name="buttonColor2">#39B44A</color>
<color name="green1_2">#E6F4EE</color>
<color name="blue1_1">#4B84FE</color>
<color name="blue1_2">#ECF2FE</color>
<color name="blue1_3">#F7F8F9</color>
<color name="blue1_4">#D5D9E3</color>
</resources>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_logo_background">#FFFFFF</color>
</resources>

@ -10,6 +10,26 @@
<item name="android:windowBackground">@color/allbg</item>
</style>
<style name="Material3" parent="Theme.Material3.Light.NoActionBar">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
<item name="colorPrimary">@color/white</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorOnSurface">@color/black</item>
<item name="actionBarStyle">@style/news</item>
</style>
<style name="MaterialComponents_style" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="colorOnPrimary">@color/white</item>
<item name="colorPrimary">@color/blue1_1</item>
<item name="android:statusBarColor">@color/white</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowBackground">@color/allbg</item>
</style>
<style name="text_title_style">
<item name="android:layout_marginTop">16dp</item>
<item name="android:layout_marginStart">12dp</item>
@ -39,7 +59,25 @@
<item name="android:padding">12dp</item>
</style>
<style name="MyMiddleDialogStyle" parent="@android:style/Theme.Holo.Light.Dialog">
<style name="text_block_style">
<item name="android:layout_marginTop">12dp</item>
<item name="android:textSize">16sp</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/chip_text_color</item>
<item name="android:background">@drawable/bg_block_selector</item>
<item name="android:layout_marginEnd">8dp</item>
</style>
<style name="text_block_end_style">
<item name="android:layout_marginTop">12dp</item>
<item name="android:textSize">16sp</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/chip_text_color</item>
<item name="android:background">@drawable/bg_block_selector</item>
</style>
<!-- <style name="MyMiddleDialogStyle" parent="@android:style/Theme.Holo.Light.Dialog">-->
<style name="MyMiddleDialogStyle" parent="@style/MaterialComponents_style">
<!-- 窗口背景色 -->
<item name="android:windowBackground">@android:color/transparent</item>
<!--是否有覆盖-->

@ -3,8 +3,8 @@
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/blue</item>
<item name="colorPrimary">@color/black</item>
<item name="colorPrimaryDark">@color/black</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="title">@color/title</item>
</style>
@ -12,7 +12,7 @@
<style name="buttonStyle">
<item name="android:background">@drawable/bg_button</item>
<item name="android:background">@drawable/bg_button_black</item>
<item name="android:textSize">23sp</item>
<item name="android:textStyle"></item>
<item name="android:textColor">@color/white</item>
@ -27,7 +27,7 @@
<item name="android:gravity">center</item>
</style>
<style name="tablebarStyleTwo">
<item name="android:background">@color/blue</item>
<item name="android:background">@color/black</item>
<item name="android:textSize">18sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/white</item>
@ -40,7 +40,7 @@
<item name="android:gravity">center</item>
<item name="android:button">@null</item>
<item name="android:drawablePadding">8dp</item>
<item name="android:textColor">#ffffff</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">18sp</item>
<!-- <item name="android:drawablePadding">5dp</item>-->
</style>

@ -1,6 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<!-- 必须包含 external-path 指向 Download 目录 -->
<external-path name="download" path="Download/" />
<external-path name="external_files" path="."/>
<external-path
name="download"
path="Download/" />
<external-path
name="external_files"
path="." />
<external-path
name="my_images"
path="." />
</paths>

4
gradlew.bat vendored

@ -27,7 +27,7 @@ echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo locationOld of your Java installation.
goto fail
@ -41,7 +41,7 @@ echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo locationOld of your Java installation.
goto fail

Loading…
Cancel
Save