hwh
2024-09-19 d37d5a268555d0fb09719a8631bdbd0bad2318f8
工作台绑定结束工位
5个文件已修改
24 ■■■■ 已修改文件
Admin.NET/WCS.Application/Entity/WcsDevice.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Hub/IPlcHub.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/PLC/PLCTaskAction.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/device/deviceInfo/data.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/device/deviceInfo/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Entity/WcsDevice.cs
@@ -85,4 +85,9 @@
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    public int BoxHeight { get; set; }
    /// <summary>
    /// 目的工位
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    public string EndLocat { get; set; }
}
Admin.NET/WCS.Application/Hub/IPlcHub.cs
@@ -47,5 +47,6 @@
        public bool BoHaveItem { get; set; }
        public PLCTypeEnum Type { get; set; }
        public int BoxHeight { get; set; }
        public string EndLocat { get; set; }
    }
}
Admin.NET/WCS.Application/PLC/PLCTaskAction.cs
@@ -397,14 +397,24 @@
                                    {
                                        var value = Convert.ToInt32(item.Value);
                                        var height = Math.Round(value / 790000d * 200).ToInt();
                                        if (modDevice.BoxHeight != height)
                                        var modPosition = listPlcPosition.FirstOrDefault(s => s.DeviceId == modDevice.Id && s.Text == "目的工位");
                                        string EndLocat = "";
                                        if (modPosition != null)
                                        {
                                            var (result2, value2) = modPlcUtil.GetPlcDBValue(modPosition.PosType, modDevice.DbNumber, modPosition.PlcPos);
                                            if (result2.IsSucceed)
                                                EndLocat = Convert.ToString(value2);
                                        }
                                        if (modDevice.BoxHeight != height || modDevice.EndLocat != EndLocat)
                                        {
                                            modDevice.EndLocat = EndLocat;
                                            modDevice.BoxHeight = Math.Round(value / 790000d * 200).ToInt();
                                            var modInfo = new PlcPositionInfo()
                                            {
                                                Type = modPlc.Type,
                                                StationNum = modDevice.StationNum,
                                                BoxHeight = modDevice.BoxHeight
                                                BoxHeight = modDevice.BoxHeight,
                                                EndLocat = EndLocat,
                                            };
                                            HubUtil.PublicPosition(modInfo);
                                            UpdatePosition(modInfo);
Web/src/views/device/deviceInfo/data.ts
@@ -2,7 +2,7 @@
//堆垛机数据
const cellsDataLine = ref<any>([
    { Id: 1, Code: '001', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 },
    { Id: 2, Code: '10', LineCode: '01', EndLocat: '01010101', IsShow: 0, IsUse: 0, BoxHeight: 0 },
    { Id: 2, Code: '10', LineCode: '01', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 },
    { Id: 3, Code: '003', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 },
    { Id: 4, Code: '004', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 },
    { Id: 5, Code: '005', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 },
Web/src/views/device/deviceInfo/index.vue
@@ -100,6 +100,7 @@
            if (foundCell) {
                //修改高度
                foundCell.BoxHeight = s.boxHeight;
                foundCell.EndLocat = s.endLocat;
            }
        }
        else if (s.type == 1) {
@@ -166,6 +167,7 @@
    debugger;
    const foundCell = cellsDataLine.value.find(cell => cell.Code === data.stationNum);
    if (foundCell) {
        foundCell.EndLocat = data.endLocat;
        const startHeight = foundCell.BoxHeight;
        const targetHeight = data.boxHeight;
        const duration = 1000; // 动画持续时间(毫秒)