金蝶凭证审核操作推sap
This commit is contained in:
parent
e5f04e389d
commit
a15ab9e97e
|
|
@ -39,6 +39,7 @@ public class VoucherAuditOperation extends AbstractOperationServicePlugIn implem
|
|||
operateOption.setVariableValue(OperateOptionConst.STRICTVALIDATION, String.valueOf(true));
|
||||
//同一个用户在多个界面操作同一张,也不允许操作
|
||||
operateOption.setVariableValue(OperateOptionConst.MUTEX_ISSTRICT, String.valueOf(true));
|
||||
OperationResult operResult;//操作执行结果
|
||||
for (DynamicObject pzinfo : dos) {
|
||||
//重新加载凭证对象
|
||||
pzinfo = BusinessDataServiceHelper.loadSingle(pzinfo.getPkValue(), pzinfo.getDataEntityType().getName(), "id,billno,sourcebill,sourcebilltype");
|
||||
|
|
@ -46,21 +47,34 @@ public class VoucherAuditOperation extends AbstractOperationServicePlugIn implem
|
|||
sourcebilltype = pzinfo.getDynamicObject("sourcebilltype").getString("number");
|
||||
if(recbillName.equals(sourcebilltype)){
|
||||
bizbillinfo = BusinessDataServiceHelper.loadSingle(sourcebillid,recbillName);
|
||||
//TODO 执行收款单推送sap操作,并反馈操作执行结果
|
||||
//执行收款单推送sap操作,并反馈操作执行结果
|
||||
operResult = OperationServiceHelper.executeOperate("pushvoucher", recbillName, new DynamicObject[]{bizbillinfo}, operateOption);
|
||||
// 可以根据需要处理 operationResult,例如检查是否成功、获取返回值等
|
||||
if (operResult.isSuccess()) {
|
||||
logger.info("执行收款单 pushvoucher 成功,单据编号:" + bizbillinfo.getString("billno"));
|
||||
} else {
|
||||
logger.error(operResult.getMessage());
|
||||
}
|
||||
}else if(paybillName.equals(sourcebilltype)){
|
||||
bizbillinfo = BusinessDataServiceHelper.loadSingle(sourcebillid,paybillName);
|
||||
//TODO 执行付款单推送sap操作,并反馈操作执行结果
|
||||
DynamicObject[] billArray = new DynamicObject[]{bizbillinfo};
|
||||
OperationResult operationResult = OperationServiceHelper.executeOperate("pushsap", paybillName, billArray, operateOption);
|
||||
//执行付款单推送sap操作,并反馈操作执行结果
|
||||
operResult = OperationServiceHelper.executeOperate("pushsap", paybillName, new DynamicObject[]{bizbillinfo}, operateOption);
|
||||
// 可以根据需要处理 operationResult,例如检查是否成功、获取返回值等
|
||||
if (operationResult.isSuccess()) {
|
||||
logger.info("执行 pushsap 成功,单据编号:" + bizbillinfo.getPkValue());
|
||||
if (operResult.isSuccess()) {
|
||||
logger.info("执行付款单 pushsap 成功,单据编号:" + bizbillinfo.getString("billno"));
|
||||
} else {
|
||||
logger.error(operationResult.getMessage());
|
||||
logger.error(operResult.getMessage());
|
||||
}
|
||||
}else if(intbillName.equals(sourcebilltype)){
|
||||
bizbillinfo = BusinessDataServiceHelper.loadSingle(sourcebillid,intbillName);
|
||||
//TODO 执行预提记账处理单推送sap操作,并反馈操作执行结果
|
||||
//执行预提记账处理单推送sap操作,并反馈操作执行结果
|
||||
operResult = OperationServiceHelper.executeOperate("sendvoucher", intbillName, new DynamicObject[]{bizbillinfo}, operateOption);
|
||||
// 可以根据需要处理 operationResult,例如检查是否成功、获取返回值等
|
||||
if (operResult.isSuccess()) {
|
||||
logger.info("执行预提记账处理单 sendvoucher 成功,单据编号:" + bizbillinfo.getString("billno"));
|
||||
} else {
|
||||
logger.error(operResult.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue