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 2460b17..c46f4cf 100644 --- a/app/src/main/java/com/example/bpa/db/QueryDB.java +++ b/app/src/main/java/com/example/bpa/db/QueryDB.java @@ -113,7 +113,12 @@ public class QueryDB { } return data; } - + /** + * 根据id获取物料 + * + * @param name + * @return + */ public static BPA_MATERIAL GetMaterialbyid(String id){ String orderby=Desc_Time_Up;//时间 String where="isDelete=? and id=?"; @@ -321,12 +326,12 @@ public class QueryDB { /** * 修改料仓物料关联 - * add fengyoufu 20230413 + * yddate 20230413 * * @param data */ public static boolean UpdateSilosAndMaterial(BPA_SILOSANDMATERIAL data) { - return Update(BPA_SILOSANDMATERIAL.class, data); + return Update(BPA_SILOSANDMATERIAL.class, data,"silosID"); } /** 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 f663207..c13cbba 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 @@ -20,6 +20,7 @@ import com.example.bpa.db.QueryDB; import com.example.bpa.db.mode.BPA_MATERIAL; import com.example.bpa.db.mode.BPA_SILOS; import com.example.bpa.db.mode.BPA_SILOSANDMATERIAL; +import com.example.bpa.helper.T; import com.example.bpa.view.adapter.lc_item_adapter; import com.example.bpa.view.adapter.selectitem_adapter; import com.example.bpa.view.control.ItemClickListener; @@ -163,6 +164,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,"更新成功"); } }