From 3919082666344c8c63dea959b852793a03018cd9 Mon Sep 17 00:00:00 2001 From: NXX <447201003@qq> Date: Mon, 24 Apr 2023 17:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=99=E4=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/bpa/db/QueryDB.java | 23 ++++++++++++++++++- .../example/bpa/view/from/lcsz_activity.java | 2 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/bpa/db/QueryDB.java b/app/src/main/java/com/example/bpa/db/QueryDB.java index c46f4cf..e930d48 100644 --- a/app/src/main/java/com/example/bpa/db/QueryDB.java +++ b/app/src/main/java/com/example/bpa/db/QueryDB.java @@ -116,7 +116,7 @@ public class QueryDB { /** * 根据id获取物料 * - * @param name + * @param * @return */ public static BPA_MATERIAL GetMaterialbyid(String id){ @@ -395,6 +395,27 @@ public class QueryDB { } return data; } + + /** + * 根据物料id查询料仓 + * @param id + * @return + */ + public static List GetSolisByMaterialID(String id){ + List solisids = GetSilosLIst(id); + List data = new ArrayList<>(); + if (solisids.size() == 0){ + return data; + } + + for (String s : solisids) { + BPA_SILOS silos = GetSilosID(s); + if (silos!= null) { + data.add(silos); + } + } + return data; + } //endregion //region BPA_GOODS 商品表 diff --git a/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java b/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java index c13cbba..541ab16 100644 --- a/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java +++ b/app/src/main/java/com/example/bpa/view/from/lcsz_activity.java @@ -103,6 +103,7 @@ public class lcsz_activity extends AppCompatActivity implements View.OnClickList } datas.add(new lcMode(silo.id,silo.num,material_name,"",material_id)); + } } lc_item_adapter adapter = new lc_item_adapter(this, datas); @@ -165,6 +166,7 @@ public class lcsz_activity extends AppCompatActivity implements View.OnClickList if(QueryDB.UpdateSilosAndMaterial(item)){ currentSilo.materialName.setText(((selectitem_adapter)viewHolder).getItem(position).name); T.show(lcsz_activity.this,"更新成功"); + } }