chengsc
2024-09-12 4db56b86d54f4f8d5a01ecb7365a30673f5d8fd4
Merge branch 'master' into csc
4个文件已修改
34 ■■■■■ 已修改文件
Admin.NET/WCS.Application/Hub/PlcHub.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/PLC/PLCService.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsPlc/WcsPlcService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/device/deviceInfo/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Hub/PlcHub.cs
@@ -63,6 +63,12 @@
            PLCTaskAction.boRefresh = context.BoRefresh.Value;
            await _sysConfigService.UpdateConfigValue("sys_Refresh", context.BoRefresh.Value);
        }
        //演示模式
        if (context.BoDemo.HasValue)
        {
            PLCTaskAction.boDemo = context.BoDemo.Value;
            await _sysConfigService.UpdateConfigValue("sys_demo", context.BoDemo.Value);
        }
        await _plcHubContext.Clients.All.UpdateService(new PLCServiceModel() { BoRunningState = PLCTaskAction.boRunningState, BoRefresh = PLCTaskAction.boRefresh, BoOffline = PLCTaskAction.boOffline, BoDemo = PLCTaskAction.boDemo});
    }
}
Admin.NET/WCS.Application/PLC/PLCService.cs
@@ -42,6 +42,9 @@
                case PLCTypeEnum.PalletMachine:
                    PalletMachine(mod);
                    break;
                case PLCTypeEnum.StackingRobot:
                    PalletMachine(mod);
                    break;
                default:
                    break;
            }
@@ -1123,6 +1126,25 @@
    }
    /// <summary>
    /// 拆垛机器人业务处理
    /// </summary>
    /// <param name="modDevice"></param>
    private static void StackingRobot(WcsDeviceDto modDevice)
    {
        var plcConn = modDevice.PLCUtil;
        switch (modDevice.Value.ToString())
        {
            case "0":
                {
                    // 若拆垛工位为空闲,查询任务表是否有未绑定的出库任务,做绑定操作
                }
                break;
            default:
                break;
        }
    }
    private static void Test(WcsDeviceDto modDevice)
    {
        //写死测试读string
Admin.NET/WCS.Application/Service/WcsPlc/WcsPlcService.cs
@@ -135,7 +135,7 @@
            }
        }
        //服务状态
        var modService = new { PLCTaskAction.boRunningState, PLCTaskAction.boOffline, PLCTaskAction.boRefresh };
        var modService = new { PLCTaskAction.boRunningState, PLCTaskAction.boOffline, PLCTaskAction.boRefresh, PLCTaskAction.boDemo };
        return new { listPlc, modService };
    }
    /// <summary>
Web/src/views/device/deviceInfo/index.vue
@@ -16,6 +16,10 @@
                            <el-switch v-model="state.boRefresh" active-text="" inactive-text="自刷新"
                                @change="handleSwitchChange('boRefresh', $event)"></el-switch>
                        </el-card>
                        <el-card class="box-card" shadow="hover" style="margin-top: 3px;">
                            <el-switch v-model="state.boDemo" active-text="" inactive-text="演示模式"
                                @change="handleSwitchChange('boDemo', $event)"></el-switch>
                        </el-card>
                    </el-collapse-item>
                    <el-collapse-item title="堆垛机" name="2">