Browse Source

Merge branch 'Agv分支2024-11-19' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into Agv分支2024-11-19

Agv分支2024-11-19
郑勃旭 4 months ago
parent
commit
c57359d751
  1. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs
  2. 327
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AgvJobs/DTOS/AgvDto.cs
  3. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs
  4. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs
  5. 146
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/AgvJobClient.cs
  6. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs
  7. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs
  8. 2
      build/src/docker/publish/conf/settings/appsettings.Development.json

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs

@ -29,7 +29,7 @@
///// </summary>
//[AllowAnonymous]
//[Route($"{BasedataConsts.RootPath}test")]
//public class TestService:ApplicationService
//public class TestService : ApplicationService
//{
// private readonly IServiceProvider _serviceProvider;
// private readonly IOptions<CycleOptions> _options;
@ -152,7 +152,7 @@
// [HttpPost("pushOutTaskCoating")]
// public async Task<AgvResultObject> PushOutTaskCoating(AgvRequest request)
// {
// var json=System.Text.Json.JsonSerializer.Serialize(request);
// var json = System.Text.Json.JsonSerializer.Serialize(request);
// _logger.LogInformation(json);
// AgvResultObject reusltObject = new AgvResultObject();
// reusltObject.Code = "0";

327
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AgvJobs/DTOS/AgvDto.cs

@ -6,189 +6,73 @@ using System.Text;
using System.Threading.Tasks;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// 海康调闻荫入参数
/// </summary>
public class AgvRequestDto
{
//[Display(Name = "请求编号")]
//public string ReqCode { set; get; }
[Display(Name = "明细")]
public List<AgvRequestDetailDto> Data { set; get; }
}
/// <summary>
/// 海康调闻荫入参数
/// </summary>
//public class AgvRequestOnlyJobHK
//{
// //[Display(Name = "请求编号")]
// //public string ReqCode { set; get; }
// [Display(Name = "明细")]
// public List<AgvRequestDetailDto> Data { set; get; }
//}
/// <summary>
/// 海康调闻荫入参明细
/// </summary>
public class AgvRequestDetailDto
{
[Display(Name = "任务类型")]
public string OrderType { set; get; }
[Display(Name = "任务编号")]
public string OrderNum { set; get; }
[Display(Name = "物料编号")]
public string MatCode { set; get; }
[Display(Name = "物料数量")]
public decimal MatQty { set; get; }
[Display(Name = "起始点")]
public string BeginPosition { set; get; }
[Display(Name = "终点")]
public string EndPosition { set; get; }
[Display(Name = "箱码")]
public string PakingCode { set; get; }
[Display(Name = "库存状态")]
public string State { set; get; }
[Display(Name = "批次属性07")]
public string BatchAttr07 { set; get; }
[Display(Name = "批次属性08")]
public string BatchAttr08 { set; get; }
[Display(Name = "批次属性09")]
public string BatchAttr09 { set; get; }
[Display(Name = "批次属性10")]
public string BatchAttr10 { set; get; }
[Display(Name = "批次属性11")]
public string BatchAttr11 { set; get; }
[Display(Name = "批次属性12")]
public string BatchAttr12 { set; get; }
[Display(Name = "批次属性13")]
public string BatchAttr13 { set; get; }
[Display(Name = "批次属性14")]
public string BatchAttr14 { set; get; }
[Display(Name = "批次属性15")]
public string BatchAttr15 { set; get; }
}
public class AgvRequestUnplannedDto
{
[Display(Name = "明细")]
public List<AgvRequestUnplannedDetailDto> Data { set; get; }
}
public class AgvRequestUnplannedDetailDto
{
[Display(Name = "任务类型")]
public string OrderType { set; get; }
[Display(Name = "任务编号")]
public string OrderNum { set; get; }
[Display(Name = "物料编号")]
public string MatCode { set; get; }
[Display(Name = "物料数量")]
public decimal MatQty { set; get; }
[Display(Name = "起始点")]
public string BeginPosition { set; get; }
[Display(Name = "终点")]
public string EndPosition { set; get; }
[Display(Name = "箱码")]
public string PakingCode { set; get; }
[Display(Name = "库存状态")]
public string State { set; get; }
[Display(Name = "批次属性07")]
public string BatchAttr07 { set; get; }
[Display(Name = "批次属性08")]
public string BatchAttr08 { set; get; }
[Display(Name = "批次属性09")]
public string BatchAttr09 { set; get; }
[Display(Name = "批次属性10")]
public string BatchAttr10 { set; get; }
[Display(Name = "批次属性11")]
public string BatchAttr11 { set; get; }
[Display(Name = "批次属性12")]
public string BatchAttr12 { set; get; }
[Display(Name = "批次属性13")]
public string BatchAttr13 { set; get; }
[Display(Name = "批次属性14")]
public string BatchAttr14 { set; get; }
[Display(Name = "批次属性15")]
public string BatchAttr15 { set; get; }
}
/// <summary>
/// 闻荫调海康入参
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class AgvRequest
{
/// <summary>
/// 任务类型
/// </summary>
[Newtonsoft.Json.JsonProperty("orderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("orderType")]
public string OrderType { get; set; }
/// <summary>
/// 任务编号
/// </summary>
[Newtonsoft.Json.JsonProperty("orderNum", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("orderNum")]
public string OrderNum { get; set; }
/// <summary>
/// 物料编号
/// </summary>
[Newtonsoft.Json.JsonProperty("matCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("matCode")]
public string MatCode { get; set; }
/// <summary>
/// 箱码
/// </summary>
[Newtonsoft.Json.JsonProperty("pakingCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("pakingCode")]
public string PakingCode { get; set; }
/// <summary>
/// 库存状态
/// </summary>
[Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("state")]
public string State { get; set; }
/// <summary>
/// 批次
/// </summary>
[Newtonsoft.Json.JsonProperty("batch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Batch { get; set; }
[System.Text.Json.Serialization.JsonPropertyName("batch")]
public string Batch { get; set; }
/// <summary>
/// 物料数量
/// </summary>
[Newtonsoft.Json.JsonProperty("matQty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("matQty")]
public decimal MatQty { get; set; }
/// <summary>
/// 来源工位
/// </summary>
[Newtonsoft.Json.JsonProperty("beginPosition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("beginPosition")]
public string BeginPosition { get; set; }
/// <summary>
/// 目标工位
/// </summary>
[Newtonsoft.Json.JsonProperty("endPosition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("endPosition")]
public string EndPosition { get; set; }
}
@ -199,19 +83,22 @@ public partial class AgvRequestBack
/// <summary>
/// 物料编号
/// </summary>
[Newtonsoft.Json.JsonProperty("matCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("matCode")]
public string MatCode { get; set; }
/// <summary>
/// 物料数量
/// </summary>
[Newtonsoft.Json.JsonProperty("returnQty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public decimal ReturnQty { get; set; }
[System.Text.Json.Serialization.JsonPropertyName("returnQty")]
public double ReturnQty { get; set; }
/// <summary>
/// 目标工位
/// </summary>
[Newtonsoft.Json.JsonProperty("endPosition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("endPosition")]
public string EndPosition { get; set; }
}
@ -222,84 +109,210 @@ public partial class AgvRequestUnplanned
/// <summary>
/// 批次
/// </summary>
[Newtonsoft.Json.JsonProperty("batch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("batch")]
public string Batch { get; set; }
/// <summary>
/// 箱码
/// </summary>
[Newtonsoft.Json.JsonProperty("pakingCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string PakingCode { get; set; }
[System.Text.Json.Serialization.JsonPropertyName("pakingCode")]
public string PakingCode { get; set; }
/// <summary>
/// 库存状态
/// </summary>
[Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string State { get; set; }
[System.Text.Json.Serialization.JsonPropertyName("state")]
public string State { get; set; }
/// <summary>
/// ERP储位
/// </summary>
[Newtonsoft.Json.JsonProperty("erpLocationCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("erpLocationCode")]
public string ErpLocationCode { get; set; }
/// <summary>
/// 任务类型
/// </summary>
[Newtonsoft.Json.JsonProperty("orderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("orderType")]
public string OrderType { get; set; }
/// <summary>
/// 任务编号
/// </summary>
[Newtonsoft.Json.JsonProperty("orderNum", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("orderNum")]
public string OrderNum { get; set; }
/// <summary>
/// 物料编号
/// </summary>
[Newtonsoft.Json.JsonProperty("matCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("matCode")]
public string MatCode { get; set; }
/// <summary>
/// 物料数量
/// </summary>
[Newtonsoft.Json.JsonProperty("matQty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("matQty")]
public decimal MatQty { get; set; }
/// <summary>
/// 来源工位
/// </summary>
[Newtonsoft.Json.JsonProperty("beginPosition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("beginPosition")]
public string BeginPosition { get; set; }
/// <summary>
/// 目标工位
/// </summary>
[Newtonsoft.Json.JsonProperty("endPosition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndPosition { get; set; }
[System.Text.Json.Serialization.JsonPropertyName("endPosition")]
public string EndPosition { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class AgvResultObject
{
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("code")]
public string Code { get; set; }
[Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("message")]
public string Message { get; set; }
[Newtonsoft.Json.JsonProperty("reqCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("reqCode")]
public string ReqCode { get; set; }
}
/// <summary>
/// 海康调闻荫入参数
/// </summary>
public class AgvRequestDto
{
//[Display(Name = "请求编号")]
//public string ReqCode { set; get; }
[Display(Name = "明细")]
public List<AgvRequestDetailDto> Data { set; get; }
}
/// <summary>
/// 海康调闻荫入参数
/// </summary>
//public class AgvRequestOnlyJobHK
//{
// //[Display(Name = "请求编号")]
// //public string ReqCode { set; get; }
// [Display(Name = "明细")]
// public List<AgvRequestDetailDto> Data { set; get; }
//}
/// <summary>
/// 海康调闻荫入参明细
/// </summary>
public class AgvRequestDetailDto
{
[Display(Name = "任务类型")]
public string OrderType { set; get; }
[Display(Name = "任务编号")]
public string OrderNum { set; get; }
[Display(Name = "物料编号")]
public string MatCode { set; get; }
[Display(Name = "物料数量")]
public decimal MatQty { set; get; }
[Display(Name = "起始点")]
public string BeginPosition { set; get; }
[Display(Name = "终点")]
public string EndPosition { set; get; }
[Display(Name = "箱码")]
public string PakingCode { set; get; }
[Display(Name = "库存状态")]
public string State { set; get; }
[Display(Name = "批次属性07")]
public string BatchAttr07 { set; get; }
[Display(Name = "批次属性08")]
public string BatchAttr08 { set; get; }
[Display(Name = "批次属性09")]
public string BatchAttr09 { set; get; }
[Display(Name = "批次属性10")]
public string BatchAttr10 { set; get; }
[Display(Name = "批次属性11")]
public string BatchAttr11 { set; get; }
[Display(Name = "批次属性12")]
public string BatchAttr12 { set; get; }
[Display(Name = "批次属性13")]
public string BatchAttr13 { set; get; }
[Display(Name = "批次属性14")]
public string BatchAttr14 { set; get; }
[Display(Name = "批次属性15")]
public string BatchAttr15 { set; get; }
}
public class AgvRequestUnplannedDto
{
[Display(Name = "明细")]
public List<AgvRequestUnplannedDetailDto> Data { set; get; }
}
public class AgvRequestUnplannedDetailDto
{
[Display(Name = "任务类型")]
public string OrderType { set; get; }
[Display(Name = "任务编号")]
public string OrderNum { set; get; }
[Display(Name = "物料编号")]
public string MatCode { set; get; }
[Display(Name = "物料数量")]
public decimal MatQty { set; get; }
[Display(Name = "起始点")]
public string BeginPosition { set; get; }
[Display(Name = "终点")]
public string EndPosition { set; get; }
[Display(Name = "箱码")]
public string PakingCode { set; get; }
[Display(Name = "库存状态")]
public string State { set; get; }
[Display(Name = "批次属性07")]
public string BatchAttr07 { set; get; }
[Display(Name = "批次属性08")]
public string BatchAttr08 { set; get; }
[Display(Name = "批次属性09")]
public string BatchAttr09 { set; get; }
[Display(Name = "批次属性10")]
public string BatchAttr10 { set; get; }
[Display(Name = "批次属性11")]
public string BatchAttr11 { set; get; }
[Display(Name = "批次属性12")]
public string BatchAttr12 { set; get; }
[Display(Name = "批次属性13")]
public string BatchAttr13 { set; get; }
[Display(Name = "批次属性14")]
public string BatchAttr14 { set; get; }
[Display(Name = "批次属性15")]
public string BatchAttr15 { set; get; }
}

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs

@ -1216,6 +1216,9 @@ public class CoatingIssueJobAppService
request.OrderType = ((int)EnumJobType.CoatingIssueJob).ToString();
request.BeginPosition = beginPosition;
request.EndPosition = endPosition;
request.State = "0";
request.PakingCode = !string.IsNullOrEmpty(first.HandledFromPackingCode) ? first.HandledFromPackingCode : string.Empty;
request.Batch = "";
var httpclient = _httpClientFactory.CreateClient();
_agvOptions.Value.Address = string.IsNullOrEmpty(_agvOptions.Value.Address)

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs

@ -1170,6 +1170,11 @@ public class KittingIssueJobAppService
request.MatCode = first.ItemCode;
request.MatQty = first.HandledToQty;
request.OrderNum = job.Number;
request.State = "0";
request.PakingCode = !string.IsNullOrEmpty(first.HandledFromPackingCode)?first.HandledFromPackingCode:string.Empty;
request.Batch = "";
request.OrderType = ((int)EnumJobType.KittingIssueJob).ToString();
request.BeginPosition = beginPosition;
request.EndPosition = endPosition;

146
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/AgvJobClient.cs

@ -1,6 +1,6 @@
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
// Generated using the NSwag toolchain v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------
@ -8,6 +8,7 @@
#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword."
#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?'
#pragma warning disable 612 // Disable "CS0612 '...' is obsolete"
#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null"
#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ...
#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..."
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
@ -15,14 +16,14 @@
#pragma warning disable 8603 // Disable "CS8603 Possible null reference return"
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable CS8765 // Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes).
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy;
namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy
{
using Win_in.Sfs.Wms.Store.Application.Contracts;
using System = global::System;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using System = global::System;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class AgvJobClient
{
#pragma warning disable 8618
@ -30,47 +31,53 @@ using System = global::System;
#pragma warning restore 8618
private System.Net.Http.HttpClient _httpClient;
private static System.Lazy<Newtonsoft.Json.JsonSerializerSettings> _settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(CreateSerializerSettings, true);
private static System.Lazy<System.Text.Json.JsonSerializerOptions> _settings = new System.Lazy<System.Text.Json.JsonSerializerOptions>(CreateSerializerSettings, true);
private System.Text.Json.JsonSerializerOptions _instanceSettings;
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public AgvJobClient(string baseUrl, System.Net.Http.HttpClient httpClient, string path)
public AgvJobClient(string baseUrl, System.Net.Http.HttpClient httpClient,string path)
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
{
_path = path;
BaseUrl = baseUrl;
_httpClient = httpClient;
_path= path;
Initialize();
}
private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
private static System.Text.Json.JsonSerializerOptions CreateSerializerSettings()
{
var settings = new Newtonsoft.Json.JsonSerializerSettings();
var settings = new System.Text.Json.JsonSerializerOptions();
UpdateJsonSerializerSettings(settings);
return settings;
}
public string BaseUrl
private string _path;
public string Path
{
get { return _baseUrl; }
get { return _path; }
set
{
_baseUrl = value;
if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/"))
_baseUrl += '/';
_path = value;
}
}
private string _path;
public string Path
public string BaseUrl
{
get { return _path; }
get { return _baseUrl; }
set
{
_path = value;
_baseUrl = value;
if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/"))
_baseUrl += '/';
}
}
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
protected System.Text.Json.JsonSerializerOptions JsonSerializerSettings { get { return _instanceSettings ?? _settings.Value; } }
static partial void UpdateJsonSerializerSettings(System.Text.Json.JsonSerializerOptions settings);
static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings);
partial void Initialize();
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url);
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder);
@ -94,12 +101,12 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -236,12 +243,12 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -378,12 +385,12 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -520,12 +527,15 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -662,12 +672,12 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -804,12 +814,12 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -946,12 +956,12 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -1088,12 +1098,12 @@ using System = global::System;
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings);
var content_ = new System.Net.Http.ByteArrayContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
@ -1239,10 +1249,10 @@ using System = global::System;
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseText, JsonSerializerSettings);
var typedBody = System.Text.Json.JsonSerializer.Deserialize<T>(responseText, JsonSerializerSettings);
return new ObjectResponseResult<T>(typedBody, responseText);
}
catch (Newtonsoft.Json.JsonException exception)
catch (System.Text.Json.JsonException exception)
{
var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception);
@ -1253,15 +1263,12 @@ using System = global::System;
try
{
using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
using (var streamReader = new System.IO.StreamReader(responseStream))
using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
{
var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
var typedBody = serializer.Deserialize<T>(jsonTextReader);
var typedBody = await System.Text.Json.JsonSerializer.DeserializeAsync<T>(responseStream, JsonSerializerSettings, cancellationToken).ConfigureAwait(false);
return new ObjectResponseResult<T>(typedBody, string.Empty);
}
}
catch (Newtonsoft.Json.JsonException exception)
catch (System.Text.Json.JsonException exception)
{
var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception);
@ -1324,41 +1331,44 @@ using System = global::System;
}
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RemoteServiceErrorInfo
{
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("code")]
public string Code { get; set; }
[Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("message")]
public string Message { get; set; }
[Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("details")]
public string Details { get; set; }
[Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("data")]
public System.Collections.Generic.IDictionary<string, object> Data { get; set; }
[Newtonsoft.Json.JsonProperty("validationErrors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("validationErrors")]
public System.Collections.Generic.ICollection<RemoteServiceValidationErrorInfo> ValidationErrors { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RemoteServiceErrorResponse
{
[Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("error")]
public RemoteServiceErrorInfo Error { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RemoteServiceValidationErrorInfo
{
[Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("message")]
public string Message { get; set; }
[Newtonsoft.Json.JsonProperty("members", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.Text.Json.Serialization.JsonPropertyName("members")]
public System.Collections.Generic.ICollection<string> Members { get; set; }
}
@ -1367,7 +1377,7 @@ using System = global::System;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ApiException : System.Exception
{
public int StatusCode { get; private set; }
@ -1390,7 +1400,7 @@ using System = global::System;
}
}
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ApiException<TResult> : ApiException
{
public TResult Result { get; private set; }
@ -1402,7 +1412,7 @@ using System = global::System;
}
}
}
#pragma warning restore 108
#pragma warning restore 114

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs

@ -27,6 +27,7 @@ using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application;
using System.Text.Json;
using Win_in.Sfs.Shared.Event;
using DocumentFormat.OpenXml.Bibliography;
namespace Win_in.Sfs.Wms.Store.Application;
@ -850,7 +851,9 @@ public class UnplannedIssueJobAppService
request.BeginPosition = detail.HandledFromLocationCode;
request.EndPosition = detail.HandledFromLocationCode;
request.OrderType = job.UnplannedIssueType == EnumUnplannedIssueType.Raw ? ((int)EnumJobType.UnplannedIssueJobHasPacking).ToString() :((int)EnumJobType.UnplannedIssueJobNoPacking).ToString(); ;
request.State = "0";
request.PakingCode = !string.IsNullOrEmpty(detail.HandledPackingCode) ? detail.HandledPackingCode : string.Empty;
request.Batch = "";
var httpclient = _httpClientFactory.CreateClient();
_agvOptions.Value.Address = string.IsNullOrEmpty(_agvOptions.Value.Address)
? "http://7e42682n64.goho.co:21171/"

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs

@ -479,7 +479,9 @@ public class UnplannedReceiptJobAppService
request.EndPosition = detail.HandledToLocationCode;
request.OrderType = job.UnplannedReceiptType == EnumUnplannedReceiptType.Raw ? ((int)EnumJobType.UnplannedReceiptJobHasPacking).ToString() : ((int)EnumJobType.UnplannedReceiptJobNoPacking).ToString();
request.State = "0";
request.PakingCode = !string.IsNullOrEmpty(detail.HandledPackingCode) ? detail.HandledPackingCode : string.Empty;
request.Batch = "";
var httpclient = _httpClientFactory.CreateClient();
_agvOptions.Value.Address = string.IsNullOrEmpty(_agvOptions.Value.Address)
? "http://7e42682n64.goho.co:21171/"

2
build/src/docker/publish/conf/settings/appsettings.Development.json

@ -15,7 +15,7 @@
"AgvOptions": {
"Address": "http://dev.ccwin-in.com:60084/api/basedata/test/",
"Address": "http://10.164.233.34:9192/wms/api/RestJsonService/",
//
"UserName": "",
//

Loading…
Cancel
Save