Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
a787950a8c
|
@ -25,17 +25,11 @@ public class AssistbalanceAutoData {
|
||||||
QFilter filteraccountTable = new QFilter("number", QCP.equals, "0003");
|
QFilter filteraccountTable = new QFilter("number", QCP.equals, "0003");
|
||||||
DynamicObject accountTableLoad = BusinessDataServiceHelper.loadSingle("bd_accounttable", "id", new QFilter[]{filteraccountTable});
|
DynamicObject accountTableLoad = BusinessDataServiceHelper.loadSingle("bd_accounttable", "id", new QFilter[]{filteraccountTable});
|
||||||
|
|
||||||
|
//查询核算组织
|
||||||
QFilter number = new QFilter("fisaccounting", "=", "1");
|
QFilter number = new QFilter("fisaccounting", "=", "1");
|
||||||
QFilter structure = new QFilter("structure.longnumber", QCP.like, "10000000!10006431%");
|
QFilter structure = new QFilter("structure.longnumber", QCP.like, "10000000!10006431%");
|
||||||
QFilter isleaf = new QFilter("structure.isleaf", QCP.equals, true);
|
QFilter isleaf = new QFilter("structure.isleaf", QCP.equals, true);
|
||||||
DynamicObject[] load = BusinessDataServiceHelper.load("bos_org", "id,structure.longnumber,structure.view", new QFilter[]{number, structure,isleaf});
|
DynamicObject[] load = BusinessDataServiceHelper.load("bos_org", "id,structure.longnumber,structure.view", new QFilter[]{number, structure,isleaf});
|
||||||
|
|
||||||
DynamicObject[] accountConf = BusinessDataServiceHelper.load("zcgj_conf_balanceaccount", "zcgj_account", new QFilter[]{});
|
|
||||||
Set<String> accountNumber = new HashSet<>();
|
|
||||||
for (DynamicObject dynamicObject : accountConf) {
|
|
||||||
accountNumber.add(dynamicObject.getDynamicObject("zcgj_account").getString("number"));
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Long> orgIds = new ArrayList<>();
|
List<Long> orgIds = new ArrayList<>();
|
||||||
Map<String,DynamicObject> orgNumberMap = new HashMap<>();
|
Map<String,DynamicObject> orgNumberMap = new HashMap<>();
|
||||||
for (int i = 0; i < load.length; i++) {
|
for (int i = 0; i < load.length; i++) {
|
||||||
|
@ -45,20 +39,40 @@ public class AssistbalanceAutoData {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//查询科目余额配置表
|
||||||
|
DynamicObject[] accountConf = BusinessDataServiceHelper.load("zcgj_conf_balanceaccount", "zcgj_account", new QFilter[]{});
|
||||||
|
Set<String> accountNumber = new HashSet<>();
|
||||||
|
for (DynamicObject dynamicObject : accountConf) {
|
||||||
|
accountNumber.add(dynamicObject.getDynamicObject("zcgj_account").getString("number"));
|
||||||
|
}
|
||||||
|
|
||||||
//查询组织下对应的当前期间数据
|
//查询组织下对应的当前期间数据
|
||||||
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.in, orgIds)});
|
and("status", QCP.equals, "C").and("org.id", QCP.in, orgIds)});
|
||||||
/*Map<Long, DynamicObject> orgByCurperiodMap =
|
|
||||||
Arrays.stream(orgByCurperiod).collect(Collectors.toMap(
|
|
||||||
i -> i.getLong("org.id"),
|
|
||||||
i -> i));*/
|
|
||||||
Map<Long, DynamicObject> orgByCurperiodMap = new HashMap<>();
|
Map<Long, DynamicObject> orgByCurperiodMap = new HashMap<>();
|
||||||
for (DynamicObject dynamicObject : orgByCurperiod) {
|
for (DynamicObject dynamicObject : orgByCurperiod) {
|
||||||
orgByCurperiodMap.put(dynamicObject.getLong("org.id"), dynamicObject);
|
orgByCurperiodMap.put(dynamicObject.getLong("org.id"), dynamicObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取核算组织的项目
|
||||||
|
|
||||||
|
Map<String,DynamicObject> projectMap = new HashMap<>();
|
||||||
|
//ec_project
|
||||||
|
DynamicObject[] projects = BusinessDataServiceHelper.load("ec_project",
|
||||||
|
"fiaccountorg,zcgj_pm",
|
||||||
|
new QFilter[]{new QFilter("billstatus", QCP.equals, "C").
|
||||||
|
and("fiaccountorg", QCP.in, orgIds)});
|
||||||
|
for (DynamicObject project : projects) {
|
||||||
|
DynamicObject fiaccountorg = project.getDynamicObject("fiaccountorg");
|
||||||
|
DynamicObject pm = project.getDynamicObject("zcgj_pm");
|
||||||
|
if(fiaccountorg!=null){
|
||||||
|
projectMap.put(fiaccountorg.getString("number"), pm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//清除数据
|
//清除数据
|
||||||
//DeleteServiceHelper.delete("zcgj_rpt_assistbalance",new QFilter[]{});
|
//DeleteServiceHelper.delete("zcgj_rpt_assistbalance",new QFilter[]{});
|
||||||
List<Object[]> sqlparams = new ArrayList<>();
|
List<Object[]> sqlparams = new ArrayList<>();
|
||||||
|
@ -128,6 +142,7 @@ public class AssistbalanceAutoData {
|
||||||
assistbalance.set("zcgj_account", record.getAccount());
|
assistbalance.set("zcgj_account", record.getAccount());
|
||||||
assistbalance.set("zcgj_period",curperiod);
|
assistbalance.set("zcgj_period",curperiod);
|
||||||
assistbalance.set("zcgj_isnew",true);
|
assistbalance.set("zcgj_isnew",true);
|
||||||
|
assistbalance.set("zcgj_pm",projectMap.get(orgNumber));
|
||||||
Map<String, AccountRecord.AssGrpItem> assgrp = record.getAssgrp();
|
Map<String, AccountRecord.AssGrpItem> assgrp = record.getAssgrp();
|
||||||
if (assgrp.containsKey("0001")) {
|
if (assgrp.containsKey("0001")) {
|
||||||
assistbalance.set("zcgj_customernumber",assgrp.get("0001").getNumber());
|
assistbalance.set("zcgj_customernumber",assgrp.get("0001").getNumber());
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class ContractSettleBillPlugin extends ContractSettleCommonEditPlugin{
|
||||||
DynamicObject contract = (DynamicObject)changeData.getNewValue();
|
DynamicObject contract = (DynamicObject)changeData.getNewValue();
|
||||||
this.clearUnitproject();
|
this.clearUnitproject();
|
||||||
this.contractChanged(contract);
|
this.contractChanged(contract);
|
||||||
this.clearOrNewProcessAlloc();//清除或者新增工序分摊分录
|
// this.clearOrNewProcessAlloc();//清除或者新增工序分摊分录
|
||||||
} else if (StringUtils.equals(name, "period")) {
|
} else if (StringUtils.equals(name, "period")) {
|
||||||
this.periodChanged(changeData);
|
this.periodChanged(changeData);
|
||||||
} else if (!StringUtils.equals(name, "begindate") && !StringUtils.equals(name, "enddate")) {
|
} else if (!StringUtils.equals(name, "begindate") && !StringUtils.equals(name, "enddate")) {
|
||||||
|
@ -171,43 +171,43 @@ public class ContractSettleBillPlugin extends ContractSettleCommonEditPlugin{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearOrNewProcessAlloc() {
|
// private void clearOrNewProcessAlloc() {
|
||||||
DynamicObjectCollection payItemDetailEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("payitemdetailentry");//合同支付项明细
|
// DynamicObjectCollection payItemDetailEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("payitemdetailentry");//合同支付项明细
|
||||||
DynamicObjectCollection itemEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("itementry");//支付项分录
|
// DynamicObjectCollection itemEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("itementry");//支付项分录
|
||||||
if (itemEntryCollection.size() == 0) {
|
// if (itemEntryCollection.size() == 0) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if (payItemDetailEntryCollection.size() > 0) {
|
// if (payItemDetailEntryCollection.size() > 0) {
|
||||||
for (DynamicObject payItemDetailEntry : payItemDetailEntryCollection) {
|
// for (DynamicObject payItemDetailEntry : payItemDetailEntryCollection) {
|
||||||
|
//
|
||||||
DynamicObject itemEntry = itemEntryCollection.get(0);
|
// DynamicObject itemEntry = itemEntryCollection.get(0);
|
||||||
DynamicObjectCollection processAllocEntityCollection = itemEntry.getDynamicObjectCollection("zcgj_processallocatentity");//工序分摊
|
// DynamicObjectCollection processAllocEntityCollection = itemEntry.getDynamicObjectCollection("zcgj_processallocatentity");//工序分摊
|
||||||
DynamicObjectType processAllocEntityType = processAllocEntityCollection.getDynamicObjectType();
|
// DynamicObjectType processAllocEntityType = processAllocEntityCollection.getDynamicObjectType();
|
||||||
|
//
|
||||||
long referBillId = payItemDetailEntry.getLong("referbillid");//关联单据id
|
// long referBillId = payItemDetailEntry.getLong("referbillid");//关联单据id
|
||||||
DynamicObject EcOutContractMeasure = BusinessDataServiceHelper.loadSingle(referBillId, "ec_outcontractmeasure");//支出合同计量
|
// DynamicObject EcOutContractMeasure = BusinessDataServiceHelper.loadSingle(referBillId, "ec_outcontractmeasure");//支出合同计量
|
||||||
if (EcOutContractMeasure != null) {
|
// if (EcOutContractMeasure != null) {
|
||||||
DynamicObjectCollection ListModelEntryCollection = EcOutContractMeasure.getDynamicObjectCollection("listmodelentry");//模板分录
|
// DynamicObjectCollection ListModelEntryCollection = EcOutContractMeasure.getDynamicObjectCollection("listmodelentry");//模板分录
|
||||||
for (DynamicObject ListModelEntry : ListModelEntryCollection) {
|
// for (DynamicObject ListModelEntry : ListModelEntryCollection) {
|
||||||
DynamicObjectCollection listEntryCollection = ListModelEntry.getDynamicObjectCollection("listentry");//清单分录
|
// DynamicObjectCollection listEntryCollection = ListModelEntry.getDynamicObjectCollection("listentry");//清单分录
|
||||||
for (DynamicObject listEntry : listEntryCollection) {
|
// for (DynamicObject listEntry : listEntryCollection) {
|
||||||
DynamicObject newProcessAllocEntity = new DynamicObject(processAllocEntityType);
|
// DynamicObject newProcessAllocEntity = new DynamicObject(processAllocEntityType);
|
||||||
newProcessAllocEntity.set("zcgj_pa_process", listEntry.get("listcbs"));//工序-成本分解结构
|
// newProcessAllocEntity.set("zcgj_pa_process", listEntry.get("listcbs"));//工序-成本分解结构
|
||||||
newProcessAllocEntity.set("zcgj_pa_amount", listEntry.get("thisoftaxmount"));//价税合计-本期计量含税金额
|
// newProcessAllocEntity.set("zcgj_pa_amount", listEntry.get("thisoftaxmount"));//价税合计-本期计量含税金额
|
||||||
newProcessAllocEntity.set("zcgj_amountnotax", listEntry.get("thisamount"));//不含税金额-本期计量金额
|
// newProcessAllocEntity.set("zcgj_amountnotax", listEntry.get("thisamount"));//不含税金额-本期计量金额
|
||||||
newProcessAllocEntity.set("zcgj_rateval", listEntry.get("entrytaxrate"));//税率(%)-税率(%)
|
// newProcessAllocEntity.set("zcgj_rateval", listEntry.get("entrytaxrate"));//税率(%)-税率(%)
|
||||||
newProcessAllocEntity.set("zcgj_taxamt", listEntry.get("thistax"));//税额-本期税额
|
// newProcessAllocEntity.set("zcgj_taxamt", listEntry.get("thistax"));//税额-本期税额
|
||||||
newProcessAllocEntity.set("zcgj_pa_remark", listEntry.get("desc"));//费用说明-说明
|
// newProcessAllocEntity.set("zcgj_pa_remark", listEntry.get("desc"));//费用说明-说明
|
||||||
processAllocEntityCollection.add(newProcessAllocEntity);
|
// processAllocEntityCollection.add(newProcessAllocEntity);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
this.getView().updateView("zcgj_processallocatentity");//工序分摊
|
// this.getView().updateView("zcgj_processallocatentity");//工序分摊
|
||||||
} else {
|
// } else {
|
||||||
itemEntryCollection.clear();
|
// itemEntryCollection.clear();
|
||||||
this.getView().updateView("itementry");//支付项分录
|
// this.getView().updateView("itementry");//支付项分录
|
||||||
this.getView().updateView("zcgj_processallocatentity");//工序分摊分录
|
// this.getView().updateView("zcgj_processallocatentity");//工序分摊分录
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
|
@ -5,6 +5,7 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.dataentity.metadata.dynamicobject.DynamicObjectType;
|
import kd.bos.dataentity.metadata.dynamicobject.DynamicObjectType;
|
||||||
import kd.bos.entity.datamodel.RowDataEntity;
|
import kd.bos.entity.datamodel.RowDataEntity;
|
||||||
import kd.bos.entity.datamodel.events.AfterAddRowEventArgs;
|
import kd.bos.entity.datamodel.events.AfterAddRowEventArgs;
|
||||||
|
import kd.bos.entity.datamodel.events.ChangeData;
|
||||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
import kd.bos.form.control.events.ItemClickEvent;
|
import kd.bos.form.control.events.ItemClickEvent;
|
||||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||||
|
@ -83,9 +84,54 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
|
||||||
public void propertyChanged(PropertyChangedArgs e) {
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
super.propertyChanged(e);
|
super.propertyChanged(e);
|
||||||
String name = e.getProperty().getName();
|
String name = e.getProperty().getName();
|
||||||
// if ("totalsettleoftaxamount".equals(name)) {
|
if ("totalsettleoftaxamount".equals(name) || "contract".equals(name)) {
|
||||||
// //关联单据
|
//关联单据
|
||||||
// System.out.println();
|
DynamicObjectCollection payItemDetailEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("payitemdetailentry");//合同支付项明细
|
||||||
// }
|
DynamicObjectCollection itemEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("itementry");//支付项分录
|
||||||
|
if (itemEntryCollection.size() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DynamicObject itemEntry = itemEntryCollection.get(0);
|
||||||
|
DynamicObjectCollection processAllocEntityCollection = itemEntry.getDynamicObjectCollection("zcgj_processallocatentity");//工序分摊
|
||||||
|
processAllocEntityCollection.clear();
|
||||||
|
if ("contract".equals(name)) {
|
||||||
|
ChangeData changeData = e.getChangeSet()[0]; //修改值所在行
|
||||||
|
Object newValue = changeData.getNewValue();//新值
|
||||||
|
if (newValue == null){
|
||||||
|
this.getView().updateView("zcgj_processallocatentity");//工序分摊
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Object contract = this.getModel().getValue("contract");
|
||||||
|
if (contract == null) {
|
||||||
|
this.getView().updateView("zcgj_processallocatentity");//工序分摊
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DynamicObjectType processAllocEntityType = processAllocEntityCollection.getDynamicObjectType();
|
||||||
|
if (payItemDetailEntryCollection.size() > 0) {
|
||||||
|
for (DynamicObject payItemDetailEntry : payItemDetailEntryCollection) {
|
||||||
|
|
||||||
|
long referBillId = payItemDetailEntry.getLong("referbillid");//关联单据id
|
||||||
|
DynamicObject EcOutContractMeasure = BusinessDataServiceHelper.loadSingle(referBillId, "ec_outcontractmeasure");//支出合同计量
|
||||||
|
if (EcOutContractMeasure != null) {
|
||||||
|
DynamicObjectCollection ListModelEntryCollection = EcOutContractMeasure.getDynamicObjectCollection("listmodelentry");//模板分录
|
||||||
|
for (DynamicObject ListModelEntry : ListModelEntryCollection) {
|
||||||
|
DynamicObjectCollection listEntryCollection = ListModelEntry.getDynamicObjectCollection("listentry");//清单分录
|
||||||
|
for (DynamicObject listEntry : listEntryCollection) {
|
||||||
|
DynamicObject newProcessAllocEntity = new DynamicObject(processAllocEntityType);
|
||||||
|
newProcessAllocEntity.set("zcgj_pa_process", listEntry.get("listcbs"));//工序-成本分解结构
|
||||||
|
newProcessAllocEntity.set("zcgj_pa_amount", listEntry.get("thisoftaxmount"));//价税合计-本期计量含税金额
|
||||||
|
newProcessAllocEntity.set("zcgj_amountnotax", listEntry.get("thisamount"));//不含税金额-本期计量金额
|
||||||
|
newProcessAllocEntity.set("zcgj_rateval", listEntry.get("entrytaxrate"));//税率(%)-税率(%)
|
||||||
|
newProcessAllocEntity.set("zcgj_taxamt", listEntry.get("thistax"));//税额-本期税额
|
||||||
|
newProcessAllocEntity.set("zcgj_pa_remark", listEntry.get("desc"));//费用说明-说明
|
||||||
|
processAllocEntityCollection.add(newProcessAllocEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getView().updateView("zcgj_processallocatentity");//工序分摊
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,16 @@ import kd.bos.context.RequestContext;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.entity.datamodel.events.BizDataEventArgs;
|
import kd.bos.entity.datamodel.events.BizDataEventArgs;
|
||||||
|
import kd.bos.entity.datamodel.events.ChangeData;
|
||||||
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.EventObject;
|
import java.util.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资金计划申请插件
|
* 资金计划申请插件
|
||||||
|
@ -32,6 +36,51 @@ public class FundingplanapplyPlugin extends AbstractBillPlugIn implements Plugin
|
||||||
item.set("zcgj_setttype",type);
|
item.set("zcgj_setttype",type);
|
||||||
}
|
}
|
||||||
getView().updateView("zcgj_fin_approved_amount");
|
getView().updateView("zcgj_fin_approved_amount");
|
||||||
|
|
||||||
|
//设置期间
|
||||||
|
DynamicObject org = (DynamicObject) this.getModel().getValue("zcgj_org");
|
||||||
|
if(org!=null){
|
||||||
|
//查询组织下对应的当前期间数据
|
||||||
|
DynamicObject[] orgByCurperiod = BusinessDataServiceHelper.load("gl_accountbook",
|
||||||
|
"org,curperiod",
|
||||||
|
new QFilter[]{new QFilter("enable", QCP.equals, Boolean.TRUE).
|
||||||
|
and("status", QCP.equals, "C").and("org.id", QCP.equals, org.getLong("id"))});
|
||||||
|
if(orgByCurperiod!=null && orgByCurperiod.length>0){
|
||||||
|
this.getModel().setValue("zcgj_period",orgByCurperiod[0].getDynamicObject("curperiod"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
|
super.propertyChanged(e);
|
||||||
|
String name = e.getProperty().getName();
|
||||||
|
ChangeData changeData = e.getChangeSet()[0];
|
||||||
|
if(name.equals("zcgj_setttype")){
|
||||||
|
String setttype = (String) changeData.getNewValue();
|
||||||
|
int rowIndex = changeData.getRowIndex();
|
||||||
|
DynamicObjectCollection zcgjFinApprovedAmount = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_fin_approved_amount");
|
||||||
|
if(zcgjFinApprovedAmount!=null){
|
||||||
|
boolean isOk = true;
|
||||||
|
for (int i = 0; i < zcgjFinApprovedAmount.size(); i++) {
|
||||||
|
if(rowIndex != i){
|
||||||
|
String zcgjSetttype = zcgjFinApprovedAmount.get(i).getString("zcgj_setttype");
|
||||||
|
if(zcgjSetttype!=null && zcgjSetttype.equals(setttype)){
|
||||||
|
isOk = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!isOk){
|
||||||
|
this.getView().showErrorNotification("财务部核定金额的结算方式不允许重复,请重新选择");
|
||||||
|
zcgjFinApprovedAmount.get(rowIndex).set("zcgj_setttype",null);
|
||||||
|
this.getView().updateView("zcgj_setttype",rowIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class OutContractSettleFiConfirmWorkFlowPlugin implements IWorkflowPlugin
|
||||||
//如果时冲销单据
|
//如果时冲销单据
|
||||||
//生成支出财务确认单 start
|
//生成支出财务确认单 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_sett",outContractSettle.getLong("id"));
|
||||||
outFinaceconfirm.set("zcgj_ec_out_contract_name",outContractSettle.getString("billname"));
|
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_oftaxamount_all",oftaxamountAll);
|
||||||
outFinaceconfirm.set("zcgj_amount_all",amountAll);
|
outFinaceconfirm.set("zcgj_amount_all",amountAll);
|
||||||
outFinaceconfirm.set("zcgj_taxamt_all",taxamtAll);
|
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);//支出合同实体
|
SaveServiceHelper.saveOperate("zcgj_ec_out_finaceconfirm", new DynamicObject[]{outFinaceconfirm}, null);//支出合同实体
|
||||||
//生成支出财务确认单 end
|
//生成支出财务确认单 end
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,22 @@ public class OutContractSettleInvalidWorkFlowPlugin implements IWorkflowPlugin {
|
||||||
outFinaceconfirm.set("zcgj_oftaxamount_all",oftaxamountAll);
|
outFinaceconfirm.set("zcgj_oftaxamount_all",oftaxamountAll);
|
||||||
outFinaceconfirm.set("zcgj_amount_all",amountAll);
|
outFinaceconfirm.set("zcgj_amount_all",amountAll);
|
||||||
outFinaceconfirm.set("zcgj_taxamt_all",taxamtAll);
|
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);//支出合同实体
|
OperationResult zcgjEcOutFinaceconfirm = SaveServiceHelper.saveOperate("zcgj_ec_out_finaceconfirm", new DynamicObject[]{outFinaceconfirm}, null);//支出合同实体
|
||||||
if(zcgjEcOutFinaceconfirm.isSuccess()){
|
if(zcgjEcOutFinaceconfirm.isSuccess()){
|
||||||
String sourceBillId = outContractSettle.getString("zcgj_invalidbillid");
|
String sourceBillId = outContractSettle.getString("zcgj_invalidbillid");
|
||||||
|
|
|
@ -124,6 +124,21 @@ public class OutContractSettleReversalWorkFlowPlugin implements IWorkflowPlugin
|
||||||
item.set("zcgj_taxamt",dynamicObject.getBigDecimal("taxamt"));
|
item.set("zcgj_taxamt",dynamicObject.getBigDecimal("taxamt"));
|
||||||
item.set("zcgj_remark",dynamicObject.getString("remark"));
|
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);//支出合同实体
|
SaveServiceHelper.saveOperate("zcgj_ec_out_finaceconfirm", new DynamicObject[]{outFinaceconfirm}, null);//支出合同实体
|
||||||
|
|
||||||
//生成支出财务确认单 end
|
//生成支出财务确认单 end
|
||||||
|
|
Loading…
Reference in New Issue