代码提交

提交人:陈绍鑫
时间:2024/11/18  17:00
内容:成本测算插件
This commit is contained in:
陈绍鑫 2024-11-18 17:27:31 +08:00
parent 0fbeb48387
commit 53b839e0ac
3 changed files with 13 additions and 5 deletions

View File

@ -62,8 +62,12 @@ public class MeasureciFormPlugin extends AbstractFormPlugin {
List<DynamicObject> myList = new ArrayList<>(); List<DynamicObject> myList = new ArrayList<>();
for (int i = 0; i < selectRows.length; i++) { for (int i = 0; i < selectRows.length; i++) {
DynamicObject cientrydata = this.getModel().getEntryRowEntity("cientry", selectRows[i]); DynamicObject cientrydata = this.getModel().getEntryRowEntity("cientry", selectRows[i]);
DynamicObject entry_costaccount = cientrydata.getDynamicObject("entry_costaccount");
boolean isleaf = entry_costaccount.getBoolean("isleaf");
if (isleaf){
myList.add(cientrydata); myList.add(cientrydata);
} }
}
result.forEach((key, value) -> { result.forEach((key, value) -> {
for (DynamicObject dynamicObject : myList) { for (DynamicObject dynamicObject : myList) {
if (dynamicObject.getString("entry_accountname").equals(key)){ if (dynamicObject.getString("entry_accountname").equals(key)){
@ -71,7 +75,7 @@ public class MeasureciFormPlugin extends AbstractFormPlugin {
} }
} }
}); });
this.getView().showSuccessNotification("能失败:"); this.getView().showSuccessNotification("同步成");
} }
} }
} }

View File

@ -161,7 +161,6 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl
//设置默认列宽 //设置默认列宽
sheet.setDefaultColumnWidth(20); sheet.setDefaultColumnWidth(20);
sheet.setColumnWidth(0, 50 * 256);
// 创建标题 // 创建标题
XSSFRow headRow = sheet.createRow(0); XSSFRow headRow = sheet.createRow(0);
headRow.setHeightInPoints(30); headRow.setHeightInPoints(30);

View File

@ -46,9 +46,14 @@ public class WorkQuantityPlugin extends AbstractFormPlugin {
.and(new QFilter("qeug_cpmc.id", QCP.equals, pkValue)); .and(new QFilter("qeug_cpmc.id", QCP.equals, pkValue));
DynamicObjectCollection query = QueryServiceHelper.query("qeug_gcl", "id", filter.toArray()); DynamicObjectCollection query = QueryServiceHelper.query("qeug_gcl", "id", filter.toArray());
if (query.size()!=0){ if (query.size()!=0){
if (query.get(0).get("id").equals(this.getModel().getValue("id"))){
}else {
this.getView().showSuccessNotification("已存在此项目,不允许保存"); this.getView().showSuccessNotification("已存在此项目,不允许保存");
args.setCancel(true); args.setCancel(true);
} }
}
} }
} }