This commit is contained in:
xiaoshi 2025-08-15 14:14:46 +08:00
parent fe609728ce
commit 2e4727e818
1 changed files with 11 additions and 1 deletions

View File

@ -67,7 +67,17 @@ public class EquipmentCardListPlugin extends AbstractListPlugin implements Plugi
this.getView().showMessage("闲置成功!"); this.getView().showMessage("闲置成功!");
IFormView view = this.getView(); IFormView view = this.getView();
view.invokeOperation("refresh"); view.invokeOperation("refresh");
} else if (itemKey.equals("zcgj_asset")) {//同步资产卡片 }else if(itemKey.equals("zcgj_assetorg")){//同步使用组织
Set<Long> setIds = getSelectOrderIds(this.getSelectedRows());
DynamicObject[] equipments = BusinessDataServiceHelper.load("eceq_equipment_card", "billno,billname,equipstatus,org,zcgj_headusedepts", new QFilter[]{new QFilter("id", "in", setIds)});
DynamicObjectCollection collection = new DynamicObjectCollection();
for (DynamicObject equipment : equipments) {
DynamicObject org = equipment.getDynamicObject("org");
equipment.set("zcgj_headusedepts",org);
collection.add(equipment);
}
SaveServiceHelper.save(collection.toArray(new DynamicObject[]{}));
}else if (itemKey.equals("zcgj_asset")) {//同步资产卡片
Set<String> strings = new HashSet(); Set<String> strings = new HashSet();
DynamicObject[] equipmenttype = BusinessDataServiceHelper.load("zcgj_equipmenttype", "number,zcgj_assetcat",new QFilter[]{new QFilter("zcgj_assetcat.number", QCP.is_notnull,"" )}); DynamicObject[] equipmenttype = BusinessDataServiceHelper.load("zcgj_equipmenttype", "number,zcgj_assetcat",new QFilter[]{new QFilter("zcgj_assetcat.number", QCP.is_notnull,"" )});
for (DynamicObject dynamicObject : equipmenttype) { for (DynamicObject dynamicObject : equipmenttype) {