增加 - 返修提交

master
wangh 11 months ago
parent bdebc8c98a
commit 4bb8d2b19b

@ -9,9 +9,9 @@
android:allowBackup="true" android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules" android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/logo2"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/logo2"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Aucmames" android:theme="@style/Theme.Aucmames"
tools:targetApi="31"> tools:targetApi="31">
@ -32,15 +32,15 @@
<activity <activity
android:name=".HomePageActivity" android:name=".HomePageActivity"
android:exported="true"> android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> </activity>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true"> android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> </activity>
</application> </application>

@ -74,6 +74,7 @@ public class BindingActivity extends BaseActivity {
Toast.makeText(BindingActivity.this, "绑定成功", Toast.LENGTH_SHORT).show(); Toast.makeText(BindingActivity.this, "绑定成功", Toast.LENGTH_SHORT).show();
boxCode.set(""); boxCode.set("");
innerCode.set(""); innerCode.set("");
materialName.set("");
} else { } else {
Toast.makeText(BindingActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show(); Toast.makeText(BindingActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
} }

@ -17,8 +17,10 @@ import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
import com.bigkoo.pickerview.listener.OnOptionsSelectListener; import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
import com.bigkoo.pickerview.view.OptionsPickerView; import com.bigkoo.pickerview.view.OptionsPickerView;
import com.example.aucma_mes.adapter.CheckAdapter; import com.example.aucma_mes.adapter.CheckAdapter;
import com.example.aucma_mes.adapter.RepaitSubmintInfoAdapter;
import com.example.aucma_mes.base.BaseActivity; import com.example.aucma_mes.base.BaseActivity;
import com.example.aucma_mes.databinding.ActivityCheckBinding; import com.example.aucma_mes.databinding.ActivityCheckBinding;
import com.example.aucma_mes.dialog.RepairSubmintInfoDialog;
import com.example.aucma_mes.entity.DefectBeen; import com.example.aucma_mes.entity.DefectBeen;
import com.example.aucma_mes.entity.DictBeen; import com.example.aucma_mes.entity.DictBeen;
import com.example.aucma_mes.entity.Result; import com.example.aucma_mes.entity.Result;
@ -36,18 +38,19 @@ import java.util.List;
import okhttp3.RequestBody; import okhttp3.RequestBody;
public class CheckActivity extends BaseActivity implements CheckAdapter.CheckItemClickCall/*, AdapterView.OnItemClickListener*/, OnOptionsSelectListener { public class CheckActivity extends BaseActivity implements CheckAdapter.CheckItemClickCall/*, AdapterView.OnItemClickListener*/, OnOptionsSelectListener, RepaitSubmintInfoAdapter.CheckItemClickCall {
private ActivityCheckBinding binding; private ActivityCheckBinding binding;
private CheckViewModel checkViewModel; private CheckViewModel checkViewModel;
// private ListPopupWindow listPopupWindow; private RepairSubmintInfoDialog tipDialog;
private CheckAdapter checkAdapter; private CheckAdapter checkAdapter;
private List<DefectBeen> list; private List<DefectBeen> list;
private List<DefectBeen> submitList; private List<DefectBeen> submitList;// 提交缺陷列表
private OptionsPickerView opv; private OptionsPickerView opv;
private List<String> options1; private List<String> options1;
private List<List<String>> options2; private List<List<String>> options2;
private List<List<List<String>>> options3; private List<List<List<String>>> options3;
private List<DefectBeen> topDefects;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -60,7 +63,92 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
checkAdapter.setList(submitList); checkAdapter.setList(submitList);
binding.recyclerView.setAdapter(checkAdapter); binding.recyclerView.setAdapter(checkAdapter);
String stationCode = getIntent().getStringExtra("stationCode"); String stationCode = getIntent().getStringExtra("stationCode");
// 三联 checkViewModel.setStationCode(stationCode);
// 三联
initOptionpb(stationCode);
tipDialog = new RepairSubmintInfoDialog(this, this);
}
// 扫码
@Override
protected void sanInfo(String code) {
checkViewModel.setCode(code);
OkGo.<Result>post(url + "/api/check/select").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", ""))
.params("code", code).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<Result> response) {
super.onSuccess(response);
Result result = response.body();
if (result.getCode() == 200) {
checkViewModel.setName(result.getMsg());
topDefects = gson.fromJson(gson.toJson(result.getData()), new TypeToken<List<DefectBeen>>() {
}.getType());
if (topDefects == null || topDefects.isEmpty()) {
Toast.makeText(CheckActivity.this, "本工位无需检查返修情况", Toast.LENGTH_SHORT).show();
return;
}
checkViewModel.setButtonVisbleState(true);
tipDialog.setList(topDefects);
tipDialog.show();
/*// 直接添加提交数据中submitList.addAll(defectBeens);
checkAdapter.notifyDataSetChanged();*/
} else {
Toast.makeText(CheckActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
}
}
});
}
// 弹出选择框
public void checkSelect(View view) {
opv.show();
}
// 弹出返修
public void selectRepair(View view) {
tipDialog.show();
}
// 提交
public void checkSubmint(View view) {
if (checkViewModel.getName() == null || checkViewModel.getName().isEmpty()) return;
checkViewModel.setList(submitList);
checkViewModel.setMeasure(submitList.isEmpty() ? "3" : "1");
checkViewModel.setUserName(SharedPreferencesUtils.getstring("userName", "pda01"));
checkViewModel.setTeamCode(SharedPreferencesUtils.getstring("teamCode",null));
OkGo.<Result>post(url + "/api/checkSubmit").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("token", ""))
.upRequestBody(RequestBody.create(JSON, gson.toJson(checkViewModel))).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<Result> response) {
super.onSuccess(response);
Result result = response.body();
if (result.getCode() == 200) {
Toast.makeText(CheckActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
checkViewModel.setCode(null);
checkViewModel.setName(null);
checkViewModel.setDefect(null);
checkViewModel.setButtonVisbleState(false);
submitList.clear();
checkAdapter.notifyDataSetChanged();
} else {
Toast.makeText(CheckActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
}
}
});
}
// 删除缺陷
@Override
public void onClick(int positon) {
Log.e("TAG", "列表点击:" + positon);
submitList.remove(positon);
checkAdapter.notifyDataSetChanged();
}
// 初始化-联动选择
private void initOptionpb(String stationCode) {
opv = new OptionsPickerBuilder(this, this).build(); opv = new OptionsPickerBuilder(this, this).build();
OkGo.<Result>get(url + "/base/qualityInspectionItem/getQualityDefects/" + stationCode).tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")).execute(new MyRecultCall(dialog, this) { OkGo.<Result>get(url + "/base/qualityInspectionItem/getQualityDefects/" + stationCode).tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")).execute(new MyRecultCall(dialog, this) {
@Override @Override
@ -105,9 +193,6 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
options3.get(index1).get(index2).add(qualityDefectName); options3.get(index1).get(index2).add(qualityDefectName);
} }
}); });
// Log.e("TAG", "options1:" + options1.toString());
// Log.e("TAG", "options2:" + options2.toString());
// Log.e("TAG", "options3:" + options3.toString());
opv.setPicker(options1, options2, options3); opv.setPicker(options1, options2, options3);
} else { } else {
Toast.makeText(CheckActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show(); Toast.makeText(CheckActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
@ -115,60 +200,16 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
} }
}); });
}
@Override
protected void sanInfo(String code) {
checkViewModel.setCode(code);
}
//弹出框
public void checkSelect(View view) {
opv.show();
} }
//提交 // 三联添加
public void checkSubmint(View view) {
checkViewModel.setList(submitList);
checkViewModel.setUserName(SharedPreferencesUtils.getstring("userName", "pda01"));
OkGo.<Result>post(url + "/api/checkSubmit").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")).upRequestBody(RequestBody.create(JSON, gson.toJson(checkViewModel))).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<Result> response) {
super.onSuccess(response);
Result result = response.body();
if (result.getCode() == 200) {
Toast.makeText(CheckActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
checkViewModel.setCode(null);
submitList.clear();
checkAdapter.notifyDataSetChanged();
} else {
Toast.makeText(CheckActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
}
}
});
}
// 删除缺陷
@Override
public void onClick(int positon) {
Log.e("TAG", "列表点击:" + positon);
submitList.remove(positon);
checkAdapter.notifyDataSetChanged();
}
//三联添加
@Override @Override
public void onOptionsSelect(int options1, int options2, int options3, View v) { public void onOptionsSelect(int options1, int options2, int options3, View v) {
String defectName = this.options3.get(options1).get(options2).get(options3); String defectName = this.options3.get(options1).get(options2).get(options3);
checkViewModel.setDefect(defectName); checkViewModel.setDefect(defectName);
DefectBeen defectBeen = new DefectBeen(); DefectBeen defectBeen = new DefectBeen();
defectBeen.setQualityDefectName(defectName); defectBeen.setQualityDefectName(defectName);
DefectBeen defectBeen1 = list.get(list.indexOf(defectBeen)); DefectBeen defectBeen1 = list.get(list.indexOf(defectBeen));
if (submitList.contains(defectBeen1)) { if (submitList.contains(defectBeen1)) {
Toast.makeText(this, "已经添加了", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "已经添加了", Toast.LENGTH_SHORT).show();
return; return;
@ -176,4 +217,18 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
submitList.add(defectBeen1); submitList.add(defectBeen1);
checkAdapter.notifyDataSetChanged(); checkAdapter.notifyDataSetChanged();
} }
// 返修添加提交数据中
@Override
public void submintRepair(int positon) {
DefectBeen defectBeen = topDefects.get(positon);
if (submitList.contains(defectBeen)) {
Toast.makeText(this, "已经添加了", Toast.LENGTH_SHORT).show();
return;
}
Log.e("TAG", "返修提交的ID:" + defectBeen.getObjId());
submitList.add(defectBeen);
checkAdapter.notifyDataSetChanged();
Toast.makeText(this, "添加成功", Toast.LENGTH_SHORT).show();
}
} }

@ -13,6 +13,7 @@ import android.widget.Toast;
import com.example.aucma_mes.databinding.ActivityHomePageBinding; import com.example.aucma_mes.databinding.ActivityHomePageBinding;
import com.example.aucma_mes.dialog.InfoDialog; import com.example.aucma_mes.dialog.InfoDialog;
import com.example.aucma_mes.entity.LoginInfoBeen; import com.example.aucma_mes.entity.LoginInfoBeen;
import com.example.aucma_mes.utils.SharedPreferencesUtils;
import com.example.aucma_mes.vm.User; import com.example.aucma_mes.vm.User;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
@ -38,7 +39,8 @@ public class HomePageActivity extends AppCompatActivity {
String stationCode = null; String stationCode = null;
try { try {
User user = infoBeen.getUser(); User user = infoBeen.getUser();
user.setTeamName(SharedPreferencesUtils.getstring("teamName",null));
user.setTeamCode(SharedPreferencesUtils.getstring("teamCode",null));
stationCode = user.getStationCode(); stationCode = user.getStationCode();
infoDialog.setInfoData(infoBeen, user); infoDialog.setInfoData(infoBeen, user);
}catch (Exception e){ }catch (Exception e){
@ -46,38 +48,38 @@ public class HomePageActivity extends AppCompatActivity {
} }
// String finalStationCode = stationCode; // String final StationCode = stationCode;
binding.homeButton1.setOnClickListener(v -> { binding.homeButton1.setOnClickListener(v -> {
// if (!roles.contains("quality_inspection")) { if (!roles.contains("quality_inspection")) {
// Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show();
// return; return;
// } }
intent = new Intent(this, CheckActivity.class); intent = new Intent(this, CheckActivity.class);
intent.putExtra("stationCode", "20 01"); intent.putExtra("stationCode", "2001");
startActivity(intent); startActivity(intent);
}); });
binding.homeButton2.setOnClickListener(v -> { binding.homeButton2.setOnClickListener(v -> {
// if (!roles.contains("shell_bile_binding")) { if (!roles.contains("shell_bile_binding")) {
// Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show();
// return; return;
// } }
intent = new Intent(this, BindingActivity.class); intent = new Intent(this, BindingActivity.class);
intent.putExtra("title", "壳胆绑定"); intent.putExtra("title", "壳胆绑定");
startActivity(intent); startActivity(intent);
}); });
binding.homeButton3.setOnClickListener(v -> { binding.homeButton3.setOnClickListener(v -> {
// if (!roles.contains("quality_repair")) { if (!roles.contains("quality_repair")) {
// Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show();
// return; return;
// } }
intent = new Intent(this, RepairActivity.class); intent = new Intent(this, RepairActivity.class);
startActivity(intent); startActivity(intent);
}); });
binding.homeButton4.setOnClickListener(v -> { binding.homeButton4.setOnClickListener(v -> {
// if (!roles.contains("barcode_binding")) { if (!roles.contains("barcode_binding")) {
// Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show();
// return; return;
// } }
intent = new Intent(this, BindingActivity.class); intent = new Intent(this, BindingActivity.class);
intent.putExtra("title", "条码绑定"); intent.putExtra("title", "条码绑定");
startActivity(intent); startActivity(intent);

@ -19,6 +19,7 @@ import com.example.aucma_mes.databinding.ActivityMainBinding;
import com.example.aucma_mes.entity.LoginBack; import com.example.aucma_mes.entity.LoginBack;
import com.example.aucma_mes.entity.RegisterPda; import com.example.aucma_mes.entity.RegisterPda;
import com.example.aucma_mes.entity.Result; import com.example.aucma_mes.entity.Result;
import com.example.aucma_mes.entity.TeamBeen;
import com.example.aucma_mes.utils.MyRecultCall; import com.example.aucma_mes.utils.MyRecultCall;
import com.example.aucma_mes.utils.SharedPreferencesUtils; import com.example.aucma_mes.utils.SharedPreferencesUtils;
import com.example.aucma_mes.vm.User; import com.example.aucma_mes.vm.User;
@ -38,49 +39,68 @@ import okhttp3.RequestBody;
public class MainActivity extends BaseActivity { public class MainActivity extends BaseActivity {
private User user; private User user;
private boolean loginState=false; private boolean loginState = false;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main); ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
user=new User(); user = new User();
user.setUsername("pda01"); user.setUsername("pda01");
user.setPassword("aucma@123"); user.setPassword("aucma@123");
getSupportActionBar().hide(); // 隐藏原生标题栏 getSupportActionBar().hide(); // 隐藏原生标题栏
binding.setUser(user); binding.setUser(user);
// Toast.makeText(this, getMacAddress()+"可以使用", Toast.LENGTH_SHORT).show();
OkGo.<Result>get(url + "/report/pdaRecord/getPdaRecord").tag(this) OkGo.<Result>get(url + "/base/teamMembers/getTeamMemberList").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("token", "")) // .headers("Authorization", SharedPreferencesUtils.getstring("token", ""))
.execute(new MyRecultCall(dialog, this) { .execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<Result> response) {
super.onSuccess(response);
List<TeamBeen> teamBeens = gson.fromJson(gson.toJson(response.body().getData()), new TypeToken<List<TeamBeen>>() {
}.getType());
user.setTeamBeens(teamBeens);
}
});
getPda();
}
@Override
protected void sanInfo(String code) {
}
// 查询PDA Mac 地址列表
private void getPda() {
OkGo.<Result>get(url + "/report/pdaRecord/getPdaRecord").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")).execute(new MyRecultCall(dialog, this) {
@Override @Override
public void onSuccess(Response<Result> response) { public void onSuccess(Response<Result> response) {
super.onSuccess(response); super.onSuccess(response);
Result result = response.body(); Result result = response.body();
if (result.getCode()==200){ if (result.getCode() == 200) {
List<RegisterPda> pdaList=gson.fromJson(gson.toJson( result.getData()),new TypeToken< List<RegisterPda>>(){}.getType()); List<RegisterPda> pdaList = gson.fromJson(gson.toJson(result.getData()), new TypeToken<List<RegisterPda>>() {
// Log.e("TAG", "onSuccess:" + pdaList.toString()); }.getType());
RegisterPda registerPda=new RegisterPda(); RegisterPda registerPda = new RegisterPda();
registerPda.setSerialCode(getMacAddress()); registerPda.setSerialCode(getMacAddress());
int index = pdaList.indexOf(registerPda); int index = pdaList.indexOf(registerPda);
loginState= index >-1; loginState = index > -1;
if (loginState){ if (loginState) {
SharedPreferencesUtils.putstring("pdaName",pdaList.get(index).getPdaName()); SharedPreferencesUtils.putstring("pdaName", pdaList.get(index).getPdaName());
} }
}else { } else {
Toast.makeText(MainActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show(); Toast.makeText(MainActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
} }
} }
}); });
} }
@Override // 获取本机Mac地址
protected void sanInfo(String code) {
}
public String getMacAddress() { public String getMacAddress() {
try { try {
List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces()); List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
@ -105,6 +125,8 @@ private boolean loginState=false;
} }
return "02:00:00:00:00:00"; // 如果无法获取到有效的MAC地址返回一个默认值 return "02:00:00:00:00:00"; // 如果无法获取到有效的MAC地址返回一个默认值
} }
// 登录
public void login(View view) { public void login(View view) {
if (!loginState) { if (!loginState) {
Toast.makeText(this, "设备未注册,不允许登录", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "设备未注册,不允许登录", Toast.LENGTH_SHORT).show();
@ -113,18 +135,15 @@ private boolean loginState=false;
dialog.show(); dialog.show();
MediaType JSON = MediaType.parse("application/json; charset=utf-8"); MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON,gson.toJson(user) ); RequestBody body = RequestBody.create(JSON, gson.toJson(user));
OkGo.<String>post(BaseActivity.url + "/login") OkGo.<String>post(BaseActivity.url + "/login").tag(this).upRequestBody(body).execute(new StringCallback() {
.tag(this)
.upRequestBody(body)
.execute(new StringCallback() {
@Override @Override
public void onSuccess(Response<String> response) { public void onSuccess(Response<String> response) {
LoginBack loginBack=gson.fromJson(response.body(),LoginBack.class); LoginBack loginBack = gson.fromJson(response.body(), LoginBack.class);
if (loginBack.getCode()==200){ if (loginBack.getCode() == 200) {
getUserInfo(loginBack.getToken()); getUserInfo(loginBack.getToken());
}else { } else {
dialog.dismiss(); dialog.dismiss();
Toast.makeText(MainActivity.this, loginBack.getMsg(), Toast.LENGTH_SHORT).show(); Toast.makeText(MainActivity.this, loginBack.getMsg(), Toast.LENGTH_SHORT).show();
} }
@ -140,25 +159,26 @@ private boolean loginState=false;
} }
private void getUserInfo(String token){
OkGo.<String>get(BaseActivity.url + "/getInfo") // 使用token获取用户信息
.tag(this) private void getUserInfo(String token) {
.headers("Authorization",token) OkGo.<String>get(BaseActivity.url + "/getInfo").tag(this).headers("Authorization", token).execute(new StringCallback() {
.execute(new StringCallback() {
@Override @Override
public void onSuccess(Response<String> response) { public void onSuccess(Response<String> response) {
dialog.dismiss(); dialog.dismiss();
String body = response.body(); String body = response.body();
LoginBack loginBack=gson.fromJson(body,LoginBack.class); LoginBack loginBack = gson.fromJson(body, LoginBack.class);
if (loginBack.getCode()==200){ if (loginBack.getCode() == 200) {
Intent intent = new Intent(MainActivity.this, HomePageActivity.class); Intent intent = new Intent(MainActivity.this, HomePageActivity.class);
intent.putExtra("role",loginBack.getRoles()); intent.putExtra("role", loginBack.getRoles());
intent.putExtra("info",body); intent.putExtra("info", body);
SharedPreferencesUtils.putstring("loginName",user.username); SharedPreferencesUtils.putstring("loginName", user.username);
SharedPreferencesUtils.putstring("token",token); SharedPreferencesUtils.putstring("teamCode", user.getTeamCode());
SharedPreferencesUtils.putstring("teamName", user.getTeamName());
SharedPreferencesUtils.putstring("token", token);
startActivity(intent); startActivity(intent);
finish(); finish();
}else { } else {
Toast.makeText(MainActivity.this, loginBack.getMsg(), Toast.LENGTH_SHORT).show(); Toast.makeText(MainActivity.this, loginBack.getMsg(), Toast.LENGTH_SHORT).show();
} }
} }

@ -76,9 +76,9 @@ public class RepairActivity extends BaseActivity {
public void onSuccess(Response<Result> response) { public void onSuccess(Response<Result> response) {
Result result = response.body(); Result result = response.body();
if (result.getCode() == 200) { if (result.getCode() == 200) {
defectBeens = gson.fromJson(result.getData().toString(), new TypeToken<List<DefectBeen>>() { defectBeens = gson.fromJson(gson.toJson(result.getData()), new TypeToken<List<DefectBeen>>() {
}.getType()); }.getType());
// Log.e("TAG", "onSuccess:" + defectBeens.toString()); Log.e("TAG", "onSuccess:" + defectBeens.toString());
defectBeens.forEach(t -> submitList.add(t.getObjId())); defectBeens.forEach(t -> submitList.add(t.getObjId()));
adapter.setList(defectBeens); adapter.setList(defectBeens);
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();

@ -0,0 +1,83 @@
package com.example.aucma_mes.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.aucma_mes.BR;
import com.example.aucma_mes.R;
import com.example.aucma_mes.databinding.ItemLayoutBinding;
import com.example.aucma_mes.databinding.ItemRepairInfoBinding;
import com.example.aucma_mes.entity.DefectBeen;
import java.util.List;
/**
* @author wanghao
* @date 2023/11/17 17:15
*/
public class RepaitSubmintInfoAdapter extends RecyclerView.Adapter<RepaitSubmintInfoAdapter.CheckAdapterVH> {
private Context context;
private List<DefectBeen> list;
private LayoutInflater from;
private CheckItemClickCall checkItemClickCall;
public RepaitSubmintInfoAdapter(Context context, CheckItemClickCall checkItemClickCall) {
this.context = context;
this.checkItemClickCall = checkItemClickCall;
from = LayoutInflater.from(context);
}
public void setList(List<DefectBeen> list) {
this.list = list;
}
@NonNull
@Override
public CheckAdapterVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ItemRepairInfoBinding inflate1 = DataBindingUtil.inflate(from, R.layout.item_repair_info, parent, false);
return new CheckAdapterVH(inflate1);
}
@Override
public void onBindViewHolder(@NonNull CheckAdapterVH holder, int position) {
DefectBeen defectBeen = list.get(position);
defectBeen.setIndex(position + 1);
ItemRepairInfoBinding databing = holder.getInflate1();
databing.setVariable(BR.item, defectBeen);
databing.itemButtom.setOnClickListener(t -> {
checkItemClickCall.submintRepair(position);
});
databing.executePendingBindings();
}
@Override
public int getItemCount() {
return list == null ? 0 : list.size();
}
class CheckAdapterVH extends RecyclerView.ViewHolder {
private ItemRepairInfoBinding inflate1;
public ItemRepairInfoBinding getInflate1() {
return inflate1;
}
public CheckAdapterVH(ItemRepairInfoBinding inflate1) {
super(inflate1.getRoot());
this.inflate1 = inflate1;
}
}
public interface CheckItemClickCall {
void submintRepair(int positon);
}
}

@ -26,8 +26,8 @@ import okhttp3.MediaType;
public abstract class BaseActivity extends AppCompatActivity { public abstract class BaseActivity extends AppCompatActivity {
private MyBroad receiver; private MyBroad receiver;
public static String url="http://192.168.0.101:8080"; // public static String url="http://192.168.3.199:6061";
// public static String url = "http://172.20.10.2:8080"; public static String url="http://10.100.72.10:8080";
public ProgressDialog dialog; public ProgressDialog dialog;
public Gson gson; public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8"); public MediaType JSON = MediaType.parse("application/json; charset=utf-8");

@ -0,0 +1,45 @@
package com.example.aucma_mes.dialog;
import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import com.example.aucma_mes.R;
import com.example.aucma_mes.adapter.RepaitSubmintInfoAdapter;
import com.example.aucma_mes.databinding.DialogInfoBinding;
import com.example.aucma_mes.databinding.DialogRepairSubmintInfoBinding;
import com.example.aucma_mes.entity.DefectBeen;
import com.example.aucma_mes.entity.LoginInfoBeen;
import com.example.aucma_mes.vm.User;
import java.util.List;
/**
* @author wanghao
* @date 2023/11/16 14:42
*/
public class RepairSubmintInfoDialog extends Dialog {
private DialogRepairSubmintInfoBinding binding;
private RepaitSubmintInfoAdapter adapter;
private RepaitSubmintInfoAdapter.CheckItemClickCall itemClickCall;
public void setList(List<DefectBeen> list) {
adapter.setList(list);
binding.repairSubmintRecycler.setAdapter(adapter);
}
public RepairSubmintInfoDialog(@NonNull Context context,RepaitSubmintInfoAdapter.CheckItemClickCall itemClickCall) {
super(context,R.style.dialog);
binding = DataBindingUtil.inflate(LayoutInflater.from(context),
R.layout.dialog_repair_submint_info, null, false);
setContentView(binding.getRoot());
assert binding.dialogRepairSubmintbutton != null;
binding.dialogRepairSubmintbutton.setOnClickListener(t-> dismiss());
adapter=new RepaitSubmintInfoAdapter(context,itemClickCall);
}
}

@ -17,6 +17,8 @@ public class DefectBeen extends BaseObservable {
private String materialName; private String materialName;
private String materialCategories; private String materialCategories;
private String materialSubclass; private String materialSubclass;
private String stationCode;
private String qualityDefectCode; private String qualityDefectCode;
private String qualityDefectName; private String qualityDefectName;
@ -26,6 +28,13 @@ public class DefectBeen extends BaseObservable {
this.index = index; this.index = index;
} }
public String getStationCode() {
return stationCode;
}
public void setStationCode(String stationCode) {
this.stationCode = stationCode;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
@ -99,9 +108,9 @@ public class DefectBeen extends BaseObservable {
return "DefectBeen{" + return "DefectBeen{" +
"index=" + index + "index=" + index +
", objId=" + objId + ", objId=" + objId +
", materialName='" + materialName + '\'' + // ", materialName='" + materialName + '\'' +
", materialCategories='" + materialCategories + '\'' + // ", materialCategories='" + materialCategories + '\'' +
", materialSubclass='" + materialSubclass + '\'' + // ", materialSubclass='" + materialSubclass + '\'' +
", qualityDefectCode='" + qualityDefectCode + '\'' + ", qualityDefectCode='" + qualityDefectCode + '\'' +
", qualityDefectName='" + qualityDefectName + '\'' + ", qualityDefectName='" + qualityDefectName + '\'' +
'}'; '}';

@ -0,0 +1,26 @@
package com.example.aucma_mes.entity;
/**
* @author wanghao
* @date 2023/12/13 14:00
*/
public class TeamBeen {
private String teamCode;
private String teamName;
public String getTeamCode() {
return teamCode;
}
public void setTeamCode(String teamCode) {
this.teamCode = teamCode;
}
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
}

@ -38,7 +38,7 @@ public class MyRecultCall extends AbsCallback<Result> {
@Override @Override
public void onSuccess(Response<Result> response) { public void onSuccess(Response<Result> response) {
dialog.dismiss(); dialog.dismiss();
Log.e("网络请求情况", "onSuccess:"); // Log.e("网络请求情况", "onSuccess:");
} }
@Override @Override
@ -53,7 +53,7 @@ public class MyRecultCall extends AbsCallback<Result> {
public void onStart(Request<Result, ? extends Request> request) { public void onStart(Request<Result, ? extends Request> request) {
super.onStart(request); super.onStart(request);
dialog.show(); dialog.show();
Log.e("网络请求情况", "onStart:" ); // Log.e("网络请求情况", "onStart:" );
} }
@Override @Override

@ -17,50 +17,50 @@ import java.util.List;
* @date 2023/11/17 16:26 * @date 2023/11/17 16:26
*/ */
public class CheckViewModel extends BaseObservable { public class CheckViewModel extends BaseObservable {
public String code;//产品条码 private String code;//产品条码
public String name;//产品型号 private String name;//产品型号
public String defect;
private List<DefectBeen> list;//缺陷列表 private List<DefectBeen> list;//缺陷列表
private String stationCode;//人的工位编码
private String measure;//处理措施TREATMENT_MEASURE
private String measureName;//处理措施TREATMENT_MEASURE
private String processCode;
private String userName; private String userName;
private String measure;//处置措施 3=放行,1=返修
private String teamCode;//班组编号
public String getProcessCode() { private boolean buttonVisbleState=false;
return processCode; private String defect;
public String getCode() {
return code;
} }
public void setProcessCode(String processCode) { public void setCode(String code) {
this.processCode = processCode; this.code = code;
notifyChange();
} }
public String getUserName() { public String getMeasure() {
return userName; return measure;
} }
public void setUserName(String userName) { public void setMeasure(String measure) {
this.userName = userName; this.measure = measure;
} }
public String getName() {
public String getMeasure() { return name;
return measure;
} }
public void setName(String name) {
public String getCode() { this.name = name;
return code; notifyChange();
} }
public String getDefect() { public String getDefect() {
return defect; return defect;
} }
public void setDefect(String defect) {
this.defect = defect;
notifyChange();
}
public List<DefectBeen> getList() { public List<DefectBeen> getList() {
return list; return list;
} }
@ -69,14 +69,36 @@ public class CheckViewModel extends BaseObservable {
this.list = list; this.list = list;
} }
public void setCode(String code) { public String getUserName() {
this.code = code; return userName;
notifyChange();
} }
public void setDefect(String defect) { public void setUserName(String userName) {
this.defect = defect; this.userName = userName;
}
public String getStationCode() {
return stationCode;
}
public void setStationCode(String stationCode) {
this.stationCode = stationCode;
}
public boolean isButtonVisbleState() {
return buttonVisbleState;
}
public void setButtonVisbleState(boolean buttonVisbleState) {
this.buttonVisbleState = buttonVisbleState;
notifyChange(); notifyChange();
} }
public String getTeamCode() {
return teamCode;
}
public void setTeamCode(String teamCode) {
this.teamCode = teamCode;
}
} }

@ -1,8 +1,18 @@
package com.example.aucma_mes.vm; package com.example.aucma_mes.vm;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import androidx.databinding.BaseObservable; import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable; import androidx.databinding.Bindable;
import com.example.aucma_mes.entity.RepairMeasures;
import com.example.aucma_mes.entity.TeamBeen;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author wanghao * @author wanghao
* @date 2023/11/15 9:45 * @date 2023/11/15 9:45
@ -13,9 +23,15 @@ public class User extends BaseObservable {
@Bindable @Bindable
public String password; public String password;
private List<String> list;
private List<TeamBeen> teamBeens;
public String nickName; public String nickName;
public String stationCode; public String stationCode;
public String stationName; public String stationName;
private String teamCode;
private String teamName;
public String getUsername() { public String getUsername() {
return username; return username;
@ -57,14 +73,48 @@ public class User extends BaseObservable {
this.stationName = stationName; this.stationName = stationName;
} }
@Override public List<String> getList() {
public String toString() { return list;
return "User{" + }
"username='" + username + '\'' +
", password='" + password + '\'' + public void setList(List<String> list) {
", nickName='" + nickName + '\'' + this.list = list;
", stationCode='" + stationCode + '\'' +
", stationName='" + stationName + '\'' + notifyChange();
'}'; }
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Log.e("TAG", "返修选中措施:" + position);
TeamBeen teamBeen = teamBeens.get(position);
setTeamCode(teamBeen.getTeamCode());
setTeamName(teamBeen.getTeamName());
}
public List<TeamBeen> getTeamBeens() {
return teamBeens;
}
public void setTeamBeens(List<TeamBeen> teamBeens) {
this.teamBeens = teamBeens;
list = new ArrayList<>(teamBeens.size());
teamBeens.forEach(t -> this.list.add(t.getTeamName()));
notifyChange();
}
public String getTeamCode() {
return teamCode;
}
public void setTeamCode(String teamCode) {
this.teamCode = teamCode;
}
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
notifyChange();
} }
} }

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

@ -1,30 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

@ -4,10 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<data> <data>
<variable <variable
name="vm" name="vm"
type="com.example.aucma_mes.vm.CheckViewModel" /> type="com.example.aucma_mes.vm.CheckViewModel" />
<import type="android.view.View" />
</data> </data>
<LinearLayout <LinearLayout
@ -64,8 +64,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="43dp" android:layout_height="43dp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp">
android:orientation="horizontal">
<TextView <TextView
style="@style/text_style1" style="@style/text_style1"
@ -74,21 +73,32 @@
android:text="选择缺陷:" /> android:text="选择缺陷:" />
<TextView <TextView
android:id="@+id/select_defect"
style="@style/text_style1_1" style="@style/text_style1_1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:drawableRight="@mipmap/icon_select" android:drawableRight="@mipmap/icon_select"
android:onClick="checkSelect" android:onClick="checkSelect"
android:layout_weight="1"
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:text="@{vm.defect}" /> android:text="@{vm.defect}" />
<TextView
android:gravity="center"
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@drawable/button_w"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold"
android:onClick="selectRepair"
android:visibility="@{vm.buttonVisbleState? View.VISIBLE : View.GONE}"
android:text="显示\n返修" />
</LinearLayout> </LinearLayout>
<TextView <TextView
style="@style/text_style1"
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="left"
android:text="缺陷详情" android:text="缺陷详情"
android:textColor="@color/purple_700" /> android:textColor="@color/purple_700" />
@ -106,7 +116,6 @@
<Button <Button
android:id="@+id/button"
style="@style/button_true_style" style="@style/button_true_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"

@ -68,7 +68,7 @@
android:id="@+id/home_button5" android:id="@+id/home_button5"
style="@style/radio_button_style" style="@style/radio_button_style"
android:drawableTop="@mipmap/icon_info" android:drawableTop="@mipmap/icon_info"
android:text="班确认" android:text="班确认"
app:layout_columnWeight="1" /> app:layout_columnWeight="1" />

@ -4,9 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<data> <data>
<variable name="user" type="com.example.aucma_mes.vm.User" /> <variable name="user" type="com.example.aucma_mes.vm.User" />
</data> </data>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -70,22 +68,16 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<Button <Button
android:id="@+id/login_button" android:id="@+id/login_button"
style="@style/button_true_style" style="@style/button_true_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_marginLeft="20dp" android:layout_marginTop="20dp"
android:layout_marginTop="64dp"
android:layout_marginRight="20dp"
android:text="登录"
android:onClick="login" android:onClick="login"
app:layout_constraintEnd_toEndOf="parent" android:text="登录"
app:layout_constraintHorizontal_bias="0.6" app:layout_constraintTop_toBottomOf="@+id/linearLayout2"
app:layout_constraintStart_toStartOf="parent" tools:layout_editor_absoluteX="0dp" />
app:layout_constraintTop_toBottomOf="@+id/textInputLayout2" />
<TextView <TextView
@ -102,5 +94,31 @@
tools:layout_editor_absoluteX="14dp" tools:layout_editor_absoluteX="14dp"
tools:layout_editor_absoluteY="592dp" /> tools:layout_editor_absoluteY="592dp" />
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginStart="20dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="20dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout2">
<TextView
style="@style/text_style1"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="选择班组:" />
<Spinner
android:textAlignment="center"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:entries="@{user.list}"
android:onItemSelected="@{user.onItemClick}"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

@ -26,7 +26,7 @@
android:layout_height="45dp" android:layout_height="45dp"
android:background="@drawable/title_bg" android:background="@drawable/title_bg"
android:gravity="center" android:gravity="center"
android:text="登录信息查询" android:text="班组确认"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="20sp"/> android:textSize="20sp"/>
@ -117,13 +117,13 @@
style="@style/text_style1" style="@style/text_style1"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="工位编号:" /> android:text="班组编号:" />
<TextView <TextView
style="@style/text_style1_1" style="@style/text_style1_1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@{user.stationCode}" /> android:text="@{user.teamCode}" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -136,13 +136,13 @@
style="@style/text_style1" style="@style/text_style1"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="工位名称:" /> android:text="班组名称:" />
<TextView <TextView
style="@style/text_style1_1" style="@style/text_style1_1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@{user.stationName}" /> android:text="@{user.teamName}" />
</LinearLayout> </LinearLayout>
<Button <Button

@ -0,0 +1,41 @@
<?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>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/dialog_bg">
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/title_bg"
android:gravity="center"
android:text="返修情况"
android:textColor="@color/white"
android:textSize="20sp"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/repair_submint_recycler"
android:layout_width="match_parent"
android:layout_height="400dp"
android:background="@color/white"
android:layout_weight="1"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<Button
android:id="@+id/dialog_repair_submintbutton"
android:layout_margin="10dp"
style="@style/button_true_style"
android:layout_width="match_parent"
android:layout_height="45dp"
android:text="完成" />
</LinearLayout>
</layout>

@ -17,7 +17,7 @@
<TextView <TextView
android:id="@+id/item_index" android:id="@+id/item_index"
style="@style/item_text_style" style="@style/item_text_style"
android:layout_width="51dp" android:layout_width="40dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text='@{item.index+""}' /> android:text='@{item.index+""}' />
@ -28,7 +28,7 @@
<TextView <TextView
style="@style/item_text_style" style="@style/item_text_style"
android:layout_width="80dp" android:layout_width="70dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@{item.qualityDefectCode}" /> android:text="@{item.qualityDefectCode}" />
@ -52,7 +52,7 @@
<TextView <TextView
android:id="@+id/item_buttom" android:id="@+id/item_buttom"
style="@style/item_text_style" style="@style/item_text_style"
android:layout_width="76dp" android:layout_width="63dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="删除" android:text="删除"
android:textColor="#E71717" /> android:textColor="#E71717" />

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="item"
type="com.example.aucma_mes.entity.DefectBeen" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="2dp"
android:background="#DEE3E6"
android:orientation="horizontal">
<TextView
android:id="@+id/item_index"
style="@style/item_text_style"
android:layout_width="35dp"
android:layout_height="match_parent"
android:text='@{item.index+""}' />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
style="@style/item_text_style"
android:layout_width="65dp"
android:layout_height="match_parent"
android:text="@{item.qualityDefectCode}" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
style="@style/item_text_style"
android:layout_width="145dp"
android:layout_height="match_parent"
android:text="@{item.qualityDefectName}"
tools:ignore="InefficientWeight" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
android:id="@+id/item_buttom"
style="@style/item_text_style"
android:layout_width="60dp"
android:layout_height="match_parent"
android:text="下返修"
android:textColor="#E71717" />
</LinearLayout>
</layout>

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

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

@ -1,5 +1,5 @@
<resources> <resources>
<string name="app_name">aucma-mes</string> <string name="app_name">MES</string>
<string name="title_activity_login">LoginActivity</string> <string name="title_activity_login">LoginActivity</string>
<string name="prompt_email">Email</string> <string name="prompt_email">Email</string>
<string name="prompt_password">Password</string> <string name="prompt_password">Password</string>

@ -15,6 +15,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# Android operating system, and which are packaged with your app's APK # Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn # https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true
# Enables namespacing of each library's R class so that its R class includes only the # Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies, # resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library # thereby reducing the size of the R class for that library

Loading…
Cancel
Save