youhua
This commit is contained in:
parent
8cf40f8cae
commit
565e815ef6
|
@ -157,7 +157,7 @@ public class EquipmentCardTaskPlugin extends AbstractTask {
|
|||
// DynamicObjectCollection depresplitdetails = QueryServiceHelper.query("fa_depresplitdetail", "billno,period,splitdept,assentry.costcentrer,assentry.splitamount", new QFilter[]{qf});
|
||||
|
||||
// DynamicObject[] depresplitdetails = BusinessDataServiceHelper.load("fa_depresplitdetail", "billno,period,splitdept,assentry.costcentrer,assentry.splitamount", new QFilter[]{qf});
|
||||
DataSet rows = QueryServiceHelper.queryDataSet(this.getClass().getName(), "fa_depresplitdetail", "billno,period,splitdept,assentry,assentry.costcentrer,assentry.splitamount", qFilter.toArray(), "period.number DESC", 1);
|
||||
DataSet rows = QueryServiceHelper.queryDataSet(this.getClass().getName(), "fa_depresplitdetail", "id,billno,period,splitdept,assentry,assentry.costcentrer,assentry.splitamount", qFilter.toArray(), "period.number DESC", 1);
|
||||
DynamicObjectCollection depresplitdetails = ORM.create().toPlainDynamicObjectCollection(rows.copy());
|
||||
// // 增强版比较器(自动适配多种日期格式)
|
||||
// for (int i = 0; i < depresplitdetails.size(); i++) {
|
||||
|
@ -206,12 +206,14 @@ public class EquipmentCardTaskPlugin extends AbstractTask {
|
|||
// }
|
||||
// });
|
||||
for (DynamicObject depresplitdetail : depresplitdetails) {
|
||||
String billno = depresplitdetail.getString("billno");
|
||||
Long periodid = depresplitdetail.getLong("period");//折旧区间
|
||||
long id = depresplitdetail.getLong("id");
|
||||
DynamicObject loadSingle = BusinessDataServiceHelper.loadSingle("fa_depresplitdetail", new QFilter[]{new QFilter("id", QCP.equals, id)});
|
||||
String billno = loadSingle.getString("billno");
|
||||
Long periodid = loadSingle.getLong("period");//折旧区间
|
||||
DynamicObject period = BusinessDataServiceHelper.loadSingle("bd_period", new QFilter[]{new QFilter("id", QCP.equals, periodid)});
|
||||
Long splitdeptid = depresplitdetail.getLong("splitdept");//使用部门
|
||||
Long splitdeptid = loadSingle.getLong("splitdept");//使用部门
|
||||
DynamicObject splitdept = BusinessDataServiceHelper.loadSingle("bos_adminorg", new QFilter[]{new QFilter("id", QCP.equals, splitdeptid)});
|
||||
DynamicObjectCollection assentry = depresplitdetail.getDynamicObjectCollection("assentry");
|
||||
DynamicObjectCollection assentry = loadSingle.getDynamicObjectCollection("assentry");
|
||||
Long costcentrerid = assentry.get(0).getLong("costcentrer");//成本中心
|
||||
DynamicObject costcentrer = BusinessDataServiceHelper.loadSingle("bos_costcenter", new QFilter[]{new QFilter("id", QCP.equals, costcentrerid)});
|
||||
BigDecimal splitamount = assentry.get(0).getBigDecimal("splitamount");//分摊金额
|
||||
|
|
Loading…
Reference in New Issue