1.发票延迟报销功能改造
This commit is contained in:
parent
9d401a8097
commit
55975606a7
|
@ -82,7 +82,7 @@ public class TravelInvoiceOverdueRemindersOp extends AbstractOperationServicePlu
|
|||
"id",
|
||||
filterArray);
|
||||
|
||||
if(load != null && load.length > 0){
|
||||
if(load == null || load.length == 0){
|
||||
DynamicObjectCollection entryentity = dataEntity.getDynamicObjectCollection("invoiceentry");//发票信息
|
||||
List<LocalDate> dateList = new ArrayList<>();
|
||||
for (DynamicObject dynamicObject : entryentity) {
|
||||
|
|
|
@ -26,6 +26,7 @@ public class OutContractSettlementValidator extends OutContractSettleValidator {
|
|||
long referbillid = payitemdetailentry.getLong("referbillid");
|
||||
QFilter f1 = new QFilter("id", "=", referbillid);
|
||||
DynamicObject outcontractmeasure = BusinessDataServiceHelper.loadSingle("ec_outcontractmeasure", new QFilter[]{f1});
|
||||
if(outcontractmeasure!=null){
|
||||
DynamicObjectCollection listmodelentry = outcontractmeasure.getDynamicObjectCollection("listmodelentry");
|
||||
//判断是否有含有计量单id 若有跳过 避免多次新增
|
||||
Set<String> set = new HashSet();
|
||||
|
@ -85,6 +86,7 @@ public class OutContractSettlementValidator extends OutContractSettleValidator {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OperationResult saveOperationResult = SaveServiceHelper.saveOperate(dataEntity1.getDataEntityType().getName(), new DynamicObject[]{dataEntity1}, null);//项目实体
|
||||
|
||||
BigDecimal settleOfTaxAmount = dataEntity.getDataEntity().getBigDecimal("settleoftaxamount");
|
||||
|
|
|
@ -25,8 +25,8 @@ public class PaymentApplyFundExtOp extends PaymentApplyFundOp {
|
|||
// 删除标品校验器
|
||||
validators.removeIf(validator -> validator instanceof PaymentMaxAmountValidator);
|
||||
validators.removeIf(validator -> validator instanceof PaymentTypeValidator);
|
||||
// 添加定制二开的校验器(位置放第一位,优先执行)
|
||||
validators.add(0, new PaymentMaxAmountExtValidator());
|
||||
// 添加定制二开的校验器(位置放第一位,优先执行) 不需要产品校验,自定义开发校验
|
||||
//validators.add(0, new PaymentMaxAmountExtValidator());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ public class PaymentMaxAmountExtValidator extends PaymentMaxAmountValidator {
|
|||
if(contractObj!=null)
|
||||
{
|
||||
String zcgjPricetype = contractObj.getString("zcgj_pricetype");
|
||||
if(!"bdlbdj".equals(zcgjPricetype)){ //如果支出合同计价方式为不定量不定价时,则移除校验
|
||||
//if(!"bdlbdj".equals(zcgjPricetype)){ //如果支出合同计价方式为不定量不定价时,则移除校验
|
||||
//20250318 全放开,后续在增加特定逻辑校验
|
||||
BigDecimal maxShouldPayAmount = this.calculateMaxShouldPayAmount(contract);
|
||||
DynamicObject contCurrency = contract.getDynamicObject("currency");
|
||||
if (contCurrency != null) {
|
||||
|
@ -44,10 +45,10 @@ public class PaymentMaxAmountExtValidator extends PaymentMaxAmountValidator {
|
|||
} else if (maxShouldPayAmount.compareTo(curMaxShouldPayAmount) != 0) {
|
||||
this.addErrorMessage(dataEntity, String.format(ResManager.loadKDString("合同付款信息:第%s行因暂存期间存在其他单据提交审核,导致应付金额上限发生变化,本单数据未刷新,继续提交将超过应付金额上限。", "PaymentMaxAmountValidator_1", "ec-contract-opplugin", new Object[0]), i + 1));
|
||||
} else {
|
||||
this.addErrorMessage(dataEntity, String.format(ResManager.loadKDString("合同付款信息:第%s行本次应付金额不允许超应付金额上限,请确认。", "PaymentMaxAmountValidator_2", "ec-contract-opplugin", new Object[0]), i + 1));
|
||||
}
|
||||
//this.addErrorMessage(dataEntity, String.format(ResManager.loadKDString("合同付款信息:第%s行本次应付金额不允许超应付金额上限,请确认。", "PaymentMaxAmountValidator_2", "ec-contract-opplugin", new Object[0]), i + 1));
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,9 +59,9 @@ public class PaymentMaxAmountExtValidator extends PaymentMaxAmountValidator {
|
|||
DynamicObject contractObj = BusinessDataServiceHelper.loadSingle("ec_out_contract", "id,zcgj_pricetype", new QFilter[]{contractIdFilter});
|
||||
if(contractObj!=null){
|
||||
String zcgjPricetype = contractObj.getString("zcgj_pricetype");
|
||||
if(!"bdlbdj".equals(zcgjPricetype)){ //如果支出合同计价方式为不定量不定价时,则移除校验
|
||||
super.maxApplyAmountValidate( shouldPayAmountMap, deductionAmountMap, contractTypeApplyAmountMap, appliedAmountMap, appliedBillMap, dataEntity, i, entry, contract, type, key);
|
||||
}
|
||||
//if(!"bdlbdj".equals(zcgjPricetype)){ //如果支出合同计价方式为不定量不定价时,则移除校验
|
||||
// super.maxApplyAmountValidate( shouldPayAmountMap, deductionAmountMap, contractTypeApplyAmountMap, appliedAmountMap, appliedBillMap, dataEntity, i, entry, contract, type, key);
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue