推送sap凭证的行摘要取金蝶凭证行摘要;认领中心展示客户
This commit is contained in:
parent
6d49e8930c
commit
a3f6b8512a
|
|
@ -10,6 +10,8 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.EventObject;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 认领中心表单插件处理根据认领处理单显示客户拆分
|
||||
|
|
@ -33,12 +35,28 @@ public class ClaimCenterFormPlugin extends AbstractFormPlugin implements Plugin
|
|||
if (null != entrys) {
|
||||
DynamicObject entryInfo;//收款认领明细对象
|
||||
QFilter q1;
|
||||
DynamicObject claimbill;//认领处理单对象
|
||||
DynamicObject claimbillinfo;//认领处理单对象
|
||||
String claimbillno;//认领处理单单号
|
||||
DynamicObjectCollection doc_entry;//认领处理单的分录集合
|
||||
Map<String, DynamicObject> claimMaps = new HashMap<>(1);//认领处理单缓存
|
||||
for (int i = 0; i < entrys.size(); i++) {
|
||||
entryInfo = entrys.get(i);
|
||||
q1 = new QFilter("billno", QCP.equals, entryInfo.getString("e_claimbill"));
|
||||
claimbill = BusinessDataServiceHelper.loadSingle("cas_claimbill", "id,billno,shjh_customersplit", q1.toArray());
|
||||
this.getModel().setValue("shjh_e_khcf",claimbill.getBoolean("shjh_customersplit"), i);//客户拆分
|
||||
claimbillno = entryInfo.getString("e_claimbill");
|
||||
claimbillinfo = claimMaps.get(claimbillno);
|
||||
if(claimbillinfo == null){
|
||||
q1 = new QFilter("billno", QCP.equals, claimbillno);
|
||||
claimbillinfo = BusinessDataServiceHelper.loadSingle("cas_claimbill", q1.toArray());
|
||||
claimMaps.put(claimbillno, claimbillinfo);
|
||||
}
|
||||
this.getModel().setValue("shjh_e_khcf",claimbillinfo.getBoolean("shjh_customersplit"), i);//客户拆分
|
||||
//根据 e_sourceentryid 源分录id找到认领单对应的分录行携带出客户信息
|
||||
doc_entry = claimbillinfo.getDynamicObjectCollection("entryentity");
|
||||
for (DynamicObject einfo : doc_entry) {
|
||||
if(entryInfo.getLong("e_sourceentryid") == einfo.getLong("id")){
|
||||
this.getModel().setValue("shjh_e_customer",einfo.getDynamicObject("shjh_entrycustomer"), i);//客户
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//更新分录页面显示
|
||||
this.getView().updateView(entryID);
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
|||
QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, prinfo.getPkValue());//凭证源单ID为预提单
|
||||
voucherFilters.and(new QFilter("billstatus",QCP.equals,"C"));//凭证状态已审核
|
||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle(voucherName,
|
||||
"id,description,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,entries.edescription,vouchertype",
|
||||
voucherFilters.toArray());
|
||||
if (null != gl_voucher) {
|
||||
IS_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//根据金蝶凭证类型设置
|
||||
|
|
@ -218,6 +218,7 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
|||
item.put("HKONT", account.getString("number")); //总账科目_科目(凭证分录account)
|
||||
item.put("UMSKZ", JhzjUtils.getUMSKZ(account.getString("number")));//特殊总账标识
|
||||
}
|
||||
item.put("SGTXT", entry.getString("edescription"));//凭证行摘要
|
||||
//获取贷方金额
|
||||
creditlocal = entry.getBigDecimal("creditlocal");//贷方
|
||||
//获取分录借贷方向
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
|||
//原因码(付款明细)
|
||||
String RSTGR;
|
||||
//SAP会计科目行项目号
|
||||
String SGTXT;
|
||||
// String SGTXT;
|
||||
DynamicObjectCollection entrys = bill.getDynamicObjectCollection("entry");
|
||||
if (!entrys.isEmpty()) {
|
||||
DynamicObject entry = entrys.get(0);
|
||||
|
|
@ -222,10 +222,11 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
|||
} else {
|
||||
RSTGR = null;
|
||||
}
|
||||
SGTXT = entry.getString("shjh_voucherentrynum");
|
||||
// SGTXT = entry.getString("shjh_voucherentrynum");
|
||||
} else {
|
||||
RSTGR = null;
|
||||
SGTXT = "";}
|
||||
// SGTXT = "";
|
||||
}
|
||||
//成本中心
|
||||
String KOSTL;
|
||||
DynamicObject shjhCostcenter = bill.getDynamicObject("shjh_costcenter");
|
||||
|
|
@ -243,7 +244,7 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
|||
QFilter q1 = new QFilter("sourcebill", QCP.equals, bill.getPkValue());
|
||||
QFilter q2 = new QFilter("billstatus",QCP.equals,"C");
|
||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher",
|
||||
"id,description,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype,entries.assgrp",
|
||||
"id,description,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,entries.edescription,vouchertype,entries.assgrp",
|
||||
new QFilter[]{q1, q2});
|
||||
if (null != gl_voucher) {
|
||||
//todo:对header 凭证类型重新赋值
|
||||
|
|
@ -271,9 +272,11 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
|||
continue;
|
||||
}
|
||||
IT_ITEMS.put("RSTGR", RSTGR);//原因代码_原因码(付款明细shjh_yym)_必填
|
||||
IT_ITEMS.put("SGTXT", SGTXT);//行项目文本_SAP会计科目行项目号(付款明细shjh_voucherentrynum)
|
||||
// IT_ITEMS.put("SGTXT", SGTXT);//行项目文本_SAP会计科目行项目号(付款明细shjh_voucherentrynum)
|
||||
IT_ITEMS.put("KOSTL", KOSTL);//成本中心_成本中心(付款单shjh_costcenter)
|
||||
IT_ITEMS.put("PRCTR", PRCTR);//利润中心_利润中心(付款单shjh_pc)
|
||||
IT_ITEMS.put("SGTXT", entry.getString("edescription"));//SAP凭证行摘要
|
||||
|
||||
assgrpinfo = entry.getDynamicObject("assgrp");//核算维度(弹性域)
|
||||
if(assgrpinfo != null){
|
||||
DynamicObjectCollection gl_assist_bd = QueryServiceHelper.query("gl_assist_bd", "asstype,assval",
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ public class RecPushVoucherOperation extends AbstractOperationServicePlugIn impl
|
|||
|
||||
// 2. 获取原因码和SAP行项目文本
|
||||
String RSTGR = "";
|
||||
String SGTXT = "";
|
||||
// String SGTXT = "";
|
||||
DynamicObjectCollection entrys = recBill.getDynamicObjectCollection("entry");
|
||||
if (entrys != null && !entrys.isEmpty()) {
|
||||
DynamicObject entry = entrys.get(0);
|
||||
|
|
@ -368,7 +368,7 @@ public class RecPushVoucherOperation extends AbstractOperationServicePlugIn impl
|
|||
QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, recBill.getPkValue());
|
||||
voucherFilters.and(new QFilter("billstatus",QCP.equals,"C"));//已审核
|
||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle(voucherName,
|
||||
"id,description,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,entries.edescription,vouchertype",
|
||||
voucherFilters.toArray());
|
||||
|
||||
if (gl_voucher != null) {
|
||||
|
|
@ -387,10 +387,10 @@ public class RecPushVoucherOperation extends AbstractOperationServicePlugIn impl
|
|||
for (DynamicObject entry : entries) {
|
||||
JSONObject IT_ITEMS = new JSONObject();
|
||||
// 设置其他字段
|
||||
IT_ITEMS.put("SGTXT", SGTXT);
|
||||
IT_ITEMS.put("RSTGR", RSTGR);
|
||||
IT_ITEMS.put("KOSTL", KOSTL);
|
||||
IT_ITEMS.put("PRCTR", PRCTR);
|
||||
IT_ITEMS.put("SGTXT", entry.getString("edescription"));//凭证行摘要
|
||||
// 设置科目
|
||||
DynamicObject account = entry.getDynamicObject("account");
|
||||
if (account != null) {
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
|||
QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, prinfo.getPkValue());//凭证源单ID为预提单
|
||||
voucherFilters.and(new QFilter("billstatus",QCP.equals,"C"));//凭证状态已审核
|
||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle(voucherName,
|
||||
"id,description,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,entries.edescription,vouchertype",
|
||||
voucherFilters.toArray());
|
||||
if (null != gl_voucher) {
|
||||
IS_HEADER.put("BLART", gl_voucher.getString("vouchertype.number"));//根据金蝶凭证类型设置
|
||||
|
|
@ -225,6 +225,7 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
|||
item.put("HKONT", account.getString("number")); //总账科目_科目(凭证分录account)
|
||||
item.put("UMSKZ", JhzjUtils.getUMSKZ(account.getString("number")));//特殊总账标识
|
||||
}
|
||||
item.put("SGTXT", entry.getString("edescription"));//凭证行摘要
|
||||
//获取贷方金额
|
||||
creditlocal = entry.getBigDecimal("creditlocal");//贷方
|
||||
//获取分录借贷方向
|
||||
|
|
|
|||
Loading…
Reference in New Issue