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

This commit is contained in:
zhangzhiguo 2024-12-20 17:14:01 +08:00
commit 108b3ebbfd
5 changed files with 82 additions and 56 deletions

View File

@ -390,12 +390,12 @@ null && visaBillArr.length != 0) {
DynamicObject[] materialOutBillArr = this.getMaterialOutBillArr(materialOutBillFilter);
String entityId = this.getView().getParentView().getEntityId();
// if (!StringUtils.equals(entityId, "ec_out_contract_settle") || !(Boolean)parentModel.getValue("iseqsettle")) {
// DynamicObject[] measureBillArr = this.getMeasureBillArr(measureBillFilter);
// if (payDirection.equals(PayDirectionEnum.IN.getValue())) {
// this.setMeasureBillDataToEntry(entryCollection, measureBillArr);
// } else {
// this.setMeasureBillDataToEntryOut(entryCollection, measureBillArr);
// }
DynamicObject[] measureBillArr = this.getMeasureBillArr(measureBillFilter);
if (payDirection.equals(PayDirectionEnum.IN.getValue())) {
this.setMeasureBillDataToEntry(entryCollection, measureBillArr);
} else {
this.setMeasureBillDataToEntryOut(entryCollection, measureBillArr);
}
// }
this.setClaimArrDataToEntry(entryCollection, claimArr);

View File

@ -60,17 +60,17 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
// contractType = "ck";
// this.getPageCache().remove("firstOpen");
if (contractType != null) {
if (contractType.toString().equals("wzcg01")) {//物资采购
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
} else if (contractType.toString().equals("sbcg")) {//设备采购
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")|| contractType.toString().equals("ck")||
contractType.toString().equals("zyfbcc")|| contractType.toString().equals("jjbc")) {//产出物
this.getView().setVisible(true, new String[]{"flexpanelturnover"});
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
}
// if (contractType.toString().equals("wzcg01")) {//物资采购
// this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
// this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
// } else if (contractType.toString().equals("sbcg")) {//设备采购
// this.getView().setVisible(true, new String[]{"flexpanelequipment"});
// this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
// }else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")|| contractType.toString().equals("ck")||
// contractType.toString().equals("zyfbcc")|| contractType.toString().equals("jjbc")) {//产出物
// this.getView().setVisible(true, new String[]{"flexpanelturnover"});
// this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
// }
}
}
}

View File

@ -98,7 +98,22 @@ public class ContractMeasurementValidator extends ContractMeasureValidator {
if (!excludeIds.contains(bill.getLong("id"))) {
DynamicObjectCollection modelEntries = bill.getDynamicObjectCollection("listmodelentry");
Iterator var20 = modelEntries.iterator();
int isTwo = 0;
if (modelEntries.size() > 1) {
DynamicObject object = modelEntries.get(0);
DynamicObjectCollection listingEntries = object.getDynamicObjectCollection("listentry");
if (!listingEntries.isEmpty()) {
isTwo++;
}
DynamicObject object1 = modelEntries.get(1);
DynamicObjectCollection listingEntries1 = object1.getDynamicObjectCollection("listentry");
if (!listingEntries1.isEmpty()) {
isTwo++;
}
if (isTwo > 1) {
this.addErrorMessage(dataEntity, "多清单时计量只可计量其中!请清空其中一个分录。");
}
}
while (var20.hasNext()) {
DynamicObject modelEntry = (DynamicObject) var20.next();
DynamicObjectCollection listingEntries = modelEntry.getDynamicObjectCollection("listentry");
@ -120,8 +135,11 @@ public class ContractMeasurementValidator extends ContractMeasureValidator {
}
}
}
}
}
}
}

View File

@ -31,6 +31,10 @@ public class InContractSettlementValidator extends InContractSettleValidator {
if (itementry.size() == 0) {
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
}
BigDecimal oftaxamount = itementry.get(0).getBigDecimal("oftaxamount");
if (oftaxamount.compareTo(new BigDecimal(0)) > 0) {
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项分录中的金额不能为空!", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
}
DynamicObject contract = BusinessDataServiceHelper.loadSingle(dataEntity.getDataEntity().getDynamicObject("contract").getPkValue(), "ec_in_contract");
BigDecimal totalSettleOfTaxAmount = contract.getBigDecimal("totalsettleoftaxamount");
BigDecimal totalOfTaxAmount = contract.getBigDecimal("totaloftaxamount");

View File

@ -22,6 +22,10 @@ public class OutContractSettlementValidator extends OutContractSettleValidator {
if (itementry.isEmpty()) {
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
}
BigDecimal oftaxamount = itementry.get(0).getBigDecimal("oftaxamount");
if (oftaxamount.compareTo(new BigDecimal(0)) > 0) {
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项分录中的金额不能为空!", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
}
if (contractTemp == null) {
this.addErrorMessage(dataEntity, ResManager.loadKDString("合同不可为空。", "OutContractSettleValidator_5", "ec-contract-opplugin", new Object[0]));
return false;