| | |
| | | using AngleSharp.Dom; |
| | | using log4net.Core; |
| | | using Mapster; |
| | | using Mapster; |
| | | using Masuit.Tools; |
| | | using SixLabors.Fonts.Tables.AdvancedTypographic; |
| | | using System.Diagnostics; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_DTO.MOM; |
| | | using WIDESEA_DTO.WMS; |
| | | using WIDESEA_IServices; |
| | | using WIDESEA_IStoragIntegrationServices; |
| | | using WIDESEA_StorageBasicRepository; |
| | | using WIDESEA_StoragIntegrationServices; |
| | | using WIDESEAWCS_BasicInfoRepository; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | | |
| | | |
| | | namespace WIDESEA_StorageTaskServices; |
| | | |
| | |
| | | await DeleteStockInfoAsync(stock.Id); |
| | | await DeleteStockInfoDetailsAsync(stock.StockInfoDetails); |
| | | await AddStockInfoHtyAsync(stockInfo_Hty); |
| | | await UpdateLocationAsync(loc); //质检任务需要持续锁定库位 |
| | | } |
| | | await UpdateLocationAsync(loc); |
| | | await DeleteTaskAsync(task.TaskId); |
| | | await AddTaskHtyAsync(taskHty); |
| | | }); |
| | |
| | | ParameterDesc = parameterInfo.Description, |
| | | ParameterResult = "OK", //isNG.ToString(), |
| | | TargetValue = parameterInfo.TargetValue, |
| | | LowerLomit = parameterInfo.LowerSpecificationsLimit, |
| | | LowerLimit = parameterInfo.LowerSpecificationsLimit, |
| | | UpperLimit = parameterInfo.UpperSpecificationsLimit, |
| | | DefectCode = defectCode, |
| | | UOMCode = parameterInfo.UOMCode, |
| | |
| | | { |
| | | return content.Error("未查询到对应的库存信息"); |
| | | } |
| | | if (stockInfo.LocationInfo.LocationStatus != (int)LocationEnum.InStock) |
| | | { |
| | | return content.Error("该货位状态不等于【有货】请查看是否已经有任务!"); |
| | | } |
| | | |
| | | var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == palletCode); |
| | | if (task != null) |
| | |
| | | } |
| | | else |
| | | { |
| | | if (stockInfo.LocationInfo.RoadwayNo == "JZSC1") |
| | | if (stockInfo.LocationInfo.RoadwayNo.Contains("JZSC")) |
| | | { |
| | | task = CreateTask(stockInfo, "002-021-001", taskType); |
| | | var targetAddress = "002-021-001"; |
| | | if (stockInfo.LocationInfo.RoadwayNo == "JZSC4") |
| | | targetAddress = "001-021-001"; |
| | | task = CreateTask(stockInfo, targetAddress, taskType); |
| | | } |
| | | } |
| | | //var taskId = await BaseDal.AddDataAsync(task); |
| | |
| | | |
| | | #endregion 外部接口方法 |
| | | |
| | | |
| | | |
| | | #region 内部调用方法 |
| | | |
| | | /// <summary> |
| | |
| | | taskHty.TaskId = 0; |
| | | taskHty.OperateType = isHand ? (int)OperateTypeEnum.人工删除 : (int)OperateTypeEnum.自动完成; |
| | | taskHty.SourceId = task.TaskId; |
| | | if (isHand) |
| | | { |
| | | taskHty.Creater = App.User.UserName != null ? App.User.UserName : "System"; |
| | | } |
| | | taskHty.TaskState = TaskOutStatusEnum.OutFinish.ObjToInt(); |
| | | return taskHty; |
| | | } |
| | |
| | | ParameterDesc = parameterInfo.Description, |
| | | ParameterResult = "OK", |
| | | TargetValue = parameterInfo.TargetValue, |
| | | LowerLomit = parameterInfo.LowerSpecificationsLimit, |
| | | LowerLimit = parameterInfo.LowerSpecificationsLimit, |
| | | UpperLimit = parameterInfo.UpperSpecificationsLimit, |
| | | DefectCode = defectCode, |
| | | } |