|
|
|
|
@ -30,8 +30,6 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
List<Dictionary<string, object>> bomList = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(inParam));
|
|
|
|
|
int bomCount = bomList.Count;
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
if (bomCount > 0)
|
|
|
|
|
{
|
|
|
|
|
dt_pp079_req req = new dt_pp079_req()
|
|
|
|
|
@ -91,16 +89,24 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
req.HEAD[i].ITEM[0] = item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
si_pp079_mcs_senderClient senderClient = new si_pp079_mcs_senderClient();
|
|
|
|
|
senderClient.ClientCredentials.UserName.UserName = AppSettingsHelper.GetAppSettingVal("Sap_Upload_UserName");
|
|
|
|
|
senderClient.ClientCredentials.UserName.Password = AppSettingsHelper.GetAppSettingVal("Sap_Password");
|
|
|
|
|
|
|
|
|
|
dt_pp079_resHEAD[] resData = senderClient.si_pp079_mcs_sender(req);
|
|
|
|
|
apiResult.Data = 1;
|
|
|
|
|
}, apiResult, Request, req);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
apiResult.Data = -1;
|
|
|
|
|
}, apiResult, Request, inParam);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 通用生产版本上载
|
|
|
|
|
@ -114,8 +120,6 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
List<Dictionary<string, object>> productList = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(inParam));
|
|
|
|
|
int productCount = productList.Count;
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
if (productCount > 0)
|
|
|
|
|
{
|
|
|
|
|
dt_pp080_req req = new dt_pp080_req()
|
|
|
|
|
@ -153,16 +157,24 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
req.HEAD[i] = head;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
si_pp080_mcs_senderClient senderClient = new si_pp080_mcs_senderClient();
|
|
|
|
|
senderClient.ClientCredentials.UserName.UserName = AppSettingsHelper.GetAppSettingVal("Sap_Upload_UserName");
|
|
|
|
|
senderClient.ClientCredentials.UserName.Password = AppSettingsHelper.GetAppSettingVal("Sap_Password");
|
|
|
|
|
|
|
|
|
|
dt_pp080_resHEAD[] resData = senderClient.si_pp080_mcs_sender(req);
|
|
|
|
|
apiResult.Data = 1;
|
|
|
|
|
}, apiResult, Request, req);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
apiResult.Data = -1;
|
|
|
|
|
}, apiResult, Request, inParam);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 物料上载
|
|
|
|
|
@ -176,8 +188,6 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
List<Dictionary<string, object>> viewList = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(inParam));
|
|
|
|
|
int viewCount = viewList.Count;
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
if (viewCount > 0)
|
|
|
|
|
{
|
|
|
|
|
dt_mm104_req req = new dt_mm104_req()
|
|
|
|
|
@ -318,14 +328,24 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
req.DATA[i] = data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
si_mm104_mcs_senderClient senderClient = new si_mm104_mcs_senderClient();
|
|
|
|
|
senderClient.ClientCredentials.UserName.UserName = AppSettingsHelper.GetAppSettingVal("Sap_Upload_UserName");
|
|
|
|
|
senderClient.ClientCredentials.UserName.Password = AppSettingsHelper.GetAppSettingVal("Sap_Password");
|
|
|
|
|
|
|
|
|
|
dt_mm104_res resData = senderClient.si_mm104_mcs_sender(req);
|
|
|
|
|
apiResult.Data = 1;
|
|
|
|
|
}, apiResult, Request, req);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
apiResult.Data = -1;
|
|
|
|
|
}, apiResult, Request, inParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|