|
|
@ -152,30 +152,30 @@ namespace DS.WMS.MainApi.Controllers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await _invokeService.GetOpenPrintTemplateList(req);
|
|
|
|
return await _invokeService.GetOpenPrintTemplateList(req);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
///// <summary>
|
|
|
|
/// 获取Json本地打印信息
|
|
|
|
///// 获取Json本地打印信息
|
|
|
|
/// </summary>
|
|
|
|
///// </summary>
|
|
|
|
/// <param name="req"></param>
|
|
|
|
///// <param name="req"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
///// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
//[HttpPost]
|
|
|
|
[Route("GetJsonPrintInfoAsync")]
|
|
|
|
//[Route("GetJsonPrintInfoAsync")]
|
|
|
|
public async Task<DataResult<string>> GetJsonPrintInfoAsync([FromBody] OpenJsonPrintReq req)
|
|
|
|
//public async Task<DataResult<string>> GetJsonPrintInfoAsync([FromBody] OpenJsonPrintReq req)
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
|
|
var url = AppSetting.Configuration["PrintService:LocalPrintUrl"];
|
|
|
|
// var url = AppSetting.Configuration["PrintService:LocalPrintUrl"];
|
|
|
|
if (url.IsNull())
|
|
|
|
// if (url.IsNull())
|
|
|
|
return await Task.FromResult(DataResult<string>.Failed("未配置本地打印地址"));
|
|
|
|
// return await Task.FromResult(DataResult<string>.Failed("未配置本地打印地址"));
|
|
|
|
|
|
|
|
|
|
|
|
var res = await RequestHelper.PostJosnAsyncNoHeaders(url, req.ToJson());
|
|
|
|
// var res = await RequestHelper.PostJosnAsyncNoHeaders(url, req.ToJson());
|
|
|
|
var result = JsonConvert.DeserializeObject<DataResult<string>>(res);
|
|
|
|
// var result = JsonConvert.DeserializeObject<DataResult<string>>(res);
|
|
|
|
if (result.Succeeded)
|
|
|
|
// if (result.Succeeded)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
return await Task.FromResult(DataResult<string>.Success(result.Message));
|
|
|
|
// return await Task.FromResult(DataResult<string>.Success(result.Message));
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
else
|
|
|
|
// else
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
return await Task.FromResult(DataResult<string>.Failed(result.Message));
|
|
|
|
// return await Task.FromResult(DataResult<string>.Failed(result.Message));
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|