|
|
@ -59,6 +59,13 @@ namespace Aucma.Scada.Business
|
|
|
|
private IBaseBomInfoService _baseBomInfoService;
|
|
|
|
private IBaseBomInfoService _baseBomInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
private IRecordInStoreService _recordInStore;
|
|
|
|
private IRecordInStoreService _recordInStore;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IPrintBarCodeServices _printBarCodeServices;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 过点数据表
|
|
|
|
|
|
|
|
private IMaterialCompletionServices _iMaterialCompletionServices;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IProductPlanInfoService _productPlanInfoServices;
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 委托事件
|
|
|
|
#region 委托事件
|
|
|
@ -95,7 +102,9 @@ namespace Aucma.Scada.Business
|
|
|
|
_baseSpaceDetailService = registerServices.GetService<IBaseSpaceDetailService>();
|
|
|
|
_baseSpaceDetailService = registerServices.GetService<IBaseSpaceDetailService>();
|
|
|
|
_baseBomInfoService = registerServices.GetService<IBaseBomInfoService>();
|
|
|
|
_baseBomInfoService = registerServices.GetService<IBaseBomInfoService>();
|
|
|
|
_recordInStore = registerServices.GetService<IRecordInStoreService>();
|
|
|
|
_recordInStore = registerServices.GetService<IRecordInStoreService>();
|
|
|
|
|
|
|
|
_printBarCodeServices = registerServices.GetService<IPrintBarCodeServices>();
|
|
|
|
|
|
|
|
_productPlanInfoServices = registerServices.GetService<IProductPlanInfoService>();
|
|
|
|
|
|
|
|
_iMaterialCompletionServices = registerServices.GetService<IMaterialCompletionServices>();
|
|
|
|
taskHandle.InStoreFinsihEvent += InStoreFinish;
|
|
|
|
taskHandle.InStoreFinsihEvent += InStoreFinish;
|
|
|
|
taskHandle.InStoreAnswerEvent += InStoreAnswer;
|
|
|
|
taskHandle.InStoreAnswerEvent += InStoreAnswer;
|
|
|
|
|
|
|
|
|
|
|
@ -141,6 +150,20 @@ namespace Aucma.Scada.Business
|
|
|
|
var result = CreateInStoreTask(spaceInfo, materialCode); //创建入库任务
|
|
|
|
var result = CreateInStoreTask(spaceInfo, materialCode); //创建入库任务
|
|
|
|
if (result)
|
|
|
|
if (result)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#region 2023-12-15 更新过点数据,插入记录到MATERIAL_COMPLETION表
|
|
|
|
|
|
|
|
PrintBarCode print =_printBarCodeServices.query(materialCode);
|
|
|
|
|
|
|
|
string planCode = _productPlanInfoServices.GetPlanCode(print.OrderCode, appConfig.stationCode);
|
|
|
|
|
|
|
|
MaterialCompletion completion = new MaterialCompletion();
|
|
|
|
|
|
|
|
completion.OrderCode = print.OrderCode;
|
|
|
|
|
|
|
|
completion.MaterialBarcode = materialCode;
|
|
|
|
|
|
|
|
completion.MaterialCode = print.MaterialCode;
|
|
|
|
|
|
|
|
completion.MaterialName = print.MaterialName;
|
|
|
|
|
|
|
|
completion.StationName = appConfig.stationCode;
|
|
|
|
|
|
|
|
completion.CompleteDate = DateTime.Now;
|
|
|
|
|
|
|
|
completion.planCode = planCode;
|
|
|
|
|
|
|
|
_iMaterialCompletionServices.Add(completion);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
//spaceInfo.onRouteAmount += 1; //通过PLC获取货道信息(在库、在途数量)时不需要修改在途数量
|
|
|
|
//spaceInfo.onRouteAmount += 1; //通过PLC获取货道信息(在库、在途数量)时不需要修改在途数量
|
|
|
|
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
|
|
|
|
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -177,7 +200,6 @@ namespace Aucma.Scada.Business
|
|
|
|
realTaskInfo.taskStatus = 1;
|
|
|
|
realTaskInfo.taskStatus = 1;
|
|
|
|
realTaskInfo.createTime = DateTime.Now;
|
|
|
|
realTaskInfo.createTime = DateTime.Now;
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
result = _taskInfoService.AddTaskInfo(realTaskInfo);
|
|
|
|
result = _taskInfoService.AddTaskInfo(realTaskInfo);
|
|
|
|
if (result)
|
|
|
|
if (result)
|
|
|
|
{
|
|
|
|
{
|
|
|
|