Zhang-Hong-Lin
2025-03-03 d6d0a3b309814d58d20052e1fea34248dbfcc889
前端

前端
已修改3个文件
42 ■■■■■ 文件已修改
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_stationinfoService.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -23,6 +23,7 @@
using WIDESEAWCS_QuartzJob.DeviceEnum;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Common.LocationEnum;
using WIDESEAWCS_Common.StockEnum;
namespace WIDESEAWCS_WCSServer.Controllers.System
{
@@ -196,6 +197,30 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "stock":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(stockEnum);
                            List<int> enums = Enum.GetValues(type).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = type.GetField(((stockEnum)item).ToString());
                                DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                if (description != null)
                                {
                                    data.Add(new { key = item.ToString(), value = description.Description });
                                }
                                else
                                {
                                    data.Add(new { key = item.ToString(), value = item.ToString() });
                                }
                                index++;
                            }
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "taskType":
                        {
                            List<object> data = new List<object>();
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -6,7 +6,7 @@
            "Microsoft.AspNetCore": "Warning"
        }
    },
    "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,taskState,mateType,inOutType,enableStatusEnum,locationStatusEnum,locationTypeEnum",
    "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,stock,taskState,mateType,inOutType,enableStatusEnum,locationStatusEnum,locationTypeEnum",
    "AllowedHosts": "*",
    "ConnectionStringsEncryption": false,
    "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true 
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_stationinfoService.cs
@@ -1,11 +1,14 @@
using AutoMapper;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_Model.Models;
@@ -22,5 +25,17 @@
        {
            _mapper = mapper;
        }
        public override WebResponseContent UpdateData(SaveModel saveModel)
        {
            int id = saveModel.MainData["id"].ObjToInt();
            int Row = saveModel.MainData["row"].ObjToInt();
            int Column = saveModel.MainData["column"].ObjToInt();
            dt_stationInfo locationInfo = BaseDal.QueryFirst(x => x.Id == id);
            locationInfo.Row = Row;
            locationInfo.Column = Column;
            return UpdateData(locationInfo);
            //return base.UpdateData(saveModel);
        }
    }
}