收付款、理财定期凭证-反记账、税码字段推送sap
This commit is contained in:
parent
5dc221c42f
commit
f2a554dc32
|
|
@ -196,7 +196,7 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
||||||
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,description,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,entries.edescription,vouchertype",
|
"id,description,shjh_fjz,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,entries.edescription,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"));//根据金蝶凭证类型设置
|
||||||
|
|
@ -219,6 +219,10 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
||||||
item.put("UMSKZ", JhzjUtils.getUMSKZ(account.getString("number")));//特殊总账标识
|
item.put("UMSKZ", JhzjUtils.getUMSKZ(account.getString("number")));//特殊总账标识
|
||||||
}
|
}
|
||||||
item.put("SGTXT", entry.getString("edescription"));//凭证行摘要
|
item.put("SGTXT", entry.getString("edescription"));//凭证行摘要
|
||||||
|
//凭证反记账标识判断,如果凭证上已勾选,则传X给sap
|
||||||
|
if(gl_voucher.getBoolean("shjh_fjz")){
|
||||||
|
item.put("XNEGP", "X");
|
||||||
|
}
|
||||||
//获取贷方金额
|
//获取贷方金额
|
||||||
creditlocal = entry.getBigDecimal("creditlocal");//贷方
|
creditlocal = entry.getBigDecimal("creditlocal");//贷方
|
||||||
//获取分录借贷方向
|
//获取分录借贷方向
|
||||||
|
|
@ -249,7 +253,6 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
||||||
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
||||||
item.put("KOSTL",hsxminfo.getString("number"));//成本中心_成本中心
|
item.put("KOSTL",hsxminfo.getString("number"));//成本中心_成本中心
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// item.put("RSTGR", "014");//原因代码_原因码
|
// item.put("RSTGR", "014");//原因代码_原因码
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ 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,description,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,entries.edescription,vouchertype,entries.assgrp",
|
"id,description,shjh_fjz,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,entries.edescription,vouchertype,entries.assgrp",
|
||||||
new QFilter[]{q1, q2});
|
new QFilter[]{q1, q2});
|
||||||
if (null != gl_voucher) {
|
if (null != gl_voucher) {
|
||||||
//todo:对header 凭证类型重新赋值
|
//todo:对header 凭证类型重新赋值
|
||||||
|
|
@ -286,6 +286,10 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
||||||
IT_ITEMS.put("KOSTL", KOSTL);//成本中心_成本中心(付款单shjh_costcenter)
|
IT_ITEMS.put("KOSTL", KOSTL);//成本中心_成本中心(付款单shjh_costcenter)
|
||||||
IT_ITEMS.put("PRCTR", PRCTR);//利润中心_利润中心(付款单shjh_pc)
|
IT_ITEMS.put("PRCTR", PRCTR);//利润中心_利润中心(付款单shjh_pc)
|
||||||
IT_ITEMS.put("SGTXT", entry.getString("edescription"));//SAP凭证行摘要
|
IT_ITEMS.put("SGTXT", entry.getString("edescription"));//SAP凭证行摘要
|
||||||
|
//凭证反记账标识判断,如果凭证上已勾选,则传X给sap
|
||||||
|
if(gl_voucher.getBoolean("shjh_fjz")){
|
||||||
|
IT_ITEMS.put("XNEGP", "X");
|
||||||
|
}
|
||||||
|
|
||||||
assgrpinfo = entry.getDynamicObject("assgrp");//核算维度(弹性域)
|
assgrpinfo = entry.getDynamicObject("assgrp");//核算维度(弹性域)
|
||||||
if(assgrpinfo != null){
|
if(assgrpinfo != null){
|
||||||
|
|
@ -330,6 +334,12 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
||||||
}else if("f000056".equals(asstype)){
|
}else if("f000056".equals(asstype)){
|
||||||
//分配编号 f000056
|
//分配编号 f000056
|
||||||
IT_ITEMS.put("ZUONR",glassistbd.getString("assval"));
|
IT_ITEMS.put("ZUONR",glassistbd.getString("assval"));
|
||||||
|
}else if("f000023".equals(asstype)){
|
||||||
|
//税码 f000023
|
||||||
|
IT_ITEMS.put("MWSKZ",glassistbd.getString("assval"));
|
||||||
|
}else if("f000031".equals(asstype)){
|
||||||
|
//税基 f000031
|
||||||
|
// IT_ITEMS.put("MWSBP",glassistbd.getString("assval"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -458,6 +458,7 @@ public class RecPushVoucherOperation extends AbstractOperationServicePlugIn impl
|
||||||
}else if("f000031".equals(asstype)){
|
}else if("f000031".equals(asstype)){
|
||||||
//税基 f000031
|
//税基 f000031
|
||||||
// IT_ITEMS.put("MWSBP",glassistbd.getString("assval"));
|
// IT_ITEMS.put("MWSBP",glassistbd.getString("assval"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ 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,description,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,entries.edescription,vouchertype",
|
"id,description,shjh_fjz,sourcebill,entries,entries.account,entries.assgrp,entries.debitlocal,entries.creditlocal,entries.entrydc,entries.edescription,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"));//根据金蝶凭证类型设置
|
||||||
|
|
@ -226,6 +226,10 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
||||||
item.put("UMSKZ", JhzjUtils.getUMSKZ(account.getString("number")));//特殊总账标识
|
item.put("UMSKZ", JhzjUtils.getUMSKZ(account.getString("number")));//特殊总账标识
|
||||||
}
|
}
|
||||||
item.put("SGTXT", entry.getString("edescription"));//凭证行摘要
|
item.put("SGTXT", entry.getString("edescription"));//凭证行摘要
|
||||||
|
//凭证反记账标识判断,如果凭证上已勾选,则传X给sap
|
||||||
|
if(gl_voucher.getBoolean("shjh_fjz")){
|
||||||
|
item.put("XNEGP", "X");
|
||||||
|
}
|
||||||
//获取贷方金额
|
//获取贷方金额
|
||||||
creditlocal = entry.getBigDecimal("creditlocal");//贷方
|
creditlocal = entry.getBigDecimal("creditlocal");//贷方
|
||||||
//获取分录借贷方向
|
//获取分录借贷方向
|
||||||
|
|
@ -256,7 +260,6 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
||||||
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
||||||
item.put("KOSTL",hsxminfo.getString("number"));//成本中心_成本中心
|
item.put("KOSTL",hsxminfo.getString("number"));//成本中心_成本中心
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// item.put("RSTGR", "014");//原因代码_原因码
|
// item.put("RSTGR", "014");//原因代码_原因码
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ public class AspAccountControler {
|
||||||
JSONArray companysJson = json_obj.getJSONArray("companys");
|
JSONArray companysJson = json_obj.getJSONArray("companys");
|
||||||
//处理科目分配
|
//处理科目分配
|
||||||
EsbUtils.handleAssignNew(companysJson, acctids, entityName);
|
EsbUtils.handleAssignNew(companysJson, acctids, entityName);
|
||||||
//处理科目在每个公司生成
|
//处理科目在每个公司生成 2211开头的科目统一在科目接口上设置税基和税码的核算维度
|
||||||
Map<String, DynamicObject> companyAcctMaps = handleAccountCompany(accountMaps,companysJson);
|
Map<String, DynamicObject> companyAcctMaps = handleAccountCompany(accountMaps,companysJson);
|
||||||
//处理每个公司下科目的核算维度和禁用状态
|
//处理每个公司下科目的核算维度和禁用状态
|
||||||
JSONArray asstacttypesJson = json_obj.getJSONArray("asstacttypes");
|
JSONArray asstacttypesJson = json_obj.getJSONArray("asstacttypes");
|
||||||
|
|
@ -390,10 +390,22 @@ public class AspAccountControler {
|
||||||
bbiso = dess[j];
|
bbiso = dess[j];
|
||||||
bbInfo = BusinessDataServiceHelper.loadSingleFromCache(bbName,new QFilter[]{new QFilter("number","=",bbiso)});
|
bbInfo = BusinessDataServiceHelper.loadSingleFromCache(bbName,new QFilter[]{new QFilter("number","=",bbiso)});
|
||||||
if(bbInfo != null){
|
if(bbInfo != null){
|
||||||
docbb.addNew().set("currency",bbInfo.getLong("id"));
|
docbb.addNew().set("currency",bbInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(olddo.getString("number").startsWith("2211")){
|
||||||
|
//2211开头的科目统一在科目接口上设置税基和税码的核算维度
|
||||||
|
DynamicObjectCollection dochswd = newAcctInfo.getDynamicObjectCollection("checkitementry");
|
||||||
|
DynamicObject itementryInfo = dochswd.addNew();
|
||||||
|
itementryInfo.set("asstactitem",getHsxmInfo("税基"));
|
||||||
|
itementryInfo.set("isdetail", true);//明细
|
||||||
|
itementryInfo.set("isrequire", false);//必录
|
||||||
|
DynamicObject itementryInfo1 = dochswd.addNew();
|
||||||
|
itementryInfo1.set("asstactitem",getHsxmInfo("税码"));
|
||||||
|
itementryInfo1.set("isdetail", true);//明细
|
||||||
|
itementryInfo1.set("isrequire", false);//必录
|
||||||
|
}
|
||||||
//损益类型
|
//损益类型
|
||||||
newAcctInfo.set("pltype", olddo.getString("pltype"));
|
newAcctInfo.set("pltype", olddo.getString("pltype"));
|
||||||
newAcctInfo.set("parent", olddo.getDynamicObject("parent"));
|
newAcctInfo.set("parent", olddo.getDynamicObject("parent"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue