Compare commits
10 Commits
6d2031f1a4
...
e8626f43fc
| Author | SHA1 | Date |
|---|---|---|
|
|
e8626f43fc | 1 month ago |
|
|
99d846c2b6 | 1 month ago |
|
|
31dd5fce0c | 2 months ago |
|
|
018149bbb6 | 10 months ago |
|
|
66f811b5de | 1 year ago |
|
|
3cc3ea1443 | 1 year ago |
|
|
3979c248b2 | 1 year ago |
|
|
2fb4d31109 | 1 year ago |
|
|
51444dd042 | 1 year ago |
|
|
3aab607a3f | 1 year ago |
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\wanghao\.android\avd\Pixel_XL_API_33.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2025-01-09T11:21:07.708219300Z" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.example.beijing_daxing",
|
||||
"variantName": "debug",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 5,
|
||||
"versionName": "1.5",
|
||||
"outputFile": "app-debug.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.example.beijing_daxing",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 5,
|
||||
"versionName": "1.5",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
||||
@ -0,0 +1,171 @@
|
||||
package com.example.beijing_daxing;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.example.beijing_daxing.base.BaseActivity;
|
||||
import com.example.beijing_daxing.base.MyRecultCall;
|
||||
import com.example.beijing_daxing.base.MyResult;
|
||||
import com.example.beijing_daxing.been.PmBasePenaltyType;
|
||||
import com.example.beijing_daxing.been.PmBasePersonInfo;
|
||||
import com.example.beijing_daxing.been.PmRecordPenalty;
|
||||
import com.example.beijing_daxing.databinding.ActivitySelectPersonInfoBinding;
|
||||
import com.example.beijing_daxing.dialog.LookPictureDialog;
|
||||
import com.example.beijing_daxing.uitls.SharedPreferencesUtils;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class SelectPersonInfoActivity extends BaseActivity implements OnOptionsSelectListener {
|
||||
private ActivitySelectPersonInfoBinding binding;
|
||||
private LookPictureDialog pictureDialog;
|
||||
private PmBasePersonInfo personInfo;
|
||||
private List<String> list1;
|
||||
private List<List<String>> list2;
|
||||
private OptionsPickerView opv;
|
||||
private List<PmBasePenaltyType> list;
|
||||
|
||||
private PmRecordPenalty recordPenalty;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_select_person_info);
|
||||
pictureDialog = new LookPictureDialog(this);
|
||||
opv= new OptionsPickerBuilder(this, this).build();
|
||||
initCheckList();
|
||||
recordPenalty=new PmRecordPenalty();
|
||||
recordPenalty.setCreateBy(SharedPreferencesUtils.getstring("user",""));
|
||||
}
|
||||
|
||||
private void initCheckList() {
|
||||
OkGo.<MyResult>post(url + "/selectPenaltyTypeList")
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
MyResult body = response.body();
|
||||
if (body.getCode() == 0) {
|
||||
list = gson.fromJson(body.getJson(), new TypeToken<List<PmBasePenaltyType>>() {
|
||||
}.getType());
|
||||
list1 = new ArrayList<>();
|
||||
list2 = new ArrayList<>();
|
||||
Map<Long, String> map = new HashMap<>();
|
||||
list.forEach(penaltyType -> {
|
||||
String penaltyInfo = penaltyType.getPenaltyInfo();// 处罚说明
|
||||
Long parentId = penaltyType.getParentId();// 父id
|
||||
Long penaltyTypeId = penaltyType.getPenaltyTypeId();// 自id
|
||||
if (parentId == null) {// 如果是一级菜单
|
||||
if (!list1.contains(penaltyInfo)) {
|
||||
list1.add(penaltyInfo);
|
||||
map.put(penaltyTypeId, penaltyInfo);
|
||||
list2.add(new ArrayList<>());
|
||||
}
|
||||
} else {// 如果是二级菜单
|
||||
String tag = map.get(parentId);
|
||||
int i = list1.indexOf(tag);
|
||||
String penaltyTypeCode = penaltyType.getPenaltyTypeCode();
|
||||
list2.get(i).add(penaltyTypeCode+"-"+penaltyInfo);
|
||||
}
|
||||
});
|
||||
opv.setPicker(list1, list2, null);
|
||||
return;
|
||||
}
|
||||
Toast.makeText(SelectPersonInfoActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readTidReault(boolean b, String bytes2HexString, byte[] rdata) {
|
||||
super.readTidReault(b, bytes2HexString, rdata);
|
||||
binding.selectInfoEpc.setText(bytes2HexString);
|
||||
OkGo.<MyResult>post(url + "/selectPersonInfo")
|
||||
.params("epc", bytes2HexString)
|
||||
.params("user", SharedPreferencesUtils.getstring("user", ""))
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
MyResult body = response.body();
|
||||
if (body.getCode() == 0) {
|
||||
|
||||
personInfo = gson.fromJson(body.getJson(), PmBasePersonInfo.class);
|
||||
recordPenalty.setBasePersonId(personInfo.getBasePersonId());
|
||||
binding.setPersonInfo(personInfo);
|
||||
Glide.with(SelectPersonInfoActivity.this).load(url.replace("/api", "") + personInfo.getPhotoPath()).into(binding.selectInfoPhoto);
|
||||
return;
|
||||
}
|
||||
Toast.makeText(SelectPersonInfoActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void selectInfoPhoto(View view) {
|
||||
if (personInfo == null) {
|
||||
Toast.makeText(this, "请先查询人员信息", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
pictureDialog.setPath(url.replace("/api", "") + personInfo.getPhotoPath());
|
||||
pictureDialog.show();
|
||||
}
|
||||
|
||||
public void checkSelect(View view) {
|
||||
if (personInfo == null) {
|
||||
Toast.makeText(this, "请先查询人员信息", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
opv.show();
|
||||
}
|
||||
|
||||
public void selectInfoSubmit(View view) {
|
||||
OkGo.<MyResult>post(url + "/insertRrecordPenalty")
|
||||
.upRequestBody(RequestBody.create(JSON, gson.toJson(recordPenalty)))
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
MyResult body = response.body();
|
||||
if (body.getCode() == 0) {
|
||||
finish();
|
||||
}
|
||||
Toast.makeText(SelectPersonInfoActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOptionsSelect(int options1, int options2, int options3, View v) {
|
||||
String type = list1.get(options1);
|
||||
String s = list2.get(options1).get(options2);
|
||||
binding.selectPenalty.setText(s);
|
||||
s = s.substring(s.indexOf("-")+1,s.length());
|
||||
Log.e("TAG", "onOptionsSelect:" + type + ", " + s);
|
||||
PmBasePenaltyType penaltyType = new PmBasePenaltyType();
|
||||
penaltyType.setPenaltyInfo(s);
|
||||
int index = list.indexOf(penaltyType);
|
||||
PmBasePenaltyType penaltyType1 = list.get(index);
|
||||
// 设置处罚类型
|
||||
recordPenalty.setPenaltyType(type);
|
||||
recordPenalty.setPenaltyTypeCode(penaltyType1.getPenaltyTypeCode());
|
||||
recordPenalty.setPenaltyInfo(penaltyType1.getPenaltyInfo());
|
||||
recordPenalty.setPenaltyAmount(penaltyType1.getPenaltyAmount());
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package com.example.beijing_daxing.been;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 处罚类型维护对象 pm_base_penalty_type
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-27
|
||||
*/
|
||||
public class PmBasePenaltyType {
|
||||
|
||||
/**
|
||||
* 处罚类型主键
|
||||
*/
|
||||
private Long penaltyTypeId;
|
||||
/** 父菜单ID */
|
||||
private Long parentId;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
|
||||
private String penaltyTypeCode;
|
||||
|
||||
/**
|
||||
* 处罚说明
|
||||
*/
|
||||
|
||||
private String penaltyInfo;
|
||||
|
||||
/**
|
||||
* 处罚金额
|
||||
*/
|
||||
|
||||
private Double penaltyAmount;
|
||||
|
||||
/**
|
||||
* 类型状态
|
||||
*/
|
||||
|
||||
private String typeState;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
PmBasePenaltyType that = (PmBasePenaltyType) o;
|
||||
|
||||
return Objects.equals(penaltyInfo, that.penaltyInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return penaltyInfo != null ? penaltyInfo.hashCode() : 0;
|
||||
}
|
||||
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Long getPenaltyTypeId() {
|
||||
return penaltyTypeId;
|
||||
}
|
||||
|
||||
public void setPenaltyTypeId(Long penaltyTypeId) {
|
||||
this.penaltyTypeId = penaltyTypeId;
|
||||
}
|
||||
|
||||
public String getPenaltyTypeCode() {
|
||||
return penaltyTypeCode;
|
||||
}
|
||||
|
||||
public void setPenaltyTypeCode(String penaltyTypeCode) {
|
||||
this.penaltyTypeCode = penaltyTypeCode;
|
||||
}
|
||||
|
||||
public String getPenaltyInfo() {
|
||||
return penaltyInfo;
|
||||
}
|
||||
|
||||
public void setPenaltyInfo(String penaltyInfo) {
|
||||
this.penaltyInfo = penaltyInfo;
|
||||
}
|
||||
|
||||
public Double getPenaltyAmount() {
|
||||
return penaltyAmount;
|
||||
}
|
||||
|
||||
public void setPenaltyAmount(Double penaltyAmount) {
|
||||
this.penaltyAmount = penaltyAmount;
|
||||
}
|
||||
|
||||
public String getTypeState() {
|
||||
return typeState;
|
||||
}
|
||||
|
||||
public void setTypeState(String typeState) {
|
||||
this.typeState = typeState;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.example.beijing_daxing.been;
|
||||
|
||||
/**
|
||||
* 人员信息对象 pm_base_person_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-26
|
||||
*/
|
||||
public class PmBasePersonInfo {
|
||||
|
||||
/**
|
||||
* 人员表主键
|
||||
*/
|
||||
private Long basePersonId;
|
||||
|
||||
/**
|
||||
* RFID编码
|
||||
*/
|
||||
|
||||
private String rfidId;
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
|
||||
private String employeeId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
|
||||
private String peopleName;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
|
||||
private String peopleSex;
|
||||
|
||||
/**
|
||||
* 驾驶证代号
|
||||
*/
|
||||
private String driverCode;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 照片
|
||||
*/
|
||||
private String photoPath;
|
||||
|
||||
/**
|
||||
* 有效日期截止
|
||||
*/
|
||||
private String joinDate;
|
||||
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private String academicQualification;
|
||||
|
||||
public Long getBasePersonId() {
|
||||
return basePersonId;
|
||||
}
|
||||
|
||||
public void setBasePersonId(Long basePersonId) {
|
||||
this.basePersonId = basePersonId;
|
||||
}
|
||||
|
||||
public String getRfidId() {
|
||||
return rfidId;
|
||||
}
|
||||
|
||||
public void setRfidId(String rfidId) {
|
||||
this.rfidId = rfidId;
|
||||
}
|
||||
|
||||
public String getEmployeeId() {
|
||||
return employeeId;
|
||||
}
|
||||
|
||||
public void setEmployeeId(String employeeId) {
|
||||
this.employeeId = employeeId;
|
||||
}
|
||||
|
||||
public String getPeopleName() {
|
||||
return peopleName;
|
||||
}
|
||||
|
||||
public void setPeopleName(String peopleName) {
|
||||
this.peopleName = peopleName;
|
||||
}
|
||||
|
||||
public String getPeopleSex() {
|
||||
return peopleSex;
|
||||
}
|
||||
|
||||
public void setPeopleSex(String peopleSex) {
|
||||
this.peopleSex = peopleSex;
|
||||
}
|
||||
|
||||
public String getDriverCode() {
|
||||
return driverCode;
|
||||
}
|
||||
|
||||
public void setDriverCode(String driverCode) {
|
||||
this.driverCode = driverCode;
|
||||
}
|
||||
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public String getPhotoPath() {
|
||||
return photoPath;
|
||||
}
|
||||
|
||||
public void setPhotoPath(String photoPath) {
|
||||
this.photoPath = photoPath;
|
||||
}
|
||||
|
||||
public String getJoinDate() {
|
||||
return joinDate;
|
||||
}
|
||||
|
||||
public void setJoinDate(String joinDate) {
|
||||
this.joinDate = joinDate;
|
||||
}
|
||||
|
||||
public String getAcademicQualification() {
|
||||
return academicQualification;
|
||||
}
|
||||
|
||||
public void setAcademicQualification(String academicQualification) {
|
||||
this.academicQualification = academicQualification;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
package com.example.beijing_daxing.been;
|
||||
|
||||
|
||||
/**
|
||||
* 处罚记录对象 pm_record_penalty
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-27
|
||||
*/
|
||||
public class PmRecordPenalty {
|
||||
|
||||
/**
|
||||
* 处罚记录主键
|
||||
*/
|
||||
private Long recordPenaltyId;
|
||||
|
||||
/**
|
||||
* 处罚类型
|
||||
*/
|
||||
|
||||
private String penaltyType;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
|
||||
private String penaltyTypeCode;
|
||||
|
||||
/**
|
||||
* 处罚说明
|
||||
*/
|
||||
|
||||
private String penaltyInfo;
|
||||
|
||||
/**
|
||||
* 处罚金额
|
||||
*/
|
||||
|
||||
private Double penaltyAmount;
|
||||
|
||||
/**
|
||||
* 处罚人员
|
||||
*/
|
||||
|
||||
private Long basePersonId;
|
||||
|
||||
/**
|
||||
* 处理状态
|
||||
*/
|
||||
|
||||
private String processState;
|
||||
|
||||
private String createBy;
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Long getRecordPenaltyId() {
|
||||
return recordPenaltyId;
|
||||
}
|
||||
|
||||
public void setRecordPenaltyId(Long recordPenaltyId) {
|
||||
this.recordPenaltyId = recordPenaltyId;
|
||||
}
|
||||
|
||||
public String getPenaltyType() {
|
||||
return penaltyType;
|
||||
}
|
||||
|
||||
public void setPenaltyType(String penaltyType) {
|
||||
this.penaltyType = penaltyType;
|
||||
}
|
||||
|
||||
public String getPenaltyTypeCode() {
|
||||
return penaltyTypeCode;
|
||||
}
|
||||
|
||||
public void setPenaltyTypeCode(String penaltyTypeCode) {
|
||||
this.penaltyTypeCode = penaltyTypeCode;
|
||||
}
|
||||
|
||||
public String getPenaltyInfo() {
|
||||
return penaltyInfo;
|
||||
}
|
||||
|
||||
public void setPenaltyInfo(String penaltyInfo) {
|
||||
this.penaltyInfo = penaltyInfo;
|
||||
}
|
||||
|
||||
public Double getPenaltyAmount() {
|
||||
return penaltyAmount;
|
||||
}
|
||||
|
||||
public void setPenaltyAmount(Double penaltyAmount) {
|
||||
this.penaltyAmount = penaltyAmount;
|
||||
}
|
||||
|
||||
public Long getBasePersonId() {
|
||||
return basePersonId;
|
||||
}
|
||||
|
||||
public void setBasePersonId(Long basePersonId) {
|
||||
this.basePersonId = basePersonId;
|
||||
}
|
||||
|
||||
public String getProcessState() {
|
||||
return processState;
|
||||
}
|
||||
|
||||
public void setProcessState(String processState) {
|
||||
this.processState = processState;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.example.beijing_daxing.dialog;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.example.beijing_daxing.R;
|
||||
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/2/1 17:06
|
||||
*/
|
||||
public class LookPictureDialog extends Dialog {
|
||||
|
||||
private Context context;
|
||||
private String path;
|
||||
private ImageView imageView;
|
||||
|
||||
public LookPictureDialog(@NonNull Context context) {
|
||||
super(context, R.style.dialog);
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_look_picture);
|
||||
|
||||
imageView = findViewById(R.id.picture_imageview);
|
||||
findViewById(R.id.confirm_back).setOnClickListener(v -> {
|
||||
dismiss();
|
||||
});
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
|
||||
linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
super.show();
|
||||
Glide.with(context).load(path).into(imageView);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
package com.example.beijing_daxing.rfid;
|
||||
|
||||
public interface RFID {
|
||||
void initRFIDModel();
|
||||
void setPower(int power);
|
||||
void sanRFID();
|
||||
void close();
|
||||
|
||||
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
package com.example.beijing_daxing.rfid.impl;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.example.beijing_daxing.rfid.RFID;
|
||||
import com.handheld.uhfr.UHFRManager;
|
||||
import com.uhf.api.cls.Reader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Device6109 implements RFID {
|
||||
|
||||
private UHFRManager uhfrManager;
|
||||
private EpcDataInterface epcDataInterface;
|
||||
|
||||
public Device6109(EpcDataInterface epcDataInterface) {
|
||||
this.epcDataInterface = epcDataInterface;
|
||||
}
|
||||
|
||||
public Device6109() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initRFIDModel() {
|
||||
if (uhfrManager == null) {
|
||||
uhfrManager = UHFRManager.getInstance();
|
||||
}
|
||||
uhfrManager.asyncStartReading();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(int power) {
|
||||
Reader.READER_ERR readerErr = uhfrManager.setPower(power, power);
|
||||
Log.e("TAG", "setPower:" + readerErr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sanRFID() {
|
||||
List<Reader.TAGINFO> data = uhfrManager.tagInventoryRealTime();
|
||||
if (data == null || data.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
epcDataInterface.epcData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
if (uhfrManager == null) {
|
||||
return;
|
||||
}
|
||||
uhfrManager.asyncStopReading();
|
||||
uhfrManager.close();
|
||||
uhfrManager = null;
|
||||
}
|
||||
|
||||
|
||||
public interface EpcDataInterface {
|
||||
void epcData(List<Reader.TAGINFO> data);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="50dp"/>
|
||||
<solid android:color="#03A9F4"/>
|
||||
</shape>
|
||||
@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="personInfo"
|
||||
type="com.example.beijing_daxing.been.PmBasePersonInfo" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/bg1"
|
||||
tools:context=".SelectPersonInfoActivity">
|
||||
|
||||
<TextView
|
||||
style="@style/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:text="信息查询" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/info_text"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="扫描RFID:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_info_epc"
|
||||
style="@style/san_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/info_text"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="工号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/info_text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="@{personInfo.employeeId}" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/info_text"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="姓名:" />
|
||||
|
||||
<TextView
|
||||
style="@style/info_text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@{personInfo.peopleName}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/info_text"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="驾驶证代号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/info_text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@{personInfo.driverCode}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
style="@style/info_text"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="有效日期:" />
|
||||
|
||||
<TextView
|
||||
style="@style/info_text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="@{personInfo.joinDate}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="205dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
style="@style/info_text"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center|top"
|
||||
android:text="照片:" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/select_info_photo"
|
||||
style="@style/info_text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:onClick="selectInfoPhoto"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
style="@style/info_text"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="处罚说明:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_penalty"
|
||||
style="@style/info_text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:drawableEnd="@mipmap/icon_select"
|
||||
android:onClick="checkSelect"
|
||||
android:paddingEnd="8dp"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_margin="20dp"
|
||||
android:onClick="selectInfoSubmit"
|
||||
android:text="处罚提交" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="450dp"
|
||||
android:background="@drawable/info_text_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/picture_imageview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="12dp" />
|
||||
<Button
|
||||
android:id="@+id/confirm_back"
|
||||
style="@style/button_style2"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="关闭" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 466 B |
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@ -1,3 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">RFID轮挡</string>
|
||||
<string name="app_name">人员管理</string>
|
||||
</resources>
|
||||
Loading…
Reference in New Issue