Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
xiaoshi 2025-07-07 09:50:15 +08:00
commit de1f6b299f
13 changed files with 110 additions and 127 deletions

View File

@ -65,9 +65,10 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
long costcompanyId = costcompany.getLong("id"); long costcompanyId = costcompany.getLong("id");
if(OrgCheckUtils.isKS(costcompanyId)){ if(OrgCheckUtils.isKS(costcompanyId)){
DynamicObjectCollection accountentry = dataEntity.getDynamicObjectCollection("accountentry"); DynamicObjectCollection accountentry = dataEntity.getDynamicObjectCollection("accountentry");
int i = 1; int i = 0;
for (DynamicObject dynamicObject : accountentry) { for (DynamicObject dynamicObject : accountentry) {
i++;
String payertype = dynamicObject.getString("payertype");//收款人类型 String payertype = dynamicObject.getString("payertype");//收款人类型
String payeraccountname = dynamicObject.getString("payeraccountname"); //账户名称 String payeraccountname = dynamicObject.getString("payeraccountname"); //账户名称
String accountTxt = dynamicObject.getString("zcgj_account_txt"); //账户名称 String accountTxt = dynamicObject.getString("zcgj_account_txt"); //账户名称
@ -76,6 +77,7 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
DynamicObject supplier = dynamicObject.getDynamicObject("supplier"); DynamicObject supplier = dynamicObject.getDynamicObject("supplier");
if(supplier ==null){ if(supplier ==null){
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人不能为空",i)); this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人不能为空",i));
continue;
} }
String name = supplier.getString("name"); String name = supplier.getString("name");
isOk = payeraccountname.equals(name); isOk = payeraccountname.equals(name);
@ -83,6 +85,7 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
DynamicObject customer = dynamicObject.getDynamicObject("customer"); DynamicObject customer = dynamicObject.getDynamicObject("customer");
if(customer ==null){ if(customer ==null){
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人不能为空",i)); this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人不能为空",i));
continue;
} }
String name = customer.getString("name"); String name = customer.getString("name");
isOk = payeraccountname.equals(name); isOk = payeraccountname.equals(name);
@ -90,7 +93,7 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
if(!isOk && accountTxt.isEmpty()){ if(!isOk && accountTxt.isEmpty()){
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人名称和账户名称不一致请在当前行填写账户不一致说明",i)); this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人名称和账户名称不一致请在当前行填写账户不一致说明",i));
} }
i++;
} }
} }
} }

View File

@ -84,7 +84,7 @@ public class ReimbursementInvoiceDateCkOp extends AbstractOperationServicePlugIn
} }
for (String invoiceno : invoiceDateMap.keySet()) { for (String invoiceno : invoiceDateMap.keySet()) {
LocalDate invoiceDate = invoiceDateMap.get(invoiceno); LocalDate invoiceDate = invoiceDateMap.get(invoiceno);
if (invoiceDate.isBefore(dateToLocalDate(zcgjGlsqAuditdate))) { if (zcgjGlsqAuditdate!=null && invoiceDate.isBefore(dateToLocalDate(zcgjGlsqAuditdate))) {
// System.out.println("date1 比 date2 早"); // System.out.println("date1 比 date2 早");
this.addFatalErrorMessage(extendedDataEntity, String.format("发票号码为:%s的发票开票日期不能早于关联申请的审核时间",invoiceno)); this.addFatalErrorMessage(extendedDataEntity, String.format("发票号码为:%s的发票开票日期不能早于关联申请的审核时间",invoiceno));

View File

@ -307,48 +307,48 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
} }
} }
} }
}
//差旅报销单数据
DynamicObject[] tripreimburseDataSet = getTripreimburseDataSet(userId, year); //差旅报销单数据
for (DynamicObject dynamicObject : tripreimburseDataSet) { DynamicObject[] tripreimburseDataSet = getTripreimburseDataSet(userId, year);
String billno = dynamicObject.getString("billno");//单据编号 for (DynamicObject dynamicObject : tripreimburseDataSet) {
//判罚是否因公出国 String billno = dynamicObject.getString("billno");//单据编号
Boolean isBusinessForeign = dynamicObject.getBoolean(DEV_KEY+"_is_business_foreign");//单据编号 //判罚是否因公出国
DynamicObjectCollection entrys = dynamicObject.getDynamicObjectCollection("tripentry"); Boolean isBusinessForeign = dynamicObject.getBoolean(DEV_KEY+"_is_business_foreign");//单据编号
for (DynamicObject entry : entrys) { DynamicObjectCollection entrys = dynamicObject.getDynamicObjectCollection("tripentry");
Date happendate = entry.getDate("startdate");//出差开始日期 for (DynamicObject entry : entrys) {
String happendateStr = dateFormat.format(happendate);//费用发生日期str Date happendate = entry.getDate("startdate");//出差开始日期
DynamicObjectCollection entryentity = entry.getDynamicObjectCollection("entryentity"); String happendateStr = dateFormat.format(happendate);//费用发生日期str
for (DynamicObject object : entryentity) { DynamicObjectCollection entryentity = entry.getDynamicObjectCollection("entryentity");
BigDecimal orientryamount = BigDecimal.ZERO; for (DynamicObject object : entryentity) {
if(istax){ BigDecimal orientryamount = BigDecimal.ZERO;
orientryamount = object.getBigDecimal("orientryamount");//报销金额 if(istax){
}else{ orientryamount = object.getBigDecimal("orientryamount");//报销金额
orientryamount = object.getBigDecimal("notaxamount");//不含税金额 }else{
} orientryamount = object.getBigDecimal("notaxamount");//不含税金额
// 生成唯一的键报销人 + 单据编号 + 费用发生日期 }
String key = userId + "-" + billno + "-" + happendateStr; // 生成唯一的键报销人 + 单据编号 + 费用发生日期
userSet.add(userId); String key = userId + "-" + billno + "-" + happendateStr;
// 根据键获取报表对象 userSet.add(userId);
ExpenseReport report = reportMap.get(key); // 根据键获取报表对象
if (report == null) { ExpenseReport report = reportMap.get(key);
report = new ExpenseReport(userId, billno, happendateStr); if (report == null) {
reportMap.put(key, report); report = new ExpenseReport(userId, billno, happendateStr);
} reportMap.put(key, report);
if(!isBusinessForeign){ }
//费用明细中的所有金额因公临时出国费用 if(!isBusinessForeign){
BigDecimal travel = report.getTravel().add(orientryamount); //费用明细中的所有金额因公临时出国费用
report.setTravel(travel); BigDecimal travel = report.getTravel().add(orientryamount);
}else{ report.setTravel(travel);
//费用明细中的所有金额因公临时出国费用 }else{
BigDecimal abroadTravel = report.getAbroadTravel().add(orientryamount); //费用明细中的所有金额因公临时出国费用
report.setAbroadTravel(abroadTravel); BigDecimal abroadTravel = report.getAbroadTravel().add(orientryamount);
report.setAbroadTravel(abroadTravel);
}
} }
} }
} }
} }
} }
//合计汇总 //合计汇总
ExpenseReport totalReport = new ExpenseReport(null, null, null); ExpenseReport totalReport = new ExpenseReport(null, null, null);

View File

@ -66,7 +66,7 @@ public class ContractRevisionEditUIPlugin extends AbstractContBillPlugin{
String inSelecttors = "id,contract,versionnumber,contractno,contractname,payrate,incontpayplanentry,incontpayplanentry.incometype,incontpayplanentry.incomemethod,incontpayplanentry.incomepercent,incontpayplanentry.incomeamount,incontpayplanentry.planincometime,incontpayplanentry.incomedescription,incontpayplanentry.insourceid,riskentry,riskentry.risktype,riskentry.riskname,riskentry.riskdesc,riskentry.measures,riskentry.islegalrisk,riskentry.risksourceid,contracttype.name,ismultirate,signdate,isonlist,incontract,description"; String inSelecttors = "id,contract,versionnumber,contractno,contractname,payrate,incontpayplanentry,incontpayplanentry.incometype,incontpayplanentry.incomemethod,incontpayplanentry.incomepercent,incontpayplanentry.incomeamount,incontpayplanentry.planincometime,incontpayplanentry.incomedescription,incontpayplanentry.insourceid,riskentry,riskentry.risktype,riskentry.riskname,riskentry.riskdesc,riskentry.measures,riskentry.islegalrisk,riskentry.risksourceid,contracttype.name,ismultirate,signdate,isonlist,incontract,description";
String outSelectors = "id,contract,versionnumber,contractno,contractname,payrate,outcontpayplanentry,outcontpayplanentry.paytype,outcontpayplanentry.paymethod,outcontpayplanentry.paypercent,outcontpayplanentry.payamount,outcontpayplanentry.planpaytime,outcontpayplanentry.paydescription,outcontpayplanentry.paysourceid,riskentry,riskentry.risktype,riskentry.riskname,riskentry.riskdesc,riskentry.measures,riskentry.islegalrisk,riskentry.risksourceid,incontract,contracttype.name,ismultirate,signdate,isonlist,incontract,description"; String outSelectors = "id,contract,versionnumber,contractno,contractname,payrate,outcontpayplanentry,outcontpayplanentry.paytype,outcontpayplanentry.paymethod,outcontpayplanentry.paypercent,outcontpayplanentry.payamount,outcontpayplanentry.planpaytime,outcontpayplanentry.paydescription,outcontpayplanentry.paysourceid,riskentry,riskentry.risktype,riskentry.riskname,riskentry.riskdesc,riskentry.measures,riskentry.islegalrisk,riskentry.risksourceid,incontract,contracttype.name,ismultirate,signdate,isonlist,incontract,description";
inSelecttors+=",zcgj_startdate,zcgj_enddate,zcgj_cooperatemode,zcgj_jnjw,zcgj_customerclass,zcgj_project,zcgj_settlementdeadline,zcgj_follow,zcgj_priceadjustment,zcgj_paymode,zcgj_guaranteemethod,zcgj_belongingsector,zcgj_sngl,zcgj_guaramount,zcgj_guaranteeyear"; inSelecttors+=",zcgj_startdate,zcgj_enddate,zcgj_cooperatemode,zcgj_jnjw,zcgj_customerclass,zcgj_project,zcgj_settlementdeadline,zcgj_follow,zcgj_originaloftaxamount,zcgj_originalamount,zcgj_taxamount,zcgj_priceadjustment,zcgj_paymode,zcgj_guaranteemethod,zcgj_belongingsector,zcgj_sngl,zcgj_guaramount,zcgj_guaranteeyear";
inSelecttors+=",zcgj_bnyjhshte,zcgj_bnyjbhshte,zcgj_bnyjse,zcgj_pjnhhshte,zcgj_pjnhbhshte,zcgj_pjnhse,zcgj_sjcn,zcgj_yjbnyxcn,zcgj_contractprocess.FBasedataId,zcgj_hshtdj,zcgj_bhshtdj"; inSelecttors+=",zcgj_bnyjhshte,zcgj_bnyjbhshte,zcgj_bnyjse,zcgj_pjnhhshte,zcgj_pjnhbhshte,zcgj_pjnhse,zcgj_sjcn,zcgj_yjbnyxcn,zcgj_contractprocess.FBasedataId,zcgj_hshtdj,zcgj_bhshtdj";
outSelectors+=",zcgj_startdate,zcgj_enddate,zcgj_cooperatemode,zcgj_jnjw,zcgj_customerclass,zcgj_project,zcgj_settlementdeadline,zcgj_priceadjustment,zcgj_paymode,zcgj_guaranteemethod,zcgj_jtnw,zcgj_guaramount,zcgj_guaranteeyear"; outSelectors+=",zcgj_startdate,zcgj_enddate,zcgj_cooperatemode,zcgj_jnjw,zcgj_customerclass,zcgj_project,zcgj_settlementdeadline,zcgj_priceadjustment,zcgj_paymode,zcgj_guaranteemethod,zcgj_jtnw,zcgj_guaramount,zcgj_guaranteeyear";
new DynamicObjectCollection(); new DynamicObjectCollection();

View File

@ -186,7 +186,7 @@ public class OutContractFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
DynamicObject org = (DynamicObject)this.getModel().getValue("zcgj_invoice_org"); DynamicObject org = (DynamicObject)this.getModel().getValue("zcgj_invoice_org");
//List<InvoiceVO> invoiceVOList = InvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData); //List<InvoiceVO> invoiceVOList = InvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData);
List<InvoiceVO> invoiceVOList = CustomInvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData); List<InvoiceVO> invoiceVOList = CustomInvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData);
Map<Boolean, Set<DynamicObject>> invoiceMap = InvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(), Map<Boolean, Set<DynamicObject>> invoiceMap = CustomInvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(),
org.getLong("id"), new Date(), "ec_in_invoice", (DynamicObject)this.getModel().getValue("zcgj_currency"), true); org.getLong("id"), new Date(), "ec_in_invoice", (DynamicObject)this.getModel().getValue("zcgj_currency"), true);
ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache()); ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache());
this.addInvoiceToEntry(invoiceUtils, invoiceMap); this.addInvoiceToEntry(invoiceUtils, invoiceMap);

View File

@ -135,6 +135,17 @@ public class OutContractFinaceConfirmePlugin extends AbstractBillPlugIn impleme
this.getModel().setValue("zcgj_accounttype",null,rowIndex); this.getModel().setValue("zcgj_accounttype",null,rowIndex);
} }
} }
}else if(StringUtils.equals(name, "zcgj_accounttype")){
DynamicObject newValue = (DynamicObject)changeData.getNewValue();
int rowIndex = changeData.getRowIndex();
if(newValue!=null){
String number = newValue.getString("number");
if(StringUtils.equals(number, "FL001")){//生成成本
this.getView().setEnable(true, rowIndex, "zcgj_cbs");
}else{
this.getView().setEnable(false, rowIndex, "zcgj_cbs");
}
}
} }

View File

@ -95,6 +95,7 @@ public class OutContractSettleReversalPlugin extends AbstractBillPlugIn implemen
getModel().setValue("isincost",ecoutcontractsettle.getBoolean("isincost")); getModel().setValue("isincost",ecoutcontractsettle.getBoolean("isincost"));
getModel().setValue("zcgj_adjustmounttax",ecoutcontractsettle.getBoolean("zcgj_adjustmounttax")); getModel().setValue("zcgj_adjustmounttax",ecoutcontractsettle.getBoolean("zcgj_adjustmounttax"));
getModel().setValue("zcgj_is_reversabillid",true); getModel().setValue("zcgj_is_reversabillid",true);
getModel().setValue("org",ecoutcontractsettle.getDynamicObject("org"));
DynamicObjectCollection itementry = ecoutcontractsettle.getDynamicObjectCollection("itementry"); DynamicObjectCollection itementry = ecoutcontractsettle.getDynamicObjectCollection("itementry");
////DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("zcgj_itementry"); ////DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("zcgj_itementry");

View File

@ -8,6 +8,8 @@ import kd.ec.ecpf.opplugin.PaymentApplyInvoiceValidatorExt;
/* /*
* 付款申请单提交操作校验更改 * 付款申请单提交操作校验更改
*/ */
@Deprecated
//无合同相关移除
public class PaymentApplyInvoiceValidateOpExt extends AbstractOperationServicePlugIn { public class PaymentApplyInvoiceValidateOpExt extends AbstractOperationServicePlugIn {
public PaymentApplyInvoiceValidateOpExt() { public PaymentApplyInvoiceValidateOpExt() {
} }

View File

@ -0,0 +1,23 @@
package zcgj.zcdev.zcdev.pr.plugin.operate;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.validate.AbstractValidator;
import kd.ec.contract.opplugin.fund.InComeApplyFundOp;
import java.util.List;
/**
* 用于校验是否超过资金计划的金额控制及反写本期申请金额
*/
public class InComeApplyFundOpExt extends InComeApplyFundOp {
@Override
public void onAddValidators(AddValidatorsEventArgs e) {
super.onAddValidators(e);
List<AbstractValidator> validators = e.getValidators();
// 删除标品校验器
validators.removeIf(validator -> validator instanceof kd.ec.contract.opplugin.fund.validator.InApplyFundValidator);
// 添加定制二开的校验器位置放第一位优先执行 不需要产品校验自定义开发校验
// validators.add(0, new InApplyFundValidator());
}
}

View File

@ -2,17 +2,22 @@ package zcgj.zcdev.zcdev.pr.plugin.operate;
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.dataentity.utils.StringUtils;
import kd.bos.entity.ExtendedDataEntity; import kd.bos.entity.ExtendedDataEntity;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs; import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs; import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.validate.AbstractValidator; import kd.bos.entity.validate.AbstractValidator;
import kd.bos.form.control.AbstractGrid;
public class OutContractFinaceConfirmeCkOp extends AbstractOperationServicePlugIn { public class OutContractFinaceConfirmeCkOp extends AbstractOperationServicePlugIn {
public void onPreparePropertys(PreparePropertysEventArgs e) { public void onPreparePropertys(PreparePropertysEventArgs e) {
super.onPreparePropertys(e); super.onPreparePropertys(e);
e.getFieldKeys().add("zcgj_entryentity"); e.getFieldKeys().add("zcgj_entryentity");
e.getFieldKeys().add("zcgj_expenseitementry");
e.getFieldKeys().add("zcgj_expenseitementry.zcgj_cbs");
} }
@Override @Override
@ -27,11 +32,30 @@ public class OutContractFinaceConfirmeCkOp extends AbstractOperationServicePlugI
ExtendedDataEntity[] extendedDataEntities = this.getDataEntities(); ExtendedDataEntity[] extendedDataEntities = this.getDataEntities();
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) { for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
DynamicObject dataEntity = extendedDataEntity.getDataEntity(); DynamicObject dataEntity = extendedDataEntity.getDataEntity();
DynamicObjectCollection expenseitementry = dataEntity.getDynamicObjectCollection("zcgj_expenseitementry");//发票信息
if(expenseitementry == null || expenseitementry.isEmpty()){
this.addFatalErrorMessage(extendedDataEntity, "费用项目分录不能为空!");
}else{
int i=0;
for (DynamicObject dynamicObject : expenseitementry) {
i++;
DynamicObject zcgjAccounttype = dynamicObject.getDynamicObject("zcgj_accounttype");
String number = zcgjAccounttype.getString("number");
DynamicObject cbs = dynamicObject.getDynamicObject("zcgj_cbs");
if(StringUtils.equals(number, "FL001") && cbs == null){ //生成成本时工序必录
this.addFatalErrorMessage(extendedDataEntity, String.format("费用项目分录,第%d行工序不能为空",i));
}
}
}
DynamicObjectCollection entryentity = dataEntity.getDynamicObjectCollection("zcgj_entryentity");//发票信息 DynamicObjectCollection entryentity = dataEntity.getDynamicObjectCollection("zcgj_entryentity");//发票信息
if(entryentity == null || entryentity.isEmpty()){ if(entryentity == null || entryentity.isEmpty()){
this.addFatalErrorMessage(extendedDataEntity, "请上传合同进项发票!"); this.addFatalErrorMessage(extendedDataEntity, "请上传合同进项发票!");
} }
} }
} }
} }
} }

View File

@ -1,25 +1,13 @@
package zcgj.zcdev.zcdev.pr.plugin.operate; package zcgj.zcdev.zcdev.pr.plugin.operate;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.dataentity.utils.StringUtils;
import kd.bos.entity.EntityMetadataCache;
import kd.bos.entity.MainEntityType;
import kd.bos.entity.plugin.AddValidatorsEventArgs; import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs; import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.validate.AbstractValidator; import kd.bos.entity.validate.AbstractValidator;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.operation.SaveServiceHelper;
import kd.ec.contract.opplugin.fund.PaymentApplyFundOp; import kd.ec.contract.opplugin.fund.PaymentApplyFundOp;
import kd.ec.contract.opplugin.fund.validator.PaymentMaxAmountValidator; import kd.ec.contract.opplugin.fund.validator.PaymentMaxAmountValidator;
import kd.ec.contract.opplugin.fund.validator.PaymentTypeValidator; import kd.ec.contract.opplugin.fund.validator.PaymentTypeValidator;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map;
// 付款申请单提交审核操作插件 // 付款申请单提交审核操作插件
public class PaymentApplyFundExtOp extends PaymentApplyFundOp { public class PaymentApplyFundExtOp extends PaymentApplyFundOp {
@ -39,77 +27,5 @@ public class PaymentApplyFundExtOp extends PaymentApplyFundOp {
validators.removeIf(validator -> validator instanceof PaymentTypeValidator); validators.removeIf(validator -> validator instanceof PaymentTypeValidator);
// 添加定制二开的校验器位置放第一位优先执行 不需要产品校验自定义开发校验 // 添加定制二开的校验器位置放第一位优先执行 不需要产品校验自定义开发校验
//validators.add(0, new PaymentMaxAmountExtValidator()); //validators.add(0, new PaymentMaxAmountExtValidator());
}
protected void updateContTypeAmtTotalShowAmt(DynamicObject[] dataEntities) {
Map<Long, BigDecimal> contractDeductionMap = new HashMap(16);
DynamicObject[] var3 = dataEntities;
int var4 = dataEntities.length;
label50:
for (int var5 = 0; var5 < var4; ++var5) {
DynamicObject paymentApply = var3[var5];
DynamicObjectCollection entryCol = paymentApply.getDynamicObjectCollection("entryentity");//付款信息分录
Iterator var8 = entryCol.iterator();
while (true) {
while (true) {
if (!var8.hasNext()) {
continue label50;
}
DynamicObject entry = (DynamicObject) var8.next();
DynamicObject contract = entry.getDynamicObject("contract");//合同名称
if (contract != null) {
BigDecimal thisApplyOfTaxAmt = entry.getBigDecimal("applyoftaxamount");//本次应付金额
BigDecimal deduction = entry.getBigDecimal("thisdeduction");//本期预付款抵扣
BigDecimal contractDeduction = (BigDecimal) contractDeductionMap.getOrDefault(contract.getLong("id"), BigDecimal.ZERO);
contractDeductionMap.put(contract.getLong("id"), contractDeduction.add(deduction));
String type = entry.getString("paymenttype");//支付类型
QFilter contractFilter = new QFilter("contract", "=", contract.getLong("id"));
QFilter typeFilter = new QFilter("type", "=", type);
DynamicObject node = entry.getDynamicObject("paynode");//节点隐藏
String nodeText = entry.getString("paynodetext");//节点
if (node != null) {
typeFilter.and("paynode", "=", node.getPkValue());
} else if (StringUtils.isNotEmpty(nodeText)) {
typeFilter.and("node", "=", nodeText);
}
DynamicObject[] contTypeAmts = BusinessDataServiceHelper.load("ecpf_conttypeamt",
"totalshowamt,totaldeductionamt", new QFilter[]{contractFilter, typeFilter});//合同的收付类型对应金额单
if (contTypeAmts != null && contTypeAmts.length != 0) {
DynamicObject[] var28 = contTypeAmts;
int var26 = contTypeAmts.length;
for (int var27 = 0; var27 < var26; ++var27) {
DynamicObject contTypeAmt = var28[var27];
BigDecimal totalShowAmt = contTypeAmt.getBigDecimal("totalshowamt");//合同的收付类型对应金额单-累计应付金额
contTypeAmt.set("totalshowamt", totalShowAmt.add(thisApplyOfTaxAmt));
BigDecimal totalDeduction = contTypeAmt.getBigDecimal("totaldeductionamt");//合同的收付类型对应金额单-累计申请抵扣金额
contTypeAmt.set("totaldeductionamt", totalDeduction.add(deduction));
}
SaveServiceHelper.save(contTypeAmts);
} else {
BigDecimal payRate = entry.getBigDecimal("controlrate");//付款控制比例%
MainEntityType entityType = EntityMetadataCache.getDataEntityType("ecpf_conttypeamt");//合同的收付类型对应金额单
DynamicObject newContTypeAmtObj = new DynamicObject(entityType);
newContTypeAmtObj.set("contract", contract);//合同
newContTypeAmtObj.set("type", type);//收付款类型
newContTypeAmtObj.set("ratio", payRate);//收付款比例%
newContTypeAmtObj.set("totalshowamt", thisApplyOfTaxAmt);//累计应付金额
newContTypeAmtObj.set("totaldeductionamt", deduction);//累计申请抵扣金额
newContTypeAmtObj.set("paynode", entry.get("paynode"));//节点隐藏
newContTypeAmtObj.set("node", entry.get("paynode") == null ? entry.get("paynodetext") : "");//节点
SaveServiceHelper.save(new DynamicObject[]{newContTypeAmtObj});
}
}
}
}
}
this.updatePrePaymentDeduction(contractDeductionMap, true);
} }
} }

View File

@ -26,7 +26,8 @@ import kd.bos.servicehelper.operation.SaveServiceHelper;
import kd.ec.basedata.common.enums.PlanAmtTypeEnum; import kd.ec.basedata.common.enums.PlanAmtTypeEnum;
import kd.ec.contract.opplugin.fund.validator.*; import kd.ec.contract.opplugin.fund.validator.*;
//付款申请单二开系统插件提交审核反审核操作注册的系统插件 @Deprecated
//无合同场景取消此类无用
public class PaymentApplyFundOpExt extends AbstractOperationServicePlugIn { public class PaymentApplyFundOpExt extends AbstractOperationServicePlugIn {
public PaymentApplyFundOpExt() { public PaymentApplyFundOpExt() {
} }

View File

@ -22,6 +22,8 @@ import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.QueryServiceHelper; import kd.bos.servicehelper.QueryServiceHelper;
import kd.ec.basedata.common.enums.ContractStatusEnum; import kd.ec.basedata.common.enums.ContractStatusEnum;
@Deprecated
//无合同付款相关移除
//付款申请单提交操作插件 //付款申请单提交操作插件
public class PaymentContSubmitOpExt extends AbstractOperationServicePlugIn { public class PaymentContSubmitOpExt extends AbstractOperationServicePlugIn {
public PaymentContSubmitOpExt() { public PaymentContSubmitOpExt() {