无需清账判断条件,变更时,不用调sap接口
This commit is contained in:
parent
0b89cb776d
commit
f03afd081c
|
|
@ -189,7 +189,7 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
||||||
};
|
};
|
||||||
DynamicObject payApply = BusinessDataServiceHelper.loadSingle("ap_payapply", filters);
|
DynamicObject payApply = BusinessDataServiceHelper.loadSingle("ap_payapply", filters);
|
||||||
if (payApply != null) {
|
if (payApply != null) {
|
||||||
this.getView().showTipNotification("所选单据不满足变更条件,存在SAP关联付款申请:" + payApply.getString("billno") + ",不允许变更。");
|
this.getView().showTipNotification("所选单据不满足变更条件,存在关联SAP付款申请:" + payApply.getString("billno") + ",不允许变更。");
|
||||||
evt.setCancel(true);
|
evt.setCancel(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,9 @@ import shjh.jhzj7.fi.fi.plugin.form.info.RecFieldsInfo;
|
||||||
import shjh.jhzj7.fi.fi.utils.SapUtils;
|
import shjh.jhzj7.fi.fi.utils.SapUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态表单插件
|
* 校验器插件
|
||||||
* 收款业务变更单提交清账状态校验
|
* 收款业务变更单提交清账状态校验
|
||||||
|
* shjh_cas_recbill_chan_ext submit操作的校验规则中
|
||||||
*/
|
*/
|
||||||
public class ClosingStatusValidator extends AbstractValidator {
|
public class ClosingStatusValidator extends AbstractValidator {
|
||||||
private final static Log logger = LogFactory.getLog(ClosingStatusValidator.class);
|
private final static Log logger = LogFactory.getLog(ClosingStatusValidator.class);
|
||||||
|
|
@ -25,7 +26,7 @@ public class ClosingStatusValidator extends AbstractValidator {
|
||||||
for (ExtendedDataEntity dataEntity : dataEntities) {
|
for (ExtendedDataEntity dataEntity : dataEntities) {
|
||||||
if (dataEntity != null) {
|
if (dataEntity != null) {
|
||||||
DynamicObject bill = dataEntity.getDataEntity();
|
DynamicObject bill = dataEntity.getDataEntity();
|
||||||
////付款方为一次性客户/供应商时,需校验国家、城市必录。
|
//付款方为一次性客户/供应商时,需校验国家、城市必录。
|
||||||
String type = bill.getString(RecFieldsInfo.PAYER_TYPE);
|
String type = bill.getString(RecFieldsInfo.PAYER_TYPE);
|
||||||
if ("bd_customer".equals(type) || "bd_supplier".equals(type)){
|
if ("bd_customer".equals(type) || "bd_supplier".equals(type)){
|
||||||
long id = bill.getLong("payer");
|
long id = bill.getLong("payer");
|
||||||
|
|
@ -43,12 +44,16 @@ public class ClosingStatusValidator extends AbstractValidator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//需要调用sap校验接口,走如下判断逻辑;当无需金蝶清账时,不去调用sap接口
|
||||||
|
if("A".equals(bill.getString(RecFieldsInfo.CLOSING_STATUS))){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
String voucherNum = bill.getString("shjh_vouchernum");
|
String voucherNum = bill.getString("shjh_vouchernum");
|
||||||
if(SapUtils.isEmpty(voucherNum)){
|
if(SapUtils.isEmpty(voucherNum)){
|
||||||
//如果收款单凭证号为空
|
//如果收款单凭证号为空
|
||||||
this.addErrorMessage(dataEntity, "所选单据不满足变更条件,SAP凭证号≠空。");
|
this.addErrorMessage(dataEntity, "所选单据不满足变更条件,SAP凭证号≠空。");
|
||||||
}
|
}
|
||||||
|
|
||||||
//则需要调用SAP收款凭证清账状态查询接口
|
//则需要调用SAP收款凭证清账状态查询接口
|
||||||
String billNumber = bill.getString("billno");
|
String billNumber = bill.getString("billno");
|
||||||
String companyCode = bill.getString("org.number");
|
String companyCode = bill.getString("org.number");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue