diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 03c5a4c..0817731 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -15,6 +15,15 @@
android:theme="@style/Theme.Haiweimom"
android:usesCleartextTraffic="true"
tools:targetApi="31">
+
+
+
diff --git a/app/src/main/java/com/example/haiwei_mom/ConfigActivity.java b/app/src/main/java/com/example/haiwei_mom/ConfigActivity.java
index 465f651..03d9320 100644
--- a/app/src/main/java/com/example/haiwei_mom/ConfigActivity.java
+++ b/app/src/main/java/com/example/haiwei_mom/ConfigActivity.java
@@ -4,7 +4,9 @@ import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
-public class ConfigActivity extends AppCompatActivity {
+import com.example.haiwei_mom.base.BaseActivity;
+
+public class ConfigActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
diff --git a/app/src/main/java/com/example/haiwei_mom/HomePageActivity.java b/app/src/main/java/com/example/haiwei_mom/HomePageActivity.java
index 7863293..bd32579 100644
--- a/app/src/main/java/com/example/haiwei_mom/HomePageActivity.java
+++ b/app/src/main/java/com/example/haiwei_mom/HomePageActivity.java
@@ -13,6 +13,7 @@ import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.data.MenuBeen;
import com.example.haiwei_mom.data.PdaRouters;
import com.example.haiwei_mom.databinding.ActivityHomePageBinding;
+import com.example.haiwei_mom.ipc.FeedingMaterialsActivity;
import com.example.haiwei_mom.qm.CheckActivity;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.example.haiwei_mom.wms.product.BindVehicleActivity;
@@ -21,6 +22,7 @@ import com.example.haiwei_mom.wms.product.ProductOutActivity;
import com.example.haiwei_mom.wms.raw.RawInActivity;
import com.example.haiwei_mom.wms.raw.RawOutActivity;
import com.example.haiwei_mom.wms.raw.RawReturnActivity;
+import com.example.haiwei_mom.wms.raw.StoreCheckActivity;
import com.example.haiwei_mom.wms.semi.SemiInActivity;
import com.example.haiwei_mom.wms.semi.SemiOutActivity;
import com.google.gson.reflect.TypeToken;
@@ -53,15 +55,20 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map = new HashMap<>();
map.put("半成品入库", SemiInActivity.class);
map.put("半成品出库", SemiOutActivity.class);
+ // map.put("半成品移库", SemiOutActivity.class);
+ // map.put("半成品盘点", SemiOutActivity.class);
map.put("入库工装绑定", BindVehicleActivity.class);
map.put("成品批量入库", ProductInActivity.class);
map.put("成品出库", ProductOutActivity.class);
map.put("原材料入库", RawInActivity.class);
map.put("原材料出库", RawOutActivity.class);
- map.put("原材料盘点", RawReturnActivity.class);
+ map.put("原材料盘点", StoreCheckActivity.class);
map.put("原材料退库", RawReturnActivity.class);
map.put("制品质检", CheckActivity.class);
map.put("制品复检", CheckActivity.class);
+ map.put("机台投料", FeedingMaterialsActivity.class);
+ map.put("工装验证", FeedingMaterialsActivity.class);
+ // map.put("产出工装绑定", CheckActivity.class);
map.put("系统配置", ConfigActivity.class);
map.put("班组管理", ClassItemActivity.class);
}
@@ -108,6 +115,7 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
var cls = map.get(menuName);
if (cls == null) return;
var intent = new Intent(this, cls);
+ intent.putExtra("title",menuName);
startActivity(intent);
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/haiwei_mom/adapter/CheckStoreSelectLocationAdapter.java b/app/src/main/java/com/example/haiwei_mom/adapter/CheckStoreSelectLocationAdapter.java
new file mode 100644
index 0000000..95c1866
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/adapter/CheckStoreSelectLocationAdapter.java
@@ -0,0 +1,74 @@
+package com.example.haiwei_mom.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.haiwei_mom.BR;
+import com.example.haiwei_mom.R;
+import com.example.haiwei_mom.data.WmsBaseLocationVo;
+import com.example.haiwei_mom.databinding.ItemLayoutBinding;
+import com.example.haiwei_mom.databinding.ItemStoreCheckLocationBinding;
+import com.example.haiwei_mom.qm.data.DefectBeen;
+
+import java.util.List;
+
+/**
+ * @author wanghao
+ * @date 2023/11/17 17:15
+ */
+public class CheckStoreSelectLocationAdapter extends RecyclerView.Adapter {
+ private Context context;
+ private List list;
+ private LayoutInflater from;
+
+
+ public CheckStoreSelectLocationAdapter(Context context) {
+ this.context = context;
+ from = LayoutInflater.from(context);
+ }
+
+ public void setList(List list) {
+ this.list = list;
+ }
+
+ @NonNull
+ @Override
+ public CheckAdapterVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ ItemStoreCheckLocationBinding inflate1 = DataBindingUtil.inflate(from, R.layout.item_store_check_location, parent, false);
+ return new CheckAdapterVH(inflate1);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull CheckAdapterVH holder, int position) {
+ var item = list.get(position);
+ item.setIndex(position + 1);
+ var databing = CheckAdapterVH.binding;
+ databing.setItem(item);
+ // databing.setVariable(BR.item, item);
+
+ databing.executePendingBindings();
+ }
+
+ @Override
+ public int getItemCount() {
+ return list == null ? 0 : list.size();
+ }
+
+ static class CheckAdapterVH extends RecyclerView.ViewHolder {
+ private static ItemStoreCheckLocationBinding binding;
+ public CheckAdapterVH(ItemStoreCheckLocationBinding binding) {
+ super(binding.getRoot());
+ this.binding = binding;
+ }
+
+
+ }
+
+
+
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/adapter/CheckWorkAdapter.java b/app/src/main/java/com/example/haiwei_mom/adapter/CheckWorkAdapter.java
new file mode 100644
index 0000000..8305627
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/adapter/CheckWorkAdapter.java
@@ -0,0 +1,73 @@
+package com.example.haiwei_mom.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.haiwei_mom.R;
+import com.example.haiwei_mom.data.WmsBaseLocationVo;
+import com.example.haiwei_mom.data.WmsInventoryVo;
+import com.example.haiwei_mom.databinding.ItemCheckWorkInventoryBinding;
+import com.example.haiwei_mom.databinding.ItemStoreCheckLocationBinding;
+
+import java.util.List;
+
+/**
+ * @author wanghao
+ * @date 2023/11/17 17:15
+ */
+public class CheckWorkAdapter extends RecyclerView.Adapter {
+ private Context context;
+ private List list;
+ private LayoutInflater from;
+
+
+ public CheckWorkAdapter(Context context) {
+ this.context = context;
+ from = LayoutInflater.from(context);
+ }
+
+ public void setList(List list) {
+ this.list = list;
+ }
+
+ @NonNull
+ @Override
+ public CheckAdapterVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ ItemCheckWorkInventoryBinding binding = DataBindingUtil.inflate(from, R.layout.item_check_work_inventory, parent, false);
+ return new CheckAdapterVH(binding);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull CheckAdapterVH holder, int position) {
+ var item = list.get(position);
+
+ var databing = CheckAdapterVH.binding;
+ databing.setVm(item);
+ // databing.setVariable(BR.item, item);
+
+ databing.executePendingBindings();
+ }
+
+ @Override
+ public int getItemCount() {
+ return list == null ? 0 : list.size();
+ }
+
+ static class CheckAdapterVH extends RecyclerView.ViewHolder {
+ private static ItemCheckWorkInventoryBinding binding;
+ public CheckAdapterVH(ItemCheckWorkInventoryBinding binding) {
+ super(binding.getRoot());
+ this.binding = binding;
+ }
+
+
+ }
+
+
+
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/CheckRecordVo.java b/app/src/main/java/com/example/haiwei_mom/data/CheckRecordVo.java
new file mode 100644
index 0000000..8fc9a14
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/CheckRecordVo.java
@@ -0,0 +1,148 @@
+package com.example.haiwei_mom.data;
+
+import androidx.databinding.BaseObservable;
+
+import java.math.BigDecimal;
+
+
+/**
+ * 盘点记录和调整工单视图对象 wms_inventory_check_record
+ *
+ * @author LionLi
+ * @date 2025-01-10
+ */
+
+public class CheckRecordVo extends BaseObservable {
+
+
+ /**
+ * 物料大类
+ */
+
+ private String materialCategories;
+
+ /**
+ * 盘点单号
+ */
+
+ private String checkCode;
+
+ /**
+ * 批次码
+ */
+
+ private String batchCode;
+
+ /**
+ * 物料id
+ */
+
+ private Long materialId;
+
+ /**
+ * 库位编码
+ */
+
+ private String locationCode;
+
+ /**
+ * 物料编码
+ */
+
+ private String materialCode;
+
+ /**
+ * 物料名称
+ */
+
+ private String materialName;
+
+ /**
+ * 库存数量
+ */
+
+ private BigDecimal inventoryQty;
+
+ /**
+ * 盘点数量
+ */
+
+ private String checkQty;
+
+ /**
+ * 盘点状态(0异常,1正常)
+ */
+
+ private String checkStatus;
+
+ /**
+ * erp同步状态
+ */
+
+ private String erpSynchronousStatus;
+
+ public String getCheckCode() {
+ return checkCode;
+ }
+
+ public void setCheckCode(String checkCode) {
+ this.checkCode = checkCode;
+ }
+
+ public String getBatchCode() {
+ return batchCode;
+ }
+
+ public void setBatchCode(String batchCode) {
+ this.batchCode = batchCode; notifyChange();
+ }
+
+ public Long getMaterialId() {
+ return materialId;
+ }
+
+ public void setMaterialId(Long materialId) {
+ this.materialId = materialId;
+ }
+
+ public String getLocationCode() {
+ return locationCode;
+ }
+
+ public void setLocationCode(String locationCode) {
+ this.locationCode = locationCode;
+ }
+
+ public String getMaterialCode() {
+ return materialCode;
+ }
+
+ public void setMaterialCode(String materialCode) {
+ this.materialCode = materialCode;
+ }
+
+ public String getMaterialName() {
+ return materialName;
+ }
+
+ public void setMaterialName(String materialName) {
+ this.materialName = materialName;
+ }
+
+ public BigDecimal getInventoryQty() {
+ return inventoryQty;
+ }
+
+ public void setInventoryQty(BigDecimal inventoryQty) {
+ this.inventoryQty = inventoryQty;
+ }
+
+ public String getCheckQty() {
+ return checkQty;
+
+ }
+
+ public void setCheckQty(String checkQty) {
+ this.checkQty = checkQty; notifyChange();
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/RawOutSubmitBeen.java b/app/src/main/java/com/example/haiwei_mom/data/RawOutSubmitBeen.java
new file mode 100644
index 0000000..4b4fe38
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/RawOutSubmitBeen.java
@@ -0,0 +1,64 @@
+package com.example.haiwei_mom.data;
+
+import androidx.databinding.BaseObservable;
+
+public class RawOutSubmitBeen extends BaseObservable {
+ /**
+ * 出库单号
+ */
+ private String outstockCode;
+
+
+ /**
+ * 批次码
+ */
+ private String batchCode;
+
+
+
+ /**
+ * 库位编码
+ */
+ private String locationCode;
+
+ /**
+ * 出库数量
+ */
+ private String outstockQty;
+
+ public String getOutstockCode() {
+ return outstockCode;
+ }
+
+ public void setOutstockCode(String outstockCode) {
+ this.outstockCode = outstockCode;
+
+ }
+
+ public String getBatchCode() {
+ return batchCode;
+ }
+
+ public void setBatchCode(String batchCode) {
+ this.batchCode = batchCode;
+ notifyChange();
+ }
+
+ public String getLocationCode() {
+ return locationCode;
+ }
+
+ public void setLocationCode(String locationCode) {
+ this.locationCode = locationCode;
+ notifyChange();
+ }
+
+ public String getOutstockQty() {
+ return outstockQty;
+ }
+
+ public void setOutstockQty(String outstockQty) {
+ this.outstockQty = outstockQty;
+ notifyChange();
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/StoreInfoVo.java b/app/src/main/java/com/example/haiwei_mom/data/StoreInfoVo.java
new file mode 100644
index 0000000..08047be
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/StoreInfoVo.java
@@ -0,0 +1,33 @@
+package com.example.haiwei_mom.data;
+
+
+public class StoreInfoVo {
+ private Long id;
+ private String code;
+ private String name;
+
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ name = name;
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/WmsBaseLocationVo.java b/app/src/main/java/com/example/haiwei_mom/data/WmsBaseLocationVo.java
new file mode 100644
index 0000000..7715843
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/WmsBaseLocationVo.java
@@ -0,0 +1,77 @@
+package com.example.haiwei_mom.data;
+
+import androidx.databinding.BaseObservable;
+
+
+
+
+public class WmsBaseLocationVo extends BaseObservable {
+
+ private int index;
+
+ private Long locationId;
+
+ /**
+ * 所属仓库
+ */
+
+ private Long warehouseId;
+
+ /**
+ * 库位编码
+ */
+
+ private String locationCode;
+
+ private boolean state;
+
+ public Long getLocationId() {
+ return locationId;
+ }
+
+ public void setLocationId(Long locationId) {
+ this.locationId = locationId;
+ }
+
+ public Long getWarehouseId() {
+ return warehouseId;
+ }
+
+ public void setWarehouseId(Long warehouseId) {
+ this.warehouseId = warehouseId;
+ }
+
+ public String getLocationCode() {
+ return locationCode;
+ }
+
+ public void setLocationCode(String locationCode) {
+ this.locationCode = locationCode;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ notifyChange();
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ @Override
+ public String toString() {
+ return "WmsBaseLocationVo{" +
+ "index=" + index +
+ ", locationId=" + locationId +
+ ", state=" + state +
+ '}';
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/WmsInventoryCheck.java b/app/src/main/java/com/example/haiwei_mom/data/WmsInventoryCheck.java
new file mode 100644
index 0000000..3df5031
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/WmsInventoryCheck.java
@@ -0,0 +1,71 @@
+package com.example.haiwei_mom.data;
+
+import java.util.Date;
+
+/**
+ * 库存盘点对象 wms_inventory_check
+ *
+ * @author LionLi
+ * @date 2025-01-10
+ */
+
+public class WmsInventoryCheck {
+
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 表主键
+ */
+ private Long inventoryCheckId;
+
+ /**
+ * 盘点单号
+ */
+ private String checkCode;
+
+ /**
+ * 物料大类
+ */
+ private String materialCategories;
+
+ /**
+ * 计划仓库ID
+ */
+ private Long planWarehouseId;
+
+ /**
+ * 盘点类型(1全部,2货架,3物料))
+ */
+ private String checkType;
+
+ /**
+ * 盘点状态(0计划,2盘点中,3盘点完成)
+ */
+ private String checkStatus;
+
+
+ /**
+ * 审核状态(0待审核,1审核通过,2审核未通过)
+ */
+ private String auditStatus;
+
+ /**
+ * 审核意见
+ */
+ private String auditComments;
+
+ /**
+ * 开始时间
+ */
+ private Date beginTime;
+
+ /**
+ * 结束时间
+ */
+ private Date endTime;
+
+ public String getCheckCode() {
+ return checkCode;
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/WmsInventoryVo.java b/app/src/main/java/com/example/haiwei_mom/data/WmsInventoryVo.java
new file mode 100644
index 0000000..debc533
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/WmsInventoryVo.java
@@ -0,0 +1,185 @@
+package com.example.haiwei_mom.data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+
+/**
+ * 物料库存视图对象 wms_inventory
+ *
+ * @author LionLi
+ * @date 2025-01-07
+ */
+
+public class WmsInventoryVo {
+
+
+
+
+ /**
+ * 表主键
+ */
+
+ private Long inventoryId;
+
+ /**
+ * 批次码
+ */
+
+ private String batchCode;
+
+ /**
+ * 物料id
+ */
+
+ private Long materialId;
+
+ /**
+ * 库位编码
+ */
+
+ private String locationCode;
+
+ /**
+ * 物料大类
+ */
+
+ private Long materialCategories;
+
+ /**
+ * 库存数量
+ */
+
+ private BigDecimal inventoryQty;
+
+ /**
+ * 锁定状态(0未锁定,1锁定)
+ */
+
+ private String lockState;
+
+ /**
+ * 库存状态(0库存归0,1正常)
+ */
+
+ private String inventoryStatus;
+
+ /**
+ * 仓库ID
+ */
+
+ private Long storeId;
+
+
+
+ private String warehouseCode;//字段映射
+ private String materialCode;//字段映射
+ private String materialName;//字段映射
+ private String warehouseId;
+
+ public Long getInventoryId() {
+ return inventoryId;
+ }
+
+ public void setInventoryId(Long inventoryId) {
+ this.inventoryId = inventoryId;
+ }
+
+ public String getBatchCode() {
+ return batchCode;
+ }
+
+ public void setBatchCode(String batchCode) {
+ this.batchCode = batchCode;
+ }
+
+ public Long getMaterialId() {
+ return materialId;
+ }
+
+ public void setMaterialId(Long materialId) {
+ this.materialId = materialId;
+ }
+
+ public String getLocationCode() {
+ return locationCode;
+ }
+
+ public void setLocationCode(String locationCode) {
+ this.locationCode = locationCode;
+ }
+
+ public Long getMaterialCategories() {
+ return materialCategories;
+ }
+
+ public void setMaterialCategories(Long materialCategories) {
+ this.materialCategories = materialCategories;
+ }
+
+ public BigDecimal getInventoryQty() {
+ return inventoryQty;
+ }
+
+ public void setInventoryQty(BigDecimal inventoryQty) {
+ this.inventoryQty = inventoryQty;
+ }
+
+ public String getLockState() {
+ return lockState;
+ }
+
+ public void setLockState(String lockState) {
+ this.lockState = lockState;
+ }
+
+ public String getInventoryStatus() {
+ return inventoryStatus;
+ }
+
+ public void setInventoryStatus(String inventoryStatus) {
+ this.inventoryStatus = inventoryStatus;
+ }
+
+ public Long getStoreId() {
+ return storeId;
+ }
+
+ public void setStoreId(Long storeId) {
+ this.storeId = storeId;
+ }
+
+ public String getWarehouseCode() {
+ return warehouseCode;
+ }
+
+ public void setWarehouseCode(String warehouseCode) {
+ this.warehouseCode = warehouseCode;
+ }
+
+ public String getMaterialCode() {
+ return materialCode;
+ }
+
+ public void setMaterialCode(String materialCode) {
+ this.materialCode = materialCode;
+ }
+
+ public String getMaterialName() {
+ return materialName;
+ }
+
+ public void setMaterialName(String materialName) {
+ this.materialName = materialName;
+ }
+
+ public String getWarehouseId() {
+ return warehouseId;
+ }
+
+ public void setWarehouseId(String warehouseId) {
+ this.warehouseId = warehouseId;
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/ipc/FeedingMaterialsActivity.java b/app/src/main/java/com/example/haiwei_mom/ipc/FeedingMaterialsActivity.java
new file mode 100644
index 0000000..413e975
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/ipc/FeedingMaterialsActivity.java
@@ -0,0 +1,22 @@
+package com.example.haiwei_mom.ipc;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.databinding.DataBindingUtil;
+import androidx.databinding.ViewDataBinding;
+
+import android.os.Bundle;
+
+import com.example.haiwei_mom.R;
+import com.example.haiwei_mom.base.BaseActivity;
+import com.example.haiwei_mom.databinding.ActivityFeedingMaterialsBinding;
+
+public class FeedingMaterialsActivity extends BaseActivity {
+ private ActivityFeedingMaterialsBinding binding;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ binding = DataBindingUtil.setContentView(this, R.layout.activity_feeding_materials);
+ String title = getIntent().getStringExtra("title");
+ binding.setTitle(title);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/haiwei_mom/wms/raw/CheckWorkActivity.java b/app/src/main/java/com/example/haiwei_mom/wms/raw/CheckWorkActivity.java
new file mode 100644
index 0000000..8f8ddf0
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/wms/raw/CheckWorkActivity.java
@@ -0,0 +1,114 @@
+package com.example.haiwei_mom.wms.raw;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.databinding.DataBindingUtil;
+
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.graphics.NinePatch;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.Toast;
+
+import com.example.haiwei_mom.R;
+import com.example.haiwei_mom.adapter.CheckWorkAdapter;
+import com.example.haiwei_mom.base.BaseActivity;
+import com.example.haiwei_mom.base.MyRecultCall;
+import com.example.haiwei_mom.base.MyResult;
+import com.example.haiwei_mom.data.CheckRecordVo;
+import com.example.haiwei_mom.data.WmsInventoryCheck;
+import com.example.haiwei_mom.data.WmsInventoryVo;
+import com.example.haiwei_mom.databinding.ActivityCheckWorkBinding;
+import com.google.gson.reflect.TypeToken;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+
+import okhttp3.RequestBody;
+
+public class CheckWorkActivity extends BaseActivity {
+ private List list;
+ private List inventorylist;
+ private CheckWorkAdapter checkWorkAdapter;
+ private CheckRecordVo checkRecordVo;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ ActivityCheckWorkBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_check_work);
+ Intent intent = getIntent();
+ list = Arrays.asList(intent.getStringArrayExtra("list"));
+ binding.setList(list);
+ String checkCode = intent.getStringExtra("code");
+ binding.setCode(checkCode);
+ binding.workListSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ @Override
+ public void onItemSelected(AdapterView> parent, View view, int position, long id) {
+ selectInventory(list.get(position));
+ }
+
+
+ @Override
+ public void onNothingSelected(AdapterView> parent) {
+
+ }
+ });
+ checkWorkAdapter=new CheckWorkAdapter(this);
+ binding.setAdapter(checkWorkAdapter);
+ checkRecordVo=new CheckRecordVo();
+ checkRecordVo.setCheckCode(checkCode);
+ binding.setData(checkRecordVo);
+ }
+
+ private void selectInventory(String locationCode) {
+ OkGo.post(url + "/wms/pda/storeCheck/selectInventory")
+ .params("locationCode", locationCode)
+ .execute(new MyRecultCall(dialog, this) {
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ inventorylist = gson.fromJson(body.getDataJson(), new TypeToken>() {
+ }.getType());
+ checkWorkAdapter.setList(inventorylist);
+ checkWorkAdapter.notifyDataSetChanged();
+ return;
+ }
+ myToastUitls.show(body.getMsg());
+ }
+ });
+ }
+
+ public void storeCheckWork(View view){
+ String batchCode = checkRecordVo.getBatchCode();
+ WmsInventoryVo wmsInventoryVo= inventorylist.stream().filter(t->t.getBatchCode().equals(batchCode)).findFirst().get();
+
+ checkRecordVo.setMaterialCode(wmsInventoryVo.getMaterialCode());
+ checkRecordVo.setLocationCode(wmsInventoryVo.getLocationCode());
+ checkRecordVo.setInventoryQty(wmsInventoryVo.getInventoryQty());
+ checkRecordVo.setMaterialName(wmsInventoryVo.getMaterialName());
+ OkGo.post(url + "/wms/pda/storeCheck/submitCheckRecord")
+ .upRequestBody(RequestBody.create(JSON,gson.toJson(checkRecordVo)))
+ .execute(new MyRecultCall(dialog, this) {
+
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ checkRecordVo.setCheckQty("");
+ checkRecordVo.setBatchCode("");
+ Toast.makeText(CheckWorkActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
+ return;
+ }
+ myToastUitls.show(body.getMsg());
+ }
+ });
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/haiwei_mom/wms/raw/RawOutActivity.java b/app/src/main/java/com/example/haiwei_mom/wms/raw/RawOutActivity.java
index 7f494a4..fb81da2 100644
--- a/app/src/main/java/com/example/haiwei_mom/wms/raw/RawOutActivity.java
+++ b/app/src/main/java/com/example/haiwei_mom/wms/raw/RawOutActivity.java
@@ -15,6 +15,7 @@ import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.data.OutDetail;
+import com.example.haiwei_mom.data.RawOutSubmitBeen;
import com.example.haiwei_mom.databinding.ActivityRawOutBinding;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
@@ -22,6 +23,8 @@ import com.lzy.okgo.model.Response;
import java.util.List;
+import okhttp3.RequestBody;
+
public class RawOutActivity extends BaseActivity implements View.OnFocusChangeListener {
private ActivityRawOutBinding binding;
private RawOutDetailAdapter rawOutDetailAdapter;
@@ -30,7 +33,7 @@ public class RawOutActivity extends BaseActivity implements View.OnFocusChangeLi
private EditText rawOutGoodsView;
private EditText focusView;
private boolean sanState = true;
-
+ private RawOutSubmitBeen submitBeen;
@SuppressLint("ClickableViewAccessibility")
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -57,6 +60,8 @@ public class RawOutActivity extends BaseActivity implements View.OnFocusChangeLi
rawOutDetailAdapter = new RawOutDetailAdapter(this);
binding.setDetailAdapter(rawOutDetailAdapter);
+ submitBeen=new RawOutSubmitBeen();
+ binding.setSubBeen(submitBeen);
}
private void selectOutOrderCode(String orderCode) {
@@ -93,30 +98,13 @@ public class RawOutActivity extends BaseActivity implements View.OnFocusChangeLi
rawOutLocationView.setText(data);
} else if (focusView == rawOutGoodsView) {
rawOutGoodsView.setText(data);
- selectBacthCode(data, rawOutLocationView.getText().toString());
+ // selectBacthCode(data, rawOutLocationView.getText().toString());
}
}
- // 查询物料
- private void selectBacthCode(String bacthCode, String locationCode) {
- OkGo.post(url + "/wms/pda/raw/selectInVentoryByBatchCode").params("bacthCode", bacthCode).params("locationCode", locationCode).execute(new MyRecultCall(dialog, this) {
- @Override
- public void onSuccess(Response response) {
- super.onSuccess(response);
- var body = response.body();
- if (body.getCode() == 200) {
- List list = gson.fromJson(body.getDataJson(), new TypeToken>() {
- }.getType());
- rawOutDetailAdapter.setList(list);
- rawOutDetailAdapter.notifyDataSetChanged();
- return;
- }
- myToastUitls.show(body.getMsg());
- }
- });
- }
+
@Override
public void onFocusChange(View v, boolean hasFocus) {
@@ -124,4 +112,27 @@ public class RawOutActivity extends BaseActivity implements View.OnFocusChangeLi
focusView = (EditText) v;
}
}
+
+ public void rawOutSubmit(View view){
+ if (submitBeen.getLocationCode()==null||submitBeen.getBatchCode()==null||submitBeen.getOutstockQty()==null) {
+ return;
+ }
+ OkGo.post(url + "/wms/pda/raw/selectInVentoryByBatchCode")
+ .upRequestBody(RequestBody.create(JSON,gson.toJson(submitBeen)))
+ .execute(new MyRecultCall(dialog, this) {
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ rawOutLocationView.setText(null);
+ rawOutGoodsView.setText(null);
+ rawOutDetailAdapter.notifyDataSetChanged();
+ return;
+ }
+ myToastUitls.show(body.getMsg());
+ }
+ });
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/haiwei_mom/wms/raw/StoreCheckActivity.java b/app/src/main/java/com/example/haiwei_mom/wms/raw/StoreCheckActivity.java
new file mode 100644
index 0000000..8ba1288
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/wms/raw/StoreCheckActivity.java
@@ -0,0 +1,147 @@
+package com.example.haiwei_mom.wms.raw;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.databinding.DataBindingUtil;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.AdapterView;
+
+import com.example.haiwei_mom.R;
+import com.example.haiwei_mom.adapter.CheckStoreSelectLocationAdapter;
+import com.example.haiwei_mom.base.BaseActivity;
+import com.example.haiwei_mom.base.MyRecultCall;
+import com.example.haiwei_mom.base.MyResult;
+import com.example.haiwei_mom.data.SemiInVo;
+import com.example.haiwei_mom.data.StoreInfoVo;
+import com.example.haiwei_mom.data.WmsBaseLocationVo;
+import com.example.haiwei_mom.data.WmsInventoryCheck;
+import com.example.haiwei_mom.databinding.ActivityStoreCheckBinding;
+import com.google.gson.reflect.TypeToken;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class StoreCheckActivity extends BaseActivity {
+ private List list;
+ private List locationList;
+ private ActivityStoreCheckBinding binding;
+ private CheckStoreSelectLocationAdapter adapter;
+ private Intent intent;
+ private Long storeId;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ binding = DataBindingUtil.setContentView(this, R.layout.activity_store_check);
+ String type = "原材料盘点";
+ initSelectStore(type);
+ binding.storeListSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ @Override
+ public void onItemSelected(AdapterView> parent, View view, int position, long id) {
+ StoreInfoVo storeInfoVo = list.get(position);
+
+ storeId = storeInfoVo.getId();
+ selectLocation(type, storeId);
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView> parent) {
+
+ }
+ });
+ adapter=new CheckStoreSelectLocationAdapter(this);
+ binding.setAdapter(adapter);
+ intent = new Intent(this, CheckWorkActivity.class);
+ }
+ private boolean selectState=true;
+ private void selectLocation(String type, Long storeId) {
+ // Log.e("TAG", "selectLocation:" + selectState);
+ // if (selectState){
+ // selectState=false;
+ // return;
+ // }
+ OkGo.post(url + "/wms/pda/storeCheck/selectInventorLocationList")
+ .params("type", type)
+ .params("storeId", storeId)
+ .execute(new MyRecultCall(dialog, this) {
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ locationList = gson.fromJson(body.getDataJson(), new TypeToken>() {
+ }.getType());
+ adapter.setList(locationList);
+ adapter.notifyDataSetChanged();
+ return;
+ }
+ myToastUitls.show(body.getMsg());
+ }
+ });
+ }
+
+ private void initSelectStore(String type) {
+ OkGo.post(url + "/wms/pda/selectStoreInfo")
+ .params("type", type)
+ .execute(new MyRecultCall(dialog, this) {
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ list = gson.fromJson(body.getDataJson(), new TypeToken>() {
+ }.getType());
+ if (list != null && !list.isEmpty()) {
+ List strings = new ArrayList<>();
+ list.forEach(t -> strings.add(t.getName()));
+ binding.setList(strings);
+ }
+ return;
+ }
+ myToastUitls.show(body.getMsg());
+ }
+ });
+ }
+
+ public void storeCheck1(View view){
+ List collect = locationList.stream().map(WmsBaseLocationVo::getLocationCode).collect(Collectors.toList());
+
+ submitOrder(collect);
+ }
+ public void storeCheck2(View view){
+ Log.e("TAG", "storeCheck2:" + locationList.toString());
+ List resultList = locationList.stream().filter(WmsBaseLocationVo::isState).map(WmsBaseLocationVo::getLocationCode).collect(Collectors.toList());
+ submitOrder(resultList);
+
+ }
+
+ private void submitOrder(List list){
+ OkGo.post(url + "/wms/pda/storeCheck/submitOrder")
+ .params("storeId",storeId)
+ .addUrlParams("location",list)
+ .execute(new MyRecultCall(dialog, this) {
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ WmsInventoryCheck wmsInventoryCheck=gson.fromJson(body.getDataJson(),WmsInventoryCheck.class);
+ String[] array = list.toArray(new String[0]);
+
+ intent.putExtra("list",array);
+ intent.putExtra("code",wmsInventoryCheck.getCheckCode());
+ startActivity(intent);
+ return;
+ }
+ myToastUitls.show(body.getMsg());
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/bg_3db.xml b/app/src/main/res/drawable/bg_3db.xml
new file mode 100644
index 0000000..b5164d7
--- /dev/null
+++ b/app/src/main/res/drawable/bg_3db.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_check_work.xml b/app/src/main/res/layout/activity_check_work.xml
new file mode 100644
index 0000000..f9813f8
--- /dev/null
+++ b/app/src/main/res/layout/activity_check_work.xml
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_feeding_materials.xml b/app/src/main/res/layout/activity_feeding_materials.xml
new file mode 100644
index 0000000..f7e8129
--- /dev/null
+++ b/app/src/main/res/layout/activity_feeding_materials.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_raw_out.xml b/app/src/main/res/layout/activity_raw_out.xml
index 8b4a170..a473030 100644
--- a/app/src/main/res/layout/activity_raw_out.xml
+++ b/app/src/main/res/layout/activity_raw_out.xml
@@ -12,6 +12,10 @@
+
+
+ android:drawableRight="@mipmap/icon_chaxun"
+ android:text="@={subBeen.outstockCode}"/>
@@ -79,7 +84,8 @@
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="45dp" />
+ android:minHeight="45dp"
+ android:text="@={subBeen.locationCode}"/>
@@ -99,7 +105,8 @@
android:id="@+id/raw_out_goods"
style="@style/text_san"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ android:text="@={subBeen.batchCode}"/>
+ android:inputType="numberDecimal"
+ android:text="@={subBeen.outstockQty}"/>
diff --git a/app/src/main/res/layout/activity_store_check.xml b/app/src/main/res/layout/activity_store_check.xml
new file mode 100644
index 0000000..e37ba83
--- /dev/null
+++ b/app/src/main/res/layout/activity_store_check.xml
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_check_work_inventory.xml b/app/src/main/res/layout/item_check_work_inventory.xml
new file mode 100644
index 0000000..79f2e40
--- /dev/null
+++ b/app/src/main/res/layout/item_check_work_inventory.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_store_check_location.xml b/app/src/main/res/layout/item_store_check_location.xml
new file mode 100644
index 0000000..c72e804
--- /dev/null
+++ b/app/src/main/res/layout/item_store_check_location.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 9713893..df6937a 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -70,4 +70,10 @@
- center
- @drawable/spinner_bg
+
+
+
\ No newline at end of file