Compare commits
3 Commits
e510a01769
...
da15158c2f
Author | SHA1 | Date |
---|---|---|
|
da15158c2f | |
|
9d10e600fb | |
|
ed3c4100f9 |
|
@ -133,6 +133,7 @@ public class AssistbalanceAutoData {
|
||||||
DynamicObject assistbalance
|
DynamicObject assistbalance
|
||||||
=BusinessDataServiceHelper.newDynamicObject("zcgj_rpt_assistbalance");
|
=BusinessDataServiceHelper.newDynamicObject("zcgj_rpt_assistbalance");
|
||||||
assistbalance.set("zcgj_debitlocal", record.getDebitlocal());
|
assistbalance.set("zcgj_debitlocal", record.getDebitlocal());
|
||||||
|
assistbalance.set("zcgj_beginlocal", record.getBeginlocal());
|
||||||
assistbalance.set("zcgj_creditlocal", record.getCreditlocal());
|
assistbalance.set("zcgj_creditlocal", record.getCreditlocal());
|
||||||
assistbalance.set("zcgj_yeardebitfor", record.getYeardebitfor());
|
assistbalance.set("zcgj_yeardebitfor", record.getYeardebitfor());
|
||||||
assistbalance.set("zcgj_yearcreditfor", record.getYearcreditfor());
|
assistbalance.set("zcgj_yearcreditfor", record.getYearcreditfor());
|
||||||
|
|
|
@ -101,6 +101,17 @@ public class CasPaybillToEcFundPlanApplyOp extends AbstractOperationServicePlugI
|
||||||
allActamt = allActamt.add(zcgjAmountRecommended);
|
allActamt = allActamt.add(zcgjAmountRecommended);
|
||||||
dynamicObject.set("zcgj_amountpaid", allActamt);//实付金额
|
dynamicObject.set("zcgj_amountpaid", allActamt);//实付金额
|
||||||
dynamicObject.set("zcgj_amount_inpayment",amountrecommended);//
|
dynamicObject.set("zcgj_amount_inpayment",amountrecommended);//
|
||||||
|
|
||||||
|
//zcgj_amount_remaining = zcgj_hdamount - zcgj_amount_inpayment - zcgj_amountpaid
|
||||||
|
//剩余待拨付金额 = 财务核定金额 - 付款处理中金额 - 实付金额
|
||||||
|
BigDecimal hdamount = dynamicObject.getBigDecimal("zcgj_hdamount");
|
||||||
|
if(hdamount !=null && isPay){
|
||||||
|
BigDecimal subtract = hdamount.subtract(amountrecommended).subtract(allActamt);
|
||||||
|
dynamicObject.set("zcgj_amount_remaining",subtract);
|
||||||
|
}else if(hdamount != null){
|
||||||
|
BigDecimal subtract = hdamount.add(amountrecommended).subtract(allActamt);//实付金额已经成为相反数
|
||||||
|
dynamicObject.set("zcgj_amount_remaining",subtract);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateData.add(fundingplanapply);
|
updateData.add(fundingplanapply);
|
||||||
|
|
|
@ -41,14 +41,16 @@ public class FundingplanapplyPlugin extends AbstractBillPlugIn implements Plugin
|
||||||
//设置期间
|
//设置期间
|
||||||
DynamicObject org = (DynamicObject) this.getModel().getValue("zcgj_org");
|
DynamicObject org = (DynamicObject) this.getModel().getValue("zcgj_org");
|
||||||
if(org!=null){
|
if(org!=null){
|
||||||
//查询组织下对应的当前期间数据
|
/*//查询组织下对应的当前期间数据
|
||||||
DynamicObject[] orgByCurperiod = BusinessDataServiceHelper.load("gl_accountbook",
|
DynamicObject[] orgByCurperiod = BusinessDataServiceHelper.load("gl_accountbook",
|
||||||
"org,curperiod",
|
"org,curperiod",
|
||||||
new QFilter[]{new QFilter("enable", QCP.equals, Boolean.TRUE).
|
new QFilter[]{new QFilter("enable", QCP.equals, Boolean.TRUE).
|
||||||
and("status", QCP.equals, "C").and("org.id", QCP.equals, org.getLong("id"))});
|
and("status", QCP.equals, "C").and("org.id", QCP.equals, org.getLong("id"))});
|
||||||
if(orgByCurperiod!=null && orgByCurperiod.length>0){
|
if(orgByCurperiod!=null && orgByCurperiod.length>0){
|
||||||
this.getModel().setValue("zcgj_period",orgByCurperiod[0].getDynamicObject("curperiod"));
|
this.getModel().setValue("zcgj_period",orgByCurperiod[0].getDynamicObject("curperiod"));
|
||||||
}
|
}*/
|
||||||
|
//设置期间
|
||||||
|
carryCurrentPeriodAndDate();
|
||||||
//初始化值
|
//初始化值
|
||||||
initData(org);
|
initData(org);
|
||||||
}
|
}
|
||||||
|
@ -156,4 +158,19 @@ public class FundingplanapplyPlugin extends AbstractBillPlugIn implements Plugin
|
||||||
return LocalDate.of(year, 12, 31);
|
return LocalDate.of(year, 12, 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void carryCurrentPeriodAndDate() {
|
||||||
|
Calendar cal = Calendar.getInstance();
|
||||||
|
int year = cal.get(1);
|
||||||
|
int month = cal.get(2) + 1;
|
||||||
|
QFilter yearFilter = new QFilter("periodyear", "=", year);
|
||||||
|
QFilter monthFilter = new QFilter("periodnumber", "=", month);
|
||||||
|
DynamicObject bdPeriod = BusinessDataServiceHelper.loadSingle("bd_period", "id,name,begindate,enddate", new QFilter[]{yearFilter, monthFilter});
|
||||||
|
if (bdPeriod != null) {
|
||||||
|
this.getModel().setValue("zcgj_period", bdPeriod.getPkValue());
|
||||||
|
//this.getModel().setValue("begindate", bdPeriod.get("begindate"));
|
||||||
|
// this.getModel().setValue("enddate", bdPeriod.get("enddate"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ public class OutContractSettleFiConfirmWorkFlowPlugin implements IWorkflowPlugin
|
||||||
outFinaceconfirm.set("zcgj_invoice_org",outContractSettle.getDynamicObject("project").getDynamicObject("projectorg"));
|
outFinaceconfirm.set("zcgj_invoice_org",outContractSettle.getDynamicObject("project").getDynamicObject("projectorg"));
|
||||||
outFinaceconfirm.set("zcgj_jscustomer",outContractSettle.getDynamicObject("zcgj_jscustomer"));
|
outFinaceconfirm.set("zcgj_jscustomer",outContractSettle.getDynamicObject("zcgj_jscustomer"));
|
||||||
outFinaceconfirm.set("billstatus","A");
|
outFinaceconfirm.set("billstatus","A");
|
||||||
outFinaceconfirm.set("zcgj_is_reversabillid",true);
|
|
||||||
outFinaceconfirm.set("creator",outContractSettle.getDynamicObject("creator"));
|
outFinaceconfirm.set("creator",outContractSettle.getDynamicObject("creator"));
|
||||||
DynamicObjectCollection itementry = outContractSettle.getDynamicObjectCollection("itementry");
|
DynamicObjectCollection itementry = outContractSettle.getDynamicObjectCollection("itementry");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue