bklLiudl
2025-01-16 6342dc6e455db957383f2abedc5c4863b6515d85
Merge branch 'master' into liudl
3个文件已修改
1个文件已添加
66 ■■■■■ 已修改文件
Admin.NET/WCS.Application/Job/LogClearJob.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/device/deviceInfo/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Job/LogClearJob.cs
New file
@@ -0,0 +1,37 @@
using Furion.Schedule;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Application;
/// <summary>
/// 日志清理任务
/// </summary>
[JobDetail("job_logClear", Description = "任务日志清理任务", GroupName = "default", Concurrent = false)]
[Daily(TriggerId = "trigger_logClear", Description = "任务日志清理任务")]
public class LogClearJob : IJob
{
    private readonly IServiceScopeFactory _scopeFactory;
    private readonly ILogger _logger;
    public LogClearJob(IServiceScopeFactory scopeFactory, ILoggerFactory loggerFactory)
    {
        _scopeFactory = scopeFactory;
        _logger = loggerFactory.CreateLogger(CommonConst.SysLogCategoryName);
    }
    public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)
    {
        using var serviceScope = _scopeFactory.CreateScope();
        var rep = serviceScope.ServiceProvider.GetRequiredService<SqlSugarRepository<WcsTask>>();
        DateTime threeMonthsAgo = DateTime.Now.AddMonths(-3);
        await rep.CopyNew().Context.Deleteable<WcsTask>().Where(s => s.CreateTime < threeMonthsAgo).ExecuteCommandAsync(stoppingToken);
        await rep.CopyNew().Context.Deleteable<WcsTaskMonitor>().Where(s => s.CreateTime < threeMonthsAgo).ExecuteCommandAsync(stoppingToken);
        threeMonthsAgo = DateTime.Now.AddMonths(-6);
        await rep.CopyNew().Context.Deleteable<WcsAlarmLog>().Where(s => s.CreateTime < threeMonthsAgo).ExecuteCommandAsync(stoppingToken);
    }
}
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs
@@ -361,6 +361,16 @@
    /// </summary>
    public string EndCeng { get; set; }
    /// <summary>
    /// 缠膜交互
    /// </summary>
    public string ChanMo { get; set; }
    /// <summary>
    /// 拆模交互
    /// </summary>
    public string ChaiMo { get; set; }
}
public class WcsDeviceStartStop
Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs
@@ -168,6 +168,11 @@
        var (result11, value11) = modUtil.GetPlcDBValue(PLCDataTypeEnum.Short, DbNum, "48");
        data.EndCeng = value11.ToString();
        var (result12, value12) = modUtil.GetPlcDBValue(PLCDataTypeEnum.Byte, DbNum, "50");
        data.ChanMo = value12.ToString();
        var (result13, value13) = modUtil.GetPlcDBValue(PLCDataTypeEnum.Byte, DbNum, "51");
        data.ChaiMo = value13.ToString();
        modUtil.Close();
        return data;
    }
Web/src/views/device/deviceInfo/index.vue
@@ -185,6 +185,16 @@
                                            </el-form-item>
                                        </el-col>
                                        
                                        <el-col :span="6">
                                            <el-form-item label="缠膜信号">
                                                <el-input v-model="stationValue.chanMo" disabled style="width: 200px; margin-right: 10px;"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="6">
                                            <el-form-item label="拆膜信号">
                                                <el-input v-model="stationValue.chaiMo" disabled style="width: 200px; margin-right: 10px;"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>    
                                </el-form>
                            </div>
@@ -232,6 +242,10 @@
    endPai:'',
    endLie:'',
    endCeng:'',
    chanMo:'',
    chaiMo:'',
});