From 71d3d99d6d1e9fe27827605558144d6134d48984 Mon Sep 17 00:00:00 2001 From: xuhaihui <2098865055@qq.com> Date: Wed, 18 Jun 2025 10:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=8D=95=E5=85=B3=E8=81=94?= =?UTF-8?q?=E9=A2=86=E6=96=99=E7=94=B3=E8=AF=B7=E5=8D=95=E4=BA=8C=E5=BC=80?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BD=BF=E7=94=A8=E8=AE=BE=E5=A4=87=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=EF=BC=8C=E9=A2=86=E6=96=99=E7=94=B3=E8=AF=B7=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=88=97=E8=A1=A8=E5=8A=A8=E6=80=81=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BD=BF=E7=94=A8=E8=AE=BE=E5=A4=87=E8=B5=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/form/MaterialApplyEntryUIPluginExt.java | 11 ++++++----- .../pr/plugin/form/MaterialOutApplyPluginExt.java | 13 +++++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialApplyEntryUIPluginExt.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialApplyEntryUIPluginExt.java index fc83154..a6268bc 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialApplyEntryUIPluginExt.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialApplyEntryUIPluginExt.java @@ -26,7 +26,7 @@ import kd.bos.form.plugin.AbstractFormPlugin; import kd.bos.servicehelper.BusinessDataServiceHelper; /** - * 领料申请单物料列表,动态表单 + * 领料申请单物料列表单:动态表单,出库单中新增行获取领料申请单的分录 */ public class MaterialApplyEntryUIPluginExt extends AbstractFormPlugin implements SearchEnterListener { public MaterialApplyEntryUIPluginExt() { @@ -76,8 +76,8 @@ public class MaterialApplyEntryUIPluginExt extends AbstractFormPlugin implements private void refreshEntryEntity(String searchText) { Map params = this.getView().getFormShowParameter().getCustomParams(); - Object applyBillIdObject = params.get("applyBillId"); - Object selectedEntryIdObject = params.get("selectedEntryId"); + Object applyBillIdObject = params.get("applyBillId");//出库单 领料申请单ID + Object selectedEntryIdObject = params.get("selectedEntryId");//出库单 申请单分录id if (applyBillIdObject != null) { Long applyBillId = (Long)applyBillIdObject; List selectedApplyEntryIdList = new ArrayList(); @@ -95,8 +95,8 @@ public class MaterialApplyEntryUIPluginExt extends AbstractFormPlugin implements } } - DynamicObject applyBill = BusinessDataServiceHelper.loadSingle(applyBillId, "ecma_materialapplybill"); - this.getModel().setValue("currency", applyBill.getDynamicObject("currency")); + DynamicObject applyBill = BusinessDataServiceHelper.loadSingle(applyBillId, "ecma_materialapplybill");//领料申请单 + this.getModel().setValue("currency", applyBill.getDynamicObject("currency"));//领料申请单 签约币别 DynamicObjectCollection applyEntries = applyBill.getDynamicObjectCollection("entryentity"); DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("entryentity"); entryEntity.clear(); @@ -132,6 +132,7 @@ public class MaterialApplyEntryUIPluginExt extends AbstractFormPlugin implements newEntry.set("applyentryid", id); newEntry.set("material", entry.get("material")); newEntry.set("modelnum", entry.get("modelnum")); + newEntry.set("zcgj_shebei", entry.get("zcgj_shebei"));//使用设备(二开添加 newEntry.set("lotid", entry.get("lotid")); newEntry.set("realoutqty", entry.get("realoutqty")); newEntry.set("price", entry.get("price")); diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialOutApplyPluginExt.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialOutApplyPluginExt.java index 7dd2f33..ca5a46b 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialOutApplyPluginExt.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialOutApplyPluginExt.java @@ -32,6 +32,9 @@ import kd.bos.orm.query.QFilter; import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.ec.basedata.common.utils.OpenPageUtils; +/** + * 出库单:领料出库与领料申请关联逻辑 + */ public class MaterialOutApplyPluginExt extends AbstractBillPlugIn implements BeforeF7SelectListener { private static final String APPLYBILL = "applybill"; private static final String MATERIAL_APPLY_ENTRY_FORM = "ecma_materialapplyentry"; @@ -133,6 +136,7 @@ public class MaterialOutApplyPluginExt extends AbstractBillPlugIn implements Bef newEntry.set("applyentryid", applyEntry.getLong("id")); newEntry.set("material", applyEntry.get("material")); newEntry.set("modelnum", applyEntry.get("modelnum")); + newEntry.set("zcgj_shebei", applyEntry.get("zcgj_shebei"));//使用设备(二开添加 newEntry.set("lotid", applyEntry.get("lotid")); newEntry.set("lot", applyEntry.get("lot")); newEntry.set("assmeasureunit", applyEntry.get("assmeasureunit")); @@ -170,6 +174,7 @@ public class MaterialOutApplyPluginExt extends AbstractBillPlugIn implements Bef newEntry.set("applyentryid", applyEntry.getLong("id")); newEntry.set("material", applyEntry.get("material")); newEntry.set("modelnum", applyEntry.get("modelnum")); + newEntry.set("zcgj_shebei", applyEntry.get("zcgj_shebei"));//使用设备(二开添加 newEntry.set("lotid", applyEntry.get("lotid")); newEntry.set("lot", applyEntry.get("lot")); newEntry.set("assmeasureunit", applyEntry.get("assmeasureunit")); @@ -252,7 +257,7 @@ public class MaterialOutApplyPluginExt extends AbstractBillPlugIn implements Bef } private void openApplyEntryForm() { - DynamicObject applyBill = (DynamicObject)this.getModel().getValue("applybill"); + DynamicObject applyBill = (DynamicObject)this.getModel().getValue("applybill");//领料申请单 DynamicObjectCollection entries = this.getModel().getEntryEntity("entryentity"); StringBuffer selectedEntryIdBuff = new StringBuffer(); Iterator var4 = entries.iterator(); @@ -264,9 +269,9 @@ public class MaterialOutApplyPluginExt extends AbstractBillPlugIn implements Bef String selectedEntryId = selectedEntryIdBuff.toString(); HashMap map = new HashMap(); - map.put("formId", "ecma_materialapplyentry"); - map.put("applyBillId", applyBill.getPkValue()); - map.put("selectedEntryId", selectedEntryId); + map.put("formId", "ecma_materialapplyentry");//领料申请单物料列表动态表单标识 + map.put("applyBillId", applyBill.getPkValue());//领料申请单ID + map.put("selectedEntryId", selectedEntryId);//申请单分录id FormShowParameter showParameter = FormShowParameter.createFormShowParameter(map); showParameter.getOpenStyle().setShowType(ShowType.Modal); showParameter.setStatus(OperationStatus.ADDNEW);