Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
de1f6b299f
|
@ -65,9 +65,10 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
|
|||
long costcompanyId = costcompany.getLong("id");
|
||||
if(OrgCheckUtils.isKS(costcompanyId)){
|
||||
DynamicObjectCollection accountentry = dataEntity.getDynamicObjectCollection("accountentry");
|
||||
int i = 1;
|
||||
int i = 0;
|
||||
|
||||
for (DynamicObject dynamicObject : accountentry) {
|
||||
i++;
|
||||
String payertype = dynamicObject.getString("payertype");//收款人类型
|
||||
String payeraccountname = dynamicObject.getString("payeraccountname"); //账户名称
|
||||
String accountTxt = dynamicObject.getString("zcgj_account_txt"); //账户名称
|
||||
|
@ -76,6 +77,7 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
|
|||
DynamicObject supplier = dynamicObject.getDynamicObject("supplier");
|
||||
if(supplier ==null){
|
||||
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行,收款人不能为空!",i));
|
||||
continue;
|
||||
}
|
||||
String name = supplier.getString("name");
|
||||
isOk = payeraccountname.equals(name);
|
||||
|
@ -83,6 +85,7 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
|
|||
DynamicObject customer = dynamicObject.getDynamicObject("customer");
|
||||
if(customer ==null){
|
||||
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行,收款人不能为空!",i));
|
||||
continue;
|
||||
}
|
||||
String name = customer.getString("name");
|
||||
isOk = payeraccountname.equals(name);
|
||||
|
@ -90,7 +93,7 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
|
|||
if(!isOk && accountTxt.isEmpty()){
|
||||
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行,收款人名称和账户名称不一致!请在当前行填写账户不一致说明!",i));
|
||||
}
|
||||
i++;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public class ReimbursementInvoiceDateCkOp extends AbstractOperationServicePlugIn
|
|||
}
|
||||
for (String invoiceno : invoiceDateMap.keySet()) {
|
||||
LocalDate invoiceDate = invoiceDateMap.get(invoiceno);
|
||||
if (invoiceDate.isBefore(dateToLocalDate(zcgjGlsqAuditdate))) {
|
||||
if (zcgjGlsqAuditdate!=null && invoiceDate.isBefore(dateToLocalDate(zcgjGlsqAuditdate))) {
|
||||
// System.out.println("date1 比 date2 早");
|
||||
this.addFatalErrorMessage(extendedDataEntity, String.format("发票号码为:%s的发票,开票日期不能早于关联申请的审核时间!",invoiceno));
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//差旅报销单数据
|
||||
DynamicObject[] tripreimburseDataSet = getTripreimburseDataSet(userId, year);
|
||||
|
@ -348,7 +348,7 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//合计汇总
|
||||
ExpenseReport totalReport = new ExpenseReport(null, null, null);
|
||||
|
|
|
@ -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 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";
|
||||
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();
|
||||
|
|
|
@ -186,7 +186,7 @@ public class OutContractFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
|
|||
DynamicObject org = (DynamicObject)this.getModel().getValue("zcgj_invoice_org");
|
||||
//List<InvoiceVO> invoiceVOList = InvoiceDataHandleHelper.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);
|
||||
ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache());
|
||||
this.addInvoiceToEntry(invoiceUtils, invoiceMap);
|
||||
|
|
|
@ -135,6 +135,17 @@ public class OutContractFinaceConfirmePlugin extends AbstractBillPlugIn impleme
|
|||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ public class OutContractSettleReversalPlugin extends AbstractBillPlugIn implemen
|
|||
getModel().setValue("isincost",ecoutcontractsettle.getBoolean("isincost"));
|
||||
getModel().setValue("zcgj_adjustmounttax",ecoutcontractsettle.getBoolean("zcgj_adjustmounttax"));
|
||||
getModel().setValue("zcgj_is_reversabillid",true);
|
||||
getModel().setValue("org",ecoutcontractsettle.getDynamicObject("org"));
|
||||
|
||||
DynamicObjectCollection itementry = ecoutcontractsettle.getDynamicObjectCollection("itementry");
|
||||
////DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("zcgj_itementry");
|
||||
|
|
|
@ -8,6 +8,8 @@ import kd.ec.ecpf.opplugin.PaymentApplyInvoiceValidatorExt;
|
|||
/*
|
||||
* 付款申请单提交操作校验更改
|
||||
*/
|
||||
@Deprecated
|
||||
//无合同相关移除
|
||||
public class PaymentApplyInvoiceValidateOpExt extends AbstractOperationServicePlugIn {
|
||||
public PaymentApplyInvoiceValidateOpExt() {
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
|
@ -2,17 +2,22 @@ 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.ExtendedDataEntity;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||
import kd.bos.entity.validate.AbstractValidator;
|
||||
import kd.bos.form.control.AbstractGrid;
|
||||
|
||||
public class OutContractFinaceConfirmeCkOp extends AbstractOperationServicePlugIn {
|
||||
|
||||
public void onPreparePropertys(PreparePropertysEventArgs e) {
|
||||
super.onPreparePropertys(e);
|
||||
e.getFieldKeys().add("zcgj_entryentity");
|
||||
e.getFieldKeys().add("zcgj_expenseitementry");
|
||||
e.getFieldKeys().add("zcgj_expenseitementry.zcgj_cbs");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,11 +32,30 @@ public class OutContractFinaceConfirmeCkOp extends AbstractOperationServicePlugI
|
|||
ExtendedDataEntity[] extendedDataEntities = this.getDataEntities();
|
||||
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
|
||||
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");//发票信息
|
||||
if(entryentity == null || entryentity.isEmpty()){
|
||||
this.addFatalErrorMessage(extendedDataEntity, "请上传合同进项发票!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +1,13 @@
|
|||
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.PreparePropertysEventArgs;
|
||||
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.validator.PaymentMaxAmountValidator;
|
||||
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.Map;
|
||||
|
||||
// 付款申请单提交审核操作插件
|
||||
public class PaymentApplyFundExtOp extends PaymentApplyFundOp {
|
||||
|
@ -39,77 +27,5 @@ public class PaymentApplyFundExtOp extends PaymentApplyFundOp {
|
|||
validators.removeIf(validator -> validator instanceof PaymentTypeValidator);
|
||||
// 添加定制二开的校验器(位置放第一位,优先执行) 不需要产品校验,自定义开发校验
|
||||
//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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|||
import kd.ec.basedata.common.enums.PlanAmtTypeEnum;
|
||||
import kd.ec.contract.opplugin.fund.validator.*;
|
||||
|
||||
//付款申请单二开系统插件:提交,审核,反审核操作注册的系统插件
|
||||
@Deprecated
|
||||
//无合同场景取消,此类无用
|
||||
public class PaymentApplyFundOpExt extends AbstractOperationServicePlugIn {
|
||||
public PaymentApplyFundOpExt() {
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@ import kd.bos.orm.query.QFilter;
|
|||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import kd.ec.basedata.common.enums.ContractStatusEnum;
|
||||
|
||||
@Deprecated
|
||||
//无合同付款相关移除
|
||||
//付款申请单提交操作插件
|
||||
public class PaymentContSubmitOpExt extends AbstractOperationServicePlugIn {
|
||||
public PaymentContSubmitOpExt() {
|
||||
|
|
Loading…
Reference in New Issue