支出财务确认单增加是否冲预付的判断
This commit is contained in:
parent
aff78c9e0a
commit
29f0fd2435
|
@ -33,6 +33,7 @@ public class OutFinaceconfirmReversalamountCkOp extends AbstractOperationService
|
|||
e.getFieldKeys().add("zcgj_prepayentry.zcgj_sourceapplybillid");
|
||||
e.getFieldKeys().add("zcgj_prepayentry.zcgj_sourceapplyentryid");
|
||||
e.getFieldKeys().add("zcgj_prepayentry.zcgj_boltamount");
|
||||
e.getFieldKeys().add("zcgj_isprepay");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,6 +52,11 @@ public class OutFinaceconfirmReversalamountCkOp extends AbstractOperationService
|
|||
for (int i = 0; i < entryEntityCollection.size(); i++) {
|
||||
DynamicObject entryEntity = entryEntityCollection.get(i);
|
||||
DynamicObjectCollection prepayentryCollection = dataEntity.getDynamicObjectCollection("zcgj_prepayentry");//冲销预付分录
|
||||
String isprepay = dataEntity.getString("zcgj_isprepay");
|
||||
if("10".equals(isprepay)){
|
||||
if(prepayentryCollection == null || prepayentryCollection.isEmpty()){
|
||||
this.addFatalErrorMessage(extendedDataEntity, String.format("请录入冲销预付明细数据!"));
|
||||
}else{
|
||||
int seq = 0;
|
||||
for (DynamicObject prepay : prepayentryCollection) {
|
||||
seq++;
|
||||
|
@ -74,25 +80,8 @@ public class OutFinaceconfirmReversalamountCkOp extends AbstractOperationService
|
|||
}
|
||||
}
|
||||
}
|
||||
/*DynamicObject contract = entryEntity.getDynamicObject("contract");//合同名称
|
||||
String contractNumber = null;
|
||||
if (contract != null) {
|
||||
contractNumber = contract.getString("number");//合同编号
|
||||
}
|
||||
String paymentType = entryEntity.getString("paymenttype");//支付类型
|
||||
DynamicObject settleType = entryEntity.getDynamicObject("settletype");//结算方式
|
||||
String settleTypeName = null;
|
||||
if (settleType != null) {
|
||||
settleTypeName = settleType.getString("name");//结算方式编码
|
||||
}
|
||||
String combinationKey = contractNumber + "|" + paymentType + "|" + settleTypeName;
|
||||
if (combinationIndices.containsKey(combinationKey)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "付款信息中一个合同不能填写多行相同的支付类型+结算方式");
|
||||
} else {
|
||||
List<Integer> indices = new ArrayList<>();
|
||||
indices.add(i);
|
||||
combinationIndices.put(combinationKey, indices);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue