1.付款申请单实付金额根据付款申请单行号过滤反写功能开发

This commit is contained in:
zhangzhiguo 2025-04-16 20:06:10 +08:00
parent ed193c4279
commit e8108297cf
1 changed files with 24 additions and 12 deletions

View File

@ -7,6 +7,7 @@ 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.servicehelper.BusinessDataServiceHelper;
import java.math.BigDecimal;
@ -19,7 +20,10 @@ public class OutContractSettleProcessCheckOp extends AbstractOperationServicePl
public void onPreparePropertys(PreparePropertysEventArgs e) {
super.onPreparePropertys(e);
e.getFieldKeys().add("itementry");
e.getFieldKeys().add("itementry.oftaxamount");
e.getFieldKeys().add("zcgj_processallocatentity");
e.getFieldKeys().add("contract");
//e.getFieldKeys().add("contract.zcgj_pricetype");
}
@Override
@ -35,6 +39,12 @@ public class OutContractSettleProcessCheckOp extends AbstractOperationServicePl
ExtendedDataEntity[] extendedDataEntities = this.getDataEntities();
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
DynamicObject contract = dataEntity.getDynamicObject("contract");
if (contract != null) {
DynamicObject contractObj = BusinessDataServiceHelper.loadSingle(contract.getLong("id"), "ec_out_contract", "zcgj_pricetype");
//不定量不定价合同和总价包干合同zjbgbdlbdj
if (contractObj.getString("zcgj_pricetype").equals("zjbg")
|| contractObj.getString("zcgj_pricetype").equals("bdlbdj")) {
DynamicObjectCollection itementryCollection = dataEntity.getDynamicObjectCollection("itementry");
int i=1;
for (DynamicObject itementry : itementryCollection) {
@ -53,3 +63,5 @@ public class OutContractSettleProcessCheckOp extends AbstractOperationServicePl
}
}
}
}
}