From e78a3e81da31c08a5675a55cdde35b4ec4bc65ad Mon Sep 17 00:00:00 2001 From: zhangzhiguo <421587375@qq.com> Date: Fri, 28 Nov 2025 14:05:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=88=90=E6=9C=AC=E6=A0=B8?= =?UTF-8?q?=E7=AE=97=E5=8D=95=E5=A2=9E=E5=8A=A0=E6=8A=98=E6=97=A7=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/form/EquipmentCostSplitFormPluginExt.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EquipmentCostSplitFormPluginExt.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EquipmentCostSplitFormPluginExt.java index d369a39..f39c340 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EquipmentCostSplitFormPluginExt.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EquipmentCostSplitFormPluginExt.java @@ -55,11 +55,13 @@ public class EquipmentCostSplitFormPluginExt extends EquipmentCardListPlugin{ DynamicObjectCollection costSplitList = this.getModel().getEntryEntity("settlesplitentity"); costSplitList.clear(); DynamicObject settleSplit = null; - if (this.getModel().getValue("project") == null) { + DynamicObject period = (DynamicObject)this.getModel().getValue("splitperiod"); + if (period== null) { + this.getView().showTipNotification(ResManager.loadKDString("请选择期间!", "EquipmentCostSplitFormPlugin_2", "ec-eceq-formplugin", new Object[0])); + }else if (this.getModel().getValue("project") == null) { this.getView().showTipNotification(ResManager.loadKDString("工程项目不能为空。", "EquipmentCostSplitFormPlugin_2", "ec-eceq-formplugin", new Object[0])); } else { DynamicObject project = (DynamicObject)this.getModel().getValue("project"); - DynamicObject period = (DynamicObject)this.getModel().getValue("splitperiod"); QFilter qFilter = new QFilter("project", "=", project.getPkValue()); QFilter qFilter1 = new QFilter("id", "<>", this.getModel().getDataEntity().getPkValue()); DynamicObject[] equipCostSpiltList = BusinessDataServiceHelper.load("eceq_costsplit", "settlesplitentity,settlesplitentity.settleid", new QFilter[]{qFilter, qFilter1}); @@ -227,7 +229,10 @@ public class EquipmentCostSplitFormPluginExt extends EquipmentCardListPlugin{ DynamicObject[] loadsettle = BusinessDataServiceHelper.load("eceq_settle", "", new QFilter[]{new QFilter("org", "=", org.getLong("id")) , new QFilter("period", "=", splitperiod.getLong("id")), - new QFilter("billstatus", "=", "C").or(new QFilter("billstatus", "=", "B"))}); + new QFilter("billstatus", "=", "C") + .or(new QFilter("billstatus", "=", "B")) + ,new QFilter("zcgj_depreciable","=",true)}); + if(loadsettle.length == 0){ //eceq_settle DynamicObject eceqsettle =BusinessDataServiceHelper.newDynamicObject("eceq_settle");//设备费用结算 @@ -243,6 +248,7 @@ public class EquipmentCostSplitFormPluginExt extends EquipmentCardListPlugin{ eceqsettle.set("creator",currentUserId); eceqsettle.set("billname",org.getString("name")+"设备折旧费"); eceqsettle.set("billstatus","C"); + eceqsettle.set("zcgj_depreciable",true); int i=0; DynamicObjectCollection entryentity = eceqsettle.getDynamicObjectCollection("entryentity");//设备结算分录 BigDecimal allAmount = BigDecimal.ZERO;