huangxiaoqiang
2025-03-04 1b6ccb64675e5262a2f7135697edc7466ffc14bf
优化
已修改5个文件
53 ■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Client/src/views/ProcessParameters/PlatForm.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/ObjectExtension.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/ProcessParameters/PlatForm.vue
@@ -33,7 +33,7 @@
      stacker: "",
      executionMethod:"",
      platformType:"",
      pLCCode:"",
      plcCode:"",
      location: "",
      capacity: "",
      status: "",
@@ -59,7 +59,7 @@
      stacker: "",
      executionMethod:"",
      platformType:"",
      pLCCode:"",
      plcCode:"",
      location: "",
      capacity: "",
      status: "",
Code Management/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue
@@ -32,7 +32,7 @@
      roadway: "",
      taskType:"",
      taskState:"",
      wMSId:"",
      wmsId:"",
      sourceAddress: "",
      targetAddress: "",
      currentAddress: "",
@@ -193,7 +193,7 @@
        align: "left",
      },
      {
        field: "wMSId",
        field: "wmsId",
        title: "WMS任务主键",
        type: "int",
        width: 120,
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/ObjectExtension.cs
@@ -23,18 +23,15 @@
        {
            T model = Activator.CreateInstance<T>();
            PropertyInfo[] propertyInfos = typeof(T).GetProperties(BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance);
            Dictionary<string, object> upperDic = dic.ToDictionary(x => x.Key.ToUpper(), y => y.Value);
            foreach (var property in propertyInfos)
            {
                object value = null;
                if (!dic.TryGetValue(property.Name, out value))
                if (!upperDic.TryGetValue(property.Name.ToUpper(), out value))
                {
                    if (!dic.TryGetValue(property.Name.FirstLetterToUpper(), out value))
                    {
                        if (!dic.TryGetValue(property.Name.FirstLetterToLower(), out value))
                        {
                            continue;
                        }
                    }
                    continue;
                };
                property.SetValue(model, value?.ToString().ChangeType(property.PropertyType));
            }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs
@@ -173,11 +173,11 @@
                if (sugarColumn == null)
                    return "请配置SugarColumn属性";
                //忽略与主键的字段不做验证
                if (property.Name == keyName.FirstLetterToUpper() || (ignoreFields != null && ignoreFields.Contains(property.Name)) || sugarColumn.IsOnlyIgnoreInsert || sugarColumn.IsOnlyIgnoreUpdate || sugarColumn.IsIgnore)
                if (property.Name.ToUpper() == keyName.ToUpper() || (ignoreFields != null && ignoreFields.Contains(property.Name)) || sugarColumn.IsOnlyIgnoreInsert || sugarColumn.IsOnlyIgnoreUpdate || sugarColumn.IsIgnore)
                    continue;
                //不在编辑中的列,是否也要必填
                if (!dic.ContainsKey(property.Name.FirstLetterToLower()))
                if (!dic.ContainsKey(property.Name.ToUpper()))
                {
                    if (!sugarColumn.IsNullable)
                    {
@@ -187,12 +187,12 @@
                    }
                    continue;
                }
                if(dic[property.Name.FirstLetterToLower()] != null)
                if(dic[property.Name.ToUpper()] != null)
                {
                    string str = dic[property.Name.FirstLetterToLower()].ToString();
                    string str = dic[property.Name.ToUpper()].ToString();
                    //将所有空值设置为null
                    if (str == string.Empty)
                        dic[property.Name.FirstLetterToLower()] = null;
                        dic[property.Name.ToUpper()] = null;
                }
                
            }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs
@@ -42,7 +42,7 @@
        /// </summary>
        [ImporterHeader(Name = "任务号")]
        [ExporterHeader(DisplayName = "任务号")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务号")]
        [SugarColumn(IsNullable = true, ColumnDescription = "任务号")]
        public int TaskNum { get; set; }
        /// <summary>
@@ -50,7 +50,7 @@
        /// </summary>
        [ImporterHeader(Name = "托盘编号")]
        [ExporterHeader(DisplayName = "托盘编号")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "托盘编号")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "托盘编号")]
        public string PalletCode { get; set; }
        /// <summary>
@@ -58,7 +58,7 @@
        /// </summary>
        [ImporterHeader(Name = "巷道号")]
        [ExporterHeader(DisplayName = "巷道号")]
        [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "巷道号")]
        [SugarColumn(IsNullable = true, Length = 10, ColumnDescription = "巷道号")]
        public string Roadway { get; set; }
        /// <summary>
@@ -66,7 +66,7 @@
        /// </summary>
        [ImporterHeader(Name = "任务类型")]
        [ExporterHeader(DisplayName = "任务类型")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务类型")]
        [SugarColumn(IsNullable = true, ColumnDescription = "任务类型")]
        public int TaskType { get; set; }
        /// <summary>
@@ -74,7 +74,7 @@
        /// </summary>
        [ImporterHeader(Name = "任务状态")]
        [ExporterHeader(DisplayName = "任务状态")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务状态")]
        [SugarColumn(IsNullable = true, ColumnDescription = "任务状态")]
        public int TaskState { get; set; }
        /// <summary>
@@ -82,7 +82,7 @@
        /// </summary>
        [ImporterHeader(Name = "起始地址")]
        [ExporterHeader(DisplayName = "起始地址")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "起始地址")]
        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "起始地址")]
        public string SourceAddress { get; set; }
        /// <summary>
@@ -90,7 +90,7 @@
        /// </summary>
        [ImporterHeader(Name = "目标地址")]
        [ExporterHeader(DisplayName = "目标地址")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "目标地址")]
        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "目标地址")]
        public string TargetAddress { get; set; }
        /// <summary>
@@ -98,7 +98,7 @@
        /// </summary>
        [ImporterHeader(Name = "当前位置")]
        [ExporterHeader(DisplayName = "当前位置")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "当前位置")]
        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "当前位置")]
        public string CurrentAddress { get; set; }
        /// <summary>
@@ -106,7 +106,7 @@
        /// </summary>
        [ImporterHeader(Name = "下一地址")]
        [ExporterHeader(DisplayName = "下一地址")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "下一地址")]
        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "下一地址")]
        public string NextAddress { get; set; }
        /// <summary>
@@ -122,7 +122,7 @@
        /// </summary>
        [ImporterHeader(Name = "优先级")]
        [ExporterHeader(DisplayName = "优先级")]
        [SugarColumn(IsNullable = false, ColumnDescription = "优先级")]
        [SugarColumn(IsNullable = true, ColumnDescription = "优先级")]
        public int Grade { get; set; }
        /// <summary>
@@ -130,7 +130,7 @@
        /// </summary>
        [ImporterHeader(Name = "WMS任务主键")]
        [ExporterHeader(DisplayName = "WMS任务主键")]
        [SugarColumn(IsNullable = false, ColumnDescription = "WMS任务主键")]
        [SugarColumn(IsNullable = true, ColumnDescription = "WMS任务主键")]
        public int WMSId { get; set; }
        /// <summary>