收款sap校验接口、红单清除已推送sap标记
This commit is contained in:
parent
a7905fb2df
commit
fff338d889
|
|
@ -106,8 +106,8 @@ public class ClearBillFormPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
//上述两句应该可以跳过权限验证
|
||||
//如下代码设置目标界面打开时的高度和宽度
|
||||
StyleCss styleCss = new StyleCss();
|
||||
styleCss.setWidth("80%");
|
||||
styleCss.setHeight("60%");
|
||||
styleCss.setWidth("85%");
|
||||
styleCss.setHeight("75%");
|
||||
showParameter.getOpenStyle().setInlineStyleCss(styleCss);
|
||||
|
||||
//设置页面ID
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
|||
|
||||
// 凭证号非空
|
||||
if (SapUtils.isEmpty(voucherNum)) {
|
||||
this.getView().showTipNotification("所选单据不满足变更条件,SAP凭证号≠空。");
|
||||
this.getView().showTipNotification("所选单据未推送SAP,不需要变更。");
|
||||
evt.setCancel(true);
|
||||
return;
|
||||
}
|
||||
|
|
@ -118,6 +118,7 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
|||
}
|
||||
}
|
||||
} else {
|
||||
//未关联下游业务时
|
||||
this.getView().showTipNotification("所选单据不满足变更条件,下游未关联清账单。");
|
||||
evt.setCancel(true);
|
||||
return;
|
||||
|
|
@ -136,12 +137,12 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
|||
evt.setCancel(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// SAP 清账状态校验
|
||||
String billNumber = recBill.getString("billno");
|
||||
String companyCode = recBill.getString("org.number");
|
||||
String sapFiscalYear = recBill.getString("shjh_sapfiscalyear");//SAP收款凭证会计年度
|
||||
// String sapLineNumber = recBill.getString("shjh_sapline");
|
||||
if(!"A".equals(qzState)){
|
||||
//SAP清账状态校验-如果是无需金蝶清账时,不用去调用sap校验接口
|
||||
String billNumber = recBill.getString("billno");
|
||||
//String sapLineNumber = recBill.getString("shjh_sapline");
|
||||
//此时不传行号给sap,sap返回这个凭证下的所有行清账标识,我方解析,只要有一行是已清账,就提示
|
||||
String response = SapUtils.querySapClearAccountsState(billNumber, companyCode, voucherNum, sapFiscalYear);
|
||||
if (response != null) {
|
||||
|
|
@ -182,8 +183,9 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
|||
evt.setCancel(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 是否存在付款申请单
|
||||
//校验当前收款单是否存在付款申请单,防止退票后再次付款的情况
|
||||
QFilter[] filters = new QFilter[]{
|
||||
new QFilter("applyorg.number", QCP.equals, companyCode),
|
||||
new QFilter("shjh_vouchernum", QCP.equals, voucherNum),//sap应付凭证号
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -37,7 +36,6 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
|
|||
}
|
||||
bill = BusinessDataServiceHelper.loadSingle(bill.getPkValue(),"cas_recbill");
|
||||
|
||||
|
||||
// DynamicObject planClass = bill.getDynamicObject("shjh_planclass");
|
||||
// if (null == planClass) {
|
||||
//根据配置表携带资金计划科目
|
||||
|
|
@ -49,10 +47,11 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
|
|||
carryCustomer(bill);
|
||||
SaveServiceHelper.save(new DynamicObject[]{bill});
|
||||
|
||||
//若源单为收款处理,清空单据头.SAP凭证号;单据头.是否已推送SAP;单据头.SAP会计年度 cas_recbill
|
||||
//若源单为收款处理 认领通知单,清空单据头.是否已推送SAP;单据头.SAP凭证号;单据头.SAP会计年度任保留方便后续推红冲凭证 cas_recbill
|
||||
String sourcebilltype = bill.getString("sourcebilltype");
|
||||
if ("cas_recbill".equals(sourcebilltype) || "收款单".equals(sourcebilltype)) {
|
||||
BigDecimal sourcebillid = bill.getBigDecimal("sourcebillid");
|
||||
if ("cas_recbill".equals(sourcebilltype) || "cas_claimcenterbill".equals(sourcebilltype) ||
|
||||
"收款单".equals(sourcebilltype) || "认领通知单".equals(sourcebilltype)) {
|
||||
long sourcebillid = bill.getLong("sourcebillid");
|
||||
QFilter q1 = new QFilter("id", QCP.equals, sourcebillid);
|
||||
DynamicObject[] load = BusinessDataServiceHelper.load("cas_recbill",
|
||||
"id,billno,shjh_vouchernum,shjh_sapfiscalyear,shjh_ispushsap,shjh_issourceblue", q1.toArray());
|
||||
|
|
|
|||
Loading…
Reference in New Issue