youhua
This commit is contained in:
parent
ca4fc13b7c
commit
34f30062f9
|
@ -51,17 +51,6 @@ public class EquipmentCardListPlugin extends AbstractListPlugin implements Plugi
|
||||||
super.itemClick(evt);
|
super.itemClick(evt);
|
||||||
String itemKey = evt.getItemKey();
|
String itemKey = evt.getItemKey();
|
||||||
if (itemKey.equals("zcgj_idle")){//闲置
|
if (itemKey.equals("zcgj_idle")){//闲置
|
||||||
Set<Long> setIds = getSelectOrderIds(this.getSelectedRows());
|
|
||||||
DynamicObject[] equipments = BusinessDataServiceHelper.load("eceq_equipment_card", "billno,billname,equipstatus", new QFilter[]{new QFilter("id", "in", setIds)});
|
|
||||||
for (DynamicObject equipment : equipments) {
|
|
||||||
equipment.set("equipstatus","FREE");
|
|
||||||
}
|
|
||||||
Object[] save = SaveServiceHelper.save(equipments);
|
|
||||||
System.out.println();
|
|
||||||
this.getView().showMessage("闲置成功!");
|
|
||||||
IFormView view = this.getView();
|
|
||||||
view.invokeOperation("refresh");
|
|
||||||
} 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) {
|
||||||
|
@ -111,13 +100,17 @@ public class EquipmentCardListPlugin extends AbstractListPlugin implements Plugi
|
||||||
if (eceq_equipment_card!=null){
|
if (eceq_equipment_card!=null){
|
||||||
equipmentcard.set("id",eceq_equipment_card.getLong("id"));
|
equipmentcard.set("id",eceq_equipment_card.getLong("id"));
|
||||||
}
|
}
|
||||||
|
String cardString = eceq_equipment_card.getString("number");
|
||||||
|
if(!cardString.isEmpty() && cardString!=null){
|
||||||
|
equipmentcard.set("number",cardString);//设备编号
|
||||||
|
}else{
|
||||||
|
equipmentcard.set("number",getCodeRule(equipmentcard,"53BT+ZJB86=L"));//设备编号
|
||||||
|
}
|
||||||
equipmentcard.set("billno",timeText);//单据编号
|
equipmentcard.set("billno",timeText);//单据编号
|
||||||
equipmentcard.set("status","C");//单据状态
|
equipmentcard.set("status","C");//单据状态
|
||||||
equipmentcard.set("billstatus","C");//
|
equipmentcard.set("billstatus","C");//
|
||||||
equipmentcard.set("enable","1");//可用
|
equipmentcard.set("enable","1");//可用
|
||||||
equipmentcard.set("property","OWN");//设备性质
|
equipmentcard.set("property","OWN");//设备性质
|
||||||
equipmentcard.set("number",getCodeRule(equipmentcard,"53BT+ZJB86=L"));//设备编号
|
|
||||||
equipmentcard.set("name",assetname);//设备名称
|
equipmentcard.set("name",assetname);//设备名称
|
||||||
equipmentcard.set("modelnum",model);//规格型号
|
equipmentcard.set("modelnum",model);//规格型号
|
||||||
equipmentcard.set("indate",realaccountdate);//入库日期
|
equipmentcard.set("indate",realaccountdate);//入库日期
|
||||||
|
|
Loading…
Reference in New Issue