From e83910ef8a7de64a2ba1a6419ec7ab51be28357d Mon Sep 17 00:00:00 2001 From: yinq Date: Tue, 12 Aug 2025 17:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=89=A7=E8=A1=8C=E6=97=B6?= =?UTF-8?q?=E7=8F=AD=E7=BB=84=E9=95=BF=E6=9C=AA=E6=89=93=E5=8D=A1=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs | 5 + SlnMesnac.WPF/appsettings.json | 138 ++++++++++---------- 2 files changed, 76 insertions(+), 67 deletions(-) diff --git a/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs b/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs index 6476597..7c797c1 100644 --- a/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs +++ b/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs @@ -588,6 +588,11 @@ namespace SlnMesnac.WPF.ViewModel // 向detail表里插入一条数据 //当前班长 var monitor = _databaseHandleBusniess.GetMonitor(RfidHandleBusniess.stationCode); + if(monitor == null) + { + MessageBox.Show("班组长未打卡!"); + return; + } if (pLanInfo.CompleteAmount == "0.00") { ProdPlanDetail prodPlanDetail = new ProdPlanDetail diff --git a/SlnMesnac.WPF/appsettings.json b/SlnMesnac.WPF/appsettings.json index 319ce99..0a7fe82 100644 --- a/SlnMesnac.WPF/appsettings.json +++ b/SlnMesnac.WPF/appsettings.json @@ -1,70 +1,74 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*", + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", - "AppConfig": { - "logPath": "E:\\桌面\\SlnMesnac\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows", - "SqlConfig": [ - { - "configId": "mes", - "dbType": 1, - "connStr": "server=119.45.202.115;uid=sa;pwd=haiwei@123;database=xmxs_os;Encrypt=True;TrustServerCertificate=True;" - } - //{ - // "configId": "mcs", - // "dbType": 3, - // "connStr": "Data Source=121.37.164.0/helowin;User ID=aucma_scada;Password=aucma" - //} - ], - "PlcConfig": [ - { - "configId": 1, - "plcType": "MelsecBinaryPlc", - "plcIp": "127.0.0.1", - "plcPort": 6000, - "plcKey": "mcs", - "isFlage": true - }, - { - "configId": 2, - "plcType": "MelsecBinaryPlc", - "plcIp": "127.0.0.1", - "plcPort": 6001, - "plcKey": "cwss", - "isFlage": true - } - ], - "RfidConfig": [ - { - "configId": 1, - "equipIp": "127.0.0.1", - "equipPort": 6003, - "equipKey": "test1", - "isFlage": true - }, - { - "configId": 2, - "equipIp": "127.0.0.1", - "equipPort": 6004, - "equipKey": "test2", - "isFlage": true - } - ], - "serialPort": "COM3", - "baudRate": 9600, - "dataBits": 8, - "stopBits": 1, - "parity": 0, - "redisConfig": "175.27.215.92:6379,password=redis@2023", - "StationCode": "1012-压延一出布,1013-压延一成型,1014-压延一包胶", - "DeviceCode": "XMGR0004", - "ProcessCode": "1002", - "ProductLineName": "压延一工位" - } + "AppConfig": { + "logPath": "E:\\桌面\\SlnMesnac\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows", + "SqlConfig": [ + { + "configId": "mes", + "dbType": 1, + "connStr": "server=119.45.202.115;uid=sa;pwd=haiwei@123;database=xmxs_os;Encrypt=True;TrustServerCertificate=True;" + } + //{ + // "configId": "mcs", + // "dbType": 3, + // "connStr": "server=10.tcp.cpolar.top,10218;uid=sa;pwd=xmxs@2024;database=xmxs_os;Encrypt=True;TrustServerCertificate=True;" + //} + ], + "PlcConfig": [ + { + "configId": 1, + "plcType": "MelsecBinaryPlc", + "plcIp": "127.0.0.1", + "plcPort": 6000, + "plcKey": "mcs", + "isFlage": true + }, + { + "configId": 2, + "plcType": "MelsecBinaryPlc", + "plcIp": "127.0.0.1", + "plcPort": 6001, + "plcKey": "cwss", + "isFlage": true + } + ], + "RfidConfig": [ + { + "configId": 1, + "equipIp": "127.0.0.1", + "equipPort": 6003, + "equipKey": "test1", + "isFlage": true + }, + { + "configId": 2, + "equipIp": "127.0.0.1", + "equipPort": 6004, + "equipKey": "test2", + "isFlage": true + } + ], + "serialPort": "COM3", + "baudRate": 9600, + "dataBits": 8, + "stopBits": 1, + "parity": 0, + "redisConfig": "175.27.215.92:6379,password=redis@2023", + // "StationCode": "1012-压延一出布,1013-压延一成型,1014-压延一包胶", + // "DeviceCode": "XMGR0004", + // "ProcessCode": "1002", + // "ProductLineName": "压延一工位" + "StationCode": "1023-硫化十一工位", + "DeviceCode": "XMGR0030", + "ProcessCode": "1023", + "ProductLineName": "硫化十一工位" + } }