32121
This commit is contained in:
parent
39fa8f8044
commit
d01fffc813
@ -30,6 +30,7 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
public override void AfterBarItemClick(AfterBarItemClickEventArgs e)
|
||||
{
|
||||
base.AfterBarItemClick(e);
|
||||
string tuiName = "";
|
||||
|
||||
{
|
||||
//备货组织操作备货组织的发货出库单跨组织下推
|
||||
@ -130,7 +131,8 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
dt = DBServiceHelper.ExecuteDynamicObject(this.Context, getSourceSql);
|
||||
if (dt != null || dt.Count > 0)
|
||||
{
|
||||
result = Invoke("PUR_PurchaseOrder", "PUR_ReceiveBill", tempFid.ToString(), "7cd93c259999489c97798063f2f7bd70", ref stockId);
|
||||
tuiName += "收料通知单 ";
|
||||
result = Invoke("PUR_PurchaseOrder", "PUR_ReceiveBill", tempFid.ToString(), "7cd93c259999489c97798063f2f7bd70", ref stockId,"收料通知单");
|
||||
}
|
||||
}
|
||||
if (result != null)
|
||||
@ -140,8 +142,8 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
//Logger.Error("推送采购入库单",jsonsheet,null);
|
||||
if (sheet != null)
|
||||
{
|
||||
|
||||
result = Invoke("PUR_ReceiveBill", "STK_InStock", sheet["id"].ToString(), "a1ff32276cd9469dad3bf2494366fa4f", ref stockId);
|
||||
tuiName += "采购入库单 ";
|
||||
result = Invoke("PUR_ReceiveBill", "STK_InStock", sheet["id"].ToString(), "a1ff32276cd9469dad3bf2494366fa4f", ref stockId,"采购入库单");
|
||||
//sheet = result.SuccessDataEnity.FirstOrDefault();
|
||||
//result = Invoke("PUR_ReceiveBill", "STK_InStock", sheet["id"].ToString(), "a1ff32276cd9469dad3bf2494366fa4f");
|
||||
}
|
||||
@ -192,7 +194,8 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
dt = DBServiceHelper.ExecuteDynamicObject(this.Context, getSourceSql);
|
||||
if (dt == null || dt.Count == 0)
|
||||
{
|
||||
result = Invoke("SAL_SaleOrder", "SAL_DELIVERYNOTICE", tempFid.ToString(), "193822715afc48aa9fa6d6beca7700ab", ref stockId);
|
||||
tuiName += "发货通知单 ";
|
||||
result = Invoke("SAL_SaleOrder", "SAL_DELIVERYNOTICE", tempFid.ToString(), "193822715afc48aa9fa6d6beca7700ab", ref stockId,"发货通知单");
|
||||
sheet = result.SuccessDataEnity.FirstOrDefault();
|
||||
tempFid = int.Parse(sheet["id"].ToString());
|
||||
//throw new KDBusinessException("", "没有上查关联的跨组织的采购订单:" + tablename);
|
||||
@ -219,14 +222,17 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
dt = DBServiceHelper.ExecuteDynamicObject(this.Context, getSourceSql);
|
||||
if (dt == null || dt.Count == 0)
|
||||
{
|
||||
result = Invoke("SAL_DELIVERYNOTICE", "SAL_OUTSTOCK", tempFid.ToString(), "ad0779a4685a43a08f08d2e42d7bf3e9", ref stockId);
|
||||
tuiName += "销售出库单 ";
|
||||
result = Invoke("SAL_DELIVERYNOTICE", "SAL_OUTSTOCK", tempFid.ToString(), "ad0779a4685a43a08f08d2e42d7bf3e9", ref stockId,"销售出库单");
|
||||
}
|
||||
//}
|
||||
//result = Invoke("SAL_SaleOrder", "SAL_DELIVERYNOTICE", tempFid.ToString(), "193822715afc48aa9fa6d6beca7700ab", ref stockId);
|
||||
//sheet = result.SuccessDataEnity.FirstOrDefault();
|
||||
|
||||
|
||||
this.View.ShowMessage("跨组织下推订单完成");
|
||||
if(tuiName!="")
|
||||
this.View.ShowMessage($@"跨组织下推 {tuiName}订单完成");
|
||||
else
|
||||
this.View.ShowMessage("没有符合条件的跨组织订单可以下推");
|
||||
|
||||
|
||||
}
|
||||
@ -475,7 +481,7 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
}
|
||||
|
||||
|
||||
private IOperationResult Invoke(string source, string target, string tempFid, string sargetBillTypeId, ref int stockId)
|
||||
private IOperationResult Invoke(string source, string target, string tempFid, string sargetBillTypeId, ref int stockId,string name="")
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -645,7 +651,7 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
|
||||
//result.IsSuccess = false;
|
||||
//this.View.ShowErrMessage("调用下推, 导致自动保存失败 原因:" + saveResult.ValidationErrors[0].Message.ToString());
|
||||
throw new KDBusinessException("", "未知原因导致自动保存失败原因:" + errorInfo);
|
||||
throw new KDBusinessException("", name+"保存失败原因:" + errorInfo);
|
||||
}
|
||||
result = saveResult;
|
||||
//this.View.ShowMessage("1");
|
||||
@ -657,14 +663,16 @@ namespace Pilot_KD_Parino.Sal_Order
|
||||
// 判断提交结果,如果失败,则内部会抛出错误,回滚代码
|
||||
if (submitResult.IsSuccess == false)
|
||||
{
|
||||
throw new KDBusinessException("", "未知原因导致自动提交失败!");
|
||||
var errorInfo = string.Join(";", submitResult.InteractionContext.SimpleMessage);
|
||||
throw new KDBusinessException("", name+"自动提交失败!" + errorInfo);
|
||||
}
|
||||
//设置审核参数
|
||||
IOperationResult auditResult = ServiceHelper.GetService<IAuditService>().Audit(this.Context, destFormMetadata.BusinessInfo, pkArray, OperateOption.Create());
|
||||
// 判断提交结果,如果失败,则内部会抛出错误,回滚代码
|
||||
if (auditResult.IsSuccess == false)
|
||||
{
|
||||
throw new KDBusinessException("", "未知原因导致自动审核失败!");
|
||||
var errorInfo = string.Join(";", auditResult.InteractionContext.SimpleMessage);
|
||||
throw new KDBusinessException("", name+"自动审核失败!" + errorInfo);
|
||||
}
|
||||
//显示下推后的单据
|
||||
//ShowPushResult("k0f9e182dbc5247fcabc9479ddb300fa3", convertResult, destObjs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user