1111
This commit is contained in:
@@ -9,6 +9,6 @@ namespace MyCode.Project.Services.IServices
|
||||
{
|
||||
public interface IOrderPushService
|
||||
{
|
||||
void PushOrderToKingDee(string id);
|
||||
string PushOrderToKingDee(string id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +158,9 @@ namespace MyCode.Project.Services.Implementation
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void PushOrderToKingDee(string id)
|
||||
public string PushOrderToKingDee(string id)
|
||||
{
|
||||
string result2 = "";
|
||||
var orderHead = _pushKingDeeOrderRepository.Queryable().Where(t => id == t.Id.ToString()).First();
|
||||
if (orderHead.Status != 0)
|
||||
{
|
||||
@@ -184,6 +185,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
if (param.FSYNCHRONIZEKINGDEE == "1")
|
||||
{
|
||||
var response = PushKingdeeSaleOrder(orderHead, param);
|
||||
result2 = JsonHelper.ToJson(response);
|
||||
// 如果保存成功,需要更新源单数据
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
@@ -196,12 +198,14 @@ namespace MyCode.Project.Services.Implementation
|
||||
{
|
||||
//wms
|
||||
var result = PushWMSSaleOrder(orderHead, param);
|
||||
result2 = JsonHelper.ToJson(result);
|
||||
if (result.Code == 200)
|
||||
{
|
||||
orderHead.Status = 2;
|
||||
_pushKingDeeOrderRepository.Update(orderHead);
|
||||
}
|
||||
}
|
||||
return result2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -165,19 +165,22 @@ namespace MyCode.Project.Services.Implementation
|
||||
var type = UnityHelper.GetUnityContainer().Resolve(Type.GetType(process.FuncClass));
|
||||
|
||||
MethodInfo method = type.GetType().GetMethod(process.FuncMethod);
|
||||
object result = new object();
|
||||
|
||||
if (!string.IsNullOrEmpty(process.ParamInfo))
|
||||
{
|
||||
method.Invoke(type, new object[] { process.ParamInfo });
|
||||
result= method.Invoke(type, new object[] { process.ParamInfo });
|
||||
}
|
||||
else
|
||||
{
|
||||
method.Invoke(type, new object[] { });
|
||||
result= method.Invoke(type, new object[] { });
|
||||
}
|
||||
|
||||
if (result == null)
|
||||
result = "";
|
||||
process.FuncStatus = (int)WorkProcessStatus.Complete;
|
||||
process.ExecuteTime = DateTime.Now;
|
||||
process.ExceptionInfo = string.Empty;
|
||||
process.Result= result.ToString();
|
||||
_SysWorkProcessRepository.Update(process);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user