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); + } + } } }