diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs
index 3842deec2..028ad78ac 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs
@@ -1,72 +1,587 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.Extensions.Options;
-using StackExchange.Redis;
-using Volo.Abp.Application.Services;
-using Win_in.Sfs.Wms.DataExchange.Domain;
-using Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent;
-using static Volo.Abp.Identity.Settings.IdentitySettingNames;
-
-namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Client;
-public class WebServiceAppService : IReader
+//----------------------
+//
+// Generated using the NSwag toolchain v14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
+//
+//----------------------
+
+#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended."
+#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 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?'"
+#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
+#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).
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
{
- private readonly IHttpClientFactory _httpClientFactory;
- private readonly IOptions _options;
+ using System = global::System;
+
+ [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Client
+ {
+#pragma warning disable 8618
+ private string _baseUrl;
+#pragma warning restore 8618
+
+ private System.Net.Http.HttpClient _httpClient;
+ private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true);
+
+#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
+ public Client(string baseUrl, System.Net.Http.HttpClient httpClient)
+#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
+ {
+ BaseUrl = baseUrl;
+ _httpClient = httpClient;
+ }
+
+ private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
+ {
+ var settings = new Newtonsoft.Json.JsonSerializerSettings();
+ UpdateJsonSerializerSettings(settings);
+ return settings;
+ }
+
+ public string BaseUrl
+ {
+ get { return _baseUrl; }
+ set
+ {
+ _baseUrl = value;
+ if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/"))
+ _baseUrl += '/';
+ }
+ }
+
+ protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
+
+ static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings);
+
+ 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);
+ partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response);
+
+ ///
+ /// 生命周期操作
+ ///
+ /// Success
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetMacStaticAsync()
+ {
+ return GetMacStaticAsync(System.Threading.CancellationToken.None);
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// 生命周期操作
+ ///
+ /// Success
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetMacStaticAsync(System.Threading.CancellationToken cancellationToken)
+ {
+ var client_ = _httpClient;
+ var disposeClient_ = false;
+ try
+ {
+ using (var request_ = new System.Net.Http.HttpRequestMessage())
+ {
+ request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+ if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
+ // Operation Path: "CargoState/GetMacStatic"
+ urlBuilder_.Append("CargoState/GetMacStatic");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ return objectResponse_.Object;
+ }
+ else
+ if (status_ == 403)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 401)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 400)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 404)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 501)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 500)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ /// Success
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task> GetCargoStaticAsync(string p_AreaID)
+ {
+ return GetCargoStaticAsync(p_AreaID, System.Threading.CancellationToken.None);
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// Success
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task> GetCargoStaticAsync(string p_AreaID, System.Threading.CancellationToken cancellationToken)
+ {
+ var client_ = _httpClient;
+ var disposeClient_ = false;
+ try
+ {
+ using (var request_ = new System.Net.Http.HttpRequestMessage())
+ {
+ request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+ if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);
+ // Operation Path: "CargoState/GetCargoStatic"
+ urlBuilder_.Append("CargoState/GetCargoStatic");
+ urlBuilder_.Append('?');
+ if (p_AreaID != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("p_AreaID")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(p_AreaID, System.Globalization.CultureInfo.InvariantCulture))).Append('&');
+ }
+ urlBuilder_.Length--;
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ return objectResponse_.Object;
+ }
+ else
+ if (status_ == 403)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 401)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 400)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 404)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 501)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ if (status_ == 500)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ throw new ApiException("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ protected struct ObjectResponseResult
+ {
+ public ObjectResponseResult(T responseObject, string responseText)
+ {
+ this.Object = responseObject;
+ this.Text = responseText;
+ }
- public WebServiceAppService(IHttpClientFactory httpClientFactory, IOptions options)
+ public T Object { get; }
+
+ public string Text { get; }
+ }
+
+ public bool ReadResponseAsString { get; set; }
+
+ protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken)
+ {
+ if (response == null || response.Content == null)
+ {
+ return new ObjectResponseResult(default(T), string.Empty);
+ }
+
+ if (ReadResponseAsString)
+ {
+ var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings);
+ return new ObjectResponseResult(typedBody, responseText);
+ }
+ catch (Newtonsoft.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);
+ }
+ }
+ else
+ {
+ 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(jsonTextReader);
+ return new ObjectResponseResult(typedBody, string.Empty);
+ }
+ }
+ catch (Newtonsoft.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);
+ }
+ }
+ }
+
+ private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo)
+ {
+ if (value == null)
+ {
+ return "";
+ }
+
+ if (value is System.Enum)
+ {
+ var name = System.Enum.GetName(value.GetType(), value);
+ if (name != null)
+ {
+ var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
+ if (field != null)
+ {
+ var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute))
+ as System.Runtime.Serialization.EnumMemberAttribute;
+ if (attribute != null)
+ {
+ return attribute.Value != null ? attribute.Value : name;
+ }
+ }
+
+ var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo));
+ return converted == null ? string.Empty : converted;
+ }
+ }
+ else if (value is bool)
+ {
+ return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant();
+ }
+ else if (value is byte[])
+ {
+ return System.Convert.ToBase64String((byte[])value);
+ }
+ else if (value is string[])
+ {
+ return string.Join(",", (string[])value);
+ }
+ else if (value.GetType().IsArray)
+ {
+ var valueArray = (System.Array)value;
+ var valueTextArray = new string[valueArray.Length];
+ for (var i = 0; i < valueArray.Length; i++)
+ {
+ valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo);
+ }
+ return string.Join(",", valueTextArray);
+ }
+
+ var result = System.Convert.ToString(value, cultureInfo);
+ return result == null ? "" : result;
+ }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class RemoteServiceErrorInfo
{
- _httpClientFactory = httpClientFactory;
- _options = options;
+ [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string Code { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string Message { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string Details { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Collections.Generic.IDictionary Data { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("validationErrors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Collections.Generic.ICollection ValidationErrors { get; set; }
+
}
- public Task> ReadAsync()
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class RemoteServiceErrorResponse
{
- throw new NotImplementedException();
+ [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ 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))")]
+ public partial class RemoteServiceValidationErrorInfo
+ {
+ [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string Message { get; set; }
+ [Newtonsoft.Json.JsonProperty("members", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Collections.Generic.ICollection Members { get; set; }
+ }
- ///
- ///
- ///
- ///
- ///
- public async Task WebApi(int p_type)
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class ResponCargoItem
{
+ ///
+ /// 区域ID
+ ///
+ [Newtonsoft.Json.JsonProperty("areaID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string AreaID { get; set; }
- //var client = _httpClientFactory.CreateClient();
- //// 设置用户名和密码
- //var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
- //client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
- //// 发送HTTP请求
- //var response = await client.GetAsync("https://example.com/api/data");
- //if (response.IsSuccessStatusCode)
- //{
- // return await response.Content.ReadAsStringAsync();
- //}
- // SoapClient
-
-
-
-
- var address = _options.Value.AutoRemote.IpAddress;
- var username = _options.Value.AutoRemote.UserName;
- var password=_options.Value.AutoRemote.Password;
- var token= _options.Value.AutoRemote.Token;
- var client = _httpClientFactory.CreateClient();
- var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
- client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
- var response = await client.GetAsync("https://example.com/api/data").ConfigureAwait(false);
- if (response.IsSuccessStatusCode)
+ ///
+ /// 货位号
+ ///
+ [Newtonsoft.Json.JsonProperty("cargoID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string CargoID { get; set; }
+
+ ///
+ /// 零件号
+ ///
+ [Newtonsoft.Json.JsonProperty("partCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string PartCode { get; set; }
+
+ ///
+ /// 货位状态
+ ///
+ [Newtonsoft.Json.JsonProperty("flag", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public int Flag { get; set; }
+
+ }
+
+
+
+ [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class ApiException : System.Exception
+ {
+ public int StatusCode { get; private set; }
+
+ public string Response { get; private set; }
+
+ public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; }
+
+ public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException)
+ : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException)
{
- return await response.Content.ReadAsStringAsync();
+ StatusCode = statusCode;
+ Response = response;
+ Headers = headers;
+ }
+
+ public override string ToString()
+ {
+ return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString());
}
- return "Error occurred";
}
+
+ [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class ApiException : ApiException
+ {
+ public TResult Result { get; private set; }
+
+ public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException)
+ : base(message, statusCode, response, headers, innerException)
+ {
+ Result = result;
+ }
+ }
+
}
+
+#pragma warning restore 108
+#pragma warning restore 114
+#pragma warning restore 472
+#pragma warning restore 612
+#pragma warning restore 1573
+#pragma warning restore 1591
+#pragma warning restore 8073
+#pragma warning restore 3016
+#pragma warning restore 8603
+#pragma warning restore 8604
+#pragma warning restore 8625
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
index 537f6ec81..a29d697f6 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
@@ -19,6 +19,7 @@ using Win_in.Sfs.Wms.Store.Application.Contracts;
using System.Text.Json.Serialization;
using System.IdentityModel.Tokens.Jwt;
using Volo.Abp;
+using System.Net.NetworkInformation;
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming;
public class InjectionMoldingRequestReader : IReader
{
@@ -60,69 +61,112 @@ public class InjectionMoldingRequestReader : IReader
try
{
// 获取注塑叫料任务数量
- var count = await _injectionRequest.GetCountAsync().ConfigureAwait(false);
- List joblist = new List();
- if (count == 0)
- {
+ //var count = await _injectionRequest.GetCountAsync().ConfigureAwait(false);
+ //List joblist = new List();
+ //if (count == 0)
+ //{
// 调用 ReaderCameraApi 方法获取摄像头信息
- string camera = await ReaderCameraApi().ConfigureAwait(false);
- List cameraList = new List();
- if (camera == "Error occured")
+
+
+ Client client = new Client(_options.Value.AutoRemote.IpAddress, _httpClientFactory.CreateClient());//调用客户记录
+
+ var flag= await client.GetMacStaticAsync().ConfigureAwait(false);
+ if (flag!=1)
{
// 记录错误日志并返回空列表
- _logger.LogInformation($"没有读取到摄像头信息{DateTime.Now},请检查网络");
+ _logger.LogInformation($"读取到摄像头信息为不可用{DateTime.Now},请检查摄像头");
+ return new List();
+ }
+
+ if (string.IsNullOrEmpty(_options.Value.AutoRemote.AreaIDs))
+ {
+ _logger.LogInformation($"没有设置指定区域AutoRemote->AreaIDs");
return new List();
}
- //将摄像头信息转换为注塑叫料明细任务数据
- cameraList = System.Text.Json.JsonSerializer.Deserialize>(camera);
- //测试数据
- //var cameraList = new List()
- //{
- // new InjectionRequest() { ItemCode = "THILDD0A542AG", ToLocCode = "ZSXB2", Qty = 100 },
- // };
- InjectionIssueRequestEditInput input = new InjectionIssueRequestEditInput();
- input.Worker = "Vision";
- input.Type = "Vision";
- input.AutoSubmit = true;
- input.ActiveDate = DateTime.Now;
- input.UseOnTheWayLocation = false;
- input.Remark = "视觉叫料";
- List injectionRequestDetails = new List();
- foreach (var job in cameraList)
+
+ var ids=_options.Value.AutoRemote.AreaIDs.Split(",");
+ List camralist = new List();
+ foreach (var itm in ids)//遍历区域查找所有货物
{
- var detailInput = new InjectionIssueRequestDetailInput()
- {
- ItemCode = job.ItemCode,
- ToLocationCode = job.ToLocCode,
- Qty = job.Qty,
- RecommendType = EnumRecommendType.W,
- IssuedQty = 0,
- ReceivedQty = 0,
- Status = EnumStatus.Open,
- RequestStatus = EnumRequestStatus.New,
- };
- // 添加注塑叫料明细任务数据
- injectionRequestDetails.Add(detailInput);
+ var idsList= await client.GetCargoStaticAsync(itm).ConfigureAwait(false);
+ camralist.AddRange(idsList);
}
- input.Details.AddRange(injectionRequestDetails);
- // 通过 BindAsync 方法对零件仓库进行赋值
- var errors = await BindAsync(input.Details).ConfigureAwait(false);
- if (errors.Count > 0)
+ camralist = camralist.Where(p=>p.Flag==0).ToList();
+
+
+ List inputdetail=new List();
+ foreach (var item in camralist)
+ {
+ UnCompletedRequestDto jobrequestinput = new UnCompletedRequestDto();
+ jobrequestinput.ItemCode = item.PartCode;
+ jobrequestinput.LocCode = item.AreaID.ToString();
+ jobrequestinput.PositionCode = item.CargoID.ToString();
+ inputdetail.Add(jobrequestinput);
+ }
+
+ var uncompletelist= await _injectionRequest.GetUnCompletedRequestAsync(inputdetail).ConfigureAwait(false);//将所有库位零件信息查找未完成记录
+
+ var query = from itm in camralist
+ join itm1 in uncompletelist on new { locCode = itm.AreaID.ToString(), itmCode = itm.PartCode, PositionCode = itm.CargoID.ToString() }
+ equals new { locCode = itm1.LocCode, itmCode = itm1.ItemCode, PositionCode = itm1.PositionCode} into temp
+ from tm in temp.DefaultIfEmpty()
+ where tm == null
+ select itm;
+ var injectionList=query.ToList();//已经完成的记录
+
+
+ foreach (var inject in injectionList)
{
- // 记录错误日志并返回空列表
- foreach (var error in errors)
+ List cameraList = new List();
+
+ InjectionIssueRequestEditInput input = new InjectionIssueRequestEditInput();
+ input.Worker = "Vision";
+ input.Type = "Vision";
+ input.AutoSubmit = true;
+ input.ActiveDate = DateTime.Now;
+ input.UseOnTheWayLocation = false;
+ input.Remark = "视觉叫料";
+ List injectionRequestDetails = new List();
+ //foreach (var job in cameraList)
+ //{
+ var detailInput = new InjectionIssueRequestDetailInput()
+ {
+ ItemCode = inject.PartCode,
+ ToLocationCode = inject.AreaID.ToString(),
+ PositionCode=inject.CargoID,
+ Qty = 1,
+ RecommendType = EnumRecommendType.W,
+ IssuedQty = 0,
+ ReceivedQty = 0,
+ Status = EnumStatus.Open,
+ RequestStatus = EnumRequestStatus.New,
+ BoxQty=1
+ };
+ // 添加注塑叫料明细任务数据
+ injectionRequestDetails.Add(detailInput);
+ //}
+ input.Details.AddRange(injectionRequestDetails);
+ // 通过 BindAsync 方法对零件仓库进行赋值
+ var errors = await BindAsync(input.Details).ConfigureAwait(false);
+ if (errors.Count > 0)
{
- _logger.LogInformation(error);
+ // 记录错误日志并返回空列表
+ foreach (var error in errors)
+ {
+ _logger.LogInformation(error);
+ }
+ return new List();
}
- return new List();
+ // 创建新的注塑请求并将数据写入数据库
+ await _injectionRequest.CreateAsync(input).ConfigureAwait(false);
+
}
- // 创建新的注塑请求并将数据写入数据库
- await _injectionRequest.CreateAsync(input).ConfigureAwait(false);
- }
- else
- {
- _logger.LogInformation("注塑叫料任务已存在,无需读取");
- }
+
+ //}
+ //else
+ //{
+ // _logger.LogInformation("注塑叫料任务已存在,无需读取");
+ //}
}
// 捕获特定异常并记录日志
@@ -162,6 +206,7 @@ public class InjectionMoldingRequestReader : IReader
if (loc == null) { errors.Add($"编号:{request.ToLocationCode}库位表中没找到!"); }
else
{
+
// 更新请求中的库位相关信息
request.ToLocationCode = loc.Code;
request.ToLocationGroup = loc.LocationGroupCode;
@@ -174,55 +219,55 @@ public class InjectionMoldingRequestReader : IReader
return errors;
}
- ///
- /// 读取摄像头API
- ///
- ///
- ///
- public async Task ReaderCameraApi()
- {
+ // ///
+ // /// 读取摄像头API
+ // ///
+ // ///
+ // ///
+ // public async Task ReaderCameraApi()
+ // {
- try
- {
+ // try
+ // {
- // 从配置中获取远程摄像头的地址、用户名、密码和令牌
- var address = _options.Value.AutoRemote.IpAddress;
- var username = _options.Value.AutoRemote.UserName;
- var password = _options.Value.AutoRemote.Password;
- var token = _options.Value.AutoRemote.Token;
+ // // 从配置中获取远程摄像头的地址、用户名、密码和令牌
+ // var address = _options.Value.AutoRemote.IpAddress;
+ // var username = _options.Value.AutoRemote.UserName;
+ // var password = _options.Value.AutoRemote.Password;
+ // var token = _options.Value.AutoRemote.Token;
- // 创建一个HttpClient实例
- var client = _httpClientFactory.CreateClient();
+ // // 创建一个HttpClient实例
+ // var client = _httpClientFactory.CreateClient();
- // 将用户名和密码转换为Base64编码的凭据,并设置请求的身份验证信息
- var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
- client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
+ // // 将用户名和密码转换为Base64编码的凭据,并设置请求的身份验证信息
+ // var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
+ // client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
- // 发送GET请求到远程摄像头地址并等待响应
- var response = await client.GetAsync(address).ConfigureAwait(false);
+ // // 发送GET请求到远程摄像头地址并等待响应
+ // var response = await client.PostAsync(address, new StringContent(token, Encoding.UTF8, "application/json")).ConfigureAwait(false);
- // 如果请求成功,则返回响应内容,否则返回错误信息
- if (response.IsSuccessStatusCode)
- {
- return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
- }
- }
- catch (HttpRequestException ex)
- {
- _logger.LogInformation("远程摄像头连接失败:" + ex.Message);
-
- }
+ // // 如果请求成功,则返回响应内容,否则返回错误信息
+ // if (response.IsSuccessStatusCode)
+ // {
+ // return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ // }
+ // }
+ // catch (HttpRequestException ex)
+ // {
+ // _logger.LogInformation("远程摄像头连接失败:" + ex.Message);
- return "Error occurred";
- }
+ // }
- private List Parse(string p_str)
- {
- List requests = new List();
+ // return "Error occurred";
+ // }
- return System.Text.Json.JsonSerializer.Deserialize>(p_str);
- }
+ // private List Parse(string p_str)
+ // {
+ // List requests = new List();
+
+ // return System.Text.Json.JsonSerializer.Deserialize>(p_str);
+ // }
@@ -231,7 +276,7 @@ public class InjectionMoldingRequestReader : IReader
-public class InjectionRequest
+ public class InjectionRequest
{
///
/// 零件M
@@ -256,7 +301,7 @@ public class InjectionRequest
}
-
+
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs
index 24041d882..a4915d6d5 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs
@@ -24,6 +24,9 @@ public class InjectionAutoRemote
public string Password { set; get; }
// 令牌
public string Token { set; get; }
+
+ public string AreaIDs { set; get; }
+
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
index 5445fdc4f..8103c9102 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
@@ -67,11 +67,11 @@
"InjectionMoldingTaskOptions": {
"AutoRemote": {
- "IpAddress": "http://10.164.113.31:60085/",
+ "IpAddress": "http://localhost:59094/",
"UserName": "",
"Password": "",
- "Token": ""
-
+ "Token": "",
+ "AreaIDs": "1"
},
"IncomingOptions": {
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs
index cfa860a62..ead0d67b6 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs
@@ -20,17 +20,26 @@ public class KittingDetailDTO: AuditedEntityDto, IMultiTenant, IRemark
/// 物料编码
///
[Display(Name = "物料编码")]
- public string PartCode { set; get; }
+ public string ItemCode { set; get; }
+
+ ///
+ /// 物品名称
+ ///
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+
+
///
/// 描述1
///
[Display(Name = "描述1")]
- public string Desc1 { set; get; }
+ public string ItemDesc1 { set; get; }
///
/// 描述2
///
[Display(Name = "描述2")]
- public string Desc2 { set; get; }
+ public string ItemDesc2 { set; get; }
///
/// 包装数量
///
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs
index 1b9e2a17b..6ee7c36bf 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs
@@ -20,17 +20,27 @@ public class KittingDetailInput: EntityDto, IMultiTenant, IRemark
/// 物料编码
///
[Display(Name = "物料编码")]
- public string PartCode { set; get; }
+ public string ItemCode { set; get; }
///
/// 描述1
///
[Display(Name = "描述1")]
- public string Desc1 { set; get; }
+ public string ItemDesc1 { set; get; }
///
/// 描述2
///
[Display(Name = "描述2")]
- public string Desc2 { set; get; }
+ public string ItemDesc2 { set; get; }
+
+
+
+ ///
+ /// 物品名称
+ ///
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+
///
/// 包装数量
///
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs
index bf22aa106..7b48e3b61 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs
@@ -8,32 +8,42 @@ public class KittingImportInput : SfsBaseDataImportInputBase
///
/// Kitting编码
///
- [Display(Name = "Kitting编码")]
- public string Code { get; set; }
+ ///
+ [Display(Name = "物料编码")]
+ public string ItemCode { set; get; }
///
- /// Kitting名称
+ /// 描述1
///
- [Display(Name = "Kitting名称")]
- public string Name { get; set; }
-
+ [Display(Name = "描述1")]
+ public string ItemDesc1 { set; get; }
///
- /// 物料编码
+ /// 描述2
///
- [Display(Name = "物料编码")]
- public string PartCode { set; get; }
+ [Display(Name = "描述2")]
+ public string ItemDesc2 { set; get; }
+
///
- /// 描述1
+ /// 物品名称
///
- [Display(Name = "物料描述1")]
- public string Desc1 { set; get; }
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+
+
+
+
+ [Display(Name = "Kitting编码")]
+ public string Code { get; set; }
///
- /// 描述2
+ /// Kitting名称
///
- [Display(Name = "物料描述2")]
- public string Desc2 { set; get; }
+ [Display(Name = "Kitting名称")]
+ public string Name { get; set; }
+
+
///
/// 包装数量
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs
index 9665851df..d8ce4f29a 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application.Contracts;
@@ -37,4 +38,10 @@ public class ProductionLineDTO : SfsBaseDataDTOBase, IHasCode, IHasName
///
[Display(Name = "描述")]
public string Description { get; set; }
+
+ ///
+ /// 生产线类型
+ ///
+ [Display(Name = "生产线类型")]
+ public EnumProductionLineType ProductionLineType { get; set; }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs
index a6737d11b..7f8f0bcdb 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs
@@ -1,5 +1,7 @@
+using System.Collections.Generic;
using System.Threading.Tasks;
using Win_in.Sfs.Shared.Application.Contracts;
+using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application.Contracts;
@@ -9,4 +11,5 @@ public interface IProductionLineAppService
, ISfsUpsertAppService
{
Task GetByLocationCodeAsync(string locationCode);
+ Task> GetByLocationCodeAsync(EnumProductionLineType productionLineType);
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs
index 6fb089009..9d03a0e12 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application.Contracts;
@@ -35,4 +36,10 @@ public class ProductionLineEditInput : SfsBaseDataCreateOrUpdateInputBase
///
[Display(Name = "描述")]
public string Description { get; set; }
+
+ ///
+ /// 生产线类型
+ ///
+ [Display(Name = "生产线类型")]
+ public EnumProductionLineType ProductionLineType { get; set; }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs
index cdfd4fcfe..8442c0626 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application.Contracts;
@@ -36,4 +37,10 @@ public class ProductionLineImportInput : SfsBaseDataImportInputBase
///
[Display(Name = "描述")]
public string Description { get; set; }
+
+ ///
+ /// 生产线类型
+ ///
+ [Display(Name = "生产线类型")]
+ public EnumProductionLineType ProductionLineType { get; set; }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/Class1.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/Class1.cs
new file mode 100644
index 000000000..e2d9b7254
--- /dev/null
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/Class1.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+
+namespace Win_in.Sfs.Basedata.tests;
+[Serializable]
+
+//测试文件暂时不删除
+public class ResponseJson
+{
+ // 错误码:
+ public int Code { set; get; } = 0;
+ // 返回值 其具体含义由调用接口确定
+ public string Value { set; get; } = "";
+ // 错误消息
+ public string Msg { set; get; } = "";
+}
+[Serializable]
+public class ResponCargoItem
+{
+ // 区域ID
+ [Display(Name = "区域ID")]
+ public string AreaID { set; get; }
+ // 货位号
+ [Display(Name = "货位号")]
+ public string CargoID { set; get; } = "";
+ // 零件号
+ [Display(Name = "零件号")]
+ public string PartCode { set; get; } = "";
+ //货位状态 1 – 货位占用 0 – 货位空闲
+ [Display(Name = "货位状态")]
+ public int Flag { set; get; } = 0;
+}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs
index e3d646fc3..0a25e7940 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs
@@ -20,8 +20,6 @@ public class BomAppService :
SfsBaseDataAppServiceBase,
IBomAppService
{
-
-
private new readonly IBomRepository _repository;
private readonly IBomManager _bomManager;
@@ -224,7 +222,7 @@ public class BomAppService :
return ObjectMapper.Map, List>(entities);
}
- [HttpPost("get_bom_sublist")]
+ [HttpPost("get-bom-sublist")]
public async Task> GetSubcomponentsRecursiveList(List p_lst,
EnumBomSelectedType p_type
)
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Caches/CacheAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Caches/CacheAppService.cs
index 0ea409cf5..2455909e8 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Caches/CacheAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Caches/CacheAppService.cs
@@ -43,13 +43,6 @@ public class TaskItem
-
-
-
-
-
-
-
public class CycleOptions
{
///
@@ -76,32 +69,35 @@ public class CacheService:ISingletonDependency
///
private async Task BomsCycle()
{
-
- //Task.Run(async () =>
- //{
- var reassigner = new Reassigner(DateTime.Now, new TimeSpan(0, 0, _options.Value.BomsCycle == 0 ? 60 : _options.Value.BomsCycle));
- await reassigner.RunAsync(async () =>
- {
- using var serviceScope = _serviceProvider.CreateScope();
- var repository = serviceScope.ServiceProvider.GetRequiredService();
- Cache.Boms.Clear();
- Cache.Boms = await repository.GetListAsync().ConfigureAwait(false);
-
- }).ConfigureAwait(false);
- //});
- ;
+ var reassigner = new Reassigner(DateTime.Now, new TimeSpan(0, 0, _options.Value.BomsCycle == 0 ? 60 : _options.Value.BomsCycle));
+ await reassigner.RunAsync(async () =>
+ {
+ using (var serviceScope = _serviceProvider.CreateScope())
+ {
+ var repository = serviceScope.ServiceProvider.GetRequiredService();
+ Cache.Boms.Clear();
+ Cache.Boms = await repository.GetListAsync().ConfigureAwait(false);
+ };
+ }).ConfigureAwait(false);
}
+
+
+
+
+
+
+
+
///
/// 异步开始生命周期操作不能堵塞
///
public async Task StartAsync()
{
+
BomsCycle();//异步处理不能堵塞主任务
}
-
-
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs
index f2f376764..e3020c8bc 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs
@@ -55,10 +55,9 @@ public class KittingAppService : SfsBaseDataWithCodeAppServiceBase p.Code == input.Code);
- var codes = input.Details.Select(p => p.PartCode);
+ var codes = input.Details.Select(p => p.ItemCode);
if (first != null)
{
-
throw new UserFriendlyException($"已存在编码:{input.Code}的Kitting箱");
//var query = from itm in input.Details
// join itm1 in first.Details on itm.PartCode equals itm1.PartCode
@@ -86,7 +85,6 @@ public class KittingAppService : SfsBaseDataWithCodeAppServiceBase(entity);
-
}
//first.Details.Where(p => codes.Contains(p.PartCode));
@@ -151,13 +149,11 @@ public class KittingAppService : SfsBaseDataWithCodeAppServiceBase(inputFileBytes).ToList();
- var checklist=importList.GroupBy(p => new { p.Code, p.PartCode }).Where(g => g.Count() > 1).Select(p => new { Code = p.Key.Code, PartCode = p.Key.PartCode });//导入重复报错 //检测是否导入重复
+ var checklist=importList.GroupBy(p => new { p.Code, p.ItemCode }).Where(g => g.Count() > 1).Select(p => new { Code = p.Key.Code, PartCode = p.Key.ItemCode });//导入重复报错 //检测是否导入重复
List errors = new List();
if (checklist.Any())
{
-
foreach (var error in checklist) {
-
errors.Add(new KittingErrorDto() { Code=error.Code,PartCode=error.PartCode, Content="记录有重复!" });
}
}
@@ -183,7 +179,6 @@ public class KittingAppService : SfsBaseDataWithCodeAppServiceBase(newdetailList).ConfigureAwait(false);
+
#endregion
}
if (existCodeList.Any())
{
var existKittingList = importList.Where(p => existCodeList.Contains(p.Code)).ToList();//新Kitting
List existKittingInputList = new List();
- //List existKittingDetailList = new List();
- //List newKittingDetailList = new List();
foreach (var include in includeList)
{
var newDetail = existKittingList.Where(p => p.Code == include.Code).ToList();
var innerExist = from itm in newDetail
- join itm1 in include.Details on itm.PartCode equals itm1.PartCode
+ join itm1 in include.Details on itm.ItemCode equals itm1.ItemCode
select itm;
if (innerExist.Any())
{
var list = innerExist.ToList();
foreach (var itm in include.Details)
{
- var entity = list.FirstOrDefault(p => p.PartCode == itm.PartCode);
- itm.Desc1 = entity.Desc1;
- itm.Desc2 = entity.Desc2;
+ var entity = list.FirstOrDefault(p => p.ItemCode == itm.ItemCode);
+ itm.ItemDesc1 = entity.ItemDesc1;
+ itm.ItemDesc2 = entity.ItemDesc2;
itm.Qty = entity.Qty;
itm.Conf = entity.Conf;
- //existKittingDetailList.Add(itm);
}
}
var leftExist = from itm in newDetail
- join itm1 in include.Details on itm.PartCode equals itm1.PartCode
+ join itm1 in include.Details on itm.ItemCode equals itm1.ItemCode
into temp
from tm in temp.DefaultIfEmpty()
where tm == null
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAutoMapperProfile.cs
index 657c97e5a..0fb0566d9 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAutoMapperProfile.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAutoMapperProfile.cs
@@ -30,9 +30,9 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
CreateMap()
.IgnoreAuditedObjectProperties()
//.ForMember(x => x., y => y.MapFrom(t => t.Code))
- .ForMember(x => x.PartCode, y => y.MapFrom(t => t.PartCode))
- .ForMember(x => x.Desc1, y => y.MapFrom(t => t.Desc1))
- .ForMember(x => x.Desc2, y => y.MapFrom(t => t.Desc2))
+ .ForMember(x => x.ItemCode, y => y.MapFrom(t => t.ItemCode))
+ .ForMember(x => x.ItemDesc1, y => y.MapFrom(t => t.ItemDesc1))
+ .ForMember(x => x.ItemDesc2, y => y.MapFrom(t => t.ItemDesc2))
.Ignore(x => x.MasterId)
.Ignore(x => x.TenantId)
.Ignore(x => x.Remark)
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs
index 3bb63cb76..cf5b04fb8 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs
@@ -1,12 +1,15 @@
+using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
+using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Basedata.Domain.Shared;
+using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application;
@@ -57,4 +60,12 @@ public class ProductionLineAppService
return ObjectMapper.Map(entity);
}
+
+ [HttpPost("get-by-type")]
+ public virtual async Task> GetByLocationCodeAsync(EnumProductionLineType productionLineType)
+ {
+ var entitList = await _repository.GetListAsync(p => p.ProductionLineType == productionLineType).ConfigureAwait(false);
+
+ return ObjectMapper.Map, List>(entitList);
+ }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs
new file mode 100644
index 000000000..264c88719
--- /dev/null
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using DocumentFormat.OpenXml.Office2010.Drawing;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Options;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Caching;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Domain.Repositories;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Basedata.Domain;
+using Win_in.Sfs.Basedata.Domain.Caches;
+using Win_in.Sfs.Basedata.Domain.Shared;
+using Win_in.Sfs.Basedata.tests;
+
+namespace Win_in.Sfs.Basedata.Application;
+
+
+///
+/// 接口模拟测试
+///
+[AllowAnonymous]
+[Route($"CargoState")]
+public class TestService:ApplicationService
+{
+ private readonly IServiceProvider _serviceProvider;
+ private readonly IOptions _options;
+ public TestService(IServiceProvider serviceProvider, IOptions options)
+ {
+ _serviceProvider = serviceProvider;
+ _options = options;
+ }
+
+ ///
+ /// 生命周期操作
+ ///
+ [HttpPost("GetMacStatic")]
+ public async Task GetMacStatic()
+ {
+ return 1;
+ }
+
+
+
+ [HttpPost("GetCargoStatic")]
+ ///
+ /// 异步开始生命周期操作不能堵塞
+ ///
+ public async Task> GetCargoStatic(string p_AreaID)
+ {
+
+ List result = new List();
+
+ result.Add(new ResponCargoItem() { AreaID = "1", CargoID = "PTXB1", PartCode = "TMDLYA0A071AB", Flag = 0 });
+ result.Add(new ResponCargoItem() { AreaID = "1", CargoID = "PTXB2", PartCode = "TMDLYA0A061AB", Flag = 0 });
+ result.Add(new ResponCargoItem() { AreaID = "2", CargoID = "ZSXB2", PartCode = "TMDLYD0ABM5A", Flag = 0 });
+
+ result = result.Where(p => p.AreaID == p_AreaID).ToList();
+
+
+ return result;
+
+ }
+}
+
+
+
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Enum/EnumProductionLineType.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Enum/EnumProductionLineType.cs
deleted file mode 100644
index eac7af0eb..000000000
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Enum/EnumProductionLineType.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace Win_in.Sfs.Basedata.Domain.Shared;
-
-///
-/// 生产线类型
-///
-public enum EnumProductionLineType
-{
- ///
- /// 空枚举
- ///
- [Display(Name = "空")]
- None = 0,
-
-}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
index 84e2bf562..743b96932 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
@@ -249,7 +249,7 @@ public class BomManager : DomainService, IBomManager
return list;
}
-
+
@@ -261,35 +261,39 @@ public class BomManager : DomainService, IBomManager
///
///
///
- public async Task> GetSubcomponentsRecursive(BomComponent p_component, EnumBomSelectedType p_type
- )
+ public async Task> GetSubcomponentsRecursive(BomComponent p_component, EnumBomSelectedType p_type
+ )
{
+ // 创建用于存储最终结果、维度结果和树状结果的列表
List lastList = new List();
- List dimensionList=new List();
- var treeList=await GetSubcomponentsRecursive(p_component, 1, p_component.ComponentQty, p_component.Component,
+ List dimensionList = new List();
+
+ // 调用异步方法GetSubcomponentsRecursive以获取树状结果,并使用lambda表达式将结果添加到lastList和dimensionList
+ var treeList = await GetSubcomponentsRecursive(p_component, 1, p_component.ComponentQty, p_component.Component,
(rs) => lastList.Add(rs)
,
- (rs1)=>{
+ (rs1) => {
dimensionList.Add(rs1);
}).ConfigureAwait(false);
-
- List returnList=new List();
+ // 根据用户指定的类型,返回相应的结果列表
+ List returnList = new List();
switch (p_type)
{
case EnumBomSelectedType.Last:
returnList = lastList;
break;
case EnumBomSelectedType.Tree:
- returnList=treeList;
+ returnList = treeList;
break;
case EnumBomSelectedType.Dimension:
- returnList=dimensionList;
+ returnList = dimensionList;
break;
}
return returnList;
}
-
+
+
///
@@ -303,55 +307,73 @@ public class BomManager : DomainService, IBomManager
/// 树型转成一维表用
///
///
+
private async Task> GetSubcomponentsRecursive(BomComponent p_component, int level, decimal sumQty, string root, Action p_actionLast,
- Action p_actionDimension
- /* ,List bomList =null*/
- )
+ Action p_actionDimension
+ /* ,List bomList =null*/
+ )
{
+ // 初始化子零件列表
List subComponents = new List();
// 假设 GetComponentsByProduct 方法可获取某个物料号下的所有子零件
- List directSubComponents =await GetComponentsByProduct(p_component.Component).ConfigureAwait(false);
+ List directSubComponents = await GetComponentsByProduct(p_component.Component).ConfigureAwait(false);
- if (!directSubComponents.Any() && level != 1)//不是根元素
+ // 如果没有直接子零件且不是根元素,则执行最后操作回调函数
+ if (!directSubComponents.Any() && level != 1)
{
p_actionLast(p_component);
}
+ // 遍历直接子零件列表
foreach (var component in directSubComponents)
{
+ // 设置根元素和数量
component.Root = root;
component.SumQty = sumQty * component.ComponentQty;
component.ParentComponent = p_component.Component;
component.Level = level;
+ // 设置拆解路径
component.Path = (p_component.Component != root) ? p_component.Path + $"->{component.Component}" : p_component.Component + $"->{component.Component}";
- component.SubComponents =await GetSubcomponentsRecursive(component, level + 1, sumQty * component.ComponentQty, component.Root, p_actionLast, p_actionDimension).ConfigureAwait(false);
+ // 递归获取子零件列表,并执行维度操作回调函数
+ component.SubComponents = await GetSubcomponentsRecursive(component, level + 1, sumQty * component.ComponentQty, component.Root, p_actionLast, p_actionDimension).ConfigureAwait(false);
p_actionDimension(component);
+ // 添加子零件到子零件列表
subComponents.Add(component);
}
+ // 返回子零件列表
return subComponents;
}
+
+
+ ///
+ /// 读取子节点
+ ///
+ ///
+ ///
private async Task> GetComponentsByProduct(string product)
{
- List list=new List();
+ List list = new List();
if (Cache.Boms.Count == 0)
{
InitBomComponent();
}
- list=Cache.Boms.Count > 0 ? Cache.Boms.Where(p => p.Product == product).ToList() :
+ // 如果缓存中有Bom列表,则从缓存中筛选符合条件的数据;否则从仓储中异步获取数据
+ list = Cache.Boms.Count > 0 ? Cache.Boms.Where(p => p.Product == product).ToList() :
await _repository.GetListAsync(p => p.Product == product).ConfigureAwait(false);
- List components = new List();
+ List components = new List();
foreach (var component in list)
{
BomComponent bomComponent = new BomComponent();
bomComponent.InjectFrom(component);
- components.Add(bomComponent);
+ components.Add(bomComponent);
}
// 其他物料号的子零件信息类似添加
return components;
}
+
///
/// 获取所有bomtree
///
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Kittings/KittingDetail.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Kittings/KittingDetail.cs
index 37b5133a2..503d1d025 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Kittings/KittingDetail.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Kittings/KittingDetail.cs
@@ -14,15 +14,27 @@ public class KittingDetail : AuditedEntity, IMultiTenant, IRemark
///
/// 物料编码
///
- public string PartCode { set; get; }
+ [Display(Name = "物料编码")]
+ public string ItemCode { set; get; }
///
/// 描述1
///
- public string Desc1 { set; get; }
+ [Display(Name = "描述1")]
+ public string ItemDesc1 { set; get; }
///
/// 描述2
///
- public string Desc2 { set; get; }
+ [Display(Name = "描述2")]
+ public string ItemDesc2 { set; get; }
+
+
+ ///
+ /// 物品名称
+ ///
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+
///
/// 包装数量
///
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs
index b7888df0a..d9f509414 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Basedata.Domain;
@@ -35,4 +36,10 @@ public class ProductionLine : SfsBaseDataAggregateRootBase, IHasCode, IHasName
///
[Display(Name = "描述")]
public string Description { get; set; }
+
+ ///
+ /// 生产线类型
+ ///
+ [Display(Name = "生产线类型")]
+ public EnumProductionLineType ProductionLineType { get; set; }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs
index c595be6fc..213e9c60f 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs
@@ -36,10 +36,10 @@ public static class KittingDbContextModelCreatingExtensions
b.ConfigureByConvention();
//Configure Sfs base properties
b.ConfigureSfsBase();
-
- b.Property(p => p.Desc1).HasMaxLength(SfsPropertyConst.DescLength);
+ b.Property(p => p.ItemName).HasMaxLength(SfsPropertyConst.DescLength);
+ b.Property(p => p.ItemDesc1).HasMaxLength(SfsPropertyConst.DescLength);
//Properties
- b.Property(q => q.Desc2).HasMaxLength(SfsPropertyConst.CodeLength);
+ b.Property(q => q.ItemDesc2).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
b.Property(q => q.MasterId).IsRequired();
//Indexes
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingEfCoreRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingEfCoreRepository.cs
index a0ee5d92c..ad90d5900 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingEfCoreRepository.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingEfCoreRepository.cs
@@ -33,14 +33,14 @@ public class KittingEfCoreRepository : SfsBaseDataEfCoreRepositoryBase update = new List();
foreach (var itm in inner.ToList())
{
- var first = newData.Details.FirstOrDefault(p => p.PartCode == itm.PartCode);
+ var first = newData.Details.FirstOrDefault(p => p.ItemCode == itm.ItemCode);
itm.Qty = first.Qty;
- itm.Desc1 = first.Desc1;
- itm.Desc2 = first.Desc2;
+ itm.ItemDesc1 = first.ItemDesc1;
+ itm.ItemDesc2 = first.ItemDesc2;
+ itm.ItemName=first.ItemName;
update.Add(itm);
}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs
index 501d57e5c..4bb67435f 100644
--- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs
@@ -78,4 +78,9 @@ public enum EnumLocationType
/// 三方库
///
[Display(Name = "三方库")] THIRDPARTY = 14,
+
+ ///
+ /// Kitting线边
+ ///
+ [Display(Name = "Kitting线边")] KittingWip = 15,
}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs
new file mode 100644
index 000000000..55fbcf988
--- /dev/null
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Win_in.Sfs.Shared.Domain.Shared;
+
+public enum EnumProductionLineType
+{
+ None = 0,
+
+ ///
+ /// 注塑
+ ///
+ [Display(Name = "注塑")] Injection = 1,
+
+ ///
+ /// 喷涂
+ ///
+ [Display(Name = "喷涂")] Coating = 2,
+
+ ///
+ /// 装配
+ ///
+ [Display(Name = "装配")] Assemble = 3
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Chassis/IChassisAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Chassis/IChassisAppService.cs
index 92700a338..eb28b2756 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Chassis/IChassisAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Chassis/IChassisAppService.cs
@@ -1,3 +1,6 @@
+using System.Threading;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -9,4 +12,10 @@ public interface IChassisAppService
ISfsCheckStatusAppService
, ISfsUpsertAppService
{
+ ///
+ /// ƽֳʹ յ̷ڲ20
+ ///
+ ///
+ Task> GetListWithNextCountAsync(long sortNumber,int count,
+ CancellationToken cancellationToken = default);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/DTOs/ChassisOperationSequenceDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/DTOs/ChassisOperationSequenceDTO.cs
index 8ffb91877..197a4b0e5 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/DTOs/ChassisOperationSequenceDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/DTOs/ChassisOperationSequenceDTO.cs
@@ -1,8 +1,8 @@
-using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
///
/// 底盘执行位置序列
///
@@ -10,10 +10,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ChassisOperationSequenceDTO : SfsBasicDTOBase
{
///
- /// kitting执行序列号
+ /// Kitting执行底盘序列位置
///
- [Display(Name = "kitting执行序列号")]
- public string KittingNumber { get; set; }
+ [Display(Name = "Kitting执行底盘序列位置")]
+ public long ChassisSortNumber { get; set; }
///
/// kitting代码
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs
index 7b5eb3a43..d6a0546ee 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs
@@ -1,3 +1,4 @@
+using System.Threading.Tasks;
using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -9,4 +10,11 @@ public interface IChassisOperationSequenceAppService
ISfsCheckStatusAppService
, ISfsUpsertAppService
{
+ ///
+ /// 修改底盘执行序列位置 根据 KitingCode
+ ///
+ ///
+ ///
+ ///
+ Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceEditInput.cs
index 0aeb4a3ab..58d8c1ec3 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceEditInput.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -11,10 +10,10 @@ public class ChassisOperationSequenceEditInput
: SfsStoreCreateOrUpdateInputBase
{
///
- /// kitting执行序列号
+ /// Kitting执行底盘序列位置
///
- [Display(Name = "kitting执行序列号")]
- public string KittingNumber { get; set; }
+ [Display(Name = "Kitting执行底盘序列位置")]
+ public long ChassisSortNumber { get; set; }
///
/// kitting代码
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceImportInput.cs
index 0289cce9d..7c0f7ecb0 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceImportInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceImportInput.cs
@@ -1,9 +1,4 @@
-using System;
using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Application.Contracts;
-using Win_in.Sfs.Shared.Application.Contracts.ExportAndImport;
-using Win_in.Sfs.Shared.Domain;
-using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -14,10 +9,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ChassisOperationSequenceImportInput : SfsStoreImportInputBase
{
///
- /// kitting执行序列号
+ /// Kitting执行底盘序列位置
///
- [Display(Name = "kitting执行序列号")]
- public string KittingNumber { get; set; }
+ [Display(Name = "Kitting执行底盘序列位置")]
+ public long ChassisSortNumber { get; set; }
///
/// kitting代码
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteChassisDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteChassisDetailDTO.cs
new file mode 100644
index 000000000..6aff7a6d7
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteChassisDetailDTO.cs
@@ -0,0 +1,24 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+public class KittingPackagingNoteChassisDetailDTO : SfsStoreDetailDTOBase
+{
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "底盘号")]
+ public string ChassisNumber { get; set; }
+
+ ///
+ /// Kitting代码
+ ///
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
+
+ ///
+ /// 底盘号排序序列
+ ///
+ [Display(Name = "底盘号排序序列")]
+ public long ChassisSortNumber { get; set; }
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDTO.cs
index 8e89587cb..db8c26ded 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDTO.cs
@@ -8,54 +8,21 @@ using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
[Display(Name = "盘点任务")]
-public class KittingPackagingNoteDTO : SfsJobDTOBase
+public class KittingPackagingNoteDTO : SfsStoreDTOBase
{
-
- ///
- /// 生产计划号
- ///
- [Display(Name = "盘点计划号")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string CountPlanNumber { get; set; }
-
- ///
- /// 盘点阶段
- ///
- [Display(Name = "盘点阶段")]
- public EnumCountStage CountStage { get; set; }
-
- ///
- /// 盘点方式
- ///
- [Display(Name = "盘点方式")]
- public EnumCountMethod CountMethod { get; set; }
-
- ///
- /// 类型
- ///
- [Display(Name = "盘点类型")]
- public EnumCountType Type { get; set; }
-
- ///
- /// 描述
- ///
- [Display(Name = "描述")]
- public string Description { get; set; }
-
///
- /// 物料代码
+ /// kitting代码
///
- [Display(Name = "物料代码")]
- public string ItemCode { get; set; }
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
///
- /// 库位代码
+ /// 明细(记录Kitting打包中的子物品明细)
///
- [Display(Name = "库位代码")]
- public string LocationCode { get; set; }
+ public override List Details { get; set; } = new();
///
- /// 任务从表明细(记录每次扫得明细)
+ /// 明细(记录底盘相关的信息)
///
- public List DepDetails { get; set; }
+ public List DepDetails { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDependentDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDependentDetailDTO.cs
deleted file mode 100644
index 1f89a3ba2..000000000
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDependentDetailDTO.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Domain;
-
-namespace Win_in.Sfs.Wms.Store.Application.Contracts;
-
-public class KittingPackagingNoteDependentDetailDTO : SfsJobDetailDTOBase, IHasCountResult
-{
-
- ///
- /// 盘点标签
- ///
- [Display(Name = "盘点标签")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string CountLabel { get; set; }
-
- ///
- /// 计量单位
- ///
- [Display(Name = "计量单位")]
- public string Uom { get; set; }
-
- ///
- /// 库存数量
- ///
- [Display(Name = "库存数量")]
- public decimal InventoryQty { get; set; }
-
- ///
- /// 库存库位
- ///
- [Display(Name = "库存库位")]
- public string InventoryLocationCode { get; set; }
-
- ///
- /// 盘点数量
- ///
- [Display(Name = "盘点数量")]
- public decimal CountQty { get; set; }
-
- ///
- /// 盘点时间
- ///
- [Display(Name = "盘点时间")]
- public DateTime? CountTime { get; set; }
-
- ///
- /// 盘点操作员
- ///
- [Display(Name = "盘点操作员")]
- public string CountOperator { get; set; }
-
- ///
- /// 盘点描述
- ///
- [Display(Name = "盘点描述")]
- public string CountDescription { get; set; }
-}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDetailDTO.cs
index 3e9edb5cc..0ecdd679d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDetailDTO.cs
@@ -4,55 +4,41 @@ using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
-public class KittingPackagingNoteDetailDTO : SfsJobDetailDTOBase, IHasCountResult
+public class KittingPackagingNoteDetailDTO : SfsStoreDetailDTOBase
{
-
- ///
- /// 盘点标签
- ///
- [Display(Name = "盘点标签")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string CountLabel { get; set; }
-
- ///
- /// 计量单位
- ///
- [Display(Name = "计量单位")]
- public string Uom { get; set; }
-
///
- /// 库存数量
+ /// 物品代码
///
- [Display(Name = "库存数量")]
- public decimal InventoryQty { get; set; }
+ [Display(Name = "物品代码")]
+ public string ItemCode { get; set; }
///
- /// 库存库位
+ /// 物品名称
///
- [Display(Name = "库存库位")]
- public string InventoryLocationCode { get; set; }
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
///
- /// 盘点数量
+ /// 物品描述1
///
- [Display(Name = "盘点数量")]
- public decimal CountQty { get; set; }
+ [Display(Name = "物品描述1")]
+ public string ItemDesc1 { get; set; }
///
- /// 盘点时间
+ /// 物品描述2
///
- [Display(Name = "盘点时间")]
- public DateTime? CountTime { get; set; }
+ [Display(Name = "物品描述2")]
+ public string ItemDesc2 { get; set; }
///
- /// 盘点操作员
+ /// 数量
///
- [Display(Name = "盘点操作员")]
- public string CountOperator { get; set; }
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
///
- /// 盘点描述
+ /// Kitting代码
///
- [Display(Name = "盘点描述")]
- public string CountDescription { get; set; }
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteChassisDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteChassisDetailInput.cs
new file mode 100644
index 000000000..2c4dbca14
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteChassisDetailInput.cs
@@ -0,0 +1,32 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Application.Contracts;
+using Win_in.Sfs.Shared.Domain;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+public class KittingPackagingNoteChassisDetailInput : SfsStoreDetailInputBase
+{
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "底盘号")]
+ public string ChassisNumber { get; set; }
+
+ ///
+ /// Kitting代码
+ ///
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
+
+ ///
+ /// 底盘号排序序列
+ ///
+ [Display(Name = "底盘号排序序列")]
+ public long ChassisSortNumber { get; set; }
+
+ ///
+ ///
+ ///
+ public string ItemCode { get; set; }
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteCreateRequestInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteCreateRequestInput.cs
index d5eececd8..9fd7228fa 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteCreateRequestInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteCreateRequestInput.cs
@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -11,91 +12,18 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteCreateRequestInput
{
///
- /// 盘点方式
+ /// kitting代码
///
- [Display(Name = "盘点方式")]
- public EnumCountMethod CountMethod { get; set; }
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
///
- /// 描述
+ /// 明细(记录打包的明细)
///
- [Display(Name = "描述")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string Description { get; set; }
+ public List Details { get; set; } = new();
///
- /// 盘点执行形式
+ /// 明细(记录每次扫的位置)
///
- [Display(Name = "盘点执行形式")]
- public CountPlanRequestType RequestType { get; set; }
-
- ///
- /// 类型
- ///
- [Display(Name = "盘点类型")]
- public EnumCountType Type { get; set; }
-
- ///
- /// 零件条件集合
- ///
- [Display(Name = "零件条件集合")]
- public List PartCondition { get; set; } = new();
-
- ///
- /// 库位条件集合
- ///
- [Display(Name = "库位条件集合")]
- public List LocCondition { get; set; } = new();
-
- ///
- /// 状态
- ///
- [Display(Name = "状态")]
- public List StatusList { get; set; }
-
- ///
- /// 操作员
- ///
- [Display(Name = "操作员")]
- //[Required(ErrorMessage = "{0}是必填项")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string Worker { get; set; }
-
- ///
- /// 仓库
- ///
- [Display(Name = "仓库")]
- //[Required(ErrorMessage = "{0}是必填项")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string WarehouseCode { get; set; }
-
- ///
- /// 备注
- ///
- [Display(Name = "备注")]
- public string Remark { get; set; }
-
- ///
- /// 盘点阶段
- ///
- [Display(Name = "盘点阶段")]
- public EnumCountStage CountStage { get; set; } = EnumCountStage.Circulate;
-
- ///
- /// 盘点的零件集合
- ///
- [Display(Name = "盘点的零件集合")]
- public string JsonItemCodes { get; set; }
-
- ///
- /// 盘点的库位集合
- ///
- [Display(Name = "盘点的库位集合")]
- public string JsonLocationCodes { get; set; }
-
- ///
- /// 盘点的库存状态集合
- ///
- [Display(Name = "盘点的库存状态集合")]
- public string JsonInventoryStatus { get; set; }
+ public List DepDetails { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteDetailInput.cs
index a02d61277..e4bacb627 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteDetailInput.cs
@@ -4,55 +4,41 @@ using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
-public class KittingPackagingNoteDetailInput : SfsJobDetailInputBase, IHasCountResult
+public class KittingPackagingNoteDetailInput : SfsStoreDetailInputBase
{
-
- ///
- /// 盘点标签
- ///
- [Display(Name = "盘点标签")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string CountLabel { get; set; }
-
- ///
- /// 计量单位
- ///
- [Display(Name = "计量单位")]
- public string Uom { get; set; }
-
///
- /// 库存数量
+ /// 物品代码
///
- [Display(Name = "库存数量")]
- public decimal InventoryQty { get; set; }
+ [Display(Name = "物品代码")]
+ public string ItemCode { get; set; }
///
- /// 库存库位
+ /// 物品名称
///
- [Display(Name = "库存库位")]
- public string InventoryLocationCode { get; set; }
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
///
- /// 盘点数量
+ /// 物品描述1
///
- [Display(Name = "盘点数量")]
- public decimal CountQty { get; set; }
+ [Display(Name = "物品描述1")]
+ public string ItemDesc1 { get; set; }
///
- /// 盘点时间
+ /// 物品描述2
///
- [Display(Name = "盘点时间")]
- public DateTime? CountTime { get; set; }
+ [Display(Name = "物品描述2")]
+ public string ItemDesc2 { get; set; }
///
- /// 盘点操作员
+ /// 数量
///
- [Display(Name = "盘点操作员")]
- public string CountOperator { get; set; }
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
///
- /// 盘点描述
+ /// Kitting代码
///
- [Display(Name = "盘点描述")]
- public string CountDescription { get; set; }
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteEditInput.cs
index 233be52d8..2a86f883f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteEditInput.cs
@@ -2,81 +2,25 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
-public class KittingPackagingNoteEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput
+public class KittingPackagingNoteEditInput : SfsStoreCreateOrUpdateInputBase
{
- #region Base
///
- /// 盘点方式
+ /// kitting代码
///
- [Display(Name = "盘点方式")]
- public EnumCountMethod CountMethod { get; set; }
- ///
- /// 类型
- ///
- [Display(Name = "盘点类型")]
-
- public EnumCountType Type { get; set; }
-
- ///
- /// 描述
- ///
- [Display(Name = "描述")]
-
- public string Description { get; set; }
-
- ///
- /// 物料代码
- ///
- [Display(Name = "物料代码")]
- public string ItemCode { get; set; }
-
- ///
- /// 库位代码
- ///
- [Display(Name = "库位代码")]
- public string LocationCode { get; set; }
- #endregion
-
- #region Create
- ///
- /// 上游任务编号
- ///
- [Display(Name = "上游任务编号")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string UpStreamJobNumber { get; set; }
-
- ///
- /// 盘点计划号
- ///
- [Display(Name = "盘点计划号")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string CountPlanNumber { get; set; }
-
- ///
- /// 盘点阶段
- ///
- [Display(Name = "盘点阶段")]
- public EnumCountStage CountStage { get; set; }
-
- ///
- /// 任务类型
- ///
- [Display(Name = "任务类型")]
- public EnumJobType JobType { get; set; }
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
///
- /// 是否自动完成
+ /// 明细(记录Kitting打包中的子物品明细)
///
- [Display(Name = "是否自动完成")]
- public bool IsAutoComplete { get; set; }
+ public List Details { get; set; } = new();
///
- /// 任务明细
+ /// 明细(记录底盘相关的信息)
///
- [Display(Name = "任务明细")]
- public List Details { get; set; }
- #endregion
+ public List DepDetails { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteImportInput.cs
index 793c3611e..0982b42a4 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteImportInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteImportInput.cs
@@ -1,32 +1,24 @@
+using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteImportInput : SfsStoreImportInputBase
{
-
- ///
- /// 盘点任务单号
- ///
- [Display(Name = "盘点任务单号")]
- public string CountJobNumber { get; set; }
-
///
- /// 盘点计划单号
+ /// kitting代码
///
- [Display(Name = "盘点计划单号")]
- public string CountPlanNumber { get; set; }
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
///
- /// 调整类型
+ /// 明细(记录打包的明细)
///
- [Display(Name = "调整类型")]
- public string Type { get; set; }
+ public List Details { get; set; } = new();
///
- /// 是否已经调整
+ /// 明细(记录每次扫的位置)
///
- [Display(Name = "是否已经调整")]
- [Required(ErrorMessage = "{0}是必填项")]
- public bool IsAdjusted { get; set; } = false;
+ public List DepDetails { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesNoteEditInput.cs
index e853ee4cb..8cf9f0a46 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesNoteEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesNoteEditInput.cs
@@ -29,7 +29,7 @@ public class MesNoteEditInput : SfsStoreCreateOrUpdateInputBase
public string MesRequestNumber { get; set; }
///
- /// Mes类型(40-冻结、41-解冻 )
+ /// Mes类型(事务类型40-冻结、41-解冻 )
///
[Display(Name = "类型")]
public string Type { get; set; }
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs
index 83d5fd280..82e0f51b2 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs
@@ -98,6 +98,8 @@ public class StorePermissionDefinitionProvider : PermissionDefinitionProvider
storeGroup.AddChassisPermission();
storeGroup.AddChassisOperationSequencePermission();
+ storeGroup.AddKittingPackagingNotePermission();
+
#region Jobs
storeGroup.AddPurchaseReceiptJobPermission();
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs
index 13c1f6bc0..e4607976b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs
@@ -53,3 +53,10 @@ public class InjectionIssueRequestDetailDTO : SfsStoreDetailWithQtyDTOBase
[Display(Name = "需求箱数量")]
public decimal BoxQty { get; set; }
}
+public class UnCompletedRequestDto
+{
+ public string ItemCode { get; set; }
+ public string LocCode { get; set; }
+ public string PositionCode { get; set; }
+
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs
index 8eb902d1d..dca017df7 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs
@@ -23,4 +23,7 @@ public interface IInjectionIssueRequestAppService
///
///
Task> GetItemCategoryListAsync();
+
+
+ Task> GetUnCompletedRequestAsync(List p_list);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Chassis/ChassisAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Chassis/ChassisAppService.cs
index a9a359d8d..97483d727 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Chassis/ChassisAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Chassis/ChassisAppService.cs
@@ -1,25 +1,15 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using Castle.Components.DictionaryAdapter;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using Volo.Abp;
using Volo.Abp.Application.Dtos;
-using Volo.Abp.Domain.Entities;
-using Volo.Abp.Domain.Repositories;
-using Volo.Abp.ObjectMapping;
-using Win_in.Sfs.Basedata.Equipments.DTOs;
-using Win_in.Sfs.Shared.Application;
-using Win_in.Sfs.Shared.Application.Contracts;
+using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
-using Win_in.Sfs.Wms.Store.Equipments;
namespace Win_in.Sfs.Wms.Store.Application;
@@ -36,7 +26,7 @@ public class ChassisAppService
public ChassisAppService(
IChassisRepository repository, IChassisManager manager
- ):base(repository)
+ ) : base(repository)
{
base.CreatePolicyName = ChassisPermissions.Create;
base.UpdatePolicyName = ChassisPermissions.Update;
@@ -45,6 +35,7 @@ public class ChassisAppService
_repository = repository;
_manager = manager;
}
+
#region 无用
[NonAction]
@@ -83,5 +74,32 @@ public class ChassisAppService
throw new NotImplementedException();
}
+ ///
+ /// 平板或手持使用 按照底盘返回排序大于参数中20个的
+ ///
+ ///
+ [HttpPost("get-list-with-next-count")]
+ public async Task> GetListWithNextCountAsync(long sortNumber,int count,
+ CancellationToken cancellationToken = default)
+ {
+ var requestInput = new SfsStoreRequestInputBase
+ {
+ MaxResultCount = count,
+ SkipCount = 0,
+ Sorting = $"{nameof(Chassis.SortNumber)} DESC",
+ Condition = new Condition
+ {
+ Filters = new List { new(nameof(Chassis.SortNumber), sortNumber.ToString(), ">=") }
+ }
+ };
+
+ var expression = requestInput.Condition.Filters?.Count > 0
+ ? requestInput.Condition.Filters.ToLambda()
+ : p => true;
+
+ return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount,
+ requestInput.Sorting, false, cancellationToken).ConfigureAwait(false);
+ }
+
#endregion
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs
index b14ce3ce2..289f78092 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs
@@ -1,32 +1,20 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
-using Castle.Components.DictionaryAdapter;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using Volo.Abp;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Domain.Entities;
-using Volo.Abp.Domain.Repositories;
-using Volo.Abp.ObjectMapping;
-using Win_in.Sfs.Basedata.Equipments.DTOs;
-using Win_in.Sfs.Shared.Application;
-using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
-using Win_in.Sfs.Wms.Store.Equipments;
namespace Win_in.Sfs.Wms.Store.Application;
[Authorize]
[Route($"{StoreConsts.RootPath}ChassisOperationSequence")]
public class ChassisOperationSequenceAppService
- : SfsStoreAppServiceBase
, IChassisOperationSequenceAppService
@@ -36,7 +24,7 @@ public class ChassisOperationSequenceAppService
public ChassisOperationSequenceAppService(
IChassisOperationSequenceRepository repository, IChassisOperationSequenceManager manager
- ):base(repository)
+ ) : base(repository)
{
base.CreatePolicyName = ChassisOperationSequencePermissions.Create;
base.UpdatePolicyName = ChassisOperationSequencePermissions.Update;
@@ -45,6 +33,35 @@ public class ChassisOperationSequenceAppService
_repository = repository;
_manager = manager;
}
+
+ ///
+ /// 修改底盘执行序列位置 根据 KitingCode
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("update-chassis-sort-number-by-kitting-code")]
+ public async Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber)
+ {
+ var chassisOperationSequence =
+ await _repository.FindAsync(p => p.KittingCode == kittingCode).ConfigureAwait(false);
+
+ if (chassisOperationSequence == null)
+ {
+ var input= new ChassisOperationSequenceEditInput();
+ input.KittingCode=kittingCode;
+ input.ChassisNumber = string.Empty;
+ input.ChassisSortNumber = newChassisSortNumber;
+ await CreateAsync(input).ConfigureAwait(false);
+ }
+ else
+ {
+ chassisOperationSequence.ChassisSortNumber = newChassisSortNumber;
+
+ await _repository.UpdateAsync(chassisOperationSequence).ConfigureAwait(false);
+ }
+ }
+
#region 无用
[NonAction]
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs
index a59670213..8a583d7bc 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs
@@ -1,5 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Castle.Components.DictionaryAdapter;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using Volo.Abp;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Basedata.Boms.DTOs;
+using Win_in.Sfs.Basedata.Domain;
+using Win_in.Sfs.Basedata.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
@@ -7,7 +17,7 @@ using Win_in.Sfs.Wms.Store.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application;
///
-/// 盘点接口
+/// kitting打包记录
///
[Authorize]
[Route($"{StoreConsts.RootPath}KittingPackagingNote")]
@@ -22,13 +32,62 @@ public class KittingPackagingNoteAppService
SfsStoreRequestInputBase,
KittingPackagingNoteImportInput>, IKittingPackagingNoteAppService
{
- private readonly IKittingPackagingNoteManager _kittingPackagingNoteManager;
+ private readonly IChassisOperationSequenceAppService _chassisOperationSequenceAppService;
+ private readonly IBomAppService _bomAppService;
+ private readonly IKittingAppService _kittingAppService;
public KittingPackagingNoteAppService(
- IKittingPackagingNoteRepository repository,
- IJisProductReceiptNoteManager KittingPackagingNoteManager,
- IKittingPackagingNoteManager kittingPackagingNoteManager) : base(repository)
+ IKittingPackagingNoteRepository repository, IChassisOperationSequenceAppService chassisOperationSequenceAppService, IBomAppService bomAppService, IKittingAppService kittingAppService) : base(repository)
{
- _kittingPackagingNoteManager = kittingPackagingNoteManager;
+ _chassisOperationSequenceAppService = chassisOperationSequenceAppService;
+ _bomAppService = bomAppService;
+ _kittingAppService = kittingAppService;
+ }
+
+ [HttpPost("")]
+ public override async Task CreateAsync(KittingPackagingNoteEditInput input)
+ {
+ var sortNumber=input.DepDetails.Max(p => p.ChassisSortNumber);
+ await _chassisOperationSequenceAppService.UpdateChassisSortNumberByKittingCodeAsync(input.KittingCode,sortNumber).ConfigureAwait(false);
+ //所有底盘转换为总成的零件号
+ var chassisItemCode = new List();
+ var listItemCode=input.DepDetails.Select(p => p.ItemCode);
+ foreach (var itemCode in listItemCode)
+ {
+ var bomDtos=await _bomAppService.GetBomTreeByCodeAsync(itemCode).ConfigureAwait(false);
+ if (bomDtos == null|| bomDtos.Count<1)
+ {
+ throw new UserFriendlyException($"物品代码【{itemCode}】没有Bom信息");
+ }
+ var bomItemCodeList = bomDtos.Select(p => p.Component);
+
+ chassisItemCode.AddRange(bomItemCodeList);
+ }
+ chassisItemCode=chassisItemCode.Distinct().ToList();
+ //获取kitting中维护的零件号
+ var kittingDto=await _kittingAppService.GetByCodeAsync(input.KittingCode).ConfigureAwait(false);
+ var kittingItemCodeList= kittingDto.Details.Select(p => p.PartCode);
+ //取出交集得到KittingCode中的零件
+ var hasItemCode= kittingItemCodeList.Intersect(chassisItemCode).ToList();
+
+ foreach (var itemCode in hasItemCode)
+ {
+ var detailInput = new KittingPackagingNoteDetailInput();
+
+ var itemBase=kittingDto.Details.First(p => p.PartCode == itemCode);
+
+ detailInput.KittingCode = input.KittingCode;
+ detailInput.ItemCode = itemCode;
+ detailInput.ItemDesc1 = itemBase.Desc1;
+ detailInput.ItemDesc2= itemBase.Desc2;
+ //todo 等待赵新宇加完字段
+ //kittingPackagingNoteDetail.ItemName=itemBase.ItemName
+ detailInput.Qty= itemBase.Qty;
+
+ input.Details.Add(detailInput);
+ }
+ input.DepDetails.ForEach(p=>p.KittingCode=input.KittingCode);
+
+ return await base.CreateAsync(input).ConfigureAwait(false);
}
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs
index 3b7c91e39..ab918a9ec 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs
@@ -66,7 +66,11 @@ public class MesNoteAppService :
var itemBasicDto =await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
if (fromLocation == null)
{
- throw new UserFriendlyException($"库位为空");
+ throw new UserFriendlyException($"来源库位为空");
+ }
+ if (fromLocation == null)
+ {
+ throw new UserFriendlyException($"目标库位为空");
}
detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number);
detail.FromLocationArea = fromLocation.AreaCode;
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
index b998f6bbc..119c5d67f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
@@ -349,5 +349,35 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase
+ /// 获取已完成的叫料单数量
+ ///
+ ///
+ [HttpPost("get-uncompleted-request")]
+ public async Task> GetUnCompletedRequestAsync(List p_list)
+ {
+ List returnList = new List();
+ //枚举类型查不到改成SQL查询
+ var list =await _repository.WithDetails().Where(p => p.RequestStatus != EnumRequestStatus.Completed && p.Type == nameof(EnumIssueType.Vision)).ToListAsync().ConfigureAwait(false);
+ foreach (var itm in list)
+ {
+ var query = from detail in itm.Details join citm in p_list on new { detail.ItemCode, locCode= detail.ToLocationCode,areaCode=detail.PositionCode } equals
+ new { citm.ItemCode, locCode= citm.LocCode,areaCode=citm.PositionCode }
+ select new UnCompletedRequestDto { ItemCode = detail.ItemCode, LocCode = detail.ToLocationCode, PositionCode = detail.PositionCode } ;
+
+ returnList.AddRange(query.ToList());
+ }
+ return returnList;
+ }
+
+
+
+
+
+
+
+
+
+
#endregion
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ChassisOperationSequence/ChassisOperationSequence.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ChassisOperationSequence/ChassisOperationSequence.cs
index 974c2cab3..385bfba8e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ChassisOperationSequence/ChassisOperationSequence.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ChassisOperationSequence/ChassisOperationSequence.cs
@@ -10,10 +10,10 @@ namespace Win_in.Sfs.Wms.Store.Domain;
public class ChassisOperationSequence : SfsAggregateRootBase
{
///
- /// kitting执行序列号
+ /// Kitting执行底盘序列位置
///
- [Display(Name = "kitting执行序列号")]
- public string KittingNumber { get; set; }
+ [Display(Name = "Kitting执行底盘序列位置")]
+ public long ChassisSortNumber { get; set; }
///
/// kitting代码
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNote.cs
index ba220dc50..204a3d063 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNote.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNote.cs
@@ -1,7 +1,5 @@
-using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Domain.Entities;
namespace Win_in.Sfs.Wms.Store.Domain;
@@ -18,14 +16,12 @@ public class KittingPackagingNote : SfsStoreAggregateRootBase
- /// 任务明细
+ /// 明细(记录Kitting打包中的子物品明细)
///
- [IgnoreUpdate]
- public override List Details { get; set; } = new();
+ public List Details { get; set; } = new();
///
- /// 任务从表明细(记录每次扫得明细)
+ /// 明细(记录底盘相关的信息)
///
- [IgnoreUpdate]
public List DepDetails { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteChassisDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteChassisDetail.cs
index 2f2a0bdf7..e1349a47e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteChassisDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteChassisDetail.cs
@@ -1,51 +1,19 @@
-using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Domain;
-public class KittingPackagingNoteChassisDetail : SfsJobDetailEntityBase, IHasCountResult, IHasInventoryQty
+public class KittingPackagingNoteChassisDetail : SfsStoreDetailEntityBase
{
-
- ///
- /// 盘点标签
- ///
- public string CountLabel { get; set; }
-
- ///
- /// 库存数量
- ///
- public decimal InventoryQty { get; set; }
-
- ///
- /// 计量单位
- ///
- [Display(Name = "计量单位")]
- public string Uom { get; set; }
-
///
- /// 库存库位
+ /// 底盘号
///
- public string InventoryLocationCode { get; set; }
+ [Display(Name = "底盘号")]
+ public long ChassisNumber { get; set; }
///
- /// 盘点数量(每次扫得数量)
+ /// Kitting代码
///
- public decimal CountQty { get; set; }
-
- ///
- /// 盘点时间
- ///
- public DateTime? CountTime { get; set; }
-
- ///
- /// 盘点操作员
- ///
- public string CountOperator { get; set; }
-
- ///
- /// 盘点描述
- ///
- public string CountDescription { get; set; }
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
}
-
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteDetail.cs
index a195a60a5..ef3523c43 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteDetail.cs
@@ -1,6 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Domain;
-using Win_in.Sfs.Shared.Domain.Entities;
namespace Win_in.Sfs.Wms.Store.Domain;
@@ -10,8 +8,6 @@ public class KittingPackagingNoteDetail : SfsStoreDetailEntityBase
/// 物品代码
///
[Display(Name = "物品代码")]
- [Required(ErrorMessage = "{0}是必填项")]
- [IgnoreUpdate]
public string ItemCode { get; set; }
///
@@ -37,4 +33,10 @@ public class KittingPackagingNoteDetail : SfsStoreDetailEntityBase
///
[Display(Name = "数量")]
public decimal Qty { get; set; }
+
+ ///
+ /// Kitting代码
+ ///
+ [Display(Name = "Kitting代码")]
+ public string KittingCode { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs
index ab86c5fa3..5fd1058d9 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs
@@ -65,6 +65,7 @@ public interface IStoreDbContext : IEfCoreDbContext
#endregion
#region Notes
+
public DbSet ItemTransformNotes { get; }
public DbSet RecycledMaterialReceiptNotes { get; }
public DbSet TransferNotes { get; }
@@ -105,6 +106,9 @@ public interface IStoreDbContext : IEfCoreDbContext
public DbSet ContainerBindNotes { get; }
public DbSet NoOkConvertOkNotes { get; }
public DbSet WipWarehouseAdjustNotes { get; }
+
+ public DbSet KittingPackagingNote { get; }
+
#endregion
#region Jobs
@@ -135,9 +139,9 @@ public interface IStoreDbContext : IEfCoreDbContext
#endregion
///
- /// 底盘信息
+ /// 底盘信息
///
- public DbSet Chassis { get; }
+ public DbSet Chassis { get; }
public DbSet ExchangeDatas { get; }
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422030203_Added_KittingPackagingNote.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422030203_Added_KittingPackagingNote.Designer.cs
new file mode 100644
index 000000000..a24e40541
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422030203_Added_KittingPackagingNote.Designer.cs
@@ -0,0 +1,31896 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.Store.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Win_in.Sfs.Wms.Store.Migrations
+{
+ [DbContext(typeof(StoreDbContext))]
+ [Migration("20240422030203_Added_KittingPackagingNote")]
+ partial class Added_KittingPackagingNote
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "6.0.13")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJob", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AcceptTime")
+ .HasColumnType("datetime2");
+
+ b.Property("AcceptUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AcceptUserName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("AssembleRequestNumber")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("CompleteTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CompleteUserName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsAutoComplete")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("JobDescription")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("JobStatus")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("JobType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Priority")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0);
+
+ b.Property("PriorityIncrement")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0);
+
+ b.Property("ProdLine")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("RequestType")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("UpStreamJobNumber")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("UseOnTheWayLocation")
+ .HasColumnType("bit");
+
+ b.Property("WarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("WorkGroupCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Worker")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Number")
+ .IsUnique();
+
+ b.ToTable("Job_AssembleIssueJob", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJobDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("HandledFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("HandledFromSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("HandledToSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemDesc1")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemDesc2")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MasterID")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Number")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OnTheWayLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PositionCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ProdLine")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RecommendFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RecommendFromSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RecommendToSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("RequestLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RequestLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RequestLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RequestLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RequestQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RequestWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("StdPackQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TransferLibFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property