add - 完成记录

foamRearStore
wenjy 1 year ago
parent 2833fac217
commit c1657f7c73

Binary file not shown.

@ -100,15 +100,15 @@ namespace Aucma.Scada.Business
grabImage.RefreshLogMessageEvent += PrintLogInfoMessage; grabImage.RefreshLogMessageEvent += PrintLogInfoMessage;
StartPassDown(); StartPassDown();
Task.Run(() => //Task.Run(() =>
{ //{
Thread.Sleep(6000); // Thread.Sleep(6000);
for (int i = 1; i < 15; i++) // for (int i = 1; i < 15; i++)
{ // {
InStore("F2340600122510190" + i.ToString().PadLeft(2,'0')); // InStore("F2340600122510190" + i.ToString().PadLeft(2,'0'));
Thread.Sleep(1000); // Thread.Sleep(1000);
} // }
}); //});
} }
/// <summary> /// <summary>

@ -64,6 +64,8 @@ namespace Aucma.Scada.Business
private IProductPlanInfoService _productPlanInfoService; private IProductPlanInfoService _productPlanInfoService;
private IRecordOutStoreService _recordOutStoreService; private IRecordOutStoreService _recordOutStoreService;
private IRecordProductfinishService _recordProductfinishService;
#endregion #endregion
#region 委托事件 #region 委托事件
@ -107,6 +109,7 @@ namespace Aucma.Scada.Business
_executePlanInfoService = registerServices.GetService<IExecutePlanInfoService>(); _executePlanInfoService = registerServices.GetService<IExecutePlanInfoService>();
_productPlanInfoService = registerServices.GetService<IProductPlanInfoService>(); _productPlanInfoService = registerServices.GetService<IProductPlanInfoService>();
_recordOutStoreService = registerServices.GetService<IRecordOutStoreService>(); _recordOutStoreService = registerServices.GetService<IRecordOutStoreService>();
_recordProductfinishService = registerServices.GetService<IRecordProductfinishService>();
assemblyPlanBusiness.NextPassExecutePlanInfoEvent += PlanHandle; assemblyPlanBusiness.NextPassExecutePlanInfoEvent += PlanHandle;
taskHandleBusiness.OutStoreFinsihEvent += TaskFeedback; taskHandleBusiness.OutStoreFinsihEvent += TaskFeedback;
StartPassDown(); StartPassDown();
@ -512,6 +515,17 @@ namespace Aucma.Scada.Business
_productPlanInfoService.UpdateProductPlanInfo(productInfo); _productPlanInfoService.UpdateProductPlanInfo(productInfo);
} }
#region 添加完成记录
RecordProductfinish productfinish = new RecordProductfinish();
productfinish.planCode = executeInfo.executePlanCode;
productfinish.productlineCode = appConfig.stationCode;
productfinish.materialCode = executeInfo.materialCode;
productfinish.completeAmount = 1; //目前一个箱体一个任务下发给plc
productfinish.recordTime = DateTime.Now;
_recordProductfinishService.InsertRecordProductfinish(productfinish);
#endregion
} }
RefreshAssemblyPlanInitEvent?.Invoke(); RefreshAssemblyPlanInitEvent?.Invoke();

@ -60,6 +60,7 @@ namespace Aucma.Scada.Business
services.AddSingleton<ISysUserInfoService, SysUserInfoServiceImpl>(); services.AddSingleton<ISysUserInfoService, SysUserInfoServiceImpl>();
services.AddSingleton<IRecordInStoreService, RecordInStoreServiceImpl>(); services.AddSingleton<IRecordInStoreService, RecordInStoreServiceImpl>();
services.AddSingleton<IRecordOutStoreService, RecordOutStoreServiceImpl>(); services.AddSingleton<IRecordOutStoreService, RecordOutStoreServiceImpl>();
services.AddSingleton<IRecordProductfinishService, RecordProductfinishServiceImpl>();
} }
public T GetService<T>() public T GetService<T>()

@ -52,6 +52,7 @@
<Compile Include="domain\RealTaskInfo.cs" /> <Compile Include="domain\RealTaskInfo.cs" />
<Compile Include="domain\RecordInstore.cs" /> <Compile Include="domain\RecordInstore.cs" />
<Compile Include="domain\RecordOutstore.cs" /> <Compile Include="domain\RecordOutstore.cs" />
<Compile Include="domain\RecordProductfinish.cs" />
<Compile Include="domain\SysUserInfo.cs" /> <Compile Include="domain\SysUserInfo.cs" />
<Compile Include="dto\FoamStoreStockDto.cs" /> <Compile Include="dto\FoamStoreStockDto.cs" />
<Compile Include="dto\OperationType.cs" /> <Compile Include="dto\OperationType.cs" />

@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;
namespace Aucma.Scada.Model.domain
{
/// <summary>
/// 完成记录
///</summary>
[SugarTable("RECORD_PRODUCTFINISH")]
public class RecordProductfinish
{
/// <summary>
/// 主键标识
///</summary>
[SugarColumn(ColumnName="OBJ_ID" ,IsPrimaryKey = true ,OracleSequenceName = "SEQ_RECORD_PRODUCTFINISH")]
public decimal objId { get; set; }
/// <summary>
/// 计划编号
///</summary>
[SugarColumn(ColumnName="PLAN_CODE" )]
public string planCode { get; set; }
/// <summary>
/// 物料编号
///</summary>
[SugarColumn(ColumnName="MATERIAL_CODE" )]
public string materialCode { get; set; }
/// <summary>
/// 计划工位
///</summary>
[SugarColumn(ColumnName="PRODUCTLINE_CODE" )]
public string productlineCode { get; set; }
/// <summary>
/// 完成数量
///</summary>
[SugarColumn(ColumnName="COMPLETE_AMOUNT" )]
public decimal? completeAmount { get; set; }
/// <summary>
/// 记录时间
///</summary>
[SugarColumn(ColumnName="RECORD_TIME" )]
public DateTime? recordTime { get; set; }
/// <summary>
/// 是否标识
///</summary>
[SugarColumn(ColumnName="IS_FLAG" )]
public decimal? isFlag { get; set; }
}
}

@ -1 +1 @@
473beecf09d8e61b9d3ea111c8c22f1208383589 f38bcd2f54993094da876b27284336475995c9e4

@ -73,10 +73,12 @@
<Compile Include="service\Impl\RealTaskInfoServiceImpl.cs" /> <Compile Include="service\Impl\RealTaskInfoServiceImpl.cs" />
<Compile Include="service\Impl\RecordInStoreServiceImpl.cs" /> <Compile Include="service\Impl\RecordInStoreServiceImpl.cs" />
<Compile Include="service\Impl\RecordOutStoreServiceImpl.cs" /> <Compile Include="service\Impl\RecordOutStoreServiceImpl.cs" />
<Compile Include="service\Impl\RecordProductfinishServiceImpl.cs" />
<Compile Include="service\IProductPlanInfoService.cs" /> <Compile Include="service\IProductPlanInfoService.cs" />
<Compile Include="service\IRealTaskInfoService.cs" /> <Compile Include="service\IRealTaskInfoService.cs" />
<Compile Include="service\IRecordInStoreService.cs" /> <Compile Include="service\IRecordInStoreService.cs" />
<Compile Include="service\IRecordOutStoreService.cs" /> <Compile Include="service\IRecordOutStoreService.cs" />
<Compile Include="service\IRecordProductfinishService.cs" />
<Compile Include="service\ISysUserInfoService.cs" /> <Compile Include="service\ISysUserInfoService.cs" />
<Compile Include="service\Impl\SysUserInfoServiceImpl.cs" /> <Compile Include="service\Impl\SysUserInfoServiceImpl.cs" />
<Compile Include="SqlSugarHelper.cs" /> <Compile Include="SqlSugarHelper.cs" />

@ -1 +1 @@
8893118b84e2105a65c287bff95b4c1f41b6812c 660c3d0a3acf862b36a99801d5441c99d107c271

@ -0,0 +1,14 @@
using Aucma.Scada.Model.domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HighWayIot.Repository.service
{
public interface IRecordProductfinishService
{
bool InsertRecordProductfinish(RecordProductfinish productfinish);
}
}

@ -0,0 +1,32 @@
using Aucma.Scada.Model.domain;
using HighWayIot.Log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HighWayIot.Repository.service.Impl
{
public class RecordProductfinishServiceImpl : IRecordProductfinishService
{
Repository<RecordProductfinish> _repository => new Repository<RecordProductfinish>("mes");
private LogHelper logHelper = LogHelper.Instance;
public bool InsertRecordProductfinish(RecordProductfinish productfinish)
{
bool result = false;
try
{
result = _repository.Insert(productfinish);
}
catch (Exception ex)
{
logHelper.Error("完成记录添加异常", ex);
}
return result;
}
}
}
Loading…
Cancel
Save