推送SAP报错
This commit is contained in:
parent
67e5129e58
commit
62507c31b0
|
|
@ -75,7 +75,7 @@ public class TransdownbillOperation extends AbstractOperationServicePlugIn imple
|
|||
ResponseData respdata;
|
||||
for (int i = 0; i < dos.length; i++) {
|
||||
prinfo = BusinessDataServiceHelper.loadSingle(dos[i].getPkValue(), dos[i].getDataEntityType().getName());
|
||||
if(prinfo.getBoolean("shjh_needvoucher") && !prinfo.getBoolean("shjh_sendsap")){
|
||||
if(!prinfo.getBoolean("shjh_sendsap")){
|
||||
//如果预提记账处理单需要生成凭证且未推送sap的才推送sap
|
||||
sapReturnData = sendBlueVoucher(prinfo);//蓝单
|
||||
if(sapReturnData != null && "0".equals(sapReturnData.getString("code"))){
|
||||
|
|
@ -101,15 +101,15 @@ public class TransdownbillOperation extends AbstractOperationServicePlugIn imple
|
|||
//SAP预提收益凭证接口入参组装和调用
|
||||
JSONObject IS_HEADER = new JSONObject();//抬头
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//日期格式化工具
|
||||
String companyCode = prinfo.getDynamicObject("org").getString("number");
|
||||
String companyCode = prinfo.getDynamicObject("company").getString("number");
|
||||
IS_HEADER.put("BUKRS",companyCode);//公司代码
|
||||
IS_HEADER.put("BLART","SA");//凭证类型-总账类凭证
|
||||
IS_HEADER.put("BLDAT",sdf.format(prinfo.getDate("bizdate")));//凭证日期-业务日期
|
||||
IS_HEADER.put("BUDAT",sdf.format(prinfo.getDate("expiredate")));//过账日期-预提日期
|
||||
IS_HEADER.put("BUDAT",sdf.format(prinfo.getDate("transbillbookdate")));//过账日期-预提日期
|
||||
String isoCode = prinfo.getDynamicObject("currency").getString("number");
|
||||
IS_HEADER.put("WAERS", JhzjUtils.getCurrencyCode(isoCode));//币种
|
||||
IS_HEADER.put("XBLNR",prinfo.getString("billno"));//参考凭证号-单据编号 固定长度16位
|
||||
IS_HEADER.put("BKTXT",prinfo.getString("productname"));//凭证抬头文本 产品名称
|
||||
//IS_HEADER.put("BKTXT",prinfo.getString("productname"));//凭证抬头文本 产品名称
|
||||
//添加用户名过滤条件-操作审核按钮的用户(OA用户名)
|
||||
DynamicObject userinfo = BusinessDataServiceHelper.loadSingleFromCache(RequestContext.get().getCurrUserId(), userName);
|
||||
String oauser = userinfo.getString("shjh_oauser");
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class TransupbillOperation extends AbstractOperationServicePlugIn impleme
|
|||
ResponseData respdata;
|
||||
for (int i = 0; i < dos.length; i++) {
|
||||
prinfo = BusinessDataServiceHelper.loadSingle(dos[i].getPkValue(), dos[i].getDataEntityType().getName());
|
||||
if(prinfo.getBoolean("shjh_needvoucher") && !prinfo.getBoolean("shjh_sendsap")){
|
||||
if(!prinfo.getBoolean("shjh_sendsap")){
|
||||
//如果预提记账处理单需要生成凭证且未推送sap的才推送sap
|
||||
sapReturnData = sendBlueVoucher(prinfo);//蓝单
|
||||
if(sapReturnData != null && "0".equals(sapReturnData.getString("code"))){
|
||||
|
|
@ -101,15 +101,15 @@ public class TransupbillOperation extends AbstractOperationServicePlugIn impleme
|
|||
//SAP预提收益凭证接口入参组装和调用
|
||||
JSONObject IS_HEADER = new JSONObject();//抬头
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//日期格式化工具
|
||||
String companyCode = prinfo.getDynamicObject("org").getString("number");
|
||||
String companyCode = prinfo.getDynamicObject("company").getString("number");
|
||||
IS_HEADER.put("BUKRS",companyCode);//公司代码
|
||||
IS_HEADER.put("BLART","SA");//凭证类型-总账类凭证
|
||||
IS_HEADER.put("BLDAT",sdf.format(prinfo.getDate("bizdate")));//凭证日期-业务日期
|
||||
IS_HEADER.put("BUDAT",sdf.format(prinfo.getDate("expiredate")));//过账日期-预提日期
|
||||
IS_HEADER.put("BUDAT",sdf.format(prinfo.getDate("transbillbookdate")));//过账日期-预提日期
|
||||
String isoCode = prinfo.getDynamicObject("currency").getString("number");
|
||||
IS_HEADER.put("WAERS", JhzjUtils.getCurrencyCode(isoCode));//币种
|
||||
IS_HEADER.put("XBLNR",prinfo.getString("billno"));//参考凭证号-单据编号 固定长度16位
|
||||
IS_HEADER.put("BKTXT",prinfo.getString("productname"));//凭证抬头文本 产品名称
|
||||
//IS_HEADER.put("BKTXT",prinfo.getString("productname"));//凭证抬头文本 产品名称
|
||||
//添加用户名过滤条件-操作审核按钮的用户(OA用户名)
|
||||
DynamicObject userinfo = BusinessDataServiceHelper.loadSingleFromCache(RequestContext.get().getCurrUserId(), userName);
|
||||
String oauser = userinfo.getString("shjh_oauser");
|
||||
|
|
|
|||
Loading…
Reference in New Issue