fix:接口是字典报错

asv2022.3.1
wanghao 3 weeks ago
parent 9c8cfb1467
commit 01be82f0b1

@ -135,6 +135,10 @@
android:name=".SwitchActivity" android:name=".SwitchActivity"
android:exported="false" /> android:exported="false" />
<!-- android:authorities="${applicationId}.fileprovider"--> <!-- android:authorities="${applicationId}.fileprovider"-->
<receiver
android:name=".maintenance.receiver.MyKeyReceiver"
android:enabled="true"
android:exported="true" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.example.tyre" android:authorities="com.example.tyre"

@ -0,0 +1,41 @@
package com.example.tyre;
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import androidx.appcompat.app.AppCompatActivity;
public class AllBaseActivity 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();
}
}

@ -277,6 +277,7 @@ public class CheckActivity extends AppCompatActivity implements AdapterView.OnIt
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
//扫描 //扫描
startFlag = true; startFlag = true;
break; break;

@ -49,7 +49,7 @@ import androidx.appcompat.app.AppCompatActivity;
import cn.pda.serialport.Tools; import cn.pda.serialport.Tools;
import com.example.tyre.databinding.ActivityDownBinding; import com.example.tyre.databinding.ActivityDownBinding;
public class DownActivity extends AppCompatActivity { public class DownActivity extends AllBaseActivity {
private ActivityDownBinding binding; private ActivityDownBinding binding;
@ -289,6 +289,7 @@ public class DownActivity extends AppCompatActivity {
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
//扫描 //扫描
startFlag = true; startFlag = true;
break; break;

@ -40,6 +40,7 @@ import com.lzy.okgo.model.Response;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import cn.pda.serialport.Tools; import cn.pda.serialport.Tools;
@ -47,7 +48,7 @@ import cn.pda.serialport.Tools;
* Created by on 2019/12/10. * Created by on 2019/12/10.
*/ */
public class InStoreHouseActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener { public class InStoreHouseActivity extends AllBaseActivity implements AdapterView.OnItemSelectedListener {
Button button; Button button;
TextView scan; TextView scan;
@ -122,6 +123,7 @@ public class InStoreHouseActivity extends AppCompatActivity implements AdapterVi
spinnerSize = binding.spinnerSize; spinnerSize = binding.spinnerSize;
spinnerBrand = binding.spinnerBrand; spinnerBrand = binding.spinnerBrand;
spinnergcts = binding.spinnergcts; spinnergcts = binding.spinnergcts;
wtbm.requestFocus();
} }
private void setupClickListeners() { private void setupClickListeners() {
@ -366,7 +368,8 @@ public class InStoreHouseActivity extends AppCompatActivity implements AdapterVi
} }
private void check_spinner() { private void check_spinner() {
OkGo.<String>post(MyUrl.url + "/system/dict/data/tyreTypeList").execute(new StringCallback() { OkGo.<String>post(MyUrl.url + "/system/dict/data/tyreTypeList")
.execute(new StringCallback() {
@Override @Override
public void onSuccess(Response<String> response) { public void onSuccess(Response<String> response) {
hideLoadingDialog(); hideLoadingDialog();
@ -377,7 +380,7 @@ public class InStoreHouseActivity extends AppCompatActivity implements AdapterVi
List<String> stringList = inStoreSpinnerVo.getKindList(); List<String> stringList = inStoreSpinnerVo.getKindList();
List<String> patternList = inStoreSpinnerVo.getPatternList(); List<String> patternList = inStoreSpinnerVo.getPatternList();
List<String> patternLevel = inStoreSpinnerVo.getLevelList(); List<String> patternLevel = inStoreSpinnerVo.getLevelList();
List<String> patternSize = inStoreSpinnerVo.getTyreSizeList(); List<String> patternSize = inStoreSpinnerVo.getTyreSizeList().stream().map(InStoreSpinnerVo.labelvalue::getLabel).collect(Collectors.toList());
List<String> patternBrand = inStoreSpinnerVo.getTyreBrandList(); List<String> patternBrand = inStoreSpinnerVo.getTyreBrandList();
List<String> patternGcts = inStoreSpinnerVo.getGctsList(); List<String> patternGcts = inStoreSpinnerVo.getGctsList();
ArrayAdapter<String> arrayAdapter = ArrayAdapter<String> arrayAdapter =
@ -540,6 +543,7 @@ public class InStoreHouseActivity extends AppCompatActivity implements AdapterVi
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
// 扫描 // 扫描
startFlag = true; startFlag = true;
break; break;

@ -314,6 +314,7 @@ public class OutStoreHouseActivity extends AppCompatActivity {
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
//扫描 //扫描
startFlag = true; startFlag = true;
break; break;

@ -141,6 +141,7 @@ public class TestActivity extends AppCompatActivity {
public void onBackPressed() { public void onBackPressed() {
hideLoadingDialog(); hideLoadingDialog();
Log.e("onBackPressed", "onBackPressed:+ " ); Log.e("onBackPressed", "onBackPressed:+ " );
finish();
// // 处理返回按钮点击事件 // // 处理返回按钮点击事件
// if (isStart) { // if (isStart) {
// // 如果当前处于开始状态,可以执行退出逻辑 // // 如果当前处于开始状态,可以执行退出逻辑
@ -340,6 +341,7 @@ public class TestActivity extends AppCompatActivity {
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
//扫描 //扫描
startFlag = true; startFlag = true;
break; break;

@ -429,6 +429,7 @@ public class TyreLayoutActivity extends AppCompatActivity {
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
//扫描 //扫描
startFlag = true; startFlag = true;
break; break;

@ -296,6 +296,7 @@ public class TyreSearchActivity extends AppCompatActivity {
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
binding.scanButton.callOnClick(); binding.scanButton.callOnClick();
break; break;
} }

@ -21,8 +21,6 @@ import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.android.hdhe.uhf.reader.UhfReader; import com.android.hdhe.uhf.reader.UhfReader;
import com.android.hdhe.uhf.readerInterface.TagModel; import com.android.hdhe.uhf.readerInterface.TagModel;
import com.example.tyre.databinding.ActivityUpBinding; import com.example.tyre.databinding.ActivityUpBinding;
@ -49,7 +47,7 @@ import java.util.List;
import cn.pda.serialport.Tools; import cn.pda.serialport.Tools;
public class UpActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener { public class UpActivity extends AllBaseActivity implements AdapterView.OnItemSelectedListener {
// 防抖延迟时间 (毫秒) // 防抖延迟时间 (毫秒)
private static final long DEBOUNCE_DELAY = 500; private static final long DEBOUNCE_DELAY = 500;
@ -78,6 +76,8 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
private Toast mToast; private Toast mToast;
private Toast toast; private Toast toast;
private KeyReceiver keyReceiver; private KeyReceiver keyReceiver;
private boolean dataType;
// 用于存储最后一次扫描到的 EPC // 用于存储最后一次扫描到的 EPC
private String lastScannedEpc; private String lastScannedEpc;
// 用于处理防抖逻辑的 Handler // 用于处理防抖逻辑的 Handler
@ -137,6 +137,21 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
Thread thread = new InventoryThread(); Thread thread = new InventoryThread();
thread.start(); thread.start();
Util.initSoundPool(this); Util.initSoundPool(this);
Intent intent = getIntent();
if (intent.getBooleanExtra("dataType", false)) dataType = true;
else dataType = false;
if (dataType) {
// 从保养跳转过来的
binding.azlw.setText(intent.getStringExtra("location"));
binding.car.setText(intent.getStringExtra("carNo"));
;
binding.start.setText(intent.getStringExtra("licheng"));
;
}
} }
private void bindViews() { private void bindViews() {
@ -185,8 +200,9 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
}); });
binding.back.setOnClickListener(v -> { binding.back.setOnClickListener(v -> {
Intent intent = new Intent(this, HomePageActivity.class); // Intent intent = new Intent(this, HomePageActivity.class);
startActivity(intent); // startActivity(intent);
finish();
}); });
binding.searchButton.setOnClickListener(v -> { binding.searchButton.setOnClickListener(v -> {
@ -321,16 +337,34 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
@Override @Override
public void onNothingSelected(AdapterView<?> parent) { public void onNothingSelected(AdapterView<?> parent) {
} }
// 提交函数
private void up_insert(String rfid, String carNo, String millage, String wheel, String selfNo) { 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() { OkGo.<String>post(MyUrl.url + "/tyre/install/PdaInstallTyre")
@Override .tag(this)
public void onSuccess(Response<String> response) { .params("tyreRfid", rfid)
hideLoadingDialog(); .params("mileage", millage)
String body = response.body(); .params("carNo", carNo)
Gson gson = new Gson(); .params("wheelPostion", wheel)
AjaxResult ajaxResult = gson.fromJson(body, AjaxResult.class); .params("selfNo", selfNo)
handleResponse(ajaxResult); .params("CreateBy", SharedPreferencesUtils.getstring("user", "admin"))
.execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
hideLoadingDialog();
String body = response.body();
Gson gson = new Gson();
AjaxResult ajaxResult = gson.fromJson(body, AjaxResult.class);
if (ajaxResult.getCode().equals("0") && dataType) {
Intent intent = new Intent();
baseTyreResult.setWheelPostion(wheel);
intent.putExtra("json", gson.toJson(baseTyreResult));
setResult(RESULT_OK, intent);
finish();
return;
}
handleResponse(ajaxResult);
// try { // try {
// Gson gson = new Gson(); // Gson gson = new Gson();
// BaseTyre baseTyre = gson.fromJson(body, BaseTyre.class); // BaseTyre baseTyre = gson.fromJson(body, BaseTyre.class);
@ -342,8 +376,8 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
// } catch (JsonSyntaxException e) { // } catch (JsonSyntaxException e) {
// return; // return;
// } // }
} }
}); });
} }
private void handleResponse(AjaxResult result) { private void handleResponse(AjaxResult result) {
@ -380,7 +414,7 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
} }
}); });
} }
private BaseTyre baseTyreResult;
// 基本信息查询 // 基本信息查询
private void find(String epc) { private void find(String epc) {
OkGo.<String>post(MyUrl.url + "/tyre/tyre/pdaQueryTyreInfo").tag(this).params("tyreEpc", epc).execute(new StringCallback() { OkGo.<String>post(MyUrl.url + "/tyre/tyre/pdaQueryTyreInfo").tag(this).params("tyreEpc", epc).execute(new StringCallback() {
@ -391,7 +425,9 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
try { try {
Gson gson = new Gson(); Gson gson = new Gson();
BaseTyre baseTyre = gson.fromJson(body, BaseTyre.class); BaseTyre baseTyre = gson.fromJson(body, BaseTyre.class);
if (baseTyre != null) { if (baseTyre != null) {
baseTyreResult=baseTyre;
// 空值处理:若字段为 null 则显示空字符串 // 空值处理:若字段为 null 则显示空字符串
String TyreNo = safeGetString(baseTyre.getTyreNo()); String TyreNo = safeGetString(baseTyre.getTyreNo());
th.setText(TyreNo); th.setText(TyreNo);
@ -462,8 +498,9 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
var myResult = response.body(); var myResult = response.body();
if (myResult.getCode() == 0) { if (myResult.getCode() == 0) {
Gson gson = new Gson(); Gson gson = new Gson();
List<BaseCar> baseCarList = gson.fromJson(myResult.getJson(), new TypeToken<List<BaseCar>>() { List<BaseCar> baseCarList =
}.getType()); gson.fromJson(myResult.getJson(), new TypeToken<List<BaseCar>>() {
}.getType());
Log.e("EPC", "listepc:+ " + baseCarList.size()); Log.e("EPC", "listepc:+ " + baseCarList.size());
if (baseCarList != null && baseCarList.size() > 0) { if (baseCarList != null && baseCarList.size() > 0) {
List<String> carNoList = new ArrayList<>(); List<String> carNoList = new ArrayList<>();
@ -565,11 +602,14 @@ public class UpActivity extends AppCompatActivity implements AdapterView.OnItemS
case KeyEvent.KEYCODE_F3: case KeyEvent.KEYCODE_F3:
case KeyEvent.KEYCODE_F4: case KeyEvent.KEYCODE_F4:
case KeyEvent.KEYCODE_F5: case KeyEvent.KEYCODE_F5:
case 136:
// 扫描 // 扫描
startFlag = true; startFlag = true;
break; break;
} }
} }
}; }
;
} }
} }

@ -4,7 +4,8 @@ import java.util.List;
public class InStoreSpinnerVo { public class InStoreSpinnerVo {
private List<String> tyreBrandList; private List<String> tyreBrandList;
private List<String> tyreSizeList; private List<labelvalue> tyreSizeList;
private List<String> tyreSizeList1;
private List<String> levelList; private List<String> levelList;
private List<String> patternList; private List<String> patternList;
private List<String> kindList; private List<String> kindList;
@ -26,11 +27,11 @@ public class InStoreSpinnerVo {
this.tyreBrandList = tyreBrandList; this.tyreBrandList = tyreBrandList;
} }
public List<String> getTyreSizeList() { public List<labelvalue> getTyreSizeList() {
return tyreSizeList; return tyreSizeList;
} }
public void setTyreSizeList(List<String> tyreSizeList) { public void setTyreSizeList(List<labelvalue> tyreSizeList) {
this.tyreSizeList = tyreSizeList; this.tyreSizeList = tyreSizeList;
} }
@ -57,4 +58,33 @@ public class InStoreSpinnerVo {
public void setKindList(List<String> kindList) { public void setKindList(List<String> kindList) {
this.kindList = kindList; this.kindList = kindList;
} }
public List<String> getTyreSizeList1() {
return tyreSizeList1;
}
public void setTyreSizeList1(List<String> tyreSizeList1) {
this.tyreSizeList1 = tyreSizeList1;
}
public class labelvalue {
private String label;
private String value;
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
} }

@ -61,17 +61,13 @@ public class CreateWorkOrderActivity extends BaseActivity {
@Override @Override
public void afterTextChanged(Editable s) { public void afterTextChanged(Editable s) {
Log.e("TAG", "afterTextChanged:" + s); Log.e("TAG", "afterTextChanged:" + s);
if (searchRunnable != null) { if (isSearch){
handler.removeCallbacks(searchRunnable); if (searchRunnable != null) {
handler.removeCallbacks(searchRunnable);
}
searchRunnable = () -> selectCarNo(s.toString());
handler.postDelayed(searchRunnable, 1000);
} }
// Start search after 1 second delay
searchRunnable = () -> selectCarNo(s.toString());
handler.postDelayed(searchRunnable, 1000);
// 搜索
// selectCarNo(s.toString());
isSearch = true; isSearch = true;
} }
}); });

@ -6,6 +6,8 @@ import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.Toast; import android.widget.Toast;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
import com.example.tyre.R; import com.example.tyre.R;
@ -20,12 +22,12 @@ import com.example.tyre.maintenance.been.BaseTyre;
import com.example.tyre.maintenance.been.BizOrderTireDetail; import com.example.tyre.maintenance.been.BizOrderTireDetail;
import com.example.tyre.maintenance.been.Order; import com.example.tyre.maintenance.been.Order;
import com.example.tyre.maintenance.dialog.TipResultDialog; 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.maintenance.dialog.TireUpdateDialog;
import com.example.tyre.util.CommonDialog; import com.example.tyre.util.CommonDialog;
import com.example.tyre.util.MyUrl; import com.example.tyre.util.MyUrl;
import com.example.tyre.util.SharedPreferencesUtils; import com.example.tyre.util.SharedPreferencesUtils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo; import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback; import com.lzy.okgo.callback.StringCallback;
@ -40,19 +42,23 @@ import java.util.Map;
public class WorkExecuteActivity extends BaseActivity { public class WorkExecuteActivity extends BaseActivity {
private ActivityWorkExecuteBinding binding; private ActivityWorkExecuteBinding binding;
private Map<String, BaseTyre> tyreMap; private Map<String, BaseTyre> tyreMap;
private TireUpdateDialog tireUpdateDialog;//点击轮胎弹窗 private TireUpdateDialog tireUpdateDialog;// 点击轮胎弹窗
private Map<String, Object> orderSubmitMap; private Map<String, Object> orderSubmitMap;
private List<BizOrderTireDetail> tireDetails; private List<BizOrderTireDetail> tireDetails;
private List<File> fileList; private List<File> fileList;
private TipResultDialog tipDialog; private TipResultDialog tipDialog;
private List<BaseTyre> baseTyreList; private List<BaseTyre> baseTyreList;
private String epcTag = "";// 屏蔽重复查询
private String carNo;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_work_execute); binding = DataBindingUtil.setContentView(this, R.layout.activity_work_execute);
initRFIDAndKeyReceiver();
Intent intent = getIntent(); Intent intent = getIntent();
String carNo = intent.getStringExtra("carNo");
carNo = intent.getStringExtra("carNo");
binding.setCarNo(carNo); binding.setCarNo(carNo);
tyreMap = new HashMap<>(); tyreMap = new HashMap<>();
selectCarNo(carNo); selectCarNo(carNo);
@ -67,12 +73,21 @@ public class WorkExecuteActivity extends BaseActivity {
binding.setDate(intent.getStringExtra("maintainDate")); binding.setDate(intent.getStringExtra("maintainDate"));
tireUpdateDialog = new TireUpdateDialog(this, new TireUpdateDialog.TireUpdateDialogSaveListener() { tireUpdateDialog = new TireUpdateDialog(this, new TireUpdateDialog.TireUpdateDialogSaveListener() {
@Override @Override
public void onSave(BizOrderTireDetail bizOrderTireDetail, File image) { public void onSave(BizOrderTireDetail bizOrderTireDetail, File image, boolean isupdate, BizOrderTireDetail newTireDetail) {
// 返回轮胎信息 // 返回轮胎信息
bizOrderTireDetail.setOrderId(order.getOrderId()); bizOrderTireDetail.setOrderId(order.getOrderId());
tireDetails.add(bizOrderTireDetail); tireDetails.add(bizOrderTireDetail);
fileList.add(image); fileList.add(image);
tireUpdateDialog.dismiss(); tireUpdateDialog.dismiss();
if (isupdate) {
// 换新胎
tireDetails.add(newTireDetail);
BaseTyre baseTyre = newTireDetail.getBaseTyre();
String positionName = newTireDetail.getPositionName();
tyreMap.put(positionName, baseTyre);
initTire(positionName, baseTyre);// 页面信息修改
}
} }
@Override @Override
@ -87,12 +102,7 @@ public class WorkExecuteActivity extends BaseActivity {
} }
@Override
public void onChengeTong(String location) {
// 同车互换
}
}); });
tireClick(); tireClick();
@ -131,11 +141,28 @@ public class WorkExecuteActivity extends BaseActivity {
} }
BaseTyre baseTyre = tyreMap.get(location); BaseTyre baseTyre = tyreMap.get(location);
if (baseTyre == null) { if (baseTyre == null) {
ActivityResultLauncher<Intent> launcher = registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == RESULT_OK) {
Intent data = result.getData();
// 返回json转换
BaseTyre reBaseTyre = gson.fromJson(data.getStringExtra("json"), BaseTyre.class);
}
}
);
Intent intent = new Intent(this, UpActivity.class); Intent intent = new Intent(this, UpActivity.class);
intent.putExtra("state", true); intent.putExtra("dataType", true);
startActivity(intent); intent.putExtra("location", location);
intent.putExtra("carNo", carNo);
intent.putExtra("licheng", s);
launcher.launch(intent);
}else {
tireUpdateDialog.setBaseTyre(baseTyre);
} }
tireUpdateDialog.setBaseTyre(baseTyre);
} }
// 查询轮胎信息 // 查询轮胎信息
@ -204,7 +231,6 @@ public class WorkExecuteActivity extends BaseActivity {
} }
} }
// 查询车辆信息 // 查询车辆信息
private void selectCarNo(String carNo) { private void selectCarNo(String carNo) {
OkGo.<MyResult>post(MyUrl.url + "/tyre/car/PdaQueryCarList").tag(this).params("carNo", carNo).execute(new MyRecultCall(dialog, this) { OkGo.<MyResult>post(MyUrl.url + "/tyre/car/PdaQueryCarList").tag(this).params("carNo", carNo).execute(new MyRecultCall(dialog, this) {
@ -228,8 +254,7 @@ public class WorkExecuteActivity extends BaseActivity {
Order order = (Order) orderSubmitMap.get("order"); Order order = (Order) orderSubmitMap.get("order");
order.setInputMileage(binding.workLicheng.getText().toString()); order.setInputMileage(binding.workLicheng.getText().toString());
order.setDescription(binding.workBuchong.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") OkGo.<MyResult>post(MyUrl.url + "/tyre/order/PDASaveMaintenanceOrder")
.params("json", gson.toJson(orderSubmitMap)) .params("json", gson.toJson(orderSubmitMap))
.addFileParams("files", fileList) .addFileParams("files", fileList)
@ -256,7 +281,6 @@ public class WorkExecuteActivity extends BaseActivity {
tireUpdateDialog.setImage(file); tireUpdateDialog.setImage(file);
} }
// 删除实时表、卸车记录表 // 删除实时表、卸车记录表
private void down_insert(String rfid, String carNo, String millage, String wheel, String patternDepth) { private void down_insert(String rfid, String carNo, String millage, String wheel, String patternDepth) {
OkGo.<String>post(MyUrl.url + "/tyre/install/PdaUnInstallTyre").tag(this) OkGo.<String>post(MyUrl.url + "/tyre/install/PdaUnInstallTyre").tag(this)
@ -270,14 +294,65 @@ public class WorkExecuteActivity extends BaseActivity {
@Override @Override
public void onSuccess(Response<String> response) { public void onSuccess(Response<String> response) {
String body = response.body(); String body = response.body();
Gson gson = new Gson();
AjaxResult ajaxResult = gson.fromJson(body, AjaxResult.class); AjaxResult ajaxResult = gson.fromJson(body, AjaxResult.class);
handleResponse(ajaxResult); handleResponse(ajaxResult);
} }
}); });
} }
// 装车
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) {
String body = response.body();
AjaxResult ajaxResult = gson.fromJson(body, AjaxResult.class);
handleResponse(ajaxResult);
}
});
}
@Override
public void sanEpcCall(String epc) {
super.sanEpcCall(epc);
if (!epcTag.equals(epc)) {
find(epc);
}
epcTag = epc;
}
// 基本信息查询
private void find(String epc) {
OkGo.<String>post(MyUrl.url + "/tyre/tyre/pdaQueryTyreInfo").tag(this).params("tyreEpc", epc).execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
String body = response.body();
try {
Gson gson = new Gson();
BaseTyre baseTyre = gson.fromJson(body, BaseTyre.class);
if (baseTyre != null) {
epcTag = "";
tireUpdateDialog.setNewBaseTyre(baseTyre);
} else {
new CommonDialog(context).setMessage("系统无此轮胎!").show();
}
} catch (JsonSyntaxException e) {
return;
}
}
});
}
private void handleResponse(AjaxResult result) { private void handleResponse(AjaxResult result) {
switch (result.getCode()) { switch (result.getCode()) {
case "500": case "500":

@ -6,17 +6,21 @@ import android.app.Activity;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.graphics.Rect; import android.graphics.Rect;
import android.media.MediaPlayer;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.util.Log;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
@ -24,6 +28,11 @@ import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider; import androidx.core.content.FileProvider;
import com.android.hdhe.uhf.reader.UhfReader;
import com.example.tyre.MyApplication;
import com.example.tyre.R;
import com.example.tyre.maintenance.receiver.MyKeyInfoCall;
import com.example.tyre.maintenance.receiver.MyKeyReceiver;
import com.example.tyre.util.MyUrl; import com.example.tyre.util.MyUrl;
import com.google.gson.Gson; import com.google.gson.Gson;
@ -32,6 +41,7 @@ import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import cn.pda.serialport.Tools;
import okhttp3.MediaType; import okhttp3.MediaType;
public class BaseActivity extends AppCompatActivity { public class BaseActivity extends AppCompatActivity {
@ -44,6 +54,7 @@ public class BaseActivity extends AppCompatActivity {
// 拍照 // 拍照
private Uri img_uri; private Uri img_uri;
private File outputImage; private File outputImage;
public byte[] accessBytes = Tools.HexString2Bytes("00000000");
@SuppressLint("SimpleDateFormat") @SuppressLint("SimpleDateFormat")
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
@ -178,5 +189,69 @@ public class BaseActivity extends AppCompatActivity {
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
return imm.isAcceptingText(); return imm.isAcceptingText();
} }
public UhfReader uhfReader;
public MediaPlayer music;
private MyKeyReceiver keyReceiver;
public void initRFID() {
uhfReader = MyApplication.getManager();
music = MediaPlayer.create(this, R.raw.msg);
}
public void initRFIDAndKeyReceiver() {
initRFID();
initKeyRecriver(this::readEPC);
}
@SuppressLint("UnspecifiedRegisterReceiverFlag")
public void initKeyRecriver(MyKeyInfoCall call) {
keyReceiver = new MyKeyReceiver(call);
IntentFilter filter = new IntentFilter();
filter.addAction("android.rfid.FUN_KEY");
filter.addAction("android.intent.action.FUN_KEY");
registerReceiver(keyReceiver, filter);
}
// 扫描epc
protected void readEPC() {
var tagModels = uhfReader.inventoryRealTime();
if (tagModels == null || tagModels.isEmpty()) {
Toast.makeText(context, "读取失败", Toast.LENGTH_SHORT).show();
return;
}
// tagModels.forEach(t-> {
// byte[] bytes = t.getmEpcBytes();
// var epc = Tools.Bytes2HexString(bytes, bytes.length);
//
// Log.e("TAG", "读取到: "+epc);
// });
byte[] bytes = tagModels.get(0).getmEpcBytes();
// uhfReader.selectEPC(epcBytes);// 选择epc
//
// byte[] bytes = uhfReader.readFrom6C(1, 2, 4, accessBytes);
if (bytes == null || bytes.length == 0) {
// Toast.makeText(context, "读取失败", Toast.LENGTH_SHORT).show();
return;
}
music.start();
var epc = Tools.Bytes2HexString(bytes, bytes.length);
Log.e("TAG", "onkeyDown:" + epc);
sanEpcCall(epc);
}
// 扫描epc返回
public void sanEpcCall(String epc) {
}
@Override
protected void onDestroy() {
super.onDestroy();
try {
if (keyReceiver != null) {
unregisterReceiver(keyReceiver);
}
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
}
} }

@ -48,6 +48,7 @@ public class BaseTyre extends BaseObservable {
*/ */
private String tyrePattern; private String tyrePattern;
private String patternDepth; private String patternDepth;
private String patternDepth1;
private String grooves; private String grooves;
/** /**
* *
@ -63,13 +64,17 @@ public class BaseTyre extends BaseObservable {
private String wheelPostion; private String wheelPostion;
private Long deptId; private Long deptId;
public String getPatternDepth() { public String getPatternDepth1() {
if (patternDepth != null && !patternDepth.isEmpty()) { if (patternDepth != null && !patternDepth.isEmpty()) {
return patternDepth + " mm"; return patternDepth + " mm";
} }
return patternDepth; return patternDepth;
} }
public String getPatternDepth() {
return patternDepth;
}
public void setPatternDepth(String patternDepth) { public void setPatternDepth(String patternDepth) {
this.patternDepth = patternDepth; this.patternDepth = patternDepth;
} }

@ -42,9 +42,6 @@ public class BizOrderTireDetail {
*/ */
private String treadDepth; private String treadDepth;
private String remark; private String remark;
/** /**
* *
*/ */
@ -54,6 +51,27 @@ public class BizOrderTireDetail {
* *
*/ */
private String tireStatus; private String tireStatus;
// 数据类型(保养;换新胎,卸车;换新胎,装车)
private String dataType;
private BaseTyre baseTyre;//基础轮胎信息
public BaseTyre getBaseTyre() {
return baseTyre;
}
public void setBaseTyre(BaseTyre baseTyre) {
this.baseTyre = baseTyre;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getRemark() { public String getRemark() {
return remark; return remark;

@ -17,6 +17,7 @@ import androidx.databinding.DataBindingUtil;
import com.example.tyre.R; import com.example.tyre.R;
import com.example.tyre.databinding.DialogTireChangeBinding; import com.example.tyre.databinding.DialogTireChangeBinding;
import com.example.tyre.maintenance.been.BaseTyre; import com.example.tyre.maintenance.been.BaseTyre;
import com.example.tyre.maintenance.been.BizOrderTireDetail;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -27,9 +28,11 @@ public class TireChangeDialog extends Dialog {
private List<BaseTyre> baseTyreList; private List<BaseTyre> baseTyreList;
private Map<String, BaseTyre> tyreMap; private Map<String, BaseTyre> tyreMap;
private String locationOld; private String locationOld;
private TireChangeListener tireChangeListener;
public TireChangeDialog(@NonNull Context context) { public TireChangeDialog(@NonNull Context context, TireChangeListener tireChangeListener) {
super(context, R.style.MyMiddleDialogStyle); super(context, R.style.MyMiddleDialogStyle);
this.tireChangeListener = tireChangeListener;
binding = binding =
DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_tire_change, null, false); DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_tire_change, null, false);
binding.dialogTitle1.setOnClickListener(view -> dismiss()); binding.dialogTitle1.setOnClickListener(view -> dismiss());
@ -47,8 +50,8 @@ public class TireChangeDialog extends Dialog {
baseTyreList.forEach(tire -> { baseTyreList.forEach(tire -> {
String wheelPostion = tire.getWheelPostion(); String wheelPostion = tire.getWheelPostion();
tyreMap.put(wheelPostion, tire); tyreMap.put(wheelPostion, tire);
if (tire.getTyreNo()==null||tire.getTyreNo().equals("")){ if (tire.getTyreNo() == null || tire.getTyreNo().equals("")) {
tire.setTyreNo("t:"+wheelPostion); tire.setTyreNo("t:" + wheelPostion);
} }
initTire(wheelPostion, tire); initTire(wheelPostion, tire);
}); });
@ -88,17 +91,17 @@ public class TireChangeDialog extends Dialog {
} }
BaseTyre baseTyre = tyreMap.get(location); BaseTyre baseTyre = tyreMap.get(location);
BaseTyre baseTyreOld = tyreMap.get(this.locationOld); BaseTyre baseTyreOld = tyreMap.get(this.locationOld);
if (baseTyre==null) { if (baseTyre == null) {
Toast.makeText(getContext(), "当前轮胎位置不存在", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "当前轮胎位置不存在", Toast.LENGTH_SHORT).show();
return; return;
} }
initTire(this.locationOld, baseTyre); initTire(this.locationOld, baseTyre);
Log.e("TAG", "tireLayoutCllick:" + location+","+baseTyre.toString()); Log.e("TAG", "tireLayoutCllick:" + location + "," + baseTyre.toString());
initTire(location, baseTyreOld); initTire(location, baseTyreOld);
Log.e("TAG", "tireLayoutCllick:" + location+","+baseTyreOld.toString()); Log.e("TAG", "tireLayoutCllick:" + location + "," + baseTyreOld.toString());
Toast.makeText(getContext(), "互换成功", Toast.LENGTH_SHORT).show();
} }
/** /**
@ -145,4 +148,9 @@ public class TireChangeDialog extends Dialog {
break; break;
} }
} }
public interface TireChangeListener {
void onChangeSave(BizOrderTireDetail bizOrderTireDetail);
}
} }

@ -27,15 +27,14 @@ public class TireUpdateDialog extends Dialog {
private BaseTyre baseTyre; private BaseTyre baseTyre;
private ObservableBoolean isupdate; private ObservableBoolean isupdate;
private BizOrderTireDetail bizOrderTireDetail; private BizOrderTireDetail bizOrderTireDetail;
private BizOrderTireDetail newTireDetail;// 新轮胎
private TireUpdateDialogSaveListener listener; private TireUpdateDialogSaveListener listener;
private File image; private File image;
private ObservableBoolean photoState; private ObservableBoolean photoState;
private TireChangeDialog tireChangeDialog; private TireChangeDialog tireChangeDialog;// 同车轮胎互换弹窗
private List<BaseTyre> baseTyreList; private List<BaseTyre> baseTyreList;
private BaseTyre newBaseTyre;
public void setBaseTyreList(List<BaseTyre> baseTyreList) {
this.baseTyreList = baseTyreList;
}
public TireUpdateDialog(@NonNull Context context, TireUpdateDialogSaveListener listener) { public TireUpdateDialog(@NonNull Context context, TireUpdateDialogSaveListener listener) {
super(context, R.style.MyMiddleDialogStyle); super(context, R.style.MyMiddleDialogStyle);
@ -50,8 +49,8 @@ public class TireUpdateDialog extends Dialog {
isupdate.set(isChecked); isupdate.set(isChecked);
}); });
// 保存按钮点击事件
binding.dialogTireUpdateSave.setOnClickListener(view -> { binding.dialogTireUpdateSave.setOnClickListener(view -> {// 保存按钮点击事件
String shendu = binding.dialogTireShendu1.getText().toString(); String shendu = binding.dialogTireShendu1.getText().toString();
String taiya = binding.dialogTireTaiya1.getText().toString(); String taiya = binding.dialogTireTaiya1.getText().toString();
if (shendu.isEmpty() || taiya.isEmpty()) { if (shendu.isEmpty() || taiya.isEmpty()) {
@ -66,7 +65,21 @@ public class TireUpdateDialog extends Dialog {
bizOrderTireDetail.setTreadDepth(shendu);// 花纹深度 bizOrderTireDetail.setTreadDepth(shendu);// 花纹深度
bizOrderTireDetail.setTirePress(taiya);// 胎压 bizOrderTireDetail.setTirePress(taiya);// 胎压
listener.onSave(bizOrderTireDetail, image); boolean isupdate1 = isupdate.get();
if (isupdate1) {
String s = binding.newTireInfo2.getText().toString();
String s1 = binding.dialogTireShendu2.getText().toString();
String s2 = binding.dialogTireTaiya2.getText().toString();
if (s1.isEmpty() || s2.isEmpty()) {
Toast.makeText(context, "请输入花纹深度和胎压", Toast.LENGTH_SHORT).show();
return;
}
newTireDetail.setTreadDepth(s1);// 花纹深度
newTireDetail.setTirePress(s2);// 胎压
bizOrderTireDetail.setDataType("换新胎,卸车");
}
listener.onSave(bizOrderTireDetail, image, isupdate1,newTireDetail);
}); });
// 同车互换 // 同车互换
binding.dialogButtonTong.setOnClickListener(view -> { binding.dialogButtonTong.setOnClickListener(view -> {
@ -82,8 +95,36 @@ public class TireUpdateDialog extends Dialog {
photoState = new ObservableBoolean(false); photoState = new ObservableBoolean(false);
binding.setPhotoState(photoState); binding.setPhotoState(photoState);
setContentView(binding.getRoot()); setContentView(binding.getRoot());
tireChangeDialog=new TireChangeDialog(context); tireChangeDialog = new TireChangeDialog(context, new TireChangeDialog.TireChangeListener() {
@Override
public void onChangeSave(BizOrderTireDetail bizOrderTireDetail) {
}
});
}
// 换新胎了
public void setNewBaseTyre(BaseTyre newBaseTyre) {
this.newBaseTyre = newBaseTyre;
// 显示用
String tyreNo = baseTyre.getTyreNo();
String selfNo = baseTyre.getSelfNo();
binding.newTireInfo1.setText(tyreNo == null ? baseTyre.getTyreEpc() : tyreNo);
binding.newTireInfo2.setText(selfNo);
binding.dialogTireShendu2.setText(newBaseTyre.getPatternDepth());
// id
Long tyreId = baseTyre.getTyreId();
newTireDetail.setTireId(tyreId);
newTireDetail.setTireCode(tyreNo);
newTireDetail.setBaseTyre(newBaseTyre);
}
public void setBaseTyreList(List<BaseTyre> baseTyreList) {
this.baseTyreList = baseTyreList;
} }
public void setBaseTyre(BaseTyre baseTyre) { public void setBaseTyre(BaseTyre baseTyre) {
@ -93,6 +134,13 @@ public class TireUpdateDialog extends Dialog {
bizOrderTireDetail.setTireId(baseTyre.getTyreId()); bizOrderTireDetail.setTireId(baseTyre.getTyreId());
bizOrderTireDetail.setTireCode(baseTyre.getTyreNo()); bizOrderTireDetail.setTireCode(baseTyre.getTyreNo());
bizOrderTireDetail.setPositionName(baseTyre.getWheelPostion()); bizOrderTireDetail.setPositionName(baseTyre.getWheelPostion());
bizOrderTireDetail.setDataType("保养");
bizOrderTireDetail.setBaseTyre(baseTyre);
// 换新胎初始化
newTireDetail = new BizOrderTireDetail();
newTireDetail.setPositionName(baseTyre.getWheelPostion());// 保存轮位
newTireDetail.setDataType("换新胎,装车");
// 重置ui
photoState.set(false); photoState.set(false);
binding.dialogUpdatePhoto.setImageResource(R.mipmap.ic_xiangji); binding.dialogUpdatePhoto.setImageResource(R.mipmap.ic_xiangji);
show(); show();
@ -130,9 +178,10 @@ public class TireUpdateDialog extends Dialog {
} }
public interface TireUpdateDialogSaveListener { public interface TireUpdateDialogSaveListener {
void onSave(BizOrderTireDetail bizOrderTireDetail, File image); void onSave(BizOrderTireDetail bizOrderTireDetail, File image, boolean isupdate,BizOrderTireDetail newTireDetail);
void onTakePhoto(); void onTakePhoto();
void onChengeTong(String location);
} }
} }

@ -0,0 +1,9 @@
package com.example.tyre.maintenance.receiver;
/**
* @author wanghao
* @date 2024/7/9 17:24
*/
public interface MyKeyInfoCall {
void onkeyDown();
}

@ -0,0 +1,30 @@
package com.example.tyre.maintenance.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.KeyEvent;
public class MyKeyReceiver extends BroadcastReceiver {
private MyKeyInfoCall myKeyInfoCall;
public MyKeyReceiver() {
}
public MyKeyReceiver(MyKeyInfoCall myKeyInfoCall) {
this.myKeyInfoCall = myKeyInfoCall;
}
@Override
public void onReceive(Context context, Intent intent) {
Log.e("TAG", "onReceive:" + intent.getAction());
var keydown = intent.getBooleanExtra("keydown", false);
var keyCode = intent.getIntExtra("keyCode", 0);
Log.e("TAG", "onReceive:" + keydown + " --" + keyCode);
if (keydown && (keyCode == 135 || keyCode ==136)) {
myKeyInfoCall.onkeyDown();
}
}
}

@ -156,7 +156,8 @@
android:textSize="22sp" android:textSize="22sp"
android:textColor="@color/black" android:textColor="@color/black"
android:background="@drawable/bg_santex_coppy" android:background="@drawable/bg_santex_coppy"
android:gravity="center" /> android:gravity="center"
android:inputType="number"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -279,8 +280,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:text="完成" android:text="完成"
style="@style/buttonStyle" style="@style/buttonStyle"/>
android:textColor="@color/black"/>
<View <View
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -291,8 +291,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:text="返回" android:text="返回"
style="@style/buttonStyle" style="@style/buttonStyle"/>
android:textColor="@color/black"/>
</LinearLayout> </LinearLayout>

@ -46,6 +46,8 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:orientation="horizontal" android:orientation="horizontal"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3"> app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
@ -62,6 +64,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_santex_coppy" android:background="@drawable/bg_santex_coppy"
android:inputType="textVisiblePassword"
android:focusable="true"
android:focusableInTouchMode="true"
android:selectable="true"
/> />
</LinearLayout> </LinearLayout>

@ -61,28 +61,18 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2"> 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
<TextView
android:id="@+id/basemessage" android:id="@+id/basemessage"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent" android:layout_height="45dp"
android:background="@color/xuebai" android:gravity="center"
android:textColor="@color/white"
android:background="@color/black"
android:textSize="18sp" android:textSize="18sp"
android:text="基本信息" android:text="基本信息"/>
style="@style/buttonStyle"
android:textColor="@color/black"/>
<!--<Button--> <!--<Button-->
<!--style="@style/buttonStyle"--> <!--style="@style/buttonStyle"-->
@ -97,7 +87,7 @@
<!--android:text="装卸记录"--> <!--android:text="装卸记录"-->
<!--/>--> <!--/>-->
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

@ -107,7 +107,7 @@
<LinearLayout <LinearLayout
android:id="@+id/linearLayout4" android:id="@+id/linearLayout4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="80dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:orientation="horizontal" android:orientation="horizontal"
@ -133,7 +133,7 @@
<LinearLayout <LinearLayout
android:id="@+id/linearLayout9" android:id="@+id/linearLayout9"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="80dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:orientation="horizontal" android:orientation="horizontal"
@ -159,7 +159,7 @@
<LinearLayout <LinearLayout
android:id="@+id/linearLayout5" android:id="@+id/linearLayout5"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="80dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:orientation="horizontal" android:orientation="horizontal"
@ -185,7 +185,7 @@
<LinearLayout <LinearLayout
android:id="@+id/linearLayout6" android:id="@+id/linearLayout6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="80dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:orientation="horizontal" android:orientation="horizontal"

@ -98,7 +98,8 @@
android:textSize="15sp" android:textSize="15sp"
android:textColor="@color/black" android:textColor="@color/black"
android:background="@drawable/bg_santex_coppy" android:background="@drawable/bg_santex_coppy"
android:gravity="center" /> android:gravity="center"
android:inputType="textVisiblePassword"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -127,6 +128,7 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/bg_santex_coppy" android:background="@drawable/bg_santex_coppy"
android:gravity="center" android:gravity="center"
android:inputType="textVisiblePassword"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="22sp" /> android:textSize="22sp" />
<Button <Button
@ -169,7 +171,8 @@
android:textSize="22sp" android:textSize="22sp"
android:textColor="@color/black" android:textColor="@color/black"
android:background="@drawable/bg_santex_coppy" android:background="@drawable/bg_santex_coppy"
android:gravity="center" /> android:gravity="center"
android:inputType="number"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout

@ -157,7 +157,6 @@
<TextView <TextView
android:layout_height="40dp" android:layout_height="40dp"
android:gravity="right|center" android:gravity="right|center"
android:onClick="selectDate"
android:text="@{tire.selfNo}" android:text="@{tire.selfNo}"
android:textColor="@color/textColor1" android:textColor="@color/textColor1"
app:layout_columnWeight="1" /> app:layout_columnWeight="1" />
@ -407,6 +406,7 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" android:textStyle="bold"
android:visibility="gone"
app:layout_columnSpan="2" /> app:layout_columnSpan="2" />
<LinearLayout <LinearLayout
@ -424,16 +424,16 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="装车轮胎" android:text="装车轮胎扫描"
android:textColor="@color/textColor1" android:textColor="@color/textColor1"
app:layout_columnWeight="1" /> app:layout_columnWeight="1" />
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/new_tire_info1"
android:layout_height="40dp" android:layout_height="40dp"
android:gravity="right|center" android:gravity="right|center"
android:onClick="selectDate" android:text=""
android:text="123@{line}"
android:textColor="@color/textColor1" android:textColor="@color/textColor1"
app:layout_columnWeight="1" /> app:layout_columnWeight="1" />
@ -466,12 +466,14 @@
</LinearLayout> </LinearLayout>
<TextView <EditText
android:id="@+id/new_tire_info2"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/textColor1" android:textColor="@color/textColor1"
app:layout_columnWeight="1" /> app:layout_columnWeight="1"
android:hint="输入轮胎自编号"/>
<View <View
android:layout_height="1dp" android:layout_height="1dp"
@ -580,18 +582,18 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<!-- <Button--> <!-- <Button-->
<!-- android:id="@+id/dialog_tire_update_save1"--> <!-- android:id="@+id/dialog_tire_update_save1"-->
<!-- android:layout_width="match_parent"--> <!-- android:layout_width="match_parent"-->
<!-- android:layout_height="55dp"--> <!-- android:layout_height="55dp"-->
<!-- android:layout_marginTop="12dp"--> <!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginBottom="12dp"--> <!-- android:layout_marginBottom="12dp"-->
<!-- android:layout_weight="1"--> <!-- android:layout_weight="1"-->
<!-- android:background="@drawable/bg_button_blue"--> <!-- android:background="@drawable/bg_button_blue"-->
<!-- android:text="保存信息并换胎"--> <!-- android:text="保存信息并换胎"-->
<!-- android:textColor="@color/white"--> <!-- android:textColor="@color/white"-->
<!-- android:textSize="16sp"--> <!-- android:textSize="16sp"-->
<!-- android:textStyle="bold" />--> <!-- android:textStyle="bold" />-->
<Button <Button
android:id="@+id/dialog_tire_update_save" android:id="@+id/dialog_tire_update_save"

@ -48,7 +48,7 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{data.patternDepth }' android:text='@{data.patternDepth1 }'
android:layout_marginBottom="5dp"/> android:layout_marginBottom="5dp"/>
</LinearLayout> </LinearLayout>

Binary file not shown.
Loading…
Cancel
Save