232
This commit is contained in:
parent
5ac1c727e2
commit
39fa8f8044
@ -116,22 +116,36 @@ namespace Pilot_KD_Parino.Sal_Order
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//先判断采购订单是否有采购入库单或者收料单
|
||||||
|
getSourceSql = $@"/*dialect*/SELECT FSTABLENAME,FSBILLID,FENTRYID FROM dbo.T_PUR_RECEIVEENTRY_LK
|
||||||
|
WHERE FSBILLID= {tempFid}";
|
||||||
|
dt = DBServiceHelper.ExecuteDynamicObject(this.Context, getSourceSql);
|
||||||
int stockId = 0;
|
int stockId = 0;
|
||||||
IOperationResult result = Invoke("PUR_PurchaseOrder", "PUR_ReceiveBill", tempFid.ToString(), "7cd93c259999489c97798063f2f7bd70", ref stockId);
|
IOperationResult result = null;
|
||||||
|
DynamicObject sheet = null;
|
||||||
|
if (dt == null || dt.Count == 0)
|
||||||
var sheet = result.SuccessDataEnity.FirstOrDefault();
|
|
||||||
string jsonsheet = JsonHelper.ToJson(sheet);
|
|
||||||
//Logger.Error("推送采购入库单",jsonsheet,null);
|
|
||||||
if (sheet != null)
|
|
||||||
{
|
{
|
||||||
|
getSourceSql = $@"/*dialect*/SELECT FSTABLENAME,FSBILLID,FENTRYID FROM dbo.T_STK_INSTOCKENTRY_LK
|
||||||
result = Invoke("PUR_ReceiveBill", "STK_InStock", sheet["id"].ToString(), "a1ff32276cd9469dad3bf2494366fa4f", ref stockId);
|
WHERE FSBILLID= {tempFid}";
|
||||||
//sheet = result.SuccessDataEnity.FirstOrDefault();
|
dt = DBServiceHelper.ExecuteDynamicObject(this.Context, getSourceSql);
|
||||||
//result = Invoke("PUR_ReceiveBill", "STK_InStock", sheet["id"].ToString(), "a1ff32276cd9469dad3bf2494366fa4f");
|
if (dt != null || dt.Count > 0)
|
||||||
|
{
|
||||||
|
result = Invoke("PUR_PurchaseOrder", "PUR_ReceiveBill", tempFid.ToString(), "7cd93c259999489c97798063f2f7bd70", ref stockId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
sheet = result.SuccessDataEnity.FirstOrDefault();
|
||||||
|
//string jsonsheet = JsonHelper.ToJson(sheet);
|
||||||
|
//Logger.Error("推送采购入库单",jsonsheet,null);
|
||||||
|
if (sheet != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
//找到最开始的销售订单
|
//找到最开始的销售订单
|
||||||
for (int kk = 0; kk < 6 && tablename.ToUpper() != "T_SAL_ORDERENTRY" && xiaoFid == 0; kk++)
|
for (int kk = 0; kk < 6 && tablename.ToUpper() != "T_SAL_ORDERENTRY" && xiaoFid == 0; kk++)
|
||||||
{
|
{
|
||||||
@ -200,7 +214,13 @@ namespace Pilot_KD_Parino.Sal_Order
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
getSourceSql = $@"/*dialect*/SELECT FSTABLENAME,FSBILLID,FENTRYID FROM dbo.T_SAL_OUTSTOCKENTRY_LK
|
||||||
|
WHERE FSBILLID= {tempFid}";
|
||||||
|
dt = DBServiceHelper.ExecuteDynamicObject(this.Context, getSourceSql);
|
||||||
|
if (dt == null || dt.Count == 0)
|
||||||
|
{
|
||||||
result = Invoke("SAL_DELIVERYNOTICE", "SAL_OUTSTOCK", tempFid.ToString(), "ad0779a4685a43a08f08d2e42d7bf3e9", ref stockId);
|
result = Invoke("SAL_DELIVERYNOTICE", "SAL_OUTSTOCK", tempFid.ToString(), "ad0779a4685a43a08f08d2e42d7bf3e9", ref stockId);
|
||||||
|
}
|
||||||
//}
|
//}
|
||||||
//result = Invoke("SAL_SaleOrder", "SAL_DELIVERYNOTICE", tempFid.ToString(), "193822715afc48aa9fa6d6beca7700ab", ref stockId);
|
//result = Invoke("SAL_SaleOrder", "SAL_DELIVERYNOTICE", tempFid.ToString(), "193822715afc48aa9fa6d6beca7700ab", ref stockId);
|
||||||
//sheet = result.SuccessDataEnity.FirstOrDefault();
|
//sheet = result.SuccessDataEnity.FirstOrDefault();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user