成本测算同步数据功能
This commit is contained in:
parent
4712ce8fde
commit
6d8065fd16
|
@ -33,11 +33,12 @@ public class MeasureciFormPlugin extends AbstractFormPlugin {
|
||||||
DynamicObjectCollection productentry = repmd_projectbill.getDynamicObjectCollection("productentry");//获取对应产品
|
DynamicObjectCollection productentry = repmd_projectbill.getDynamicObjectCollection("productentry");//获取对应产品
|
||||||
List<DynamicObject> children = productentry .stream().filter(e -> e.getDynamicObject("productentry_producttype").getString("id").equals(producttypeid.toString())).collect(Collectors.toList());
|
List<DynamicObject> children = productentry .stream().filter(e -> e.getDynamicObject("productentry_producttype").getString("id").equals(producttypeid.toString())).collect(Collectors.toList());
|
||||||
DynamicObjectCollection qeug_entryentity = children.get(0).getDynamicObjectCollection("qeug_subentryentity");//子单据体
|
DynamicObjectCollection qeug_entryentity = children.get(0).getDynamicObjectCollection("qeug_subentryentity");//子单据体
|
||||||
Map<String, BigDecimal> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
for (int i = 0; i <qeug_entryentity.size() ; i++) {
|
for (int i = 0; i <qeug_entryentity.size() ; i++) {
|
||||||
DynamicObject dynamicObject = qeug_entryentity.get(i);
|
DynamicObject dynamicObject = qeug_entryentity.get(i);
|
||||||
BigDecimal sum = dynamicObject.getBigDecimal("qeug_jrgsbsz");
|
BigDecimal sum = dynamicObject.getBigDecimal("qeug_jrgsbsz");
|
||||||
result.put(dynamicObject.getString("qeug_kmname"),sum);
|
String remark = dynamicObject.getString("qeug_remark");
|
||||||
|
result.put(dynamicObject.getString("qeug_kmname"),new Object[]{sum,remark});
|
||||||
}
|
}
|
||||||
EntryGrid cientry = this.getControl("cientry");
|
EntryGrid cientry = this.getControl("cientry");
|
||||||
int[] selectRows = cientry.getSelectRows();
|
int[] selectRows = cientry.getSelectRows();
|
||||||
|
@ -56,10 +57,15 @@ public class MeasureciFormPlugin extends AbstractFormPlugin {
|
||||||
}
|
}
|
||||||
//遍历赋值工程量基数
|
//遍历赋值工程量基数
|
||||||
result.forEach((key, value) -> {
|
result.forEach((key, value) -> {
|
||||||
|
BigDecimal sum = (BigDecimal) ((Object[]) value)[0]; // 获取工程量基数
|
||||||
|
String remark = (String) ((Object[]) value)[1]; // 获取备注
|
||||||
|
|
||||||
for (DynamicObject dynamicObject : myList) {
|
for (DynamicObject dynamicObject : myList) {
|
||||||
if (dynamicObject.getString("entry_accountname").equals(key)){
|
if (dynamicObject.getString("entry_accountname").equals(key)){
|
||||||
// this.getModel().setValue("entry_workload",value,(int)dynamicObject.get("seq")-1);//工程量
|
//设置工程量基数
|
||||||
this.getModel().setValue("qeug_gcljs",value,(int)dynamicObject.get("seq")-1);//工程量基数
|
this.getModel().setValue("qeug_gcljs",sum,(int)dynamicObject.get("seq")-1);
|
||||||
|
// 设置说明
|
||||||
|
this.getModel().setValue("entry_description", remark, (int) dynamicObject.get("seq") - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue