From 53b839e0ac699d9900eeb8e6754a1eb7a6c518c2 Mon Sep 17 00:00:00 2001 From: chenshaoxin <1981897232@qq.com> Date: Mon, 18 Nov 2024 17:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4=20?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=99=88=E7=BB=8D=E9=91=AB?= =?UTF-8?q?=20=E6=97=B6=E9=97=B4=EF=BC=9A2024/11/18=20=2017=EF=BC=9A00=20?= =?UTF-8?q?=E5=86=85=E5=AE=B9=EF=BC=9A=E6=88=90=E6=9C=AC=E6=B5=8B=E7=AE=97?= =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shkd/repc/recos/formplugin/MeasureciFormPlugin.java | 8 ++++++-- .../repc/recos/formplugin/RecosMeasurecosFormPlugin.java | 1 - .../shkd/repc/repmd/formplugin/WorkQuantityPlugin.java | 9 +++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/main/java/shkd/repc/recos/formplugin/MeasureciFormPlugin.java b/main/java/shkd/repc/recos/formplugin/MeasureciFormPlugin.java index 08574a8..6016e3a 100644 --- a/main/java/shkd/repc/recos/formplugin/MeasureciFormPlugin.java +++ b/main/java/shkd/repc/recos/formplugin/MeasureciFormPlugin.java @@ -62,7 +62,11 @@ public class MeasureciFormPlugin extends AbstractFormPlugin { List myList = new ArrayList<>(); for (int i = 0; i < selectRows.length; i++) { DynamicObject cientrydata = this.getModel().getEntryRowEntity("cientry", selectRows[i]); - myList.add(cientrydata); + DynamicObject entry_costaccount = cientrydata.getDynamicObject("entry_costaccount"); + boolean isleaf = entry_costaccount.getBoolean("isleaf"); + if (isleaf){ + myList.add(cientrydata); + } } result.forEach((key, value) -> { for (DynamicObject dynamicObject : myList) { @@ -71,7 +75,7 @@ public class MeasureciFormPlugin extends AbstractFormPlugin { } } }); - this.getView().showSuccessNotification("功能失败:"); + this.getView().showSuccessNotification("同步成功"); } } } diff --git a/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java b/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java index c86f7a4..8138d0a 100644 --- a/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java +++ b/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java @@ -161,7 +161,6 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl //设置默认列宽 sheet.setDefaultColumnWidth(20); - sheet.setColumnWidth(0, 50 * 256); // 创建标题 XSSFRow headRow = sheet.createRow(0); headRow.setHeightInPoints(30); diff --git a/main/java/shkd/repc/repmd/formplugin/WorkQuantityPlugin.java b/main/java/shkd/repc/repmd/formplugin/WorkQuantityPlugin.java index 7be67b8..8587303 100644 --- a/main/java/shkd/repc/repmd/formplugin/WorkQuantityPlugin.java +++ b/main/java/shkd/repc/repmd/formplugin/WorkQuantityPlugin.java @@ -46,8 +46,13 @@ public class WorkQuantityPlugin extends AbstractFormPlugin { .and(new QFilter("qeug_cpmc.id", QCP.equals, pkValue)); DynamicObjectCollection query = QueryServiceHelper.query("qeug_gcl", "id", filter.toArray()); if (query.size()!=0){ - this.getView().showSuccessNotification("已存在此项目,不允许保存"); - args.setCancel(true); + if (query.get(0).get("id").equals(this.getModel().getValue("id"))){ + + }else { + this.getView().showSuccessNotification("已存在此项目,不允许保存"); + args.setCancel(true); + } + } } }