From 7a86773abaaf846a5f7b32e50e535bedf8f303c1 Mon Sep 17 00:00:00 2001 From: ptt <2403326863@qq.com> Date: Mon, 10 Mar 2025 16:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E6=9C=AC=E6=B5=8B=E7=AE=97=EF=BC=9A?= =?UTF-8?q?=E6=89=8B=E5=B7=A5=E7=94=9F=E6=88=90=E7=9B=AE=E6=A0=87=E6=88=90?= =?UTF-8?q?=E6=9C=AC=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recos/formplugin/CreatTargetCostFormPlugin.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main/java/shkd/repc/recos/formplugin/CreatTargetCostFormPlugin.java b/main/java/shkd/repc/recos/formplugin/CreatTargetCostFormPlugin.java index 5406c57..ac56d66 100644 --- a/main/java/shkd/repc/recos/formplugin/CreatTargetCostFormPlugin.java +++ b/main/java/shkd/repc/recos/formplugin/CreatTargetCostFormPlugin.java @@ -33,16 +33,20 @@ public class CreatTargetCostFormPlugin extends AbstractBillPlugIn implements Plu DynamicObject dynamicObject = this.getModel().getDataEntity(); Object primaryKeyValue = dynamicObject.getPkValue(); if ("qeug_creat".equals(evt.getItemKey())) { - QFilter measurecostid = new QFilter("measurecostid", QCP.equals, primaryKeyValue); + QFilter measurecostid = new QFilter("project", QCP.equals, dynamicObject.getDynamicObject("project").getPkValue()); DynamicObject dynamicObject2 = BusinessDataServiceHelper.loadSingle("recos_aimcost", measurecostid.toArray()); if (dynamicObject2!=null) { this.getView().showMessage("存在对应目标成本,无法生成"); return; } - dynamicObject.set("aimversionflag",true); + dynamicObject.set("qeug_aimversionflag",true); SaveServiceHelper.update(dynamicObject); AimCostGenByMeasureHelper.generateAimCost((Long)dynamicObject.getPkValue()); - this.getView().updateView("aimversionflag"); + OperationResult unAuditOpResult = AimCostGenByMeasureHelper.unAuditAimCost(dynamicObject.getPkValue()); + if (null != unAuditOpResult && !unAuditOpResult.isSuccess()) { + this.getView().showMessage(((IOperateInfo)unAuditOpResult.getAllErrorOrValidateInfo().get(0)).getMessage()); + } + this.getView().updateView("qeug_aimversionflag"); this.getView().showSuccessNotification("生成成功"); }else if("qeug_revoked".equals(evt.getItemKey())){ boolean aimversionflag = dynamicObject.getBoolean("aimversionflag");