liulb@mesnac.com 1 year ago
parent af79883b44
commit 32f2e8ca55

@ -285,7 +285,7 @@ namespace Admin.Core.Service
{
Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.MaterialType == null && x.StoreCode == store && x.SpaceCapacity != x.SpaceStock);
spaceInfos =await _dal.QueryAsync(exp);
spaceInfos =await _dal.QueryAsync(x => x.MaterialType == null && x.StoreCode == store && x.SpaceCapacity != x.SpaceStock);
}
catch (Exception ex)
{

@ -47,7 +47,8 @@ namespace Admin.Core.Service
{
try
{
List<RecordInstore> preCordList = await _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) && d.CreatedTime >= startTime&& d.CreatedTime <= endTime);
storeCode = "FPJCK-001";
List<RecordInstore> preCordList = await _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) );//&& d.CreatedTime >= startTime&& d.CreatedTime <= endTime
if (preCordList.Count() == 0) return null;
var proList = _productPlanInfoRepository.Query();
if (proList.Count() == 0) return null;

@ -52,7 +52,7 @@ namespace Admin.Core.Tasks
}
public async Task Run(IJobExecutionContext context)
{
var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("泡前库"));
var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("泡前库Plc"));
if (obj.IsConnect)
{
var val = obj.plc.ReadBool("M100");//出发出库点位

@ -7,6 +7,7 @@ using Admin.Core.Model;
using Admin.Core.Repository;
using Admin.Core.Service;
using Admin.Core.Tasks;
using Aucma.Core.RunPlc;
using Autofac;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@ -61,8 +62,9 @@ namespace Aucma.Core.BoxFoam
AddServices(services);
//任务调度
//services.AddJobSetup();
services.AddJobSetup();
//PLC
services.AddPlcSetup();
//支持编码大全 例如:支持 System.Text.Encoding.GetEncoding("GB2312") System.Text.Encoding.GetEncoding("GB18030")
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
}
@ -83,7 +85,7 @@ namespace Aucma.Core.BoxFoam
/// </summary>
/// <param name="app"></param>
/// <param name="env"></param>
public void Configure(IApplicationBuilder app)//, ISysTasksQzService tasksQzService, ISchedulerCenter schedulerCenter
public void Configure(IApplicationBuilder app, ISysTasksQzService tasksQzService, ISchedulerCenter schedulerCenter, IRunPlcService runPlcService)//
{
// 使用静态文件
app.UseStaticFiles();
@ -91,8 +93,9 @@ namespace Aucma.Core.BoxFoam
//app.UseAuthorization();
// 开启QuartzNetJob调度服务
//app.UseQuartzJobMildd(tasksQzService, schedulerCenter);
app.UseQuartzJobMildd(tasksQzService, schedulerCenter);
//PLC
app.UsePlcMildd(runPlcService);
}
#region 注册服务

@ -29,6 +29,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
// Job_TestTask_Quartz.DataGridDelegateEvent += ExecMethod;//刷新日志
Job_BoxFoamInStoreTask_Quartz.RefreshScanMateriaCodeEvent += RefreshScanInfo;//扫码信息刷新
Job_BoxFoamInStoreTask_Quartz.LogDelegateEvent += PrintMessageToListBox;//入库日志事件
}
public async Task ExecMethod()

@ -105,7 +105,7 @@
"Remark": "执行任务调度系统",
"RunTimes": 3881,
"BeginTime": "2023-04-23 11:08:50.000",
"EndTime": "2324-08-06 16:45:30.000",
"EndTime": "2224-08-06 16:45:30.000",
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
@ -123,11 +123,11 @@
"JobGroup": "DEFAULT",
"Cron": "*/1 * * * * ?",
"AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_TestTask_Quartz",
"Remark": "执行任务调度系统",
"ClassName": "Job_BoxFoamInStoreTask_Quartz",
"Remark": "执行箱体入库任务调度系统,",
"RunTimes": 3881,
"BeginTime": "2023-04-23 11:08:50.000",
"EndTime": "2324-08-06 16:45:30.000",
"EndTime": "2224-08-06 16:45:30.000",
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
@ -145,11 +145,11 @@
"JobGroup": "DEFAULT",
"Cron": "*/15 * * * * ?",
"AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_PQInStoreTask_Quartz",
"ClassName": "Job_BoxFoamOutStore_Quartz",
"Remark": "泡前库入库调度任务",
"RunTimes": 3881,
"BeginTime": "2023-04-23 11:08:50.000",
"EndTime": "2324-08-06 16:45:30.000",
"EndTime": "2224-08-06 16:45:30.000",
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
@ -221,6 +221,14 @@
"Enabled": true
}
},
"PLCServer": [
{
"Id": 1,
"EquipName": "泡前库Plc",
"IP": "127.0.0.1",
"Port": 6000
}
],
"IpRateLimiting": {
"EnableEndpointRateLimiting": false, //False: globally executed, true: executed for each
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter

@ -161,7 +161,7 @@
<TextBlock Text="当前工位" Foreground="White"/>
</Border>
<Border Grid.Row="1" Grid.RowSpan="3" Grid.Column="0" Background="#1157b9">
<TextBlock Text="产品下线扫描" Foreground="White" FontWeight="Bold" FontSize="25"/>
<TextBlock Text="产品分垛" Foreground="White" FontWeight="Bold" FontSize="25"/>
</Border>
<Border Grid.Row="0" Grid.Column="1" Background="#1157b9">
<TextBlock Text="产品条码" Foreground="White" />

Loading…
Cancel
Save