From 39a42c5eb7a55a1a886ce3fb670c6991f4691256 Mon Sep 17 00:00:00 2001 From: xuhaihui <2098865055@qq.com> Date: Wed, 6 Aug 2025 17:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E5=87=BA=E5=90=88=E5=90=8C=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E5=8D=95=E7=94=9F=E6=88=90=E5=86=B2=E9=94=80=E5=92=8C?= =?UTF-8?q?=E4=BD=9C=E5=BA=9F=E7=AD=89=E6=94=AF=E5=87=BA=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=8D=95=E9=80=BB=E8=BE=91=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=94=AF=E5=87=BA=E8=B4=A2=E5=8A=A1=E7=A1=AE=E8=AE=A4=E5=8D=95?= =?UTF-8?q?-=E8=B4=B9=E7=94=A8=E9=A1=B9=E7=9B=AE=E5=88=86=E5=BD=95?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tContractSettleFiConfirmWorkFlowPlugin.java | 18 +++++++++++++++++- ...OutContractSettleInvalidWorkFlowPlugin.java | 16 ++++++++++++++++ ...utContractSettleReversalWorkFlowPlugin.java | 15 +++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleFiConfirmWorkFlowPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleFiConfirmWorkFlowPlugin.java index ee4d29e..77c8bcb 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleFiConfirmWorkFlowPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleFiConfirmWorkFlowPlugin.java @@ -30,7 +30,7 @@ public class OutContractSettleFiConfirmWorkFlowPlugin implements IWorkflowPlugin //如果时冲销单据 //生成支出财务确认单 start //收入合同结算 - DynamicObject outFinaceconfirm =BusinessDataServiceHelper.newDynamicObject("zcgj_ec_out_finaceconfirm"); + DynamicObject outFinaceconfirm =BusinessDataServiceHelper.newDynamicObject("zcgj_ec_out_finaceconfirm");//支出财务确认单 outFinaceconfirm.set("zcgj_ec_out_contract_sett",outContractSettle.getLong("id")); outFinaceconfirm.set("zcgj_ec_out_contract_name",outContractSettle.getString("billname")); @@ -76,6 +76,22 @@ public class OutContractSettleFiConfirmWorkFlowPlugin implements IWorkflowPlugin outFinaceconfirm.set("zcgj_oftaxamount_all",oftaxamountAll); outFinaceconfirm.set("zcgj_amount_all",amountAll); outFinaceconfirm.set("zcgj_taxamt_all",taxamtAll); + + DynamicObjectCollection expenseItemEntryCollection = outFinaceconfirm.getDynamicObjectCollection("zcgj_expenseitementry");//支出财务确认单-费用项目分录 + expenseItemEntryCollection.clear(); + for (DynamicObject itemEntry : itementry) { + DynamicObjectCollection processAllocEntityCollection = itemEntry.getDynamicObjectCollection("zcgj_processallocatentity");//工序分摊 + for (DynamicObject processAllocEntity : processAllocEntityCollection) { + DynamicObject NewExpenseItemEntry = expenseItemEntryCollection.addNew(); + NewExpenseItemEntry.set("zcgj_cbs",processAllocEntity.get("zcgj_pa_process"));//工序 + NewExpenseItemEntry.set("zcgj_amountsum",processAllocEntity.get("zcgj_pa_amount"));//价税合计 + NewExpenseItemEntry.set("zcgj_expenseitemamt",processAllocEntity.get("zcgj_amountnotax"));//费用不含税金额 + NewExpenseItemEntry.set("zcgj_rateval",processAllocEntity.get("zcgj_rateval"));//税率(%) + NewExpenseItemEntry.set("zcgj_taxamount",processAllocEntity.get("zcgj_taxamt"));//税额 + NewExpenseItemEntry.set("zcgj_expenseitemrem",processAllocEntity.get("zcgj_pa_remark"));//费用说明 + } + } + SaveServiceHelper.saveOperate("zcgj_ec_out_finaceconfirm", new DynamicObject[]{outFinaceconfirm}, null);//支出合同实体 //生成支出财务确认单 end } diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleInvalidWorkFlowPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleInvalidWorkFlowPlugin.java index 9a807e6..5fc1632 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleInvalidWorkFlowPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleInvalidWorkFlowPlugin.java @@ -76,6 +76,22 @@ public class OutContractSettleInvalidWorkFlowPlugin implements IWorkflowPlugin { outFinaceconfirm.set("zcgj_oftaxamount_all",oftaxamountAll); outFinaceconfirm.set("zcgj_amount_all",amountAll); outFinaceconfirm.set("zcgj_taxamt_all",taxamtAll); + + DynamicObjectCollection expenseItemEntryCollection = outFinaceconfirm.getDynamicObjectCollection("zcgj_expenseitementry");//支出财务确认单-费用项目分录 + expenseItemEntryCollection.clear(); + for (DynamicObject itemEntry : itementry) { + DynamicObjectCollection processAllocEntityCollection = itemEntry.getDynamicObjectCollection("zcgj_processallocatentity");//工序分摊 + for (DynamicObject processAllocEntity : processAllocEntityCollection) { + DynamicObject NewExpenseItemEntry = expenseItemEntryCollection.addNew(); + NewExpenseItemEntry.set("zcgj_cbs",processAllocEntity.get("zcgj_pa_process"));//工序 + NewExpenseItemEntry.set("zcgj_amountsum",processAllocEntity.get("zcgj_pa_amount"));//价税合计 + NewExpenseItemEntry.set("zcgj_expenseitemamt",processAllocEntity.get("zcgj_amountnotax"));//费用不含税金额 + NewExpenseItemEntry.set("zcgj_rateval",processAllocEntity.get("zcgj_rateval"));//税率(%) + NewExpenseItemEntry.set("zcgj_taxamount",processAllocEntity.get("zcgj_taxamt"));//税额 + NewExpenseItemEntry.set("zcgj_expenseitemrem",processAllocEntity.get("zcgj_pa_remark"));//费用说明 + } + } + OperationResult zcgjEcOutFinaceconfirm = SaveServiceHelper.saveOperate("zcgj_ec_out_finaceconfirm", new DynamicObject[]{outFinaceconfirm}, null);//支出合同实体 if(zcgjEcOutFinaceconfirm.isSuccess()){ String sourceBillId = outContractSettle.getString("zcgj_invalidbillid"); diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleReversalWorkFlowPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleReversalWorkFlowPlugin.java index dadff39..56f65a2 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleReversalWorkFlowPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/OutContractSettleReversalWorkFlowPlugin.java @@ -124,6 +124,21 @@ public class OutContractSettleReversalWorkFlowPlugin implements IWorkflowPlugin item.set("zcgj_taxamt",dynamicObject.getBigDecimal("taxamt")); item.set("zcgj_remark",dynamicObject.getString("remark")); } + + DynamicObjectCollection expenseItemEntryCollection = outFinaceconfirm.getDynamicObjectCollection("zcgj_expenseitementry");//支出财务确认单-费用项目分录 + expenseItemEntryCollection.clear(); + for (DynamicObject itemEntry : itementry) { + DynamicObjectCollection processAllocEntityCollection = itemEntry.getDynamicObjectCollection("zcgj_processallocatentity");//工序分摊 + for (DynamicObject processAllocEntity : processAllocEntityCollection) { + DynamicObject NewExpenseItemEntry = expenseItemEntryCollection.addNew(); + NewExpenseItemEntry.set("zcgj_cbs",processAllocEntity.get("zcgj_pa_process"));//工序 + NewExpenseItemEntry.set("zcgj_amountsum",processAllocEntity.get("zcgj_pa_amount"));//价税合计 + NewExpenseItemEntry.set("zcgj_expenseitemamt",processAllocEntity.get("zcgj_amountnotax"));//费用不含税金额 + NewExpenseItemEntry.set("zcgj_rateval",processAllocEntity.get("zcgj_rateval"));//税率(%) + NewExpenseItemEntry.set("zcgj_taxamount",processAllocEntity.get("zcgj_taxamt"));//税额 + NewExpenseItemEntry.set("zcgj_expenseitemrem",processAllocEntity.get("zcgj_pa_remark"));//费用说明 + } + } SaveServiceHelper.saveOperate("zcgj_ec_out_finaceconfirm", new DynamicObject[]{outFinaceconfirm}, null);//支出合同实体 //生成支出财务确认单 end