凭证抬头文本
This commit is contained in:
parent
a1c177b1af
commit
ccb3e0316c
|
|
@ -106,6 +106,7 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
||||||
boolean isClearBillCancelled = false;
|
boolean isClearBillCancelled = false;
|
||||||
|
|
||||||
if (isToBeCleared) {
|
if (isToBeCleared) {
|
||||||
|
//根据当前单据查找对应下游单据记录
|
||||||
Map<String, HashSet<Long>> recBillMap = BFTrackerServiceHelper.findSourceBills("cas_recbill", new Long[]{(Long) recBill.getPkValue()});
|
Map<String, HashSet<Long>> recBillMap = BFTrackerServiceHelper.findSourceBills("cas_recbill", new Long[]{(Long) recBill.getPkValue()});
|
||||||
if (recBillMap.containsKey("shjh_clear_account")) {
|
if (recBillMap.containsKey("shjh_clear_account")) {
|
||||||
Set<Long> billIds = recBillMap.get("shjh_clear_account");
|
Set<Long> billIds = recBillMap.get("shjh_clear_account");
|
||||||
|
|
@ -139,7 +140,7 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
||||||
// SAP 清账状态校验
|
// SAP 清账状态校验
|
||||||
String billNumber = recBill.getString("billno");
|
String billNumber = recBill.getString("billno");
|
||||||
String companyCode = recBill.getString("org.number");
|
String companyCode = recBill.getString("org.number");
|
||||||
String sapFiscalYear = recBill.getString("shjh_sapfiscalyear");
|
String sapFiscalYear = recBill.getString("shjh_sapfiscalyear");//SAP收款凭证会计年度
|
||||||
// String sapLineNumber = recBill.getString("shjh_sapline");
|
// String sapLineNumber = recBill.getString("shjh_sapline");
|
||||||
//此时不传行号给sap,sap返回这个凭证下的所有行清账标识,我方解析,只要有一行是已清账,就提示
|
//此时不传行号给sap,sap返回这个凭证下的所有行清账标识,我方解析,只要有一行是已清账,就提示
|
||||||
String response = SapUtils.querySapClearAccountsState(billNumber, companyCode, voucherNum, sapFiscalYear);
|
String response = SapUtils.querySapClearAccountsState(billNumber, companyCode, voucherNum, sapFiscalYear);
|
||||||
|
|
@ -182,14 +183,15 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否存在付款申请
|
// 是否存在付款申请单
|
||||||
QFilter[] filters = new QFilter[]{
|
QFilter[] filters = new QFilter[]{
|
||||||
new QFilter("applyorg.number", QCP.equals, companyCode),
|
new QFilter("applyorg.number", QCP.equals, companyCode),
|
||||||
new QFilter("shjh_vouchernum", QCP.equals, voucherNum)
|
new QFilter("shjh_vouchernum", QCP.equals, voucherNum),//sap应付凭证号
|
||||||
|
new QFilter("shjh_voucheryear", QCP.equals, sapFiscalYear)//sap应付凭证会计年度
|
||||||
};
|
};
|
||||||
DynamicObject payApply = BusinessDataServiceHelper.loadSingle("ap_payapply", filters);
|
DynamicObject payApply = BusinessDataServiceHelper.loadSingle("ap_payapply", "id,billno", 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -216,11 +216,14 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
||||||
QFilter q1 = new QFilter("sourcebill", QCP.equals, bill.getPkValue());
|
QFilter q1 = new QFilter("sourcebill", QCP.equals, bill.getPkValue());
|
||||||
QFilter q2 = new QFilter("billstatus",QCP.equals,"C");
|
QFilter q2 = new QFilter("billstatus",QCP.equals,"C");
|
||||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher",
|
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher",
|
||||||
"id,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype",
|
"id,description,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype",
|
||||||
new QFilter[]{q1, q2});
|
new QFilter[]{q1, q2});
|
||||||
if (null != gl_voucher) {
|
if (null != gl_voucher) {
|
||||||
//todo:对header 凭证类型重新赋值
|
//todo:对header 凭证类型重新赋值
|
||||||
IS_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//凭证类型
|
IS_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//凭证类型-从金蝶凭证中获取
|
||||||
|
if(!JhzjUtils.isEmpty(gl_voucher.getString("description"))){
|
||||||
|
IS_HEADER.put("BKTXT", gl_voucher.getString("description"));//凭证抬头文本-从金蝶凭证中获取
|
||||||
|
}
|
||||||
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
||||||
if (!entries.isEmpty()) {
|
if (!entries.isEmpty()) {
|
||||||
for (DynamicObject entry : entries) {
|
for (DynamicObject entry : entries) {
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ public class RecPushVoucherOperation extends AbstractOperationServicePlugIn impl
|
||||||
private final static Log logger = LogFactory.getLog(RecPushVoucherOperation.class);
|
private final static Log logger = LogFactory.getLog(RecPushVoucherOperation.class);
|
||||||
private static final String glbdName = "gl_assist_bd";//核算项目组合纵表
|
private static final String glbdName = "gl_assist_bd";//核算项目组合纵表
|
||||||
private static final String customerName = "bd_customer";//客户标识
|
private static final String customerName = "bd_customer";//客户标识
|
||||||
|
private static final String voucherName = "gl_voucher";//凭证标识
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -338,8 +339,8 @@ public class RecPushVoucherOperation extends AbstractOperationServicePlugIn impl
|
||||||
// 5. 查询关联的凭证信息——凭证必传
|
// 5. 查询关联的凭证信息——凭证必传
|
||||||
QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, recBill.getPkValue());
|
QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, recBill.getPkValue());
|
||||||
voucherFilters.and(new QFilter("billstatus",QCP.equals,"C"));//已审核
|
voucherFilters.and(new QFilter("billstatus",QCP.equals,"C"));//已审核
|
||||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher",
|
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle(voucherName,
|
||||||
"id,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype",
|
"id,description,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype",
|
||||||
voucherFilters.toArray());
|
voucherFilters.toArray());
|
||||||
|
|
||||||
if (gl_voucher != null) {
|
if (gl_voucher != null) {
|
||||||
|
|
@ -347,7 +348,10 @@ public class RecPushVoucherOperation extends AbstractOperationServicePlugIn impl
|
||||||
String asstype;
|
String asstype;
|
||||||
DynamicObject glassistbd;
|
DynamicObject glassistbd;
|
||||||
DynamicObject hsxminfo;
|
DynamicObject hsxminfo;
|
||||||
json_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//凭证类型
|
json_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//凭证类型-从金蝶凭证中获取
|
||||||
|
if(!JhzjUtils.isEmpty(gl_voucher.getString("description"))){
|
||||||
|
json_HEADER.put("BKTXT", gl_voucher.getString("description"));//凭证抬头文本-从金蝶凭证中获取
|
||||||
|
}
|
||||||
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
||||||
if (entries != null && !entries.isEmpty()) {
|
if (entries != null && !entries.isEmpty()) {
|
||||||
//如果是客户拆分,则从凭证上获取客户编号
|
//如果是客户拆分,则从凭证上获取客户编号
|
||||||
|
|
|
||||||
|
|
@ -126,10 +126,13 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
||||||
QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, prinfo.getPkValue());//凭证源单ID为预提单
|
QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, prinfo.getPkValue());//凭证源单ID为预提单
|
||||||
voucherFilters.and(new QFilter("billstatus",QCP.equals,"C"));//凭证状态已审核
|
voucherFilters.and(new QFilter("billstatus",QCP.equals,"C"));//凭证状态已审核
|
||||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle(voucherName,
|
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle(voucherName,
|
||||||
"id,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype",
|
"id,description,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype",
|
||||||
voucherFilters.toArray());
|
voucherFilters.toArray());
|
||||||
if (null != gl_voucher) {
|
if (null != gl_voucher) {
|
||||||
IS_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//根据金蝶凭证类型设置
|
IS_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//根据金蝶凭证类型设置
|
||||||
|
if(!JhzjUtils.isEmpty(gl_voucher.getString("description"))){
|
||||||
|
IS_HEADER.put("BKTXT", gl_voucher.getString("description"));//凭证抬头文本-从金蝶凭证中获取
|
||||||
|
}
|
||||||
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
||||||
JSONObject item;
|
JSONObject item;
|
||||||
DynamicObject account;
|
DynamicObject account;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONException;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.sap.db.jdbc.packet.ErrorLevel;
|
import com.sap.db.jdbc.packet.ErrorLevel;
|
||||||
import kd.bos.context.RequestContext;
|
import kd.bos.context.RequestContext;
|
||||||
|
import kd.bos.dataentity.OperateOption;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.entity.operate.result.OperateErrorInfo;
|
import kd.bos.entity.operate.result.OperateErrorInfo;
|
||||||
|
|
@ -15,6 +16,7 @@ import kd.bos.logging.Log;
|
||||||
import kd.bos.logging.LogFactory;
|
import kd.bos.logging.LogFactory;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.operation.OperationServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
import shjh.jhzj7.fi.fi.utils.EsbUtils;
|
import shjh.jhzj7.fi.fi.utils.EsbUtils;
|
||||||
|
|
@ -180,7 +182,8 @@ public class SupplierInitOperation extends AbstractOperationServicePlugIn implem
|
||||||
//处理 sap公司信息 结算方式 统驭科目
|
//处理 sap公司信息 结算方式 统驭科目
|
||||||
handleSAPCompany(companysJson,currentSup.getDynamicObjectCollection("shjh_entry_sap"),supnumber);
|
handleSAPCompany(companysJson,currentSup.getDynamicObjectCollection("shjh_entry_sap"),supnumber);
|
||||||
//保存供应商
|
//保存供应商
|
||||||
SaveServiceHelper.save(new DynamicObject[]{currentSup});
|
// SaveServiceHelper.save(new DynamicObject[]{currentSup});
|
||||||
|
OperationServiceHelper.executeOperate("save", entityName, new DynamicObject[]{currentSup}, OperateOption.create());
|
||||||
cusids.put(supnumber,currentSup.getLong("id"));
|
cusids.put(supnumber,currentSup.getLong("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue