¤NameÀ¤User¤Name«wanshenmean¤Icon¤GuidÙ$cc3dfa06-85b8-4a6c-ac23-5becc4562c2c¢IdÌ
§ServiceÀ«TimeCreated×ÿ¸»gÈó¢IdÙ$85d61362-b687-48eb-8099-932a817719a7¢IdÙ4Microsoft.VisualStudio.Conversations.Chat.HelpWindow¨Metadata¨IsThreadðConversationMode°ExperimentalChatªResponders¤Name®GitHub Copilot¤Icon¤GuidÙ$4515b9bd-70a1-45fa-9545-d4536417c596¢Id§Service¤NameÙ7Microsoft.VisualStudio.Copilot.CopilotChatAgentProvider§Version£0.3 CorrelationIdÙ$c036f5e8-639f-4e51-bada-20628d7757e9©MessageIdÙ$b7db8c4b-f8b8-43ec-a1b4-263fafe62bd7§Context®ValueContainerÙMicrosoft.VisualStudio.Copilot.DocumentContext, Microsoft.VisualStudio.Copilot, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ ¾íÒ
§ContentÛ ¾$using Autofac.Core;
|
using Mapster;
|
using Masuit.Tools;
|
using SqlSugar;
|
using System.Text.RegularExpressions;
|
using WIDESEA_Cache;
|
using WIDESEA_Core.Const;
|
using WIDESEA_DTO.MOM;
|
using WIDESEA_DTO.WMS;
|
using WIDESEA_IServices;
|
using WIDESEA_IStoragIntegrationServices;
|
using WIDESEAWCS_BasicInfoRepository;
|
using WIDESEAWCS_QuartzJob.Models;
|
|
namespace WIDESEA_StorageTaskServices;
|
|
public partial class Dt_TaskService : ServiceBase<Dt_Task, IDt_TaskRepository>, IDt_TaskService
|
{
|
private readonly LogFactory LogFactory = new LogFactory();
|
private readonly IUnitOfWorkManage _unitOfWorkManage;
|
private readonly IStockInfoRepository _stockInfoRepository;
|
private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
|
private readonly IDt_Task_HtyRepository _task_HtyRepository;
|
private readonly IMapper _mapper;
|
private readonly ILocationInfoRepository _locationRepository;
|
private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository;
|
private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository;
|
private readonly IBoxingInfoRepository _boxingInfoRepository; //ç»ç
|
private readonly ICellStateService _cellStateService; //çµè¯å±æ§
|
private readonly IProcessApplyService _processApplyService; //å·¥èºè·¯çº¿
|
private readonly IDt_AreaInfoRepository _areaInfoRepository; //åºå
|
private readonly IAgingInOrOutInputService _agingInOrOutInputService; //éç½®\éå
|
private readonly IDt_StationManagerRepository _stationManagerRepository;
|
private readonly ISys_ConfigService _configService;
|
private readonly ISimpleCacheService _simpleCacheService;
|
|
public Dt_TaskService(IDt_TaskRepository BaseDal,
|
IUnitOfWorkManage unitOfWorkManage,
|
IDt_OutOrderRepository outOrderRepository,
|
IStockInfoRepository stockInfoRepository,
|
IDt_Task_HtyRepository task_HtyRepository,
|
IMapper mapper,
|
ILocationInfoRepository locationRepository,
|
ITaskExecuteDetailRepository taskExecuteDetailRepository,
|
ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository,
|
IBoxingInfoRepository boxingInfoRepository,
|
ICellStateService cellStateService,
|
IProcessApplyService processApplyService,
|
IDt_AreaInfoRepository areaInfoRepository,
|
IAgingInOrOutInputService agingInOrOutInputService,
|
IStockInfoDetailRepository stockInfoDetailRepository,
|
IDt_StationManagerRepository stationManagerRepository,
|
ISys_ConfigService configService,
|
ISimpleCacheService simpleCacheService) : base(BaseDal)
|
{
|
_unitOfWorkManage = unitOfWorkManage;
|
_stockInfoRepository = stockInfoRepository;
|
_task_HtyRepository = task_HtyRepository;
|
_mapper = mapper;
|
_locationRepository = locationRepository;
|
_taskExecuteDetailRepository = taskExecuteDetailRepository;
|
_locationStatusChangeRecordRepository = locationStatusChangeRecordRepository;
|
_boxingInfoRepository = boxingInfoRepository;
|
_cellStateService = cellStateService;
|
_processApplyService = processApplyService;
|
_areaInfoRepository = areaInfoRepository;
|
_agingInOrOutInputService = agingInOrOutInputService;
|
_stockInfoDetailRepository = stockInfoDetailRepository;
|
_stationManagerRepository = stationManagerRepository;
|
_configService = configService;
|
_simpleCacheService = simpleCacheService;
|
}
|
|
#region å¤é¨æ¥å£æ¹æ³
|
|
#region åºåºä»»å¡å®æ
|
|
public async Task<WebResponseContent> CompleteStackTaskAsync(Dt_Task task, DtStockInfo stock)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
|
{
|
#region èçæ¬
|
//var process = await SqlSugarHelper.Db.Queryable<Dt_EquipmentProcess>()
|
// .FirstAsync(x => x.EquipmentName == task.Roadway);
|
//var info = JsonConvert.DeserializeObject<ResponseEqptRunDto>(process.ProcessValue);
|
//if (!task.Roadway.Contains("FR") && stock.ProcessCode != "OCVB") //éå容åºåºä¸å½åå·¥åºæ¯OCVBå䏿¥MOMåºå
¥ç«
|
//{
|
// var agingOutputDto = MapToAgingOutputDto(stock);
|
// content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto);
|
// //ValidateResponse(content);
|
// var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
// if (!result.Success || !agingOutputDto.SerialNos[0].SerialNoResult)
|
// {
|
// if (result.MessageCode == "E10001")
|
// {
|
// var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == stock.AreaCode);
|
// if (area == null)
|
// {
|
// throw new Exception("æªæ¾å°å¯¹åºçåºåºä¿¡æ¯");
|
// }
|
// var trayCells = new TrayCellsStatusDto()
|
// {
|
// Software = area.Spare3,
|
// TrayBarcode = task.PalletCode,
|
// EquipmentCode = area.Spare2,
|
// SceneType = area.Spare4
|
// };
|
// content = await _cellStateService.GetTrayCellStatusAsync(trayCells);
|
// if (!content.Status) return content;
|
|
// var ResultTray = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
// if (ResultTray.SerialNos.Count > 0)
|
// {
|
// var parameterInfo = JsonConvert.DeserializeObject<List<ParameterInfo>>(stock.ParameterInfos).FirstOrDefault(y => y.Description.Contains("æ¶é´"));
|
// if (parameterInfo == null) throw new Exception("");
|
|
// var outHours = (DateTime.Now - (stock.LinedProcessFeedbackTime == null ? stock.CreateDate : stock.LinedProcessFeedbackTime.ToDateTime())).TotalHours;
|
|
// var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble() && outHours < parameterInfo.UpperSpecificationsLimit.ToDouble();
|
|
// var defectCode = string.Empty;
|
// if (!isNG) defectCode = "TQCK";
|
// var outputDto = new AgingOutputDto
|
// {
|
// OpFlag = 1,
|
// Software = area.Spare3,
|
// EquipmentCode = area.Spare2,
|
// TrayBarcode = stock.PalletCode,
|
// SerialNos = ResultTray.SerialNos.Select(x => new SerialNoOutDto
|
// {
|
// SlotNo = x.PositionNo,
|
// SerialNo = x.SerialNo,
|
// SerialNoResult = true, //isNG,
|
// ParameterInfo = new List<ParameterInfoOutput> {
|
// new ParameterInfoOutput() {
|
// Value = outHours.ToString(),
|
// ParameterCode =parameterInfo.ParameterCode,
|
// ParameterDesc = parameterInfo.Description,
|
// ParameterResult = "OK", //isNG.ToString(),
|
// TargetValue = parameterInfo.TargetValue,
|
// LowerLomit = parameterInfo.LowerSpecificationsLimit,
|
// UpperLimit = parameterInfo.UpperSpecificationsLimit,
|
// DefectCode = defectCode,
|
// UOMCode = parameterInfo.UOMCode,
|
// }
|
// }
|
// }).ToList()
|
// };
|
|
// content = await _agingInOrOutInputService.GetOCVOutputAsync(outputDto);
|
// result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
// if (!result.Success)
|
// task.Remark = "NG";
|
// }
|
// }
|
// else
|
// task.Remark = "NG";
|
// }
|
//}
|
#endregion èçæ¬
|
|
if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
|
{
|
if (!task.Roadway.Contains("FR") && stock.ProcessCode != "OCVB")
|
{
|
var agingOutputDto = MapToAgingOutputDto(stock);
|
content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto);
|
|
if (content.Status)
|
{
|
var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
|
if (!result.Success && result.MessageCode == "E10001")
|
{
|
await HandleOutBoundError(stock, task);
|
}
|
}
|
else
|
{
|
task.Remark = "NG";
|
ConsoleHelper.WriteErrorLine("MOM鿥ç¹è¯NG");
|
return content.Error("MOM鿥ç¹è¯NG");
|
}
|
}
|
}
|
}
|
|
if (task.Remark == "NG")
|
{
|
ConsoleHelper.WriteErrorLine("MOM鿥ç¹è¯NG");
|
return content.Error("MOM鿥ç¹è¯NG");
|
}
|
|
// æ´æ°åºåç¶æåä»»å¡ç¶æ
|
(var loc, var tas) = UpdateStockAndTaskStatus(stock, task);
|
var taskHty = task.Adapt<Dt_Task_Hty>();
|
taskHty.FinishTime = DateTime.Now;
|
taskHty.OperateType = (int)OperateTypeEnum.èªå¨å®æ;
|
|
DtStockInfo_Hty stockInfo_Hty = stock.Adapt<DtStockInfo_Hty>();
|
stockInfo_Hty.ModifyDate = DateTime.Now;
|
|
// äºå¡å¤ç
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
if (task.TaskType != (int)TaskOutboundTypeEnum.OutQuality)
|
{
|
await DeleteStockInfoAsync(stock.Id);
|
await DeleteStockInfoDetailsAsync(stock.StockInfoDetails);
|
await AddStockInfoHtyAsync(stockInfo_Hty);
|
await UpdateLocationAsync(loc); //è´¨æ£ä»»å¡éè¦æç»éå®åºä½
|
}
|
await DeleteTaskAsync(task.TaskId);
|
await AddTaskHtyAsync(taskHty);
|
});
|
|
return content.OK("ä»»å¡å®ææå", task.Remark);
|
}
|
catch (Exception err)
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").Error(true, $"ç³»ç»å¼å¸¸ï¼å¼å¸¸ä¿¡æ¯ï¼{err.Message}");
|
return content.Error(err.Message);
|
}
|
}
|
|
private AgingOutputDto MapToAgingOutputDto(DtStockInfo stock, ResponseEqptRunDto info = null)
|
{
|
// TODO Value弿 ¹æ®MOMä¸åçéç½®æ¶é´å°å½åæ¶é´çåéæ°
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == stock.AreaCode);
|
if (area == null)
|
{
|
throw new Exception("æªæ¾å°å¯¹åºçåºåºä¿¡æ¯");
|
}
|
|
var parameterInfo = JsonConvert.DeserializeObject<List<ParameterInfo>>(stock.ParameterInfos).FirstOrDefault(y => y.Description.Contains("æ¶é´"));
|
if (parameterInfo == null) throw new Exception("");
|
|
var outHours = (DateTime.Now - (stock.LinedProcessFeedbackTime == null ? stock.CreateDate : stock.LinedProcessFeedbackTime.ToDateTime())).TotalHours;
|
|
//if (stock.LinedProcessFeedbackTime == null)
|
//{
|
// outHours = (DateTime.Now - stock.CreateDate).TotalHours;
|
//}
|
//else
|
//{
|
// outHours = (DateTime.Now - stock.LinedProcessFeedbackTime.ToDateTime()).TotalHours;
|
//}
|
|
var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble() && outHours < parameterInfo.UpperSpecificationsLimit.ToDouble();
|
|
var defectCode = string.Empty;
|
if (!isNG) defectCode = "TQCK";
|
return new AgingOutputDto
|
{
|
OpFlag = 1,
|
Software = area.Spare3,
|
EquipmentCode = area.Spare2,
|
TrayBarcode = stock.PalletCode,
|
SerialNos = stock.StockInfoDetails.Select(x => new SerialNoOutDto
|
{
|
SlotNo = x.OrderNo.ToInt32(),
|
SerialNo = x.SerialNumber,
|
SerialNoResult = true, //isNG,
|
ParameterInfo = new List<ParameterInfoOutput> {
|
new ParameterInfoOutput() {
|
Value = outHours.ToString(),
|
ParameterCode =parameterInfo.ParameterCode,
|
ParameterDesc = parameterInfo.Description,
|
ParameterResult = "OK", //isNG.ToString(),
|
TargetValue = parameterInfo.TargetValue,
|
LowerLimit = parameterInfo.LowerSpecificationsLimit,
|
UpperLimit = parameterInfo.UpperSpecificationsLimit,
|
DefectCode = defectCode,
|
UOMCode = parameterInfo.UOMCode,
|
}
|
}
|
}).ToList()
|
};
|
}
|
|
private (DtLocationInfo, Dt_Task) UpdateStockAndTaskStatus(DtStockInfo stock, Dt_Task task)
|
{
|
var location = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
|
//var details = _stockInfoDetailRepository.QueryData(x => x.StockId == stock.Id);
|
int lastStatus = location.LocationStatus;
|
location.LocationStatus = (int)LocationEnum.Free;
|
task.TaskState = (int)TaskOutStatusEnum.OutFinish;
|
//task.CurrentAddress = task.NextAddress;
|
//task.NextAddress = task.TargetAddress;
|
|
_locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, lastStatus, (int)StatusChangeTypeEnum.AutomaticDelivery, task.TaskNum);
|
|
LogFactory.GetLog("ä»»å¡å®æ").Info(true, "æ´æ°åºåç¶æä¸ä»»å¡ç¶æ");
|
return (location, task);
|
}
|
|
private async Task DeleteStockInfoAsync(int stockId)
|
{
|
var isStockUpdated = await _stockInfoRepository.DeleteDataByIdAsync(stockId);
|
if (!isStockUpdated)
|
{
|
throw new Exception("åºåä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task AddStockInfoHtyAsync(DtStockInfo_Hty dtStock)
|
{
|
var isStockAdd = await SqlSugarHelper.DbWMS.InsertNav(dtStock).IncludesAllFirstLayer().ExecuteCommandAsync();
|
if (!isStockAdd)
|
{
|
throw new Exception("åºååå²ä¿¡æ¯æ·»å 失败");
|
}
|
}
|
|
private async Task UpdateLocationAsync(DtLocationInfo info)
|
{
|
var isStockUpdated = await _locationRepository.UpdateDataAsync(info);
|
if (!isStockUpdated)
|
{
|
throw new Exception("åºåä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task DeleteStockInfoDetailsAsync(IEnumerable<DtStockInfoDetail> details)
|
{
|
var ids = details.Select(x => (object)x.Id).ToArray();
|
var isStockDetailUpdated = await _stockInfoDetailRepository.DeleteDataByIdsAsync(ids);
|
if (!isStockDetailUpdated)
|
{
|
throw new Exception("åºå详æ
ä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task DeleteTaskAsync(int taskId)
|
{
|
var isTaskUpdated = await BaseDal.DeleteDataByIdAsync(taskId);
|
if (!isTaskUpdated)
|
{
|
throw new Exception("ä»»å¡ä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task AddTaskHtyAsync(Dt_Task_Hty taskHty)
|
{
|
var isTaskAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
|
if (!isTaskAdd)
|
{
|
throw new Exception("åå²ä»»å¡ä¿¡æ¯æ·»å 失败");
|
}
|
}
|
|
#endregion åºåºä»»å¡å®æ
|
|
#region ç§»åºä»»å¡å®æ
|
|
/// <summary>
|
/// ç§»åºä»»å¡å®æ
|
/// </summary>
|
/// <param name="saveModel">任塿°æ®åé</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> CompleteTransferTaskAsync(Dt_Task task, DtStockInfo stock)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ´æ°è´§ä½ååºåä¿¡æ¯
|
(DtStockInfo updateStock, DtLocationInfo locationInForm, DtLocationInfo locationInfoTo) = UpdateStockLocation(stock, task);
|
var taskHty = CreateHistoricalTask(task);
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ç§»åºä»»å¡å®æ", $"è´§ä½å°åï¼{task.TargetAddress},ä¿®æ¹ååºåæ°æ®ï¼{JsonConvert.SerializeObject(updateStock)}ï¼åå
è´§ä½æ°æ®ï¼{locationInForm}");
|
|
// æ§è¡æ°æ®åºäºå¡
|
bool isResult = await ExecuteTransaction(updateStock, taskHty, locationInForm, locationInfoTo, task.TaskId);
|
if (isResult)
|
content.OK("ç§»åºä»»å¡å®ææå");
|
else
|
content.Error("ç§»åºä»»å¡å®æå¤±è´¥");
|
}
|
catch (Exception err)
|
{
|
Console.WriteLine(err.Message.ToString());
|
}
|
return content;
|
}
|
|
#endregion ç§»åºä»»å¡å®æ
|
|
#region å
¥åºä»»å¡å®æ
|
|
/// <summary>
|
/// 宿å
¥åºä»»å¡
|
/// </summary>
|
/// <param name="task">任塿°æ®åé</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> CompleteInboundTaskAsync(Dt_Task task)
|
{
|
// åå§åååºå
容
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
if (task.TaskType == (int)TaskInboundTypeEnum.InNG || task.TaskType == (int)TaskInboundTypeEnum.InQuality)
|
{
|
task.TaskState = (int)TaskInStatusEnum.SC_InFinish;
|
// å建åå²ä»»å¡å®ä¾æ¨¡å
|
var taskHtyNG = CreateHistoricalTask(task);
|
|
// æ§è¡æ°æ®åºäºå¡
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
// æ·»å åå²ä»»å¡
|
var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHtyNG) > 0;
|
|
// å é¤ä»»å¡æ°æ®
|
var isTaskDelete = await Delete(task.TaskId);
|
if (!isTaskHtyAdd || !isTaskDelete)
|
throw new Exception("æ·»å 失败");
|
});
|
return content.OK("å
¥åºä»»å¡å®ææå");
|
}
|
|
// è·åè£
箱信æ¯åç®æ ä½ç½®ä¿¡æ¯
|
var boxing = await _boxingInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode);
|
var locationInf = await _locationRepository.QueryFirstAsync(x => x.LocationCode == task.TargetAddress && x.RoadwayNo == task.Roadway);
|
|
int lastStatus = locationInf.LocationStatus;
|
// æ´æ°ç®æ ä½ç½®ç¶æä¸ºåºåä¸
|
locationInf.LocationStatus = (int)LocationEnum.InStock;
|
|
// å建åå²ä»»å¡å®ä¾æ¨¡å
|
var taskHty = CreateHistoricalTask(task);
|
|
if (task.TaskType == (int)TaskInboundTypeEnum.InQuality)
|
{
|
await _locationRepository.UpdateDataAsync(locationInf);
|
await _task_HtyRepository.AddDataAsync(taskHty);
|
await BaseDal.DeleteDataAsync(task);
|
|
//è®°å½è´§ä½åå¨ä¿¡æ¯
|
_locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(locationInf, lastStatus, (int)StatusChangeTypeEnum.AutomaticStorage, task.TaskNum);
|
|
return content.OK("å
¥åºä»»å¡å®ææå");
|
}
|
// æ ¹æ®æ¯å¦æç»çä¿¡æ¯å建åºåå®ä¾æ¨¡å
|
DtStockInfo stock = boxing == null ? CreateEmptyPalletStock(task, locationInf) : CreateFullPalletStock(task, locationInf, boxing);
|
|
// æ§è¡æ°æ®åºäºå¡
|
bool isResult = await ExecuteTransaction(stock, taskHty, locationInf, task.TaskId, boxing);
|
if (isResult)
|
{
|
_locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(locationInf, lastStatus, (int)StatusChangeTypeEnum.AutomaticStorage, task.TaskNum);
|
content.OK("å
¥åºä»»å¡å®ææå");
|
}
|
else
|
{
|
content.Error("å
¥åºä»»å¡å®æå¤±è´¥");
|
}
|
}
|
catch (Exception err)
|
{
|
// è®°å½å¼å¸¸ä¿¡æ¯å°æ§å¶å°åæ¥å¿
|
Console.WriteLine(err.Message.ToString());
|
LogFactory.GetLog("ä»»å¡å®æ").Error(true, err);
|
content.Error(err.Message);
|
}
|
return content;
|
}
|
|
/// <summary>
|
/// å建空æççåºåå®ä¾æ¨¡å
|
/// </summary>
|
private DtStockInfo CreateEmptyPalletStock(Dt_Task task, DtLocationInfo locationInf)
|
{
|
var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
return new DtStockInfo()
|
{
|
PalletCode = task.PalletCode,
|
LocationCode = task.TargetAddress,
|
CreateDate = DateTime.Now,
|
Creater = "system",
|
IsFull = false,
|
AreaCode = area.AreaCode ?? "",
|
LocationId = loation.Id,
|
ProductionLine = task.ProductionLine,
|
StockInfoDetails = new List<DtStockInfoDetail>()
|
{
|
new DtStockInfoDetail()
|
{
|
MaterielCode = "空æç",
|
Id = 0,
|
Status = (int)StockStateEmun.å·²å
¥åº
|
}
|
}
|
};
|
}
|
|
/// <summary>
|
/// å建å容ç宿ççåºåå®ä¾æ¨¡å
|
/// </summary>
|
private DtStockInfo CreateFullPalletStockByFR(Dt_Task task, DtLocationInfo locationInf)
|
{
|
var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
return new DtStockInfo()
|
{
|
PalletCode = task.PalletCode,
|
LocationCode = task.TargetAddress,
|
CreateDate = DateTime.Now,
|
Creater = "system",
|
IsFull = false,
|
AreaCode = area.AreaCode ?? "",
|
LocationId = loation.Id,
|
StockInfoDetails = new List<DtStockInfoDetail>()
|
{
|
new DtStockInfoDetail()
|
{
|
MaterielCode = "宿ç",
|
Id = 0,
|
Status = (int)StockStateEmun.å·²å
¥åº
|
}
|
}
|
};
|
}
|
|
/// <summary>
|
/// å建å®ççåºåå®ä¾æ¨¡åå¹¶è°ç¨MOMå
¥åº
|
/// </summary>
|
private DtStockInfo CreateFullPalletStock(Dt_Task task, DtLocationInfo locationInf, DtBoxingInfo boxing)
|
{
|
var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
if (loation == null)
|
throw new Exception("æªæ¾å°å¯¹åºä½ç½®ä¿¡æ¯");
|
|
var area = new Dt_AreaInfo();
|
if (task.Roadway.Contains("FR"))
|
{
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
}
|
else
|
{
|
//var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress);
|
//if (station.stationPLC == "1017")
|
// area = _areaInfoRepository.QueryFirst(x => x.AreaID == Convert.ToInt32(station.stationNGLocation));
|
//else
|
// area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
//if (area == null)
|
// throw new Exception("æªæ¾å°å¯¹åºåºåä¿¡æ¯");
|
|
if (boxing.ProcessCode == "OCV1")
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == 6);
|
else if (boxing.ProcessCode == "OCVB")
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == 7);
|
else
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
|
if (area == null)
|
throw new Exception("æªæ¾å°å¯¹åºåºåä¿¡æ¯");
|
}
|
|
var boxDetail = boxing.BoxingInfoDetails.Adapt<List<DtStockInfoDetail>>();
|
boxDetail.ForEach(x => { x.Status = (int)StockStateEmun.å·²å
¥åº; });
|
var stock = new DtStockInfo()
|
{
|
PalletCode = task.PalletCode,
|
LocationCode = task.TargetAddress,
|
CreateDate = DateTime.Now,
|
Creater = "system",
|
IsFull = boxing.IsFull,
|
AreaCode = area.AreaCode,
|
LocationId = loation.Id,
|
StockInfoDetails = boxDetail,
|
ProcessCode = boxing.ProcessCode,
|
NextProcessCode = boxing.NextProcessCode,
|
Remark = boxing.BoxingInfoDetails.Count().ToString(),
|
};
|
|
if (boxing.ProcessCode != "OCVB" && !task.Roadway.Contains("FR"))
|
{
|
// å¤ç请æ±åæ°
|
AgingInputDto agingInputDto = new AgingInputDto()
|
{
|
SerialNos = boxing.BoxingInfoDetails
|
.Select(item => new SerialNoInDto { SerialNo = item.SerialNumber, PositionNo = item.OrderNo })
|
.ToList(),
|
TrayBarcode = task.PalletCode,
|
OpFlag = 1,
|
EquipmentCode = area.Spare2,
|
Software = area.Spare3
|
};
|
|
var result = _agingInOrOutInputService.GetOCVInputAsync(agingInputDto).Result;
|
var respone = JsonConvert.DeserializeObject<ResponeAgingInputDto>(result.Data.ToString());
|
|
bool isFull = false;
|
if (!task.Roadway.Contains("FR"))
|
{
|
isFull = respone.SpecialParameterDuration.IsNullOrEmpty();
|
}
|
if (respone.ProductionLine == null || respone.ParameterInfos == null)
|
{
|
throw new Exception("MOMæ°æ®è¿åé误");
|
}
|
stock.LinedProcessFeedbackTime = respone.LinedProcessFeedbackTime;
|
stock.SpecialParameterDuration = respone.SpecialParameterDuration;
|
//2024å¹´11æ16æ¥ï¼æ°å¢å段计ç®åºåºåºæ¶é´
|
stock.OutboundTime = Convert.ToDateTime(respone.LinedProcessFeedbackTime == null ? DateTime.Now : respone.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(respone.SpecialParameterDuration));
|
stock.ProductionLine = respone.ProductionLine;
|
stock.ParameterInfos = respone.ParameterInfos.ToJsonString();
|
stock.StockStatus = 1;
|
}
|
else
|
{
|
stock.OutboundTime = DateTime.Now;
|
stock.StockStatus = 1;
|
stock.ProductionLine = boxing.ProductionLine;
|
}
|
|
// è®°å½æ¥å¿
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡å®æ", $"è´§ä½å°åï¼{task.TargetAddress},ä¿®æ¹åè´§ä½æ°æ®ï¼{locationInf}");
|
|
return stock;
|
}
|
|
#endregion å
¥åºä»»å¡å®æ
|
|
#region ä»»å¡å®æ
|
|
/// <summary>
|
/// 宿任å¡
|
/// </summary>
|
/// <param name="taskNum">ä»»å¡ç¼å·</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> CompleteAsync(int taskNum)
|
{
|
// åå§åååºå
容
|
WebResponseContent content = new WebResponseContent();
|
|
// æå任塿°æ®
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æå任塿°æ®", $"ä»»å¡å·ï¼{taskNum}");
|
|
// éªè¯ä»»å¡æ¯å¦åå¨
|
var task = await GetByTaskNum(taskNum);
|
if (task == null)
|
{
|
return content.Error("ä»»å¡ä¸åå¨");
|
}
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "éªè¯ä»»å¡æ¯å¦åå¨", JsonConvert.SerializeObject(task));
|
|
if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
|
{
|
return await CompleteInToOutTaskAsync(task);
|
}
|
// éªè¯åºåæ¯å¦åå¨
|
var stock = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode);
|
|
// æ ¹æ®ä»»å¡ç±»åè°ç¨ç¸åºç宿任塿¹æ³
|
switch (task.TaskType)
|
{
|
case (int)TaskInboundTypeEnum.Inbound:
|
case (int)TaskInboundTypeEnum.InTray:
|
case (int)TaskInboundTypeEnum.InNG:
|
case (int)TaskInboundTypeEnum.InQuality:
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡", "");
|
return await CompleteInboundTaskAsync(task);
|
|
case (int)TaskOutboundTypeEnum.OutTray:
|
case (int)TaskOutboundTypeEnum.Outbound:
|
case (int)TaskOutboundTypeEnum.OutNG:
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåºä»»å¡", "");
|
return await CompleteStackTaskAsync(task, stock);
|
|
case (int)TaskRelocationTypeEnum.Relocation:
|
return await CompleteTransferTaskAsync(task, stock);
|
|
default:
|
return content.Error("ä»»å¡ç±»åä¸åå¨");
|
}
|
}
|
|
#endregion ä»»å¡å®æ
|
|
#region 请æ±ä»»å¡å
¥åº
|
|
#region
|
|
/// <summary>
|
/// 请æ±ä»»å¡å··é
|
/// </summary>
|
/// <param name="input">è¯·æ±æ¨¡å</param>
|
/// <returns>å
å«ä»»å¡ä¿¡æ¯çååºå
容</returns>
|
public async Task<WebResponseContent> RequestTaskAsync2(RequestTaskDto input)
|
{
|
// å建ä¸ä¸ªWebResponseContent对象
|
WebResponseContent content = new WebResponseContent();
|
|
try
|
{
|
// è°ç¨BaseDal.QueryFirstAsyncæ¹æ³ï¼æ¥è¯¢ä»»å¡
|
var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
|
if (task != null)
|
{
|
//if (task.TaskState == (int)TaskInStatusEnum.InNew)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = new WMSTaskDTO()
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = 1,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.Roadway,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
};
|
return content.OK(data: taskDTO);
|
}
|
}
|
|
var stock = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == input.PalletCode && x.IsFull);
|
if (stock != null)
|
{
|
// TODOè´¨æ£ååº
|
}
|
|
var area = await _areaInfoRepository.QueryFirstAsync(x => x.Spare1.Contains(input.Position));
|
if (area == null)
|
return content.Error("æ¹ç¹ä½ä¸å¨åºåå表ä¸åå¨");
|
|
// å建ä¸ä¸ªTrayCellsStatusDto对象ï¼å¹¶èµå¼
|
TrayCellsStatusDto trayCells = new TrayCellsStatusDto()
|
{
|
Software = area.Spare3,
|
TrayBarcode = input.PalletCode,
|
EquipmentCode = area.Spare2,
|
SceneType = area.Spare4,
|
};
|
|
// è°ç¨GetTrayCellStatusAsyncæ¹æ³ï¼è·åæ´ççµè¯
|
content = await GetTrayCellStatusAsync(trayCells);
|
// å¦æç¶æä¸ºfalseï¼åè¿åcontent
|
if (!content.Status) return content;
|
|
// æ·»å ç»çä¿¡æ¯
|
// å°content.Data转æ¢ä¸ºResultTrayCellsStatus对象
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (!result.Success)
|
return content.Error(result.MOMMessage);
|
|
// è·åå¼å¸¸çµè¯
|
List<SerialNoDto>? serialNosError = result.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList();
|
if (serialNosError.Count > 0)
|
{
|
// TODO å建任å¡éè³NGæåºå£
|
var efg = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position && x.stationArea == area.AreaCode).ToList();
|
//List<string> NGStation = input.Position == "1088" ? new List<string>() { "1020" } : new List<string>() { "JZSC01" };
|
if (efg.Count <= 0)
|
{
|
throw new Exception("æªæ¾å°NGå
¥åºç«å°é
ç½®");
|
}
|
List<string> NGStation = efg.Select(x => x.stationNGLocation).ToList();
|
if (NGStation.Count <= 0)
|
{
|
NGStation = efg.Select(x => x.stationNGChildCode).ToList();
|
}
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, NGStation, 2);
|
return content.Error("åå¨å¼å¸¸çµè¯");
|
}
|
|
if (result.SerialNos.Count <= 0)
|
{
|
// Todo 空æçå
¥åºé»è¾
|
content = await RequestTrayInTaskAsync(input);
|
return content;
|
}
|
|
var boxing = CreateBoxingInfo(result, input.PalletCode);
|
//Console.WriteLine(boxing.ToJsonString());
|
if (boxing == null) return content.Error("ç»ç失败");
|
|
if (result.ProcessCode == "OCVB")
|
{
|
//TODO 夿éä¸éè¦å»å
è£
ï¼ä¸éè¦å°±å»å¸¸æ¸©ä¸
|
var stationManagers = _stationManagerRepository.QueryData(x => x.stationPLC == "1018" && x.stationArea == "Cache");
|
var station = stationManagers.Select(x => x.stationChildCode).ToList();
|
|
// è·åWCSipå°å
|
var configz = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
|
var wcsBasez = configz.Where(x => x.ConfigKey == SysConfigConst.WCSIPAddress).FirstOrDefault()?.ConfigValue;
|
var address = configz.Where(x => x.ConfigKey == SysConfigConst.GetStation).FirstOrDefault()?.ConfigValue;
|
if (wcsBasez == null || address == null)
|
{
|
throw new InvalidOperationException("WCS IP æªé
ç½®");
|
}
|
var wcsIpAddrss = wcsBasez + address;
|
|
var abc = HttpHelper.PostAsync(wcsIpAddrss, station.ToJsonString()).Result;
|
content = JsonConvert.DeserializeObject<WebResponseContent>(abc);
|
if (content.Data.ObjToInt() > 0)
|
{
|
// TODO éè³å
è£
|
List<string> strings = stationManagers.Where(x => x.stationType == 0).Select(x => x.Roadway).ToList();
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings, 3);
|
return content;
|
}
|
else
|
{
|
var config = _configService.GetByConfigKey("SYS_InStacker", "CW3InStacker");
|
var strings = config.ConfigValue.Split(',').ToList();
|
// TODO å
¥åº
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings);
|
if (content.Status)
|
await _boxingInfoRepository.AddDataNavAsync(boxing);
|
}
|
}
|
else
|
{
|
// TODO è·åæ¬å°ææ¡å±æ§ä¸æ´ççµè¯å±æ§è·åçå¼è¿è¡å¯¹æ¯ï¼å¦æä¸è´åç»§ç»ï¼å¦åè¿åé误信æ¯
|
//var productions = await _productionRepository.QueryDataAsync(x => result.TrayBarcodePropertys.Select(x => x.TrayBarcodeProperty).ToList().Contains(x.TrayBarcodeProperty));
|
//if (productions.Count <= 0)
|
// return content.Error("ææ¡å±æ§ä¸åå¨");
|
|
// è°ç¨CreateBoxingInfoæ¹æ³ï¼å建ç»çä¿¡æ¯
|
|
//var boxing = CreateBoxingInfo(result, input.PalletCode);
|
////Console.WriteLine(boxing.ToJsonString());
|
//if (boxing == null) return content.Error("ç»ç失败");
|
|
// è°ç¨GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºè·¯çº¿
|
ProcessApplyDto process = await GetProcessApplyAsync(result);
|
|
// 妿process为nullï¼åè¿åcontent
|
if (process == null) return content;
|
|
// å¹¶èµå¼ä¸ä½è½¯ä»¶åç§°å设å¤ç¼ç
|
process.Software = area.Spare3;
|
process.EquipmentCode = area.Spare2;
|
|
// è°ç¨GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºç³è¯·
|
|
// è°ç¨_processApplyService.GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºç³è¯·
|
content = await _processApplyService.GetProcessApplyAsync(process);
|
|
// å¦æç¶æä¸ºfalseï¼åè¿ånull
|
if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString());
|
if (!resultProcessApply.Success) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode == boxing.ProcessCode).FirstOrDefault().Number.ToInt32();
|
foreach (var item in resultProcessApply.ProcessInfo)
|
{
|
if (item.Number.ToInt32() == number + 1)
|
{
|
boxing.NextProcessCode = item.ProcessCode;
|
}
|
}
|
Console.WriteLine();
|
Console.WriteLine($"å½åå·¥åºï¼{boxing.ProcessCode}");
|
Console.WriteLine($"ä¸ä¸å·¥åºï¼{boxing.NextProcessCode}");
|
|
Console.WriteLine(area.AreaCode + "-----------------------");
|
Console.WriteLine(input.Position + "-----------------------");
|
|
var areaIn = string.Empty;
|
switch (boxing.NextProcessCode)
|
{
|
case "CH01":
|
areaIn = "CH001";
|
break;
|
|
case "JZ01":
|
areaIn = "JZ001";
|
break;
|
|
case "GW01":
|
areaIn = "GWSC1";
|
break;
|
|
case "CW01":
|
areaIn = "CWSC1";
|
break;
|
|
case "CW02":
|
areaIn = "CWSC2";
|
break;
|
|
default:
|
break;
|
}
|
|
var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position && x.stationArea.Contains(areaIn)).FirstOrDefault();
|
if (stationManagers == null)
|
{
|
throw new Exception("æªæ¾å°å
¥åºç«å°é
ç½®");
|
}
|
List<string> strings = stationManagers.Roadway.Split(',').ToList();
|
Console.WriteLine(strings.ToJsonString() + "b-----------------------");
|
//// è°ç¨CreateNewTaskæ¹æ³ï¼å建æ°ä»»å¡
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings);
|
if (content.Status)
|
{
|
var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing);
|
}
|
//}
|
}
|
}
|
catch (Exception err)
|
{
|
// 妿åçå¼å¸¸ï¼åè°ç¨content.Erroræ¹æ³ï¼è®°å½é误信æ¯ï¼å¹¶è¾åºé误信æ¯
|
content.Error(err.Message);
|
Console.WriteLine(err.Message);
|
}
|
|
// è¿åcontent
|
return content;
|
}
|
|
#endregion 请æ±ä»»å¡å
¥åº
|
|
public async Task<WebResponseContent> RequestTaskAsync(RequestTaskDto input)
|
{
|
WebResponseContent content = new WebResponseContent();
|
|
try
|
{
|
// æ¥è¯¢ä»»å¡
|
var task = await QueryTaskByPalletCode(input.PalletCode);
|
if (task != null)
|
{
|
return CreateAndReturnWMSTaskDTO(task);
|
}
|
|
// æ¥è¯¢åºåä¿¡æ¯ï¼è¿éåç»è¦å®åè´¨æ£ååºé»è¾ï¼
|
var stock = await QueryStockInfo(input.PalletCode);
|
if (stock != null)
|
{
|
Dt_Task taskNew = new Dt_Task
|
{
|
Grade = 1,
|
Roadway = stock.LocationInfo.RoadwayNo,
|
TargetAddress = stock.LocationInfo.RoadwayNo,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = stock.LocationInfo.RoadwayNo,
|
OrderNo = null,
|
PalletCode = stock.PalletCode,
|
SourceAddress = input.Position,
|
CurrentAddress = input.Position,
|
TaskState = stock.LocationInfo.RoadwayNo.Contains("CH") ? (int)TaskInStatusEnum.InNew : (int)TaskInStatusEnum.Line_InFinish,
|
TaskType = (int)TaskInboundTypeEnum.InQuality,
|
TaskNum = BaseDal.GetTaskNo().Result,
|
Creater = "System", // ä¿®æ£æ¼åé误
|
CreateDate = DateTime.Now,
|
TaskId = 0,
|
ProductionLine = stock.ProductionLine,
|
ProcessCode = stock.ProcessCode,
|
};
|
|
var taskDTO = CreateTaskDTO(taskNew);
|
BaseDal.AddData(taskNew);
|
return content.OK(data: taskDTO);
|
// TODOè´¨æ£ååº
|
}
|
|
// æ ¹æ®ä½ç½®æ¥è¯¢åºåä¿¡æ¯
|
var areaCode = Regex.Replace(input.Position, @"-(\d+)", "");
|
var area = await QueryAreaInfoByPosition(areaCode);
|
if (area == null)
|
{
|
return content.Error("该ç¹ä½ä¸å¨åºåå表ä¸åå¨");
|
}
|
|
// å建并è·åæ´ççµè¯ç¶æ
|
TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, input.PalletCode);
|
content = await GetTrayCellStatusAsync(trayCells);
|
if (!content.Status)
|
{
|
ConsoleHelper.WriteErrorLine($"è·åçµè¯ç¶æå¤±è´¥:{content.Message}");
|
return content;
|
}
|
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
|
if (!result.Success)
|
{
|
ConsoleHelper.WriteErrorLine($"è·åçµè¯ç¶æå¤±è´¥:{result.MOMMessage}");
|
if (result.SerialNos.Count <= 0)
|
{
|
// 空æçå
¥åºé»è¾
|
var staion = _stationManagerRepository.QueryFirst(x => x.stationChildCode == input.Position && x.stationType == 1 && x.remark == "IN");
|
if (staion != null)
|
{
|
return await HandleErrorCells(input, area);
|
}
|
else
|
{
|
return await RequestTrayInTaskAsync(input);
|
}
|
}
|
else
|
return content.Error(result.MOMMessage);
|
}
|
|
if (result.SerialNos.Count <= 0)
|
{
|
var config = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStacker, SysConfigConst.InboundIsEmpty);
|
var strings = config.ConfigValue.Split(',').ToList();
|
if (strings.Contains(input.Position))
|
{
|
// todoéè³NGå£
|
ConsoleHelper.WriteErrorLine($"å½åä½ç½®ä¸è½å
¥ç©ºæç");
|
return content.Error("å½åä½ç½®ä¸è½å
¥ç©ºæç");
|
}
|
else
|
return await RequestTrayInTaskAsync(input);
|
}
|
else
|
{
|
// å¤çå¼å¸¸çµè¯æ
åµ
|
var serialNosError = result.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList();
|
if (serialNosError.Count > 0)
|
{
|
return await HandleErrorCells(input, area, serialNosError);
|
}
|
|
var boxing = CreateBoxingInfo(result, input.PalletCode);
|
if (boxing == null) return content.Error("ç»ç失败");
|
|
input.ProductionLine = result.ProductionLine;
|
return await ProcessBasedOnProcessCode(boxing, area, input, result);
|
}
|
}
|
catch (Exception err)
|
{
|
// æ´è¯¦ç»çå¼å¸¸å¤çï¼å¯ä»¥æ ¹æ®å¼å¸¸ç±»åè®°å½ä¸åçé误æ¥å¿ç
|
content.Error(err.Message);
|
Console.WriteLine(err.Message);
|
}
|
|
return content;
|
}
|
|
/// <summary>
|
/// æ´æ°ä»»å¡è´§ä½
|
/// </summary>
|
/// <param name="input"></param>
|
/// <returns></returns>
|
public async Task<WebResponseContent> UpdateExistingTask(RequestTaskDto input)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
|
if (task == null)
|
return content.Error($"ææªæ¾å°ã{input.PalletCode}ãçä»»å¡");
|
|
return content = await UpdateExistingTask(input, task);
|
}
|
catch (Exception err)
|
{
|
return content.Error(err.Message);
|
}
|
}
|
|
/// <summary>
|
/// 空æçå
¥åºç³è¯·
|
/// </summary>
|
/// <param name="input"></param>
|
/// <returns></returns>
|
public async Task<WebResponseContent> RequestTrayInTaskAsync(RequestTaskDto input)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// è°ç¨BaseDal.QueryFirstAsyncæ¹æ³ï¼æ¥è¯¢ä»»å¡
|
var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
|
if (task != null && task.TaskState == (int)TaskInStatusEnum.InNew)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateTaskDTO(task);
|
//WMSTaskDTO taskDTO = new WMSTaskDTO()
|
//{
|
// TaskNum = task.TaskNum.Value,
|
// Grade = 1,
|
// PalletCode = task.PalletCode,
|
// RoadWay = task.Roadway,
|
// SourceAddress = task.SourceAddress,
|
// TargetAddress = task.Roadway,
|
// TaskState = task.TaskState.Value,
|
// Id = 0,
|
// TaskType = task.TaskType,
|
//};
|
return content.OK(data: task);
|
}
|
|
// æ ¹æ®ä½ç½®æ¥è¯¢åºåä¿¡æ¯
|
var areaCode = Regex.Replace(input.Position, @"-(\d+)", "");
|
var area = await QueryAreaInfoByPosition(areaCode);
|
if (area == null)
|
{
|
return content.Error("该ç¹ä½ä¸å¨åºåå表ä¸åå¨");
|
}
|
|
// è·åæ´ççµè¯å±æ§ç¶æ
|
TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, input.PalletCode);
|
content = await GetTrayCellStatusAsync(trayCells);
|
if (!content.Status)
|
{
|
ConsoleHelper.WriteErrorLine($"è·åçµè¯ç¶æå¤±è´¥:{content.Message}");
|
return content;
|
}
|
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (result.ProductionLine.IsNullOrEmpty())
|
{
|
ConsoleHelper.WriteErrorLine($"å½åæçæ 产线,èç³»MOMæ·»å 产线");
|
return content.Error("å½åæçæ 产线,èç³»MOMæ·»å 产线");
|
}
|
|
var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 6 && x.stationChildCode == input.Position).FirstOrDefault();
|
if (stationManagers == null)
|
{
|
stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position).FirstOrDefault();
|
if (stationManagers == null)
|
throw new Exception("æªæ¾å°ç©ºæçå
¥åºç«å°åå
¥åºç«å°é
ç½®");
|
}
|
List<string> strings = stationManagers.Roadway.Split(',').ToList();
|
|
return await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings, 1);
|
}
|
catch (Exception)
|
{
|
throw;
|
}
|
}
|
|
// è·åæçåå
æ ¼ç¶æ
|
private async Task<WebResponseContent> GetTrayCellStatusAsync(TrayCellsStatusDto trayCells)
|
{
|
// è°ç¨_cellStateService.GetTrayCellStatusAsyncæ¹æ³ï¼è·åæçåå
æ ¼ç¶æ
|
return await _cellStateService.GetTrayCellStatusAsync(trayCells);
|
}
|
|
// è·åç»çä¿¡æ¯
|
private DtBoxingInfo CreateBoxingInfo(ResultTrayCellsStatus result, string palletCode)
|
{
|
return new DtBoxingInfo
|
{
|
PalletCode = palletCode,
|
IsFull = true,
|
ProcessCode = result.ProcessCode,
|
ProductionLine = result.ProductionLine,
|
BoxingInfoDetails = result.SerialNos.Select(serialNoObj => new DtBoxingInfoDetail
|
{
|
SerialNumber = serialNoObj.SerialNo,
|
OrderNo = serialNoObj.PositionNo.ToString(),
|
Status = serialNoObj.SerialNoStatus,
|
MaterielCode = result.BindCode,
|
Remark = result.TrayBarcodePropertys.ToJsonString(),
|
}).ToList()
|
};
|
}
|
|
// è·åå·¥èºç³è¯·
|
private async Task<ProcessApplyDto> GetProcessApplyAsync(ResultTrayCellsStatus content)
|
{
|
// å建ä¸ä¸ªProcessApplyDto对象ï¼å¹¶èµå¼
|
return new ProcessApplyDto()
|
{
|
//WipOrderNo = result.BindCode,
|
SerialNos = content.SerialNos.Select(item => new SerialNos
|
{
|
SerialNo = item.SerialNo
|
}).ToList()
|
};
|
}
|
|
#endregion å¤é¨æ¥å£æ¹æ³
|
|
#region 请æ±åºåºï¼å®ç&空çï¼
|
|
/// <summary>
|
/// è¯·æ±æçä»»å¡
|
/// </summary>
|
/// <param name="position">ç®æ ä½ç½®</param>
|
/// <param name="tag">æçç±»åï¼1ï¼å®çï¼2ï¼ç©ºçï¼</param>
|
/// <param name="areaCode">åºåç¼ç </param>
|
/// <param name="roadways">å··éç¼ç éå</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> RequestTrayOutTaskAsync(string position, int tag, string areaCode, List<string> areaCodes, string productionLine)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ ¹æ®æçç±»åæ¥è¯¢åºåä¿¡æ¯
|
DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound
|
? areaCode != "CWSC1" ? await QueryStockInfoForRealTrayAsync(areaCode, areaCodes, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine)
|
: await QueryStockInfoForEmptyTrayAsync(areaCode, position);
|
|
if (stockInfo == null)
|
{
|
return content.Error("åºåä¿¡æ¯ä¸åå¨");
|
}
|
|
//ConsoleHelper.WriteColorLine(JsonConvert.SerializeObject(stockInfo), ConsoleColor.DarkMagenta);
|
|
// æ°å¢éå¤ä»»å¡æ ¡éª
|
var hasTask = BaseDal.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
|
if (hasTask != null)
|
{
|
WMSTaskDTO taskDTO1 = CreateTaskDTO(hasTask);
|
return content.OK("å·²åå¨åºåºä»»å¡", data: taskDTO1);
|
}
|
|
// å建æ°ä»»å¡å®ä¾
|
var task = CreateTask(stockInfo, position, tag);
|
var taskId = await BaseDal.AddDataAsync(task);
|
bool isResult = taskId > 0;
|
if (!isResult)
|
{
|
return content.Error("ä»»å¡å建失败");
|
}
|
|
// å建任å¡DTO
|
WMSTaskDTO taskDTO = CreateTaskDTO(task);
|
//if (tag == 1)
|
{
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
stockInfo.LocationInfo.LocationStatus = (int)LocationEnum.InStockDisable;
|
await _locationRepository.UpdateDataAsync(stockInfo.LocationInfo);
|
}
|
|
// è¿åæåååº
|
return content.OK(data: taskDTO);
|
}
|
catch (Exception ex)
|
{
|
// è®°å½å¼å¸¸ä¿¡æ¯å¹¶æåº
|
LogFactory.GetLog("è¯·æ±æçä»»å¡").Error(true, ex);
|
ConsoleHelper.WriteErrorLine("请æ±ç©º/宿çä»»å¡" + ex.Message);
|
return content.Error(ex.Message);
|
}
|
}
|
|
/// <summary>
|
/// æ¥è¯¢å®çåºåä¿¡æ¯
|
/// </summary>
|
private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, List<string> devices, string productionLine)
|
{
|
var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
|
if (area == null)
|
{
|
ConsoleHelper.WriteErrorLine($"æ¥è¯¢å®çåºåä¿¡æ¯æ¶,æªæ¾å°åºå代ç 为{areaCode}çæ°æ®");
|
return null;
|
}
|
|
var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
|
List<string> materielCodes = null;
|
if (outBoundMateriel.Count != 0)
|
{
|
materielCodes = outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == area.AreaCode).Select(x => x.MaterielCode).ToList();
|
}
|
|
IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
|
List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
|
var result = new DtStockInfo();
|
if (stockInfoList.IsNullOrEmpty())
|
{
|
stockInfoList = await _stockInfoRepository.Db.Queryable<DtStockInfo>().IncludesAllFirstLayer().ToListAsync();
|
|
result = stockInfoList.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true)
|
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
|
.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
.OrderBy(x => x.OutboundTime) // æåº
|
.FirstOrDefault(); // è·å第ä¸ä¸ªå
ç´
|
|
if (result != null)
|
{
|
// æé¤ result ä¸çå
ç´
|
stockInfoList = stockInfoList.Where(x => x != result).ToList();
|
}
|
foreach (var item in stockInfoList)
|
{
|
_simpleCacheService.HashAdd(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, item.PalletCode, item);
|
}
|
}
|
else
|
{
|
result = stockInfoList.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true)
|
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
|
.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
.OrderBy(x => x.OutboundTime) // æåº
|
.FirstOrDefault(); // è·å第ä¸ä¸ªå
ç´
|
if (result != null)
|
{
|
// æé¤ result ä¸çå
ç´
|
stockInfoList = stockInfoList.Where(x => x != result).ToList();
|
}
|
string[] xfasd = new string[] { result.PalletCode };
|
_simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { result.PalletCode });
|
}
|
|
#region
|
//var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
|
// .Includes(x => x.LocationInfo) // é¢å è½½LocationInfo
|
// .Includes(x => x.StockInfoDetails) // é¢å è½½StockInfoDetails
|
// .Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true) // è¿æ»¤æ¡ä»¶
|
// .WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
// .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
// .WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
|
// .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
// .OrderBy(x => x.OutboundTime) // æåº
|
// .FirstAsync(); // è·å第ä¸ä¸ªå
ç´
|
#endregion
|
|
return result;
|
}
|
|
/// <summary>
|
/// æ¥è¯¢å¸¸æ¸©å®çåºåä¿¡æ¯
|
/// </summary>
|
private async Task<DtStockInfo> QueryStockInfoForRealTrayCWAsync(List<string> areaCodes, string productionLine)
|
{
|
var areaId = (await _areaInfoRepository.QueryDataAsync(x => areaCodes.Contains(x.AreaCode))).Select(x => x.AreaID).ToList();
|
if (areaId.Count == 0)
|
{
|
ConsoleHelper.WriteErrorLine($"æ¥è¯¢å¸¸æ¸©å®çåºåä¿¡æ¯æ¶,æªæ¾å°åºå代ç 为{JsonConvert.SerializeObject(areaCodes)}çæ°æ®");
|
return null;
|
}
|
|
var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
|
List<string> materielCodes = null;
|
if (outBoundMateriel.Count != 0)
|
{
|
materielCodes = outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == areaCodes[0]).Select(x => x.MaterielCode).ToList();
|
}
|
|
var devices = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
|
.Where(x => x.DeviceStatus == "1")
|
.Where(x => x.DeviceCode.Contains("CWSC"))
|
.ToList();
|
var deviceCode = devices.Select(x => x.DeviceCode).ToList();
|
|
var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
|
.Includes(x => x.LocationInfo) // é¢å è½½LocationInfo
|
.Includes(x => x.StockInfoDetails) // é¢å è½½StockInfoDetails
|
.Where(x => areaCodes.Contains(x.AreaCode) && x.OutboundTime < DateTime.Now && x.IsFull == true) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && areaId.Contains(x.LocationInfo.AreaId) && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
|
.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
.OrderBy(x => x.OutboundTime) // æåº
|
.FirstAsync(); // è·å第ä¸ä¸ªå
ç´
|
return result;
|
}
|
|
/// <summary>
|
/// æ¥è¯¢ç©ºçåºåä¿¡æ¯
|
/// </summary>
|
private async Task<DtStockInfo> QueryStockInfoForEmptyTrayAsync(string areaCode, string position)
|
{
|
var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
|
|
ConsoleHelper.WriteColorLine(position + "..." + areaCode, ConsoleColor.Magenta);
|
var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationChildCode == position && x.stationType == 17);
|
|
ConsoleHelper.WriteColorLine(station.Roadway, ConsoleColor.Magenta);
|
var stackers = station.Roadway.Split(',').ToList();
|
|
var devices = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
|
.Where(x => x.DeviceStatus == "1")
|
.Where(x => stackers.Contains(x.DeviceCode))
|
.ToList();
|
|
var deviceCode = devices.Select(x => x.DeviceCode).ToList();
|
|
var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
|
.Includes(x => x.LocationInfo) // é¢å è½½LocationInfo
|
.Includes(x => x.StockInfoDetails) // é¢å è½½StockInfoDetails
|
.Where(x => x.ProductionLine == station.productLine)
|
.Where(x => x.AreaCode == areaCode && x.IsFull == false)
|
.Where(x => x.StockInfoDetails.Any(y => y.MaterielCode == "空æç"))
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
|
.OrderBy(x => x.CreateDate) // æåº
|
.FirstAsync(); // 转æ¢ä¸ºå表
|
|
//var firstOrDefault = result[0]; // æ¥æ¾ç¬¬ä¸ä¸ªå¹é
çå
ç´
|
//return firstOrDefault;
|
return result;
|
}
|
|
/// <summary>
|
/// å建任å¡å®ä¾
|
/// </summary>
|
private Dt_Task CreateTask(DtStockInfo stockInfo, string position, int tag)
|
{
|
return new Dt_Task
|
{
|
Grade = tag == 104 ? (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 1 : 2) : (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 2 : 1),
|
Roadway = stockInfo.LocationInfo.RoadwayNo,
|
TargetAddress = position,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = position,
|
OrderNo = null,
|
PalletCode = stockInfo.PalletCode,
|
SourceAddress = stockInfo.LocationCode,
|
CurrentAddress = stockInfo.LocationCode,
|
TaskState = (int)TaskOutStatusEnum.OutNew,
|
TaskType = tag,
|
TaskNum = BaseDal.GetTaskNo().Result,
|
Creater = "System", // ä¿®æ£æ¼åé误
|
CreateDate = DateTime.Now,
|
TaskId = 0,
|
ProductionLine = stockInfo.ProductionLine,
|
ProcessCode = stockInfo.ProcessCode,
|
};
|
}
|
|
/// <summary>
|
/// å建任å¡DTO
|
/// </summary>
|
private WMSTaskDTO CreateTaskDTO(Dt_Task task)
|
{
|
return new WMSTaskDTO
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = task.Grade.Value,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.TargetAddress,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
ProductionLine = task.ProductionLine,
|
};
|
}
|
|
#endregion 请æ±åºåºï¼å®ç&空çï¼
|
|
#region ä»»å¡ç¶ææ´æ¹
|
|
/// <summary>
|
/// æ´æ°ä»»å¡ç¶æ&åºåºè§£ç
|
/// </summary>
|
/// <param name="taskNum"></param>
|
/// <param name="taskState"></param>
|
/// <returns></returns>
|
public async Task<WebResponseContent> UpdateTaskStatus(int taskNum, int taskState)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
var task = await BaseDal.QueryFirstAsync(x => x.TaskNum == taskNum);
|
if (task == null)
|
return content.Error("æªæ¾å°ä»»å¡");
|
|
if (taskState == (int)TaskOutStatusEnum.Line_OutFinish || taskState == (int)TaskInStatusEnum.SC_InFinish)
|
{
|
var taskHty = CreateHistoricalTask(task);
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
var asb = await BaseDal.DeleteDataByIdAsync(task.TaskId);
|
var asbHty = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
|
if (asb && asbHty)
|
content.OK();
|
else
|
throw new Exception();
|
});
|
content.OK();
|
}
|
else
|
{
|
task.TaskState = taskState;
|
var asb = await BaseDal.UpdateDataAsync(task);
|
if (asb)
|
content.OK();
|
else
|
content.Error();
|
}
|
}
|
catch (Exception ex)
|
{
|
content.Error(ex.Message);
|
}
|
return content;
|
}
|
|
#endregion ä»»å¡ç¶ææ´æ¹
|
|
#region æå®ä»»å¡åºåº
|
|
public async Task<WebResponseContent> CreateAndSendOutboundTask(string locationCode, string palletCode)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ¥è¯¢åºåä¿¡æ¯
|
var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.LocationCode == locationCode && x.PalletCode == palletCode);
|
if (stockInfo == null)
|
{
|
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)
|
{
|
return content.Error($"ã{palletCode}ãå·²åå¨ä»»å¡");
|
}
|
|
int taskType = 0;
|
if (stockInfo.IsFull)
|
taskType = (int)TaskOutboundTypeEnum.OutQuality;
|
else
|
taskType = (int)TaskOutboundTypeEnum.OutTray;
|
|
if (stockInfo.AreaCode.Contains("CH"))
|
{
|
// å建并添å ä»»å¡å°æ°æ®åº
|
task = CreateTask(stockInfo, "1020-1", taskType);
|
}
|
else
|
{
|
if (stockInfo.LocationInfo.RoadwayNo.Contains("JZSC"))
|
{
|
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);
|
//if (taskId <= 0)
|
//{
|
// return content.Error("ä»»å¡å建失败");
|
//}
|
|
// å建任å¡ä¼ è¾ç¨çDTO对象
|
var taskDTO = CreateTaskDTO(task);
|
|
// è·åWMS IPå°åç¨äºåéä»»å¡è¯·æ±
|
var wmsIpAddress = GetWCSIpReceiveTask();
|
if (wmsIpAddress == null)
|
{
|
throw new InvalidOperationException("WMS IP æªé
ç½®");
|
}
|
|
var tasks = new List<WMSTaskDTO>() { taskDTO };
|
// åéä»»å¡è¯·æ±å°WMS
|
var result = await HttpHelper.PostAsync(wmsIpAddress, tasks.ToJsonString());
|
content = JsonConvert.DeserializeObject<WebResponseContent>(result);
|
if (content.Status)
|
{
|
// æ·»å ä»»å¡å°æ°æ®åº
|
await BaseDal.AddDataAsync(task);
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
stockInfo.LocationInfo.LocationStatus = (int)LocationEnum.InStockDisable;
|
await _locationRepository.UpdateDataAsync(stockInfo.LocationInfo);
|
}
|
}
|
catch (Exception ex)
|
{
|
Console.WriteLine($"åçå¼å¸¸: {ex.Message}");
|
content.Error(ex.Message);
|
}
|
|
return content;
|
}
|
|
private string GetWCSIpReceiveTask()
|
{
|
var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
|
var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
|
var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveTask)?.ConfigValue;
|
if (wmsBase == null || ipAddress == null)
|
{
|
return null;
|
}
|
return wmsBase + ipAddress;
|
}
|
|
#endregion æå®ä»»å¡åºåº
|
|
#region éç½®å¼å¸¸å£å
¥åº
|
|
public async Task<WebResponseContent> CreateAndSendInboundTask(string palletCode, string position)
|
{
|
#region
|
//WebResponseContent content = new WebResponseContent();
|
//try
|
//{
|
// // æ¥è¯¢åºåä¿¡æ¯
|
// var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == palletCode);
|
// if (stockInfo == null)
|
// {
|
// var taskOld = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
|
// if (!taskOld.IsNullOrEmpty())
|
// {// å建WMSä»»å¡
|
// WMSTaskDTO taskDTO = new WMSTaskDTO()
|
// {
|
// TaskNum = taskOld.TaskNum.Value,
|
// Grade = 1,
|
// PalletCode = taskOld.PalletCode,
|
// RoadWay = taskOld.Roadway,
|
// SourceAddress = taskOld.CurrentAddress,
|
// TargetAddress = taskOld.TargetAddress,
|
// TaskState = taskOld.TaskState.Value,
|
// Id = 0,
|
// TaskType = taskOld.TaskType,
|
// };
|
// return content.OK(data: taskDTO);
|
// }
|
// var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
// var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == position);
|
// TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, palletCode);
|
// content = await GetTrayCellStatusAsync(trayCells);
|
// if (!content.Status) return content;
|
|
// ConsoleHelper.WriteErrorLine(content.ToJsonString());
|
// var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
// if (!result.Success) return content.Error(result.MOMMessage);
|
|
// if (result.SerialNos.Count > 0)
|
// {
|
// var boxing = CreateBoxingInfo(result, palletCode);
|
// if (boxing == null) return content.Error("ç»ç失败");
|
|
// // è·åå·¥èºè·¯çº¿
|
// ProcessApplyDto process = await GetProcessApplyAsync(result);
|
// // èµå¼ä¸ä½è½¯ä»¶åç§°å设å¤ç¼ç
|
// process.Software = area.Spare3;
|
// process.EquipmentCode = area.Spare2;
|
// content = await _processApplyService.GetProcessApplyAsync(process);
|
// if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
// var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString());
|
// if (!resultProcessApply.Success) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
// var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault().Number.ToInt32();
|
// foreach (var item in resultProcessApply.ProcessInfo)
|
// {
|
// if (item.Number.ToInt32() == number + 1)
|
// {
|
// boxing.NextProcessCode = item.ProcessCode;
|
// }
|
// }
|
// var location = await GetLocationDistributeAsync(station.Roadway);
|
|
// ConsoleHelper.WriteErrorLine(location.ToJsonString());
|
|
// // å建æ°ä»»å¡å®ä¾
|
// var task = new Dt_Task
|
// {
|
// CurrentAddress = station.stationLocation,
|
// Grade = 1,
|
// Roadway = station.Roadway,
|
// TargetAddress = location.LocationCode,
|
// Dispatchertime = DateTime.Now,
|
// MaterialNo = "",
|
// NextAddress = location.LocationCode,
|
// OrderNo = null,
|
// PalletCode = palletCode,
|
// SourceAddress = position,
|
// TaskState = (int)TaskInStatusEnum.Line_InFinish,
|
// TaskType = (int)TaskInboundTypeEnum.Inbound,
|
// TaskNum = await BaseDal.GetTaskNo(),
|
// Creater = "Systeam"
|
// };
|
|
// // å建WMSä»»å¡
|
// WMSTaskDTO taskDTO = new WMSTaskDTO()
|
// {
|
// TaskNum = task.TaskNum.Value,
|
// Grade = 1,
|
// PalletCode = task.PalletCode,
|
// RoadWay = task.Roadway,
|
// SourceAddress = task.SourceAddress,
|
// TargetAddress = task.TargetAddress,
|
// TaskState = task.TaskState.Value,
|
// Id = 0,
|
// TaskType = task.TaskType,
|
// };
|
|
// await _unitOfWorkManage.UseTranAsync(async () =>
|
// {
|
// // æ·»å ä»»å¡å°æ°æ®åº
|
// await BaseDal.AddDataAsync(task);
|
// // æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
// location.LocationStatus = (int)LocationEnum.InStockDisable;
|
// await _locationRepository.UpdateDataAsync(location);
|
// await _boxingInfoRepository.AddDataNavAsync(boxing);
|
// });
|
|
// content.OK(data: taskDTO);
|
// }
|
// else
|
// content.Error(result.MOMMessage);
|
// }
|
// else
|
// {
|
// // TODOè´¨æ£ååº
|
// var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
// }
|
//}
|
//catch (Exception ex)
|
//{
|
// content.Error(ex.Message);
|
//}
|
//return content;
|
#endregion éç½®å¼å¸¸å£å
¥åº
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ¥è¯¢åºåä¿¡æ¯
|
var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == palletCode);
|
if (stockInfo == null)
|
{
|
var taskOld = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
|
if (taskOld != null)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateWMSTaskDTO(taskOld);
|
return content.OK(data: taskDTO);
|
}
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == position);
|
TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, palletCode);
|
content = await GetTrayCellStatusAsync(trayCells);
|
if (!content.Status) return content;
|
|
ConsoleHelper.WriteErrorLine(content.ToJsonString());
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (result == null || !result.Success) return content.Error(result?.MOMMessage ?? "Deserialization error");
|
|
if (result.SerialNos.Count > 0)
|
{
|
var boxing = CreateBoxingInfo(result, palletCode);
|
if (boxing == null) return content.Error("ç»ç失败");
|
|
// è·åå·¥èºè·¯çº¿
|
ProcessApplyDto process = await GetProcessApplyAsync(result);
|
// èµå¼ä¸ä½è½¯ä»¶åç§°å设å¤ç¼ç
|
process.Software = area.Spare3;
|
process.EquipmentCode = area.Spare2;
|
|
content = await _processApplyService.GetProcessApplyAsync(process);
|
if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString()) as ResultProcessApply;
|
if (resultProcessApply == null || !resultProcessApply.Success) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault()?.Number.ToInt32() ?? 0;
|
foreach (var item in resultProcessApply.ProcessInfo)
|
{
|
if (item.Number.ToInt32() == number + 1)
|
{
|
boxing.NextProcessCode = item.ProcessCode;
|
}
|
}
|
var location = await GetLocationDistributeAsync(station.Roadway);
|
|
ConsoleHelper.WriteErrorLine(location.ToJsonString());
|
|
// å建æ°ä»»å¡å®ä¾
|
var task = new Dt_Task
|
{
|
CurrentAddress = station.stationLocation,
|
Grade = 1,
|
Roadway = station.Roadway,
|
TargetAddress = location.LocationCode,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = location.LocationCode,
|
OrderNo = null,
|
PalletCode = palletCode,
|
SourceAddress = position,
|
TaskState = (int)TaskInStatusEnum.Line_InFinish,
|
TaskType = (int)TaskInboundTypeEnum.Inbound,
|
TaskNum = await BaseDal.GetTaskNo(),
|
Creater = "Systeam",
|
ProductionLine = result.ProductionLine,
|
ProcessCode = result.ProcessCode,
|
};
|
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateWMSTaskDTO(task);
|
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
// æ·»å ä»»å¡å°æ°æ®åº
|
await BaseDal.AddDataAsync(task);
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
location.LocationStatus = (int)LocationEnum.Lock;
|
await _locationRepository.UpdateDataAsync(location);
|
await _boxingInfoRepository.AddDataNavAsync(boxing);
|
});
|
|
content.OK(data: taskDTO);
|
}
|
else
|
{
|
var location = await GetLocationDistributeAsync(station.Roadway);
|
var task = new Dt_Task
|
{
|
CurrentAddress = station.stationLocation,
|
Grade = 1,
|
Roadway = station.Roadway,
|
TargetAddress = location.LocationCode,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = location.LocationCode,
|
OrderNo = null,
|
PalletCode = palletCode,
|
SourceAddress = position,
|
TaskState = (int)TaskInStatusEnum.Line_InFinish,
|
TaskType = (int)TaskInboundTypeEnum.InTray,
|
TaskNum = await BaseDal.GetTaskNo(),
|
Creater = "Systeam",
|
ProductionLine = result.ProductionLine,
|
ProcessCode = result.ProcessCode,
|
};
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateWMSTaskDTO(task);
|
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
// æ·»å ä»»å¡å°æ°æ®åº
|
await BaseDal.AddDataAsync(task);
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
location.LocationStatus = (int)LocationEnum.Lock;
|
await _locationRepository.UpdateDataAsync(location);
|
});
|
|
content.OK(data: taskDTO);
|
}
|
}
|
else
|
{
|
// TODOè´¨æ£ååº
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
}
|
}
|
catch (Exception ex)
|
{
|
// æ´è¯¦ç»çæ¥å¿è®°å½ï¼å¯ä½¿ç¨æ¥å¿æ¡æ¶æ¿æ¢ Console.WriteLine
|
Console.WriteLine($"Error in CreateAndSendInboundTask: {ex.Message}");
|
content.Error(ex.Message);
|
}
|
return content;
|
}
|
|
private WMSTaskDTO CreateWMSTaskDTO(object source)
|
{
|
if (source is Dt_Task taskOld)
|
{
|
return new WMSTaskDTO()
|
{
|
TaskNum = taskOld.TaskNum.Value,
|
Grade = 1,
|
PalletCode = taskOld.PalletCode,
|
RoadWay = taskOld.Roadway,
|
SourceAddress = taskOld.SourceAddress,
|
TargetAddress = taskOld.TargetAddress,
|
TaskState = taskOld.TaskState.Value,
|
Id = 0,
|
TaskType = taskOld.TaskType,
|
ProductionLine = taskOld.ProductionLine
|
};
|
}
|
else if (source is Dt_Task task)
|
{
|
return new WMSTaskDTO()
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = 1,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.TargetAddress,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
ProductionLine = task.ProductionLine
|
};
|
}
|
else
|
{
|
throw new ArgumentException("Invalid source object type for WMSTaskDTO creation.");
|
}
|
}
|
|
#endregion éç½®å¼å¸¸å£å
¥åº
|
|
#endregion å¤é¨æ¥å£æ¹æ³
|
|
#region å
é¨è°ç¨æ¹æ³
|
|
/// <summary>
|
/// å建ä¸ä¸ªæ°çä»»å¡
|
/// </summary>
|
/// <param name="model">任塿¨¡å</param>
|
/// <returns>å建çä»»å¡</returns>
|
public async Task<Dt_Task> Create(Dt_Task model)
|
{
|
return await BaseDal.Create(model);
|
}
|
|
/// <summary>
|
/// æ¹éå建任å¡
|
/// </summary>
|
/// <param name="models">任塿¨¡åå表</param>
|
/// <returns>æ¯å¦å建æå</returns>
|
public async Task<bool> Create(List<Dt_Task> models)
|
{
|
return await BaseDal.Create(models);
|
}
|
|
/// <summary>
|
/// å é¤ä¸ä¸ªä»»å¡
|
/// </summary>
|
/// <param name="id">ä»»å¡ID</param>
|
/// <returns>æ¯å¦å 餿å</returns>
|
public async Task<bool> Delete(int id)
|
{
|
return await BaseDal.Delete(id);
|
}
|
|
/// <summary>
|
/// æ¹éå é¤ä»»å¡
|
/// </summary>
|
/// <param name="ids">ä»»å¡IDå表</param>
|
/// <returns>æ¯å¦å 餿å</returns>
|
public async Task<bool> Delete(List<int> ids)
|
{
|
return await BaseDal.Delete(ids);
|
}
|
|
public override WebResponseContent DeleteData(object[] key)
|
{
|
WebResponseContent content = new WebResponseContent();
|
// å建åå²ä»»å¡å®ä¾æ¨¡å
|
try
|
{
|
Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key[0]));
|
if (task == null)
|
{
|
return content.Error("æªæ¾å°ä»»å¡ä¿¡æ¯!");
|
}
|
var taskHtyNG = CreateHistoricalTask(task, true);
|
|
// æ§è¡æ°æ®åºäºå¡
|
|
// æ·»å åå²ä»»å¡
|
var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0;
|
|
// å é¤ä»»å¡æ°æ®
|
var isTaskDelete = BaseDal.Delete(task.TaskId);
|
|
return content.OK("å 餿å!");
|
}
|
catch (Exception ex)
|
{
|
return content.Error("å é¤ä»»å¡å¼å¸¸ï¼" + ex.Message);
|
}
|
}
|
|
/// <summary>
|
/// éè¿IDè·åä»»å¡
|
/// </summary>
|
/// <param name="id">ä»»å¡ID</param>
|
/// <returns>任塿¨¡å</returns>
|
public async Task<Dt_Task> GetById(int id)
|
{
|
return await BaseDal.GetById(id);
|
}
|
|
/// <summary>
|
/// è·åææä»»å¡å表
|
/// </summary>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetList()
|
{
|
return await BaseDal.GetList();
|
}
|
|
/// <summary>
|
/// æ ¹æ®åºåºè®¢åIDè·åä»»å¡å表
|
/// </summary>
|
/// <param name="outOrderId">åºåºè®¢åID</param>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetListByOutOrder(int outOrderId)
|
{
|
return await BaseDal.GetListByOutOrder(outOrderId);
|
}
|
|
/// <summary>
|
/// æ ¹æ®åºåºè®¢åIDåç¶æè·åä»»å¡å表
|
/// </summary>
|
/// <param name="outOrderId">åºåºè®¢åID</param>
|
/// <param name="status">ä»»å¡ç¶æ</param>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetListByOutOrderAndStatus(int outOrderId, int status)
|
{
|
return await BaseDal.GetListByOutOrderAndStatus(outOrderId, status);
|
}
|
|
/// <summary>
|
/// æ ¹æ®ç¶æè·åä»»å¡å表
|
/// </summary>
|
/// <param name="status">ä»»å¡ç¶æ</param>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetListByStatus(int status)
|
{
|
return await BaseDal.GetListByStatus(status);
|
}
|
|
/// <summary>
|
/// æ´æ°ä¸ä¸ªä»»å¡
|
/// </summary>
|
/// <param name="model">任塿¨¡å</param>
|
/// <returns>æ¯å¦æ´æ°æå</returns>
|
public async Task<bool> Update(Dt_Task model)
|
{
|
return await BaseDal.UpdateDataAsync(model);
|
}
|
|
/// <summary>
|
/// æ¹éæ´æ°ä»»å¡
|
/// </summary>
|
/// <param name="models">任塿¨¡åå表</param>
|
/// <returns>æ¯å¦æ´æ°æå</returns>
|
public async Task<bool> Update(List<Dt_Task> models)
|
{
|
return await BaseDal.UpdateDataAsync(models);
|
}
|
|
/// <summary>
|
/// æ£æ¥ä»»å¡æ¯å¦åå¨
|
/// </summary>
|
/// <param name="palletCode">æçç¼ç </param>
|
/// <returns>任塿¯å¦åå¨</returns>
|
public bool IsExist(string palletCode)
|
{
|
return Db.Queryable<Dt_Task>().Any(x => x.PalletCode == palletCode);
|
}
|
|
/// <summary>
|
/// æ ¹æ®è´§ä½IDè·åä»»å¡
|
/// </summary>
|
/// <param name="locationID"></param>
|
/// <returns></returns>
|
public async Task<Dt_Task> GetByLocation(string locationID)
|
{
|
return await BaseDal.QueryFirstAsync(x => x.SourceAddress == locationID);
|
}
|
|
/// <summary>
|
/// æ ¹æ®ä»»å¡å·è·åä»»å¡
|
/// </summary>
|
/// <param name="taskNum"></param>
|
/// <returns></returns>
|
public async Task<Dt_Task> GetByTaskNum(int taskNum)
|
{
|
return await BaseDal.QueryFirstAsync(x => x.TaskNum == taskNum);
|
}
|
|
#endregion å
é¨è°ç¨æ¹æ³
|
|
#region private å
鍿¹æ³
|
|
/// <summary>
|
/// å建åå²ä»»å¡è®°å½
|
/// </summary>
|
/// <param name="task"></param>
|
/// <returns></returns>
|
private Dt_Task_Hty CreateHistoricalTask(Dt_Task task, bool isHand = false)
|
{
|
// æ´æ°ä»»å¡ç¶æ
|
task.TaskState = task.TaskType > 199 ? (int)TaskInStatusEnum.InFinish : (int)TaskOutStatusEnum.OutFinish;
|
task.CurrentAddress = task.NextAddress;
|
|
// å建åå²ä»»å¡
|
var taskHty = _mapper.Map<Dt_Task_Hty>(task);
|
taskHty.FinishTime = DateTime.Now;
|
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 = task.TaskType > 199 ? (int)TaskInStatusEnum.InFinish : (int)TaskOutStatusEnum.OutFinish;
|
return taskHty;
|
}
|
|
/// <summary>
|
/// æ´æ°åºåä½ç½®
|
/// </summary>
|
/// <param name="stock">åºå对象</param>
|
/// <param name="toLocation">ç®æ ä½ç½®</param>
|
// æ´æ°åºååä½ç½®ä¿¡æ¯
|
private (DtStockInfo, DtLocationInfo, DtLocationInfo) UpdateStockLocation(DtStockInfo stock, Dt_Task task)
|
{
|
//ä¿®æ¹æ¥æºåºä½å ç®æ åºä½ç¶æ
|
var fromLocation = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
|
fromLocation.LocationStatus = LocationEnum.Free.ObjToInt();
|
var toLocation = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
|
toLocation.LocationStatus = LocationEnum.InStock.ObjToInt();
|
|
// å°åºåä½ç½®è®¾ç½®ä¸ºç®æ ä½ç½®
|
stock.LocationCode = task.TargetAddress;
|
|
// è¿åæ´æ°åçåºååä½ç½®ä¿¡æ¯
|
return (stock, fromLocation, toLocation);
|
}
|
|
/// <summary>
|
/// æ§è¡æ°æ®åºäºå¡
|
/// </summary>
|
/// <param name="stock">åºå对象</param>
|
/// <param name="taskHty">åå²ä»»å¡å¯¹è±¡</param>
|
/// <param name="taskId">ä»»å¡ID</param>
|
/// <returns></returns>
|
private async Task<bool> ExecuteTransaction(DtStockInfo stock, Dt_Task_Hty taskHty, DtLocationInfo locationInfo, int taskId, DtBoxingInfo boxingInfo = null)
|
{
|
_unitOfWorkManage.BeginTran();
|
try
|
{
|
var isUpdateStock = true;
|
var isDeleteBoxing = true;
|
if (taskHty.TaskType == (int)TaskTypeEnum.Outbound)
|
{
|
// æ´æ°åºå
|
isUpdateStock = await _stockInfoRepository.UpdateDataAsync(stock);
|
}
|
else
|
{
|
// æ·»å åºå
|
isUpdateStock = await _stockInfoRepository.AddDataNavAsync(stock);
|
if (boxingInfo != null)
|
{
|
isDeleteBoxing = await _boxingInfoRepository.Db.DeleteNav<DtBoxingInfo>(x => x.Id == boxingInfo.Id)
|
.Include(x => x.BoxingInfoDetails)
|
.ExecuteCommandAsync();
|
}
|
}
|
|
if (stock.IsFull)
|
{
|
// æ¥è¯¢ç¬¦åæ¡ä»¶çåºåä¿¡æ¯
|
var stocks = _stockInfoRepository.QueryData(x => x.AreaCode == stock.AreaCode && x.ProductionLine == stock.ProductionLine && x.SpecialParameterDuration != stock.SpecialParameterDuration);
|
|
// æ¥è¯¢ä»»å¡ä¿¡æ¯
|
var tasks = BaseDal.QueryData(x => x.PalletCode != stock.PalletCode && x.ProductionLine == stock.ProductionLine).Select(x => x.PalletCode).ToList();
|
|
if (stocks != null && stocks.Count > 0)
|
{
|
// è¿æ»¤åºéè¦æ´æ°çåºåä¿¡æ¯
|
var stocksToUpdate = stocks.Where(item => !tasks.Contains(item.PalletCode)).ToList();
|
foreach (var item in stocksToUpdate)
|
{
|
// æ´æ°åºåä¿¡æ¯çç¹å®åæ°
|
item.SpecialParameterDuration = stock.SpecialParameterDuration;
|
item.ParameterInfos = stock.ParameterInfos;
|
item.OutboundTime = Convert.ToDateTime(item.LinedProcessFeedbackTime == null ? item.CreateDate : item.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(stock.SpecialParameterDuration));
|
}
|
if (stocksToUpdate.Count > 0)
|
{
|
// 弿¥æ´æ°åºåä¿¡æ¯
|
var isUpdates = await _stockInfoRepository.UpdateDataAsync(stocksToUpdate);
|
}
|
}
|
}
|
|
// æ·»å åå²ä»»å¡
|
var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
|
|
// ä¿®æ¹ç§»åºåè´§ä½ç¶æ
|
var isUpdateLoc = _locationRepository.UpdateData(locationInfo);
|
|
// å é¤ä»»å¡æ°æ®
|
var isTaskDelete = await Delete(taskId);
|
|
// æäº¤æåæ»äºå¡
|
if (isUpdateStock && isTaskHtyAdd && isTaskDelete && isUpdateLoc && isDeleteBoxing)
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ä»»å¡å®æ", $"äºå¡å¤ç宿,æäº¤äºå¡ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°ææ·»å åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}");
|
_unitOfWorkManage.CommitTran();
|
return true;
|
}
|
else
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ä»»å¡å®æ", $"æ°æ®å¤ç失败,è¯·æ£æ¥æ°æ®æ¯å¦æ£ç¡®,æ°æ®åæ»ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}");
|
_unitOfWorkManage.RollbackTran();
|
return false;
|
}
|
}
|
catch (Exception err)
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, $"ä»»å¡å®æ,ç³»ç»å¼å¸¸ï¼å¼å¸¸ä¿¡æ¯ï¼{err.Message}", "æ åæ°");
|
_unitOfWorkManage.RollbackTran();
|
throw; // æåºå¼å¸¸ä»¥ä¾¿å¤é¨æè·
|
}
|
}
|
|
#region ä»»å¡è¯·æ±æ¹æ³
|
|
private static readonly SemaphoreSlim _semaphoreUpdate = new SemaphoreSlim(1, 1);
|
// æ´æ°ä»»å¡è´§ä½
|
|
private async Task<WebResponseContent> UpdateExistingTask(RequestTaskDto input, Dt_Task task)
|
{
|
await _semaphoreUpdate.WaitAsync();
|
try
|
{
|
if (task == null)
|
{
|
return new WebResponseContent().Error("ä»»å¡å¯¹è±¡ä¸ºç©º");
|
}
|
|
try
|
{
|
// å建WebResponseContent对象
|
var content = new WebResponseContent();
|
|
// è·åç®æ å°ååæ´æ°ä»»å¡ç¶æ
|
|
input.Position = Regex.Replace(input.Position, @"-(\d+)", "");
|
if (Convert.ToInt32(input.Position) > 1999)
|
{
|
input.Position = (Convert.ToInt32(input.Position) - 1000).ToString();
|
}
|
|
if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
|
{
|
// TODO æ ¹æ®å··éæ¥æ¾å¯¹åºNGå£ï¼ç°å¨é»è®¤å»éç½®å åæºçå¼å¸¸å£è´§ä½å·
|
task.CurrentAddress = input.Position;
|
task.TargetAddress = "002-021-000";
|
task.NextAddress = "002-021-000";
|
task.TaskState = (int)TaskInStatusEnum.Line_InFinish;
|
bool isResult = await BaseDal.UpdateDataAsync(task);
|
return content.OK(data: task);
|
}
|
else if (task.TaskType == (int)TaskInboundTypeEnum.InQuality)
|
{
|
var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == input.PalletCode);
|
task.CurrentAddress = input.Position;
|
task.TargetAddress = stockInfo.LocationInfo.LocationCode;
|
task.NextAddress = stockInfo.LocationInfo.LocationCode;
|
task.TaskState = (int)TaskInStatusEnum.Line_InFinish;
|
bool isResult = await BaseDal.UpdateDataAsync(task);
|
return content.OK(data: task);
|
}
|
else
|
{
|
var location = await GetLocationDistributeAsync(task.Roadway);
|
if (location == null)
|
{
|
return content.Error("æ æ³è·åè´§ä½ä¿¡æ¯");
|
}
|
|
string toAddress = location.LocationCode;
|
int taskState = (int)TaskInStatusEnum.Line_InFinish;
|
int beforeStatus = location.LocationStatus;
|
// æ´æ°è´§ä½ä¿¡æ¯
|
location.LocationStatus = (int)LocationEnum.Lock;
|
|
// æ´æ°ä»»å¡ä¿¡æ¯
|
MapTaskProperties(task, input, toAddress, taskState);
|
|
// å¼å§äºå¡
|
var isResult = await UpdateTaskAsync(task, location, beforeStatus);
|
if (!isResult)
|
{
|
_unitOfWorkManage.RollbackTran();
|
return content.Error("æ´æ°ä»»å¡å¤±è´¥");
|
}
|
|
// æäº¤äºå¡
|
_unitOfWorkManage.CommitTran();
|
return content.OK(data: task);
|
}
|
}
|
catch (Exception ex)
|
{
|
// åæ»äºå¡
|
_unitOfWorkManage.RollbackTran();
|
// è¿éå¯ä»¥æ·»å æ¥å¿è®°å½
|
return new WebResponseContent().Error($"æ´æ°ä»»å¡æ¶åçé误: {ex.Message}");
|
}
|
}
|
catch (Exception)
|
{
|
throw;
|
}
|
finally { _semaphoreUpdate.Release(); }
|
}
|
|
private void MapTaskProperties(Dt_Task task, RequestTaskDto input, string toAddress, int taskState)
|
{
|
task.CurrentAddress = input.Position;
|
task.TargetAddress = toAddress;
|
task.NextAddress = toAddress;
|
task.TaskState = taskState;
|
}
|
|
// ä¿®æ¹ä»»å¡
|
private async Task<bool> UpdateTaskAsync(Dt_Task task, DtLocationInfo location, int beforeStatus)
|
{
|
bool isResult = await BaseDal.UpdateDataAsync(task);
|
bool isTaskDetail = await _taskExecuteDetailRepository.AddDetailAsync(task, false, TaskDescription.GetTaskUpdateDescription(task.PalletCode, task.CurrentAddress, task.TargetAddress, TaskInStatusEnum.Line_InFinish.GetIntegralRuleTypeEnumDesc()));
|
|
LocationChangeRecordDto changeRecordDto = new LocationChangeRecordDto()
|
{
|
AfterStatus = location.LocationStatus,
|
BeforeStatus = beforeStatus,
|
TaskNum = task.TaskNum.Value,
|
LocationId = location.Id,
|
LocationCode = location.LocationCode,
|
ChangeType = (int)StatusChangeTypeEnum.AutomaticStorage,
|
};
|
|
bool isUpdateChange = _locationStatusChangeRecordRepository.AddStatusChangeRecord(changeRecordDto);
|
bool isUpdateLo = await _locationRepository.UpdateDataAsync(location);
|
|
return isResult && isUpdateLo && isTaskDetail;
|
}
|
|
/// <summary>
|
/// å建æ°ä»»å¡
|
/// </summary>
|
/// <param name="input">è¯·æ±æ¨¡å</param>
|
/// <param name="process">å··é</param>
|
/// <param name="flag">æ è¯ï¼0-å
¥åºï¼1-空æçå
¥åºï¼2-NGå
¥åºï¼3-åºåºï¼</param>
|
/// <returns></returns>
|
private async Task<WebResponseContent> CreateNewTask(RequestTaskDto input, string productionLine, string processCode, List<string> process = null, int flag = 0)
|
{
|
WebResponseContent content = new WebResponseContent();
|
|
// è·åç®æ å°å
|
//string ToAddress = await GetRoadWayAsync(process);
|
string ToAddress = string.Empty;
|
if (flag < 2)
|
ToAddress = await GetRoadWayAsync(process);
|
else
|
ToAddress = process[0];
|
|
// å建æ°ä»»å¡å®ä¾
|
var task = new Dt_Task
|
{
|
CurrentAddress = input.Position,
|
Grade = 1,
|
Roadway = ToAddress,
|
TargetAddress = ToAddress,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = ToAddress,
|
OrderNo = null,
|
PalletCode = input.PalletCode,
|
SourceAddress = input.Position,
|
TaskState = flag == 3 ? (int)TaskOutStatusEnum.OutNew : (int)TaskInStatusEnum.InNew,
|
TaskType = flag == 0 ? (int)TaskInboundTypeEnum.Inbound : flag == 1 ? (int)TaskInboundTypeEnum.InTray : flag == 2 ? (int)TaskInboundTypeEnum.InNG : (int)TaskOutboundTypeEnum.Outbound,
|
TaskNum = await BaseDal.GetTaskNo(),
|
Creater = "Systeam",
|
ProductionLine = productionLine,
|
ProcessCode = processCode
|
};
|
|
// å°è¯æ·»å æ°ä»»å¡
|
var taskId = await BaseDal.AddDataAsync(task);
|
bool isResult = taskId > 0;
|
if (isResult)
|
{
|
task.TaskId = taskId;
|
isResult = await _taskExecuteDetailRepository.AddDetailAsync(task, false, TaskDescription.GetTaskUpdateDescription(input.PalletCode, input.Position, ToAddress, TaskInStatusEnum.InNew.GetIntegralRuleTypeEnumDesc()));
|
|
//var location = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
//location.LocationStatus = (int)LocationEnum.Lock;
|
//var isLocation = _locationRepository.UpdateData(location);
|
|
if (isResult)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = new WMSTaskDTO()
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = 1,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.TargetAddress,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
ProductionLine = task.ProductionLine
|
};
|
content.OK(data: taskDTO);
|
}
|
else
|
content.Error("æ·»å ä»»å¡å¤±è´¥");
|
}
|
else
|
content.Error("æ·»å ä»»å¡å¤±è´¥");
|
return content;
|
}
|
|
private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1);
|
|
/// <summary>
|
/// æ¥æ¾è´§ä½
|
/// </summary>
|
/// <param name="IsFull">åºå主é®</param>
|
/// <param name="roadWay">å··é</param>
|
/// <returns></returns>
|
public async Task<DtLocationInfo> GetLocationDistributeAsync(string roadWay, bool IsFull = true)
|
{
|
#region è·åè´§ä½
|
|
await _semaphore.WaitAsync();
|
try
|
{
|
List<DtLocationInfo> locations;
|
if (IsFull)
|
{
|
locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo == roadWay && x.EnalbeStatus == (int)EnableEnum.Enable);
|
}
|
else
|
{
|
locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo == roadWay && x.EnalbeStatus == (int)EnableEnum.Enable);
|
}
|
|
if (locations == null)
|
{
|
return null;
|
}
|
|
return locations.OrderBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault();
|
}
|
catch (Exception err)
|
{
|
Console.WriteLine(err.Message.ToString());
|
return null;
|
}
|
finally
|
{
|
_semaphore.Release();
|
}
|
|
#endregion è·åè´§ä½
|
}
|
|
/// <summary>
|
/// æ ¹æ®å··éè·åå··éæç«å°
|
/// </summary>
|
/// <returns></returns>
|
public async Task<string> GetRoadWayAsync(List<string> process)
|
{
|
var deviceCode = await SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
|
.Where(x => x.DeviceStatus == 1.ToString() && process.Contains(x.DeviceCode))
|
.Select(x => x.DeviceCode).ToListAsync();
|
|
var minGroup = _locationRepository.QueryData(x => deviceCode.Contains(x.RoadwayNo) && x.LocationStatus == (int)LocationEnum.Free)
|
.GroupBy(x => x.RoadwayNo)
|
.OrderByDescending(g => g.Count()) // æ ¹æ®æ¯ä¸ªç»çå
ç´ æ°éæåº
|
.ToList(); // ååºæ°éæå¤çç»
|
|
Dictionary<string, int> result = new Dictionary<string, int>();
|
foreach (var item in minGroup)
|
{
|
var number = BaseDal.QueryData(x => x.TargetAddress == item.Key).Count();
|
result.Add(item.Key, item.Count() - number);
|
}
|
|
string minRoadwayNo = result.OrderByDescending(x => x.Value).FirstOrDefault().Key; // æ°éæå¤çç»çKey
|
|
return minRoadwayNo;
|
}
|
|
/// <summary>
|
/// æ ¹æ®åºåè·åå··éæç«å°
|
/// </summary>
|
/// <returns></returns>
|
public async Task<string> GetRoadWayAsync(int areaCode)
|
{
|
var minGroup = _locationRepository.QueryData(x => x.AreaId == areaCode && x.LocationStatus == (int)LocationEnum.Free)
|
.GroupBy(x => x.RoadwayNo)
|
.OrderBy(g => g.Count()) // æ ¹æ®æ¯ä¸ªç»çå
ç´ æ°éæåº
|
.ToList(); // ååºæ°éæå°çç»
|
|
Dictionary<string, int> result = new Dictionary<string, int>();
|
foreach (var item in minGroup)
|
{
|
var number = BaseDal.QueryData(x => x.TargetAddress == item.Key).Count();
|
result.Add(item.Key, item.Count() - number);
|
}
|
|
string minRoadwayNo = result.OrderByDescending(x => x.Value).FirstOrDefault().Key; // æ°éæå¤çç»çKey
|
|
return minRoadwayNo;
|
}
|
|
// æ°çåºåºé误å¤çé»è¾
|
private async Task HandleOutBoundError(DtStockInfo stock, Dt_Task task)
|
{
|
WebResponseContent content = new WebResponseContent();
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == stock.AreaCode);
|
if (area == null)
|
{
|
throw new Exception("æªæ¾å°å¯¹åºçåºåºä¿¡æ¯");
|
}
|
|
var trayCells = new TrayCellsStatusDto
|
{
|
Software = area.Spare3,
|
TrayBarcode = task.PalletCode,
|
EquipmentCode = area.Spare2,
|
SceneType = area.Spare4
|
};
|
|
content = await _cellStateService.GetTrayCellStatusAsync(trayCells);
|
if (!content.Status) return;
|
|
var ResultTray = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (ResultTray.SerialNos.Count > 0)
|
{
|
var parameterInfo = GetParameterInfo(stock);
|
|
var outHours = CalculateOutHours(stock);
|
var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble()
|
&& outHours < parameterInfo.UpperSpecificationsLimit.ToDouble();
|
|
var defectCode = !isNG ? "TQCK" : string.Empty;
|
|
var outputDto = CreateAgingOutputDto(area, stock, ResultTray, parameterInfo, outHours, defectCode);
|
content = await _agingInOrOutInputService.GetOCVOutputAsync(outputDto);
|
|
var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
if (!result.Success)
|
task.Remark = "NG";
|
}
|
}
|
|
// 计ç®åºåºå°æ¶çæ¹æ³
|
private double CalculateOutHours(DtStockInfo stock) =>
|
(DateTime.Now - Convert.ToDateTime(stock.LinedProcessFeedbackTime ?? stock.CreateDate.ToString())).TotalHours;
|
|
// çæ AgingOutputDto çå°è£
æ¹æ³
|
private AgingOutputDto CreateAgingOutputDto(Dt_AreaInfo area, DtStockInfo stock, ResultTrayCellsStatus resultTray,
|
ParameterInfo parameterInfo, double outHours, string defectCode)
|
{
|
return new AgingOutputDto
|
{
|
OpFlag = 1,
|
Software = area.Spare3,
|
EquipmentCode = area.Spare2,
|
TrayBarcode = stock.PalletCode,
|
SerialNos = resultTray.SerialNos.Select(x => new SerialNoOutDto
|
{
|
SlotNo = x.PositionNo,
|
SerialNo = x.SerialNo,
|
SerialNoResult = true,
|
ParameterInfo = new List<ParameterInfoOutput>
|
{
|
new ParameterInfoOutput
|
{
|
Value = outHours.ToString(),
|
ParameterCode = parameterInfo.ParameterCode,
|
ParameterDesc = parameterInfo.Description,
|
ParameterResult = "OK",
|
TargetValue = parameterInfo.TargetValue,
|
LowerLimit = parameterInfo.LowerSpecificationsLimit,
|
UpperLimit = parameterInfo.UpperSpecificationsLimit,
|
DefectCode = defectCode,
|
}
|
}
|
}).ToList()
|
};
|
}
|
|
// è·ååæ°ä¿¡æ¯çè¾
婿¹æ³
|
private ParameterInfo GetParameterInfo(DtStockInfo stock) =>
|
JsonConvert.DeserializeObject<List<ParameterInfo>>(stock.ParameterInfos)
|
.FirstOrDefault(y => y.Description.Contains("æ¶é´"));
|
|
#endregion ä»»å¡è¯·æ±æ¹æ³
|
|
#endregion private å
鍿¹æ³
|
}¯OriginalContentÀªSelections¥CaretÀ¥StartÍÎ*£EndÍߺ¨FilePathÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_StorageTaskServices\Task\Dt_TaskService.cs¨Language¢C#¯CopilotTypeName¯DocumentContext¨TypeName¤Name¯DocumentContext§IsArray¢IdÙ$55f6670b-d52d-4cd6-b54a-4c3c87a0b4ac¯ProviderMoniker¤NameÙ6Microsoft.VisualStudio.Copilot.DocumentContextProvider§Version£0.3¦SourceÙ6Microsoft.VisualStudio.Copilot.DocumentContextProvider¦Member¤file©CanReduceéRequestIdÙ$c036f5e8-639f-4e51-bada-20628d7757e9©ReferenceÀ¦Traits¯ProviderMoniker¤NameÙ9Microsoft.VisualStudio.Copilot.CSharpProjectTraitProvider§Version£0.3£Key¯LanguageVersion¥Value®ValueContainerÙMicrosoft.VisualStudio.Copilot.LanguageVersionTrait, Microsoft.VisualStudio.Copilot, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ ¨Language¢C#§Version¤10.0¯CopilotTypeName¯LanguageVersion¨TypeName¤Name¯LanguageVersion§IsArray¯ProviderMoniker¤NameÙ9Microsoft.VisualStudio.Copilot.CSharpProjectTraitProvider§Version£0.3£Key¶CSharpTargetFrameworks¥Value®ValueContainerÙ£Microsoft.VisualStudio.Copilot.CSharpTargetFrameworkTrait, Microsoft.VisualStudio.Copilot.Core, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ (°TargetFrameworks¨'.NET 6'ªIsDocumentïCopilotTypeName¶CSharpTargetFrameworks¨TypeName¤Name¶CSharpTargetFrameworks§IsArray«IsEphemeral®ValueContainerÙ«Microsoft.VisualStudio.Copilot.UnstableInternalApi.RichDocumentContext, Microsoft.VisualStudio.Copilot, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ §Content ¯OriginalContentÀªSelections¨FilePathÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_StorageTaskServices\Task\Dt_TaskService.cs¨LanguageÀªReferencesÜ y¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ%WIDESEA_Core.BaseServices.ServiceBase¯UnqualifiedName«ServiceBase¬CommentRange¥Start ¦Length ©NameRange¥StartÍB¦Length©BodyRange¥StartÍô¦LengthÍså«ExtentRange¥StartÍ5¦LengthÍt¤¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ9WIDESEA_Core.BaseServices.ServiceBase.ValidatePageOptions¯UnqualifiedName³ValidatePageOptions¬CommentRange¥Start ¦Length ©NameRange¥StartÍã¦Length©BodyRange¥StartÍ ¦LengthÍ «ExtentRange¥StartÍÒ¦LengthÍ Ï¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ5WIDESEA_Core.BaseServices.ServiceBase.GetPageDataSort¯UnqualifiedName¯GetPageDataSort¬CommentRange¥StartͦLength̸©NameRange¥StartͦLength©BodyRange¥StartÍæ¦LengthÍæ«ExtentRange¥StartÍo¦LengthÍ]¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ0WIDESEA_Core.BaseServices.ServiceBase.UpdateData¯UnqualifiedNameªUpdateData¬CommentRange¥StartÍ>¦LengthÌ©NameRange¥StartÍ?=¦Length
|
©BodyRange¥StartÍ?f¦LengthÍ5«ExtentRange¥StartÍ?¦LengthͤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ1WIDESEA_Core.BaseServices.ServiceBase.GetPageData¯UnqualifiedName«GetPageData¬CommentRange¥Start ¦Length ©NameRange¥Startͳ¦Length©BodyRange¥StartÍá¦LengthÍã«ExtentRange¥StartͦLengthÍ6¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseServices.ServiceBase.AddData¯UnqualifiedName§AddData¬CommentRange¥StartÍ)±¦LengthÌ©NameRange¥StartÍ*c¦Length©BodyRange¥StartÍ*¦LengthÍ ö«ExtentRange¥StartÍ*A¦LengthÍ
|
>¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ;WIDESEA_Core.BaseServices.ServiceBase.AddDataIncludesDetail¯UnqualifiedNameµAddDataIncludesDetail¬CommentRange¥Start ¦Length ©NameRange¥StartÍ4¥¦Length©BodyRange¥StartÍ58¦LengthÍõ«ExtentRange¥StartÍ4¦LengthÍ¢¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ,WIDESEA_Core.BaseServices.ServiceBase.Import¯UnqualifiedName¦Import¬CommentRange¥StartÍk4¦LengthÌ©NameRange¥StartÍkâ¦Length©BodyRange¥StartÍl ¦LengthÍ«ExtentRange¥StartÍkÀ¦LengthÍѤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ3WIDESEA_Core.BaseServices.ServiceBase.GetDetailPage¯UnqualifiedNameGetDetailPage¬CommentRange¥Start ¦Length ©NameRange¥StartÍ î¦Length ©BodyRange¥StartÍ!¦LengthÍ:«ExtentRange¥StartÍ Ø¦LengthͤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ>WIDESEA_Core.BaseServices.ServiceBase.UpdateDataInculdesDetail¯UnqualifiedName¸UpdateDataInculdesDetail¬CommentRange¥Start ¦Length ©NameRange¥StartÍJÁ¦Length©BodyRange¥StartÍKm¦Lengthͨ«ExtentRange¥StartÍJ§¦LengthÍn¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ0WIDESEA_Core.BaseServices.ServiceBase.DeleteData¯UnqualifiedNameªDeleteData¬CommentRange¥StartÍY=¦LengthÌ
©NameRange¥StartÍYî¦Length
|
©BodyRange¥StartÍZ¦LengthÍt«ExtentRange¥StartÍY̦Length͹¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ,WIDESEA_Core.BaseServices.ServiceBase.Export¯UnqualifiedName¦Export¬CommentRange¥StartÍdá¦LengthÌ
©NameRange¥StartÍe¦Length©BodyRange¥StartÍe»¦LengthÍm«ExtentRange¥StartÍep¦Length͸¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ6WIDESEA_Core.BaseServices.ServiceBase.DownLoadTemplate¯UnqualifiedName°DownLoadTemplate¬CommentRange¥StartÍr¼¦LengthX©NameRange¥StartÍs@¦Length©BodyRange¥StartÍs\¦LengthÍv«ExtentRange¥StartÍs¦LengthÍ´¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ1WIDESEA_Core.BaseServices.ServiceBase.TProperties¯UnqualifiedName«TProperties¬CommentRange¥Start ¦Length ©NameRange¥StartÍL¦Length©BodyRange¥StartÍa¦LengthÍ!«ExtentRange¥StartÍ6¦LengthÍL¤Kind¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseServices.ServiceBase.AddData¯UnqualifiedName§AddData¬CommentRange¥StartÍ%e¦LengthÌ©NameRange¥StartÍ&¦Length©BodyRange¥StartÍ&9¦LengthÍ@«ExtentRange¥StartÍ%ö¦LengthͤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseServices.ServiceBase.AddData¯UnqualifiedName§AddData¬CommentRange¥StartÍ'
¦LengthÌ©NameRange¥StartÍ(:¦Length©BodyRange¥StartÍ(c¦LengthÍB«ExtentRange¥StartÍ(¦LengthͤKind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ,WIDESEA_IStorageTaskServices.IDt_TaskService¯UnqualifiedName¯IDt_TaskService¬CommentRange¥Start ¦Length ©NameRange¥StartR¦Length©BodyRange¥Startw¦LengthÍ-«ExtentRange¥StartA¦LengthÍc¤Kind¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙDWIDESEA_IStorageTaskServices.IDt_TaskService.RequestTrayOutTaskAsync¯UnqualifiedName·RequestTrayOutTaskAsync¬CommentRange¥StartͦLengthÍ ©NameRange¥StartÍI¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍ0¦Length̤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙGWIDESEA_IStorageTaskServices.IDt_TaskService.GetListByOutOrderAndStatus¯UnqualifiedNameºGetListByOutOrderAndStatus¬CommentRange¥StartÍý¦LengthÌ»©NameRange¥StartÍÒ¦Length©BodyRange¥Start ¦Length «ExtentRange¥Start;¦LengthK¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙCWIDESEA_IStorageTaskServices.IDt_TaskService.CompleteStackTaskAsync¯UnqualifiedName¶CompleteStackTaskAsync¬CommentRange¥StartÍ
|
¦LengthÌ©NameRange¥StartÍ1¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartͦLengthZ¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙFWIDESEA_IStorageTaskServices.IDt_TaskService.CompleteTransferTaskAsync¯UnqualifiedName¹CompleteTransferTaskAsync¬CommentRange¥StartÍq¦LengthÌ©NameRange¥StartͦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍú¦Length]¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ:WIDESEA_IStorageTaskServices.IDt_TaskService.GetByLocation¯UnqualifiedNameGetByLocation¬CommentRange¥StartÍ%¦Length}©NameRange¥StartͶ¦Length ©BodyRange¥Start ¦Length «ExtentRange¥Startͨ¦Length/¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ>WIDESEA_IStorageTaskServices.IDt_TaskService.GetListByOutOrder¯UnqualifiedName±GetListByOutOrder¬CommentRange¥StartÍ,¦LengthÌ©NameRange¥StartÍÓ¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍ¿¦Length6¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ4WIDESEA_IStorageTaskServices.IDt_TaskService.GetById¯UnqualifiedName§GetById¬CommentRange¥Start~¦Length{©NameRange¥StartÍ ¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÌÿ¦Length¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName²LogLibrary.Log.Log¯UnqualifiedName£Log¬CommentRange¥Start ¦Length ©NameRange¥Starto¦Length©BodyRange¥Starty¦LengthÍo«ExtentRange¥Start[¦LengthÍo"¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.InfoFormat¯UnqualifiedNameªInfoFormat¬CommentRange¥StartÍGŦLengthÍ 8©NameRange¥StartÍQ¦Length
|
©BodyRange¥StartÍQ`¦LengthÍØ«ExtentRange¥StartÍQ¦LengthÍ1¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.InfoFormat¯UnqualifiedNameªInfoFormat¬CommentRange¥StartÍE¦LengthÌá©NameRange¥StartÍF¦Length
|
©BodyRange¥StartÍFW¦LengthÍb«ExtentRange¥StartÍF ¦LengthͰ¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ&[¦LengthÍ©NameRange¥StartÍ'¦Length©BodyRange¥StartÍ'ó¦LengthÍ«ExtentRange¥StartÍ'¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Error¯UnqualifiedName¥Error¬CommentRange¥StartͦLength̲©NameRange¥StartÍY¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÍM¦LengthÍI¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Info¯UnqualifiedName¤Info¬CommentRange¥StartÍ@}¦Lengtẖ©NameRange¥StartÍAD¦Length©BodyRange¥StartÍAt¦LengthÍ
|
«ExtentRange¥StartÍA8¦LengthÍF¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ!¦LengthÌâ©NameRange¥StartÍ"¦Length©BodyRange¥StartÍ"Õ¦LengthÍ«ExtentRange¥StartÍ"¦LengthÍd¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ#ö¦LengthÌâ©NameRange¥StartÍ$î¦Length©BodyRange¥StartÍ%:¦LengthÍ«ExtentRange¥StartÍ$â¦LengthÍm¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ)¦LengthÍ©NameRange¥StartÍ*H¦Length©BodyRange¥StartÍ*¦LengthÍ«ExtentRange¥StartÍ*<¦LengthÍw¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ+¿¦LengthÍF©NameRange¥StartÍ-¦Length©BodyRange¥StartÍ-x¦LengthÍ«ExtentRange¥StartÍ-¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍ/¦LengthÍ©NameRange¥StartÍa¦Length©BodyRange¥StartÍǦLengthÍ7«ExtentRange¥StartÍU¦LengthÍ©¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ8!¦LengthÍ"©NameRange¥StartÍ9Y¦Length©BodyRange¥StartÍ9¿¦LengthÍ«ExtentRange¥StartÍ9M¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Info¯UnqualifiedName¤Info¬CommentRange¥StartÍB¦LengthÌí©NameRange¥StartÍC¦Length©BodyRange¥StartÍCÒ¦LengthÍ@«ExtentRange¥StartÍC¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍ]ª¦LengthÍ©NameRange¥StartÍ^Þ¦Length
|
©BodyRange¥StartÍ_C¦LengthÍ«ExtentRange¥StartÍ^Ò¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Error¯UnqualifiedName¥Error¬CommentRange¥StartÍ¢¦LengthÌî©NameRange¥Startͦ¦Length©BodyRange¥StartÍì¦LengthÍ¢«ExtentRange¥StartͦLengthÍô¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedNameÙ!LogLibrary.Log.Log.GetDataTimeLog¯UnqualifiedName®GetDataTimeLog¬CommentRange¥Start ¦Length ©NameRange¥StartÍ
|
¦Length©BodyRange¥StartÍ
|
0¦Lengthq«ExtentRange¥StartÍ þ¦LengthÌ£¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Debug¯UnqualifiedName¥Debug¬CommentRange¥StartÍ
|
¦Length̲©NameRange¥StartÍu¦Length©BodyRange¥Startͦ¦LengthÍ«ExtentRange¥StartÍi¦LengthÍI¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Fatal¯UnqualifiedName¥Fatal¬CommentRange¥StartÍ.¦Length̸©NameRange¥StartÍ/m¦Length©BodyRange¥StartÍ/¦LengthÍ«ExtentRange¥StartÍ/a¦LengthÍI¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Warn¯UnqualifiedName¤Warn¬CommentRange¥StartÍTD¦LengthÌ´©NameRange¥StartÍU¦Length©BodyRange¥StartÍU>¦LengthÍ
|
«ExtentRange¥StartÍU¦LengthÍF¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍV¦LengthÌâ©NameRange¥StartÍN¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÍB¦LengthÍd¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ3T¦LengthÌè©NameRange¥StartÍ4R¦Length©BodyRange¥StartÍ4¦LengthÍ«ExtentRange¥StartÍ4F¦LengthÍd¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍXë¦LengthÌä©NameRange¥StartÍYå¦Length
|
©BodyRange¥StartÍZ'¦LengthÍ«ExtentRange¥StartÍYÙ¦LengthÍa¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartͲ¦LengthÌâ©NameRange¥Startͪ¦Length©BodyRange¥StartÍö¦LengthÍ-«ExtentRange¥StartͦLengthÍ
¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍ
|
¦LengthÍ©NameRange¥StartÍ4¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÍ(¦LengthÍw¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ5¶¦LengthÌè©NameRange¥StartÍ6´¦Length©BodyRange¥StartÍ7 ¦LengthÍ«ExtentRange¥StartÍ6¨¦LengthÍm¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ:ê¦LengthÍ©NameRange¥StartÍ<¦Length©BodyRange¥StartÍ<j¦LengthÍ«ExtentRange¥StartÍ<¦LengthÍw¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍ[F¦LengthÌä©NameRange¥StartÍ\@¦Length
|
©BodyRange¥StartÍ\¦LengthÍ«ExtentRange¥StartÍ\4¦LengthÍj¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍ`l¦LengthÍ©NameRange¥StartÍa¦Length
|
©BodyRange¥StartÍaç¦LengthÍ«ExtentRange¥StartÍa¦LengthÍt¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍ«¦LengthÍF©NameRange¥StartͦLength©BodyRange¥StartÍd¦LengthÍ!«ExtentRange¥StartÍû¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ=¦LengthÍL©NameRange¥StartÍ>ó¦Length©BodyRange¥StartÍ?P¦LengthÍ!«ExtentRange¥StartÍ>ç¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍc¦LengthÍH©NameRange¥StartÍdj¦Length
|
©BodyRange¥StartÍdƦLengthÍ«ExtentRange¥StartÍd^¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Debug¯UnqualifiedName¥Debug¬CommentRange¥Start;¦LengthÌî©NameRange¥StartÍ Â¦Length©BodyRange¥StartͦLengthÍB«ExtentRange¥StartÍ ¶¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Fatal¯UnqualifiedName¥Fatal¬CommentRange¥StartÍ0¶¦LengthÌô©NameRange¥StartÍ1À¦Length©BodyRange¥StartÍ2¦LengthÍB«ExtentRange¥StartÍ1´¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Warn¯UnqualifiedName¤Warn¬CommentRange¥StartÍVT¦LengthÌð©NameRange¥StartÍWZ¦Length©BodyRange¥StartÍW¦LengthÍ@«ExtentRange¥StartÍWN¦LengthͤKind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageBasicRepository\Location\ILocationStatusChangeRecordRepository.cs²FullyQualifiedNameÙEWIDESEA_IStorageBasicRepository.ILocationStatusChangeRecordRepository¯UnqualifiedNameÙ%ILocationStatusChangeRecordRepository¬CommentRange¥Start ¦Length ©NameRange¥StartU¦Length%©BodyRange¥Start̨¦LengthÍÑ«ExtentRange¥StartD¦LengthÍ5¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageBasicRepository\Location\ILocationStatusChangeRecordRepository.cs²FullyQualifiedNameÙcWIDESEA_IStorageBasicRepository.ILocationStatusChangeRecordRepository.AddLocationStatusChangeRecord¯UnqualifiedName½AddLocationStatusChangeRecord¬CommentRange¥Start ¦Length ©NameRange¥StartÍ ¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍû¦Length{¤Kind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageBasicRepository\Location\ILocationStatusChangeRecordRepository.cs²FullyQualifiedNameÙcWIDESEA_IStorageBasicRepository.ILocationStatusChangeRecordRepository.AddLocationStatusChangeRecord¯UnqualifiedName½AddLocationStatusChangeRecord¬CommentRange¥Start ¦Length ©NameRange¥StartͦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍ
¦Lengthn¤Kind ¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ WIDESEA_Model.Models.Dt_AreaInfo¯UnqualifiedName«Dt_AreaInfo¬CommentRange¥StarțLength-©NameRange¥StartÌþ¦Length©BodyRange¥StartͦLengthÍ ~«ExtentRange¥StartÌЦLengthÍ Ê¤Kind ¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ:WIDESEA_Model.Models.Dt_AreaInfo.Dt_WareAreaInfoDetailList¯UnqualifiedName¹Dt_WareAreaInfoDetailList¬CommentRange¥StartÍ ¦Length7©NameRange¥StartÍ
|
l¦Length©BodyRange¥StartÍ
|
¦Length «ExtentRange¥StartÍ ×¦Length̼¤Kind¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ)WIDESEA_Model.Models.Dt_AreaInfo.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartͦLengthM©NameRange¥StartÍ«¦Length©BodyRange¥Start͵¦Length«ExtentRange¥StartÍm¦Length_¤Kind¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ2WIDESEA_Model.Models.Dt_AreaInfo.AreaCode.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartͦLengthM©NameRange¥StartÍ«¦Length©BodyRange¥StartÍÆ¦Length«ExtentRange¥StartÍm¦Length_¤Kind¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ'WIDESEA_Model.Models.Dt_AreaInfo.AreaID¯UnqualifiedName¦AreaID¬CommentRange¥StartÍ8¦LengthM©NameRange¥StartÍî¦Length©BodyRange¥StartÍö¦Length«ExtentRange¥StartͦLengthu¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\MOM\ProcessApply\IProcessApplyService.cs²FullyQualifiedNameÙ7WIDESEA_IStoragIntegrationServices.IProcessApplyService¯UnqualifiedName´IProcessApplyService¬CommentRange¥Start ¦Length ©NameRange¥StartÌæ¦Length©BodyRange¥StartÍ
|
¦LengthÍn«ExtentRange¥StartÌÕ¦LengthÍ£¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\MOM\ProcessApply\IProcessApplyService.cs²FullyQualifiedNameÙYWIDESEA_IStoragIntegrationServices.IProcessApplyService.StockInDataBackfillInterfaceAsync¯UnqualifiedNameÙ!StockInDataBackfillInterfaceAsync¬CommentRange¥StartÍ^¦Lengtḩ©NameRange¥StartÍ$¦Length!©BodyRange¥Start ¦Length «ExtentRange¥StartͦLengthZ¤Kind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\MOM\ProcessApply\IProcessApplyService.cs²FullyQualifiedNameÙZWIDESEA_IStoragIntegrationServices.IProcessApplyService.StockOutDataBackfillInterfaceAsync¯UnqualifiedNameÙ"StockOutDataBackfillInterfaceAsync¬CommentRange¥StartÍm¦Lengtḩ©NameRange¥StartÍ3¦Length"©BodyRange¥Start ¦Length «ExtentRange¥StartͦLength[¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ WIDESEA_Model.Models.DtStockInfo¯UnqualifiedName«DtStockInfo¬CommentRange¥Start ¦Length ©NameRange¥StartÍ9¦Length©BodyRange¥StartÍW¦LengthÍ«ExtentRange¥StartÌý¦LengthÍv¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ1WIDESEA_Model.Models.DtStockInfo.StockInfoDetails¯UnqualifiedName°StockInfoDetails¬CommentRange¥StartÍZ¦Length7©NameRange¥StartÍB¦Length©BodyRange¥StartÍS¦Length «ExtentRange¥StartͦLengthÌŤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtStockInfo.OutboundTime¯UnqualifiedName¬OutboundTime¬CommentRange¥StartÍð¦Length8©NameRange¥StartÍå¦Length©BodyRange¥StartÍò¦Length «ExtentRange¥StartÍ2¦LengthÌͤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ/WIDESEA_Model.Models.DtStockInfo.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥StartÍ Ê¦Length7©NameRange¥StartÍ
|
¸¦Length©BodyRange¥StartÍ
|
ǦLength «ExtentRange¥StartÍ
|
¦LengthÌɤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ)WIDESEA_Model.Models.DtStockInfo.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartÍ
|
à¦Length7©NameRange¥StartÍΦLength©BodyRange¥StartÍצLength «ExtentRange¥StartÍ!¦LengthÌäKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ,WIDESEA_Model.Models.DtStockInfo.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartÍ0¦Length7©NameRange¥StartͦLength©BodyRange¥StartÍ*¦Length «ExtentRange¥StartÍq¦LengthÌÆ¤Kind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtStockInfo.LocationInfo¯UnqualifiedName¬LocationInfo¬CommentRange¥StartÍl¦Length7©NameRange¥StartÍR¦Length©BodyRange¥StartÍ_¦Length «ExtentRange¥StartͦLengthÌ¿¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ$WIDESEA_Model.Models.DtStockInfo_Hty¯UnqualifiedName¯DtStockInfo_Hty¬CommentRange¥Start ¦Length ©NameRange¥StartÌÆ¦Length©BodyRange¥StartÌè¦LengthÍô«ExtentRange¥StarțLengthÍX¤Kind ¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ5WIDESEA_Model.Models.DtStockInfo_Hty.StockInfoDetails¯UnqualifiedName°StockInfoDetails¬CommentRange¥StartÍ»¦Length7©NameRange¥StartÍ«¦Length©BodyRange¥Startͼ¦Length «ExtentRange¥StartÍü¦LengthÌͤKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ1WIDESEA_Model.Models.DtStockInfo_Hty.OutboundTime¯UnqualifiedName¬OutboundTime¬CommentRange¥StartÍ;¦Length8©NameRange¥StartÍ0¦Length©BodyRange¥StartÍ=¦Length «ExtentRange¥StartÍ}¦LengthÌͤKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtStockInfo_Hty.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartÍ
|
+¦Length7©NameRange¥StartͦLength©BodyRange¥StartÍ"¦Length «ExtentRange¥StartÍ
|
l¦LengthÌäKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ0WIDESEA_Model.Models.DtStockInfo_Hty.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartͦLength7©NameRange¥StartͦLength©BodyRange¥StartͦLength «ExtentRange¥StartÍÒ¦LengthÌÆ¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ1WIDESEA_Model.Models.DtStockInfo_Hty.LocationInfo¯UnqualifiedName¬LocationInfo¬CommentRange¥StartÍÕ¦Length7©NameRange¥StartÍ»¦Length©BodyRange¥StartÍȦLength «ExtentRange¥StartͦLengthÌ¿¤Kind¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ!WIDESEA_Model.Models.DtBoxingInfo¯UnqualifiedName¬DtBoxingInfo¬CommentRange¥Start ¦Length ©NameRange¥StartÌè¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÌ«¦LengthÍø¤Kind ¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ3WIDESEA_Model.Models.DtBoxingInfo.BoxingInfoDetails¯UnqualifiedName±BoxingInfoDetails¬CommentRange¥StartÍc¦Length7©NameRange¥StartÍ}¦Length©BodyRange¥StartͦLength «ExtentRange¥Startͤ¦LengthÌø¤Kind¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ0WIDESEA_Model.Models.DtBoxingInfo.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥StartÍ.¦Length7©NameRange¥StartÍæLength©BodyRange¥StartÍÒ¦Length «ExtentRange¥StartÍo¦Lengthp¤Kind¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtBoxingInfo.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartÍë¦Length7©NameRange¥StartͦLength©BodyRange¥StartͦLength «ExtentRange¥StartÍ,¦Lengthm¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheHashService.cs²FullyQualifiedNameÙ!WIDESEA_Cache.ISimpleCacheService¯UnqualifiedName³ISimpleCacheService¬CommentRange¥Start¦Length'©NameRange¥Start^¦Length©BodyRange¥Starts¦LengthÍV«ExtentRange¥StartE¦LengthͤKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheHashService.cs²FullyQualifiedNameÙ,WIDESEA_Cache.ISimpleCacheService.HashGetAll¯UnqualifiedNameªHashGetAll¬CommentRange¥StartÍí¦LengthÌ¢©NameRange¥Startͬ¦Length
|
©BodyRange¥Start ¦Length «ExtentRange¥StartͦLength1¤Kind ¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙ1WIDESEA_IStorageTaskRepository.IDt_TaskRepository¯UnqualifiedName²IDt_TaskRepository¬CommentRange¥Start ¦Length ©NameRange¥Start>¦Length©BodyRange¥Starti¦LengthÍ«ExtentRange¥Start-¦LengthÍŤKind¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙLWIDESEA_IStorageTaskRepository.IDt_TaskRepository.GetListByOutOrderAndStatus¯UnqualifiedNameºGetListByOutOrderAndStatus¬CommentRange¥Start ¦Length ©NameRange¥StartͦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍú¦LengthK¤Kind ¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙCWIDESEA_IStorageTaskRepository.IDt_TaskRepository.GetListByOutOrder¯UnqualifiedName±GetListByOutOrder¬CommentRange¥Start ¦Length ©NameRange¥StartÍЦLength©BodyRange¥Start ¦Length «ExtentRange¥Startͼ¦Length6¤Kind ¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙ9WIDESEA_IStorageTaskRepository.IDt_TaskRepository.GetById¯UnqualifiedName§GetById¬CommentRange¥Start ¦Length ©NameRange¥Start~¦Length©BodyRange¥Start ¦Length «ExtentRange¥Startp¦Length¤Kind ¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ'WIDESEA_Core.BaseRepository.IRepository¯UnqualifiedName«IRepository¬CommentRange¥Start ¦Length ©NameRange¥StartÍ ¦Length©BodyRange¥StartÍe¦LengthÍAw«ExtentRange¥StartͦLengthÍAͤKind¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ7WIDESEA_Core.BaseRepository.IRepository.QueryFirstAsync¯UnqualifiedName¯QueryFirstAsync¬CommentRange¥Start ¦Length ©NameRange¥StartÍe¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍW¦Lengthx¤Kind ¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ6WIDESEA_Core.BaseRepository.IRepository.QueryDataAsync¯UnqualifiedName®QueryDataAsync¬CommentRange¥Start ¦Length ©NameRange¥StartÍЦLength©BodyRange¥Start ¦Length «ExtentRange¥Startͼ¦LengthZ¤Kind ¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ1WIDESEA_Core.BaseRepository.IRepository.QueryPage¯UnqualifiedName©QueryPage¬CommentRange¥Start ¦Length ©NameRange¥StartÍ5̦Length ©BodyRange¥Start ¦Length «ExtentRange¥StartÍ5¶¦Lengtht¤Kind ¨FileNameÙlD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\UnitOfWorks\UnitOfWork.cs²FullyQualifiedNameÙ&WIDESEA_Core.BaseRepository.UnitOfWork¯UnqualifiedNameªUnitOfWork¬CommentRange¥Start ¦Length ©NameRange¥StartÌì¦Length
|
©BodyRange¥StartÍ
|
¦LengthÍ«ExtentRange¥StartÌߦLength͵¤Kind ¨FileNameÙlD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\UnitOfWorks\UnitOfWork.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseRepository.UnitOfWork.Commit¯UnqualifiedName¦Commit¬CommentRange¥Start ¦Length ©NameRange¥StartÍĦLength©BodyRange¥StartÍÖ¦LengthÍ·«ExtentRange¥Start͸¦LengthÍÕ¤Kind ¨FileNameÙlD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\UnitOfWorks\UnitOfWork.cs²FullyQualifiedNameÙ.WIDESEA_Core.BaseRepository.UnitOfWork.Dispose¯UnqualifiedName§Dispose¬CommentRange¥Start ¦Length ©NameRange¥StartÍd¦Length©BodyRange¥StartÍw¦LengthÍ5«ExtentRange¥StartÍX¦LengthÍT¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheService.cs²FullyQualifiedNameÙ!WIDESEA_Cache.ISimpleCacheService¯UnqualifiedName³ISimpleCacheService¬CommentRange¥Start¦Length'©NameRange¥Start^¦Length©BodyRange¥Starts¦LengthÍl«ExtentRange¥StartE¦LengthͤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheService.cs²FullyQualifiedNameÙ/WIDESEA_Cache.ISimpleCacheService.GetDictionary¯UnqualifiedNameGetDictionary¬CommentRange¥StartÍæLengthÌ©NameRange¥StartÍ k¦Length ©BodyRange¥Start ¦Length «ExtentRange¥StartÍ T¦Length4¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheService.cs²FullyQualifiedNameÙ(WIDESEA_Cache.ISimpleCacheService.SetAll¯UnqualifiedName¦SetAll¬CommentRange¥StartͦLengthÌ©©NameRange¥StartÍȦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍæLength?¤Kind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageOutOrderRepository\OutboundOrder\IDt_OutOrderRepository.cs²FullyQualifiedNameÙ9WIDESEA_IStorageOutOrderRepository.IDt_OutOrderRepository¯UnqualifiedName¶IDt_OutOrderRepository¬CommentRange¥Start ¦Length ©NameRange¥StartY¦Length©BodyRange¥StarțLengthÍ«ExtentRange¥StartH¦LengthÍR¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageOutOrderRepository\OutboundOrder\IDt_OutOrderRepository.cs²FullyQualifiedNameÙRWIDESEA_IStorageOutOrderRepository.IDt_OutOrderRepository.GetOutOrderByNumberAsync¯UnqualifiedName¸GetOutOrderByNumberAsync¬CommentRange¥Start ¦Length ©NameRange¥StartÍj¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍX¦Length?¤Kind ¨FileNameÙdD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseModels\WebResponseContent.cs²FullyQualifiedName¿WIDESEA_Core.WebResponseContent¯UnqualifiedName²WebResponseContent¬CommentRange¥Start ¦Length ©NameRange¥Starţ¦Length©BodyRange¥StartÌ¿¦LengthÍ«ExtentRange¥StarțLengthÍ@¤Kind ¨FileNameÙdD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseModels\WebResponseContent.cs²FullyQualifiedNameÙ%WIDESEA_Core.WebResponseContent.Error¯UnqualifiedName¥Error¬CommentRange¥Start ¦Length ©NameRange¥StartÍJ¦Length©BodyRange¥StartÍp¦Lengthc«ExtentRange¥StartÍ0¦LengthÌ£¤Kind ¨FileNameÙdD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseModels\WebResponseContent.cs²FullyQualifiedNameÙ"WIDESEA_Core.WebResponseContent.OK¯UnqualifiedName¢OK¬CommentRange¥Start ¦Length ©NameRange¥StartÍq¦Length©BodyRange¥Startͨ¦Length|«ExtentRange¥StartÍW¦LengthÌͤKind ¨FileNameÙ\D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_Task.cs²FullyQualifiedName¼WIDESEA_Model.Models.Dt_Task¯UnqualifiedName§Dt_Task¬CommentRange¥StartU¦Length%©NameRange¥StartÌ©¦Length©BodyRange¥StartÌ¿¦LengthÍ«ExtentRange¥Start|¦LengthÍÒ¤Kind ¨FileNameÙ\D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_Task.cs²FullyQualifiedNameÙ+WIDESEA_Model.Models.Dt_Task.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥Startͺ¦LengthB©NameRange¥StartÍ c¦Length©BodyRange¥StartÍ r¦Length «ExtentRange¥StartÍ ¦Length}¤Kind¨FileNameÙ\D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_Task.cs²FullyQualifiedNameÙ(WIDESEA_Model.Models.Dt_Task.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartÍ ¦LengthB©NameRange¥StartÍ.¦Length©BodyRange¥StartÍ:¦Length «ExtentRange¥StartÍ Ï¦Lengthx¤Kind¨FileNameÙhD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\OutboundOrder\Dt_OutOrder.cs²FullyQualifiedNameÙ WIDESEA_Model.Models.Dt_OutOrder¯UnqualifiedName«Dt_OutOrder¬CommentRange¥StartU¦Length*©NameRange¥StartÌ·¦Length©BodyRange¥StartÌѦLengthÍã«ExtentRange¥StarțLengthÍ3¤Kind ¨FileNameÙhD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\OutboundOrder\Dt_OutOrder.cs²FullyQualifiedNameÙ0WIDESEA_Model.Models.Dt_OutOrder.OrderDetailList¯UnqualifiedName¯OrderDetailList¬CommentRange¥StartÍÆ¦Length1©NameRange¥StartͦLength©BodyRange¥Startͤ¦Length «ExtentRange¥StartÍý¦LengthÌ´¤Kind¨FileNameÙZD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\Basic\RequestTaskDto.cs²FullyQualifiedNameºWIDESEA_DTO.RequestTaskDto¯UnqualifiedName®RequestTaskDto¬CommentRange¥Start ¦Length ©NameRange¥Start'¦Length©BodyRange¥Start7¦LengthÍQ«ExtentRange¥Start¦LengthÍn¤Kind ¨FileNameÙZD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\Basic\RequestTaskDto.cs²FullyQualifiedNameÙ%WIDESEA_DTO.RequestTaskDto.PalletCode¯UnqualifiedNameªPalletCode¬CommentRange¥StarțLength.©NameRange¥StartÌá¦Length
|
©BodyRange¥StartÌì¦Length «ExtentRange¥StartÌÓ¦Length&¤Kind¨FileNameÙZD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\Basic\RequestTaskDto.cs²FullyQualifiedNameÙ)WIDESEA_DTO.RequestTaskDto.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥Start ¦Length ©NameRange¥StartÍi¦Length©BodyRange¥StartÍx¦Length «ExtentRange¥StartÍ[¦Length*¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\MOM\CellState\ResultTrayCellsStatus.cs²FullyQualifiedNameÙ%WIDESEA_DTO.MOM.ResultTrayCellsStatus¯UnqualifiedNameµResultTrayCellsStatus¬CommentRange¥Start"¦Length1©NameRange¥Startf¦Length©BodyRange¥StarțLengthÍ-«ExtentRange¥StartY¦LengthÍc¤Kind ¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\MOM\CellState\ResultTrayCellsStatus.cs²FullyQualifiedNameÙ4WIDESEA_DTO.MOM.ResultTrayCellsStatus.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥StartͦLength7©NameRange¥StartÍf¦Length©BodyRange¥StartÍu¦Length «ExtentRange¥StartÍX¦Length*¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\MOM\CellState\ResultTrayCellsStatus.cs²FullyQualifiedNameÙ1WIDESEA_DTO.MOM.ResultTrayCellsStatus.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartͦLength;©NameRange¥StartÍá¦Length©BodyRange¥StartÍí¦Length «ExtentRange¥StartÍÓ¦Length'¤Kind¨FileNameÙTD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\WMS\WMSTaskDTO.cs²FullyQualifiedNameºWIDESEA_DTO.WMS.WMSTaskDTO¯UnqualifiedNameªWMSTaskDTO¬CommentRange¥Start ¦Length ©NameRange¥StartÌ»¦Length
|
©BodyRange¥StartÌ˦LengthÍj«ExtentRange¥StartÌ®¦LengthͤKind ¨FileNameÙTD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\WMS\WMSTaskDTO.cs²FullyQualifiedNameÙ%WIDESEA_DTO.WMS.WMSTaskDTO.PalletCode¯UnqualifiedNameªPalletCode¬CommentRange¥StartͦLength6©NameRange¥StartÍû¦Length
|
©BodyRange¥StartͦLength «ExtentRange¥StartÍí¦Length&¤Kind¨FileNameÙTD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\WMS\WMSTaskDTO.cs²FullyQualifiedNameÙ)WIDESEA_DTO.WMS.WMSTaskDTO.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥Startͽ¦Length<©NameRange¥StartͦLength©BodyRange¥StartÍ!¦Length «ExtentRange¥StartͦLength+¤Kind²OriginalReferences¯CopilotTypeName¯DocumentContext¨TypeName¤Name¯DocumentContext§IsArray¢IdÙ$9abe80de-1e1c-40dd-9b54-6e8dc7b15652¯ProviderMoniker¤NameÙ6Microsoft.VisualStudio.Copilot.DocumentContextProvider§Version£0.3¦SourceÙ3Microsoft.VisualStudio.Copilot.SemanticContextScope¦Member¤file©CanReduceéRequestIdÙ$c036f5e8-639f-4e51-bada-20628d7757e9©ReferenceÀ¦Traits«IsEphemeral§Content
¢IdÄüã
|
ÁF¥BëÑÛtMAªVisibility«Annotations§ContentÙHæéä¸çè¿ä¸ªæ¹æ³ä¼åä¸ä¸ï¼ä¸è¦æåï¼å纯ä¼åé»è¾¨Mentions¨Metadata¦IntentÀ¨GuidanceÀ¥Model¦Family¦gpt-4o¬Capabilities ²DirectedResponders©FunctionsCorrelationIdÙ$c036f5e8-639f-4e51-bada-20628d7757e9©MessageIdÙ$ce4e1bae-4eda-4013-af66-c34acf98fcf9§Context®ValueContainerÙMicrosoft.VisualStudio.Copilot.DocumentContext, Microsoft.VisualStudio.Copilot, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ ¾íÒ
§ContentÛ ¾$using Autofac.Core;
|
using Mapster;
|
using Masuit.Tools;
|
using SqlSugar;
|
using System.Text.RegularExpressions;
|
using WIDESEA_Cache;
|
using WIDESEA_Core.Const;
|
using WIDESEA_DTO.MOM;
|
using WIDESEA_DTO.WMS;
|
using WIDESEA_IServices;
|
using WIDESEA_IStoragIntegrationServices;
|
using WIDESEAWCS_BasicInfoRepository;
|
using WIDESEAWCS_QuartzJob.Models;
|
|
namespace WIDESEA_StorageTaskServices;
|
|
public partial class Dt_TaskService : ServiceBase<Dt_Task, IDt_TaskRepository>, IDt_TaskService
|
{
|
private readonly LogFactory LogFactory = new LogFactory();
|
private readonly IUnitOfWorkManage _unitOfWorkManage;
|
private readonly IStockInfoRepository _stockInfoRepository;
|
private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
|
private readonly IDt_Task_HtyRepository _task_HtyRepository;
|
private readonly IMapper _mapper;
|
private readonly ILocationInfoRepository _locationRepository;
|
private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository;
|
private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository;
|
private readonly IBoxingInfoRepository _boxingInfoRepository; //ç»ç
|
private readonly ICellStateService _cellStateService; //çµè¯å±æ§
|
private readonly IProcessApplyService _processApplyService; //å·¥èºè·¯çº¿
|
private readonly IDt_AreaInfoRepository _areaInfoRepository; //åºå
|
private readonly IAgingInOrOutInputService _agingInOrOutInputService; //éç½®\éå
|
private readonly IDt_StationManagerRepository _stationManagerRepository;
|
private readonly ISys_ConfigService _configService;
|
private readonly ISimpleCacheService _simpleCacheService;
|
|
public Dt_TaskService(IDt_TaskRepository BaseDal,
|
IUnitOfWorkManage unitOfWorkManage,
|
IDt_OutOrderRepository outOrderRepository,
|
IStockInfoRepository stockInfoRepository,
|
IDt_Task_HtyRepository task_HtyRepository,
|
IMapper mapper,
|
ILocationInfoRepository locationRepository,
|
ITaskExecuteDetailRepository taskExecuteDetailRepository,
|
ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository,
|
IBoxingInfoRepository boxingInfoRepository,
|
ICellStateService cellStateService,
|
IProcessApplyService processApplyService,
|
IDt_AreaInfoRepository areaInfoRepository,
|
IAgingInOrOutInputService agingInOrOutInputService,
|
IStockInfoDetailRepository stockInfoDetailRepository,
|
IDt_StationManagerRepository stationManagerRepository,
|
ISys_ConfigService configService,
|
ISimpleCacheService simpleCacheService) : base(BaseDal)
|
{
|
_unitOfWorkManage = unitOfWorkManage;
|
_stockInfoRepository = stockInfoRepository;
|
_task_HtyRepository = task_HtyRepository;
|
_mapper = mapper;
|
_locationRepository = locationRepository;
|
_taskExecuteDetailRepository = taskExecuteDetailRepository;
|
_locationStatusChangeRecordRepository = locationStatusChangeRecordRepository;
|
_boxingInfoRepository = boxingInfoRepository;
|
_cellStateService = cellStateService;
|
_processApplyService = processApplyService;
|
_areaInfoRepository = areaInfoRepository;
|
_agingInOrOutInputService = agingInOrOutInputService;
|
_stockInfoDetailRepository = stockInfoDetailRepository;
|
_stationManagerRepository = stationManagerRepository;
|
_configService = configService;
|
_simpleCacheService = simpleCacheService;
|
}
|
|
#region å¤é¨æ¥å£æ¹æ³
|
|
#region åºåºä»»å¡å®æ
|
|
public async Task<WebResponseContent> CompleteStackTaskAsync(Dt_Task task, DtStockInfo stock)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
|
{
|
#region èçæ¬
|
//var process = await SqlSugarHelper.Db.Queryable<Dt_EquipmentProcess>()
|
// .FirstAsync(x => x.EquipmentName == task.Roadway);
|
//var info = JsonConvert.DeserializeObject<ResponseEqptRunDto>(process.ProcessValue);
|
//if (!task.Roadway.Contains("FR") && stock.ProcessCode != "OCVB") //éå容åºåºä¸å½åå·¥åºæ¯OCVBå䏿¥MOMåºå
¥ç«
|
//{
|
// var agingOutputDto = MapToAgingOutputDto(stock);
|
// content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto);
|
// //ValidateResponse(content);
|
// var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
// if (!result.Success || !agingOutputDto.SerialNos[0].SerialNoResult)
|
// {
|
// if (result.MessageCode == "E10001")
|
// {
|
// var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == stock.AreaCode);
|
// if (area == null)
|
// {
|
// throw new Exception("æªæ¾å°å¯¹åºçåºåºä¿¡æ¯");
|
// }
|
// var trayCells = new TrayCellsStatusDto()
|
// {
|
// Software = area.Spare3,
|
// TrayBarcode = task.PalletCode,
|
// EquipmentCode = area.Spare2,
|
// SceneType = area.Spare4
|
// };
|
// content = await _cellStateService.GetTrayCellStatusAsync(trayCells);
|
// if (!content.Status) return content;
|
|
// var ResultTray = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
// if (ResultTray.SerialNos.Count > 0)
|
// {
|
// var parameterInfo = JsonConvert.DeserializeObject<List<ParameterInfo>>(stock.ParameterInfos).FirstOrDefault(y => y.Description.Contains("æ¶é´"));
|
// if (parameterInfo == null) throw new Exception("");
|
|
// var outHours = (DateTime.Now - (stock.LinedProcessFeedbackTime == null ? stock.CreateDate : stock.LinedProcessFeedbackTime.ToDateTime())).TotalHours;
|
|
// var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble() && outHours < parameterInfo.UpperSpecificationsLimit.ToDouble();
|
|
// var defectCode = string.Empty;
|
// if (!isNG) defectCode = "TQCK";
|
// var outputDto = new AgingOutputDto
|
// {
|
// OpFlag = 1,
|
// Software = area.Spare3,
|
// EquipmentCode = area.Spare2,
|
// TrayBarcode = stock.PalletCode,
|
// SerialNos = ResultTray.SerialNos.Select(x => new SerialNoOutDto
|
// {
|
// SlotNo = x.PositionNo,
|
// SerialNo = x.SerialNo,
|
// SerialNoResult = true, //isNG,
|
// ParameterInfo = new List<ParameterInfoOutput> {
|
// new ParameterInfoOutput() {
|
// Value = outHours.ToString(),
|
// ParameterCode =parameterInfo.ParameterCode,
|
// ParameterDesc = parameterInfo.Description,
|
// ParameterResult = "OK", //isNG.ToString(),
|
// TargetValue = parameterInfo.TargetValue,
|
// LowerLomit = parameterInfo.LowerSpecificationsLimit,
|
// UpperLimit = parameterInfo.UpperSpecificationsLimit,
|
// DefectCode = defectCode,
|
// UOMCode = parameterInfo.UOMCode,
|
// }
|
// }
|
// }).ToList()
|
// };
|
|
// content = await _agingInOrOutInputService.GetOCVOutputAsync(outputDto);
|
// result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
// if (!result.Success)
|
// task.Remark = "NG";
|
// }
|
// }
|
// else
|
// task.Remark = "NG";
|
// }
|
//}
|
#endregion èçæ¬
|
|
if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
|
{
|
if (!task.Roadway.Contains("FR") && stock.ProcessCode != "OCVB")
|
{
|
var agingOutputDto = MapToAgingOutputDto(stock);
|
content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto);
|
|
if (content.Status)
|
{
|
var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
|
if (!result.Success && result.MessageCode == "E10001")
|
{
|
await HandleOutBoundError(stock, task);
|
}
|
}
|
else
|
{
|
task.Remark = "NG";
|
ConsoleHelper.WriteErrorLine("MOM鿥ç¹è¯NG");
|
return content.Error("MOM鿥ç¹è¯NG");
|
}
|
}
|
}
|
}
|
|
if (task.Remark == "NG")
|
{
|
ConsoleHelper.WriteErrorLine("MOM鿥ç¹è¯NG");
|
return content.Error("MOM鿥ç¹è¯NG");
|
}
|
|
// æ´æ°åºåç¶æåä»»å¡ç¶æ
|
(var loc, var tas) = UpdateStockAndTaskStatus(stock, task);
|
var taskHty = task.Adapt<Dt_Task_Hty>();
|
taskHty.FinishTime = DateTime.Now;
|
taskHty.OperateType = (int)OperateTypeEnum.èªå¨å®æ;
|
|
DtStockInfo_Hty stockInfo_Hty = stock.Adapt<DtStockInfo_Hty>();
|
stockInfo_Hty.ModifyDate = DateTime.Now;
|
|
// äºå¡å¤ç
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
if (task.TaskType != (int)TaskOutboundTypeEnum.OutQuality)
|
{
|
await DeleteStockInfoAsync(stock.Id);
|
await DeleteStockInfoDetailsAsync(stock.StockInfoDetails);
|
await AddStockInfoHtyAsync(stockInfo_Hty);
|
await UpdateLocationAsync(loc); //è´¨æ£ä»»å¡éè¦æç»éå®åºä½
|
}
|
await DeleteTaskAsync(task.TaskId);
|
await AddTaskHtyAsync(taskHty);
|
});
|
|
return content.OK("ä»»å¡å®ææå", task.Remark);
|
}
|
catch (Exception err)
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").Error(true, $"ç³»ç»å¼å¸¸ï¼å¼å¸¸ä¿¡æ¯ï¼{err.Message}");
|
return content.Error(err.Message);
|
}
|
}
|
|
private AgingOutputDto MapToAgingOutputDto(DtStockInfo stock, ResponseEqptRunDto info = null)
|
{
|
// TODO Value弿 ¹æ®MOMä¸åçéç½®æ¶é´å°å½åæ¶é´çåéæ°
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == stock.AreaCode);
|
if (area == null)
|
{
|
throw new Exception("æªæ¾å°å¯¹åºçåºåºä¿¡æ¯");
|
}
|
|
var parameterInfo = JsonConvert.DeserializeObject<List<ParameterInfo>>(stock.ParameterInfos).FirstOrDefault(y => y.Description.Contains("æ¶é´"));
|
if (parameterInfo == null) throw new Exception("");
|
|
var outHours = (DateTime.Now - (stock.LinedProcessFeedbackTime == null ? stock.CreateDate : stock.LinedProcessFeedbackTime.ToDateTime())).TotalHours;
|
|
//if (stock.LinedProcessFeedbackTime == null)
|
//{
|
// outHours = (DateTime.Now - stock.CreateDate).TotalHours;
|
//}
|
//else
|
//{
|
// outHours = (DateTime.Now - stock.LinedProcessFeedbackTime.ToDateTime()).TotalHours;
|
//}
|
|
var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble() && outHours < parameterInfo.UpperSpecificationsLimit.ToDouble();
|
|
var defectCode = string.Empty;
|
if (!isNG) defectCode = "TQCK";
|
return new AgingOutputDto
|
{
|
OpFlag = 1,
|
Software = area.Spare3,
|
EquipmentCode = area.Spare2,
|
TrayBarcode = stock.PalletCode,
|
SerialNos = stock.StockInfoDetails.Select(x => new SerialNoOutDto
|
{
|
SlotNo = x.OrderNo.ToInt32(),
|
SerialNo = x.SerialNumber,
|
SerialNoResult = true, //isNG,
|
ParameterInfo = new List<ParameterInfoOutput> {
|
new ParameterInfoOutput() {
|
Value = outHours.ToString(),
|
ParameterCode =parameterInfo.ParameterCode,
|
ParameterDesc = parameterInfo.Description,
|
ParameterResult = "OK", //isNG.ToString(),
|
TargetValue = parameterInfo.TargetValue,
|
LowerLimit = parameterInfo.LowerSpecificationsLimit,
|
UpperLimit = parameterInfo.UpperSpecificationsLimit,
|
DefectCode = defectCode,
|
UOMCode = parameterInfo.UOMCode,
|
}
|
}
|
}).ToList()
|
};
|
}
|
|
private (DtLocationInfo, Dt_Task) UpdateStockAndTaskStatus(DtStockInfo stock, Dt_Task task)
|
{
|
var location = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
|
//var details = _stockInfoDetailRepository.QueryData(x => x.StockId == stock.Id);
|
int lastStatus = location.LocationStatus;
|
location.LocationStatus = (int)LocationEnum.Free;
|
task.TaskState = (int)TaskOutStatusEnum.OutFinish;
|
//task.CurrentAddress = task.NextAddress;
|
//task.NextAddress = task.TargetAddress;
|
|
_locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, lastStatus, (int)StatusChangeTypeEnum.AutomaticDelivery, task.TaskNum);
|
|
LogFactory.GetLog("ä»»å¡å®æ").Info(true, "æ´æ°åºåç¶æä¸ä»»å¡ç¶æ");
|
return (location, task);
|
}
|
|
private async Task DeleteStockInfoAsync(int stockId)
|
{
|
var isStockUpdated = await _stockInfoRepository.DeleteDataByIdAsync(stockId);
|
if (!isStockUpdated)
|
{
|
throw new Exception("åºåä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task AddStockInfoHtyAsync(DtStockInfo_Hty dtStock)
|
{
|
var isStockAdd = await SqlSugarHelper.DbWMS.InsertNav(dtStock).IncludesAllFirstLayer().ExecuteCommandAsync();
|
if (!isStockAdd)
|
{
|
throw new Exception("åºååå²ä¿¡æ¯æ·»å 失败");
|
}
|
}
|
|
private async Task UpdateLocationAsync(DtLocationInfo info)
|
{
|
var isStockUpdated = await _locationRepository.UpdateDataAsync(info);
|
if (!isStockUpdated)
|
{
|
throw new Exception("åºåä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task DeleteStockInfoDetailsAsync(IEnumerable<DtStockInfoDetail> details)
|
{
|
var ids = details.Select(x => (object)x.Id).ToArray();
|
var isStockDetailUpdated = await _stockInfoDetailRepository.DeleteDataByIdsAsync(ids);
|
if (!isStockDetailUpdated)
|
{
|
throw new Exception("åºå详æ
ä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task DeleteTaskAsync(int taskId)
|
{
|
var isTaskUpdated = await BaseDal.DeleteDataByIdAsync(taskId);
|
if (!isTaskUpdated)
|
{
|
throw new Exception("ä»»å¡ä¿¡æ¯æ´æ°å¤±è´¥");
|
}
|
}
|
|
private async Task AddTaskHtyAsync(Dt_Task_Hty taskHty)
|
{
|
var isTaskAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
|
if (!isTaskAdd)
|
{
|
throw new Exception("åå²ä»»å¡ä¿¡æ¯æ·»å 失败");
|
}
|
}
|
|
#endregion åºåºä»»å¡å®æ
|
|
#region ç§»åºä»»å¡å®æ
|
|
/// <summary>
|
/// ç§»åºä»»å¡å®æ
|
/// </summary>
|
/// <param name="saveModel">任塿°æ®åé</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> CompleteTransferTaskAsync(Dt_Task task, DtStockInfo stock)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ´æ°è´§ä½ååºåä¿¡æ¯
|
(DtStockInfo updateStock, DtLocationInfo locationInForm, DtLocationInfo locationInfoTo) = UpdateStockLocation(stock, task);
|
var taskHty = CreateHistoricalTask(task);
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ç§»åºä»»å¡å®æ", $"è´§ä½å°åï¼{task.TargetAddress},ä¿®æ¹ååºåæ°æ®ï¼{JsonConvert.SerializeObject(updateStock)}ï¼åå
è´§ä½æ°æ®ï¼{locationInForm}");
|
|
// æ§è¡æ°æ®åºäºå¡
|
bool isResult = await ExecuteTransaction(updateStock, taskHty, locationInForm, locationInfoTo, task.TaskId);
|
if (isResult)
|
content.OK("ç§»åºä»»å¡å®ææå");
|
else
|
content.Error("ç§»åºä»»å¡å®æå¤±è´¥");
|
}
|
catch (Exception err)
|
{
|
Console.WriteLine(err.Message.ToString());
|
}
|
return content;
|
}
|
|
#endregion ç§»åºä»»å¡å®æ
|
|
#region å
¥åºä»»å¡å®æ
|
|
/// <summary>
|
/// 宿å
¥åºä»»å¡
|
/// </summary>
|
/// <param name="task">任塿°æ®åé</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> CompleteInboundTaskAsync(Dt_Task task)
|
{
|
// åå§åååºå
容
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
if (task.TaskType == (int)TaskInboundTypeEnum.InNG || task.TaskType == (int)TaskInboundTypeEnum.InQuality)
|
{
|
task.TaskState = (int)TaskInStatusEnum.SC_InFinish;
|
// å建åå²ä»»å¡å®ä¾æ¨¡å
|
var taskHtyNG = CreateHistoricalTask(task);
|
|
// æ§è¡æ°æ®åºäºå¡
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
// æ·»å åå²ä»»å¡
|
var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHtyNG) > 0;
|
|
// å é¤ä»»å¡æ°æ®
|
var isTaskDelete = await Delete(task.TaskId);
|
if (!isTaskHtyAdd || !isTaskDelete)
|
throw new Exception("æ·»å 失败");
|
});
|
return content.OK("å
¥åºä»»å¡å®ææå");
|
}
|
|
// è·åè£
箱信æ¯åç®æ ä½ç½®ä¿¡æ¯
|
var boxing = await _boxingInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode);
|
var locationInf = await _locationRepository.QueryFirstAsync(x => x.LocationCode == task.TargetAddress && x.RoadwayNo == task.Roadway);
|
|
int lastStatus = locationInf.LocationStatus;
|
// æ´æ°ç®æ ä½ç½®ç¶æä¸ºåºåä¸
|
locationInf.LocationStatus = (int)LocationEnum.InStock;
|
|
// å建åå²ä»»å¡å®ä¾æ¨¡å
|
var taskHty = CreateHistoricalTask(task);
|
|
if (task.TaskType == (int)TaskInboundTypeEnum.InQuality)
|
{
|
await _locationRepository.UpdateDataAsync(locationInf);
|
await _task_HtyRepository.AddDataAsync(taskHty);
|
await BaseDal.DeleteDataAsync(task);
|
|
//è®°å½è´§ä½åå¨ä¿¡æ¯
|
_locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(locationInf, lastStatus, (int)StatusChangeTypeEnum.AutomaticStorage, task.TaskNum);
|
|
return content.OK("å
¥åºä»»å¡å®ææå");
|
}
|
// æ ¹æ®æ¯å¦æç»çä¿¡æ¯å建åºåå®ä¾æ¨¡å
|
DtStockInfo stock = boxing == null ? CreateEmptyPalletStock(task, locationInf) : CreateFullPalletStock(task, locationInf, boxing);
|
|
// æ§è¡æ°æ®åºäºå¡
|
bool isResult = await ExecuteTransaction(stock, taskHty, locationInf, task.TaskId, boxing);
|
if (isResult)
|
{
|
_locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(locationInf, lastStatus, (int)StatusChangeTypeEnum.AutomaticStorage, task.TaskNum);
|
content.OK("å
¥åºä»»å¡å®ææå");
|
}
|
else
|
{
|
content.Error("å
¥åºä»»å¡å®æå¤±è´¥");
|
}
|
}
|
catch (Exception err)
|
{
|
// è®°å½å¼å¸¸ä¿¡æ¯å°æ§å¶å°åæ¥å¿
|
Console.WriteLine(err.Message.ToString());
|
LogFactory.GetLog("ä»»å¡å®æ").Error(true, err);
|
content.Error(err.Message);
|
}
|
return content;
|
}
|
|
/// <summary>
|
/// å建空æççåºåå®ä¾æ¨¡å
|
/// </summary>
|
private DtStockInfo CreateEmptyPalletStock(Dt_Task task, DtLocationInfo locationInf)
|
{
|
var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
return new DtStockInfo()
|
{
|
PalletCode = task.PalletCode,
|
LocationCode = task.TargetAddress,
|
CreateDate = DateTime.Now,
|
Creater = "system",
|
IsFull = false,
|
AreaCode = area.AreaCode ?? "",
|
LocationId = loation.Id,
|
ProductionLine = task.ProductionLine,
|
StockInfoDetails = new List<DtStockInfoDetail>()
|
{
|
new DtStockInfoDetail()
|
{
|
MaterielCode = "空æç",
|
Id = 0,
|
Status = (int)StockStateEmun.å·²å
¥åº
|
}
|
}
|
};
|
}
|
|
/// <summary>
|
/// å建å容ç宿ççåºåå®ä¾æ¨¡å
|
/// </summary>
|
private DtStockInfo CreateFullPalletStockByFR(Dt_Task task, DtLocationInfo locationInf)
|
{
|
var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
return new DtStockInfo()
|
{
|
PalletCode = task.PalletCode,
|
LocationCode = task.TargetAddress,
|
CreateDate = DateTime.Now,
|
Creater = "system",
|
IsFull = false,
|
AreaCode = area.AreaCode ?? "",
|
LocationId = loation.Id,
|
StockInfoDetails = new List<DtStockInfoDetail>()
|
{
|
new DtStockInfoDetail()
|
{
|
MaterielCode = "宿ç",
|
Id = 0,
|
Status = (int)StockStateEmun.å·²å
¥åº
|
}
|
}
|
};
|
}
|
|
/// <summary>
|
/// å建å®ççåºåå®ä¾æ¨¡åå¹¶è°ç¨MOMå
¥åº
|
/// </summary>
|
private DtStockInfo CreateFullPalletStock(Dt_Task task, DtLocationInfo locationInf, DtBoxingInfo boxing)
|
{
|
var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
if (loation == null)
|
throw new Exception("æªæ¾å°å¯¹åºä½ç½®ä¿¡æ¯");
|
|
var area = new Dt_AreaInfo();
|
if (task.Roadway.Contains("FR"))
|
{
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
}
|
else
|
{
|
//var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress);
|
//if (station.stationPLC == "1017")
|
// area = _areaInfoRepository.QueryFirst(x => x.AreaID == Convert.ToInt32(station.stationNGLocation));
|
//else
|
// area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
//if (area == null)
|
// throw new Exception("æªæ¾å°å¯¹åºåºåä¿¡æ¯");
|
|
if (boxing.ProcessCode == "OCV1")
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == 6);
|
else if (boxing.ProcessCode == "OCVB")
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == 7);
|
else
|
area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId);
|
|
if (area == null)
|
throw new Exception("æªæ¾å°å¯¹åºåºåä¿¡æ¯");
|
}
|
|
var boxDetail = boxing.BoxingInfoDetails.Adapt<List<DtStockInfoDetail>>();
|
boxDetail.ForEach(x => { x.Status = (int)StockStateEmun.å·²å
¥åº; });
|
var stock = new DtStockInfo()
|
{
|
PalletCode = task.PalletCode,
|
LocationCode = task.TargetAddress,
|
CreateDate = DateTime.Now,
|
Creater = "system",
|
IsFull = boxing.IsFull,
|
AreaCode = area.AreaCode,
|
LocationId = loation.Id,
|
StockInfoDetails = boxDetail,
|
ProcessCode = boxing.ProcessCode,
|
NextProcessCode = boxing.NextProcessCode,
|
Remark = boxing.BoxingInfoDetails.Count().ToString(),
|
};
|
|
if (boxing.ProcessCode != "OCVB" && !task.Roadway.Contains("FR"))
|
{
|
// å¤ç请æ±åæ°
|
AgingInputDto agingInputDto = new AgingInputDto()
|
{
|
SerialNos = boxing.BoxingInfoDetails
|
.Select(item => new SerialNoInDto { SerialNo = item.SerialNumber, PositionNo = item.OrderNo })
|
.ToList(),
|
TrayBarcode = task.PalletCode,
|
OpFlag = 1,
|
EquipmentCode = area.Spare2,
|
Software = area.Spare3
|
};
|
|
var result = _agingInOrOutInputService.GetOCVInputAsync(agingInputDto).Result;
|
var respone = JsonConvert.DeserializeObject<ResponeAgingInputDto>(result.Data.ToString());
|
|
bool isFull = false;
|
if (!task.Roadway.Contains("FR"))
|
{
|
isFull = respone.SpecialParameterDuration.IsNullOrEmpty();
|
}
|
if (respone.ProductionLine == null || respone.ParameterInfos == null)
|
{
|
throw new Exception("MOMæ°æ®è¿åé误");
|
}
|
stock.LinedProcessFeedbackTime = respone.LinedProcessFeedbackTime;
|
stock.SpecialParameterDuration = respone.SpecialParameterDuration;
|
//2024å¹´11æ16æ¥ï¼æ°å¢å段计ç®åºåºåºæ¶é´
|
stock.OutboundTime = Convert.ToDateTime(respone.LinedProcessFeedbackTime == null ? DateTime.Now : respone.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(respone.SpecialParameterDuration));
|
stock.ProductionLine = respone.ProductionLine;
|
stock.ParameterInfos = respone.ParameterInfos.ToJsonString();
|
stock.StockStatus = 1;
|
}
|
else
|
{
|
stock.OutboundTime = DateTime.Now;
|
stock.StockStatus = 1;
|
stock.ProductionLine = boxing.ProductionLine;
|
}
|
|
// è®°å½æ¥å¿
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡å®æ", $"è´§ä½å°åï¼{task.TargetAddress},ä¿®æ¹åè´§ä½æ°æ®ï¼{locationInf}");
|
|
return stock;
|
}
|
|
#endregion å
¥åºä»»å¡å®æ
|
|
#region ä»»å¡å®æ
|
|
/// <summary>
|
/// 宿任å¡
|
/// </summary>
|
/// <param name="taskNum">ä»»å¡ç¼å·</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> CompleteAsync(int taskNum)
|
{
|
// åå§åååºå
容
|
WebResponseContent content = new WebResponseContent();
|
|
// æå任塿°æ®
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æå任塿°æ®", $"ä»»å¡å·ï¼{taskNum}");
|
|
// éªè¯ä»»å¡æ¯å¦åå¨
|
var task = await GetByTaskNum(taskNum);
|
if (task == null)
|
{
|
return content.Error("ä»»å¡ä¸åå¨");
|
}
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "éªè¯ä»»å¡æ¯å¦åå¨", JsonConvert.SerializeObject(task));
|
|
if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
|
{
|
return await CompleteInToOutTaskAsync(task);
|
}
|
// éªè¯åºåæ¯å¦åå¨
|
var stock = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode);
|
|
// æ ¹æ®ä»»å¡ç±»åè°ç¨ç¸åºç宿任塿¹æ³
|
switch (task.TaskType)
|
{
|
case (int)TaskInboundTypeEnum.Inbound:
|
case (int)TaskInboundTypeEnum.InTray:
|
case (int)TaskInboundTypeEnum.InNG:
|
case (int)TaskInboundTypeEnum.InQuality:
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡", "");
|
return await CompleteInboundTaskAsync(task);
|
|
case (int)TaskOutboundTypeEnum.OutTray:
|
case (int)TaskOutboundTypeEnum.Outbound:
|
case (int)TaskOutboundTypeEnum.OutNG:
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåºä»»å¡", "");
|
return await CompleteStackTaskAsync(task, stock);
|
|
case (int)TaskRelocationTypeEnum.Relocation:
|
return await CompleteTransferTaskAsync(task, stock);
|
|
default:
|
return content.Error("ä»»å¡ç±»åä¸åå¨");
|
}
|
}
|
|
#endregion ä»»å¡å®æ
|
|
#region 请æ±ä»»å¡å
¥åº
|
|
#region
|
|
/// <summary>
|
/// 请æ±ä»»å¡å··é
|
/// </summary>
|
/// <param name="input">è¯·æ±æ¨¡å</param>
|
/// <returns>å
å«ä»»å¡ä¿¡æ¯çååºå
容</returns>
|
public async Task<WebResponseContent> RequestTaskAsync2(RequestTaskDto input)
|
{
|
// å建ä¸ä¸ªWebResponseContent对象
|
WebResponseContent content = new WebResponseContent();
|
|
try
|
{
|
// è°ç¨BaseDal.QueryFirstAsyncæ¹æ³ï¼æ¥è¯¢ä»»å¡
|
var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
|
if (task != null)
|
{
|
//if (task.TaskState == (int)TaskInStatusEnum.InNew)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = new WMSTaskDTO()
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = 1,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.Roadway,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
};
|
return content.OK(data: taskDTO);
|
}
|
}
|
|
var stock = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == input.PalletCode && x.IsFull);
|
if (stock != null)
|
{
|
// TODOè´¨æ£ååº
|
}
|
|
var area = await _areaInfoRepository.QueryFirstAsync(x => x.Spare1.Contains(input.Position));
|
if (area == null)
|
return content.Error("æ¹ç¹ä½ä¸å¨åºåå表ä¸åå¨");
|
|
// å建ä¸ä¸ªTrayCellsStatusDto对象ï¼å¹¶èµå¼
|
TrayCellsStatusDto trayCells = new TrayCellsStatusDto()
|
{
|
Software = area.Spare3,
|
TrayBarcode = input.PalletCode,
|
EquipmentCode = area.Spare2,
|
SceneType = area.Spare4,
|
};
|
|
// è°ç¨GetTrayCellStatusAsyncæ¹æ³ï¼è·åæ´ççµè¯
|
content = await GetTrayCellStatusAsync(trayCells);
|
// å¦æç¶æä¸ºfalseï¼åè¿åcontent
|
if (!content.Status) return content;
|
|
// æ·»å ç»çä¿¡æ¯
|
// å°content.Data转æ¢ä¸ºResultTrayCellsStatus对象
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (!result.Success)
|
return content.Error(result.MOMMessage);
|
|
// è·åå¼å¸¸çµè¯
|
List<SerialNoDto>? serialNosError = result.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList();
|
if (serialNosError.Count > 0)
|
{
|
// TODO å建任å¡éè³NGæåºå£
|
var efg = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position && x.stationArea == area.AreaCode).ToList();
|
//List<string> NGStation = input.Position == "1088" ? new List<string>() { "1020" } : new List<string>() { "JZSC01" };
|
if (efg.Count <= 0)
|
{
|
throw new Exception("æªæ¾å°NGå
¥åºç«å°é
ç½®");
|
}
|
List<string> NGStation = efg.Select(x => x.stationNGLocation).ToList();
|
if (NGStation.Count <= 0)
|
{
|
NGStation = efg.Select(x => x.stationNGChildCode).ToList();
|
}
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, NGStation, 2);
|
return content.Error("åå¨å¼å¸¸çµè¯");
|
}
|
|
if (result.SerialNos.Count <= 0)
|
{
|
// Todo 空æçå
¥åºé»è¾
|
content = await RequestTrayInTaskAsync(input);
|
return content;
|
}
|
|
var boxing = CreateBoxingInfo(result, input.PalletCode);
|
//Console.WriteLine(boxing.ToJsonString());
|
if (boxing == null) return content.Error("ç»ç失败");
|
|
if (result.ProcessCode == "OCVB")
|
{
|
//TODO 夿éä¸éè¦å»å
è£
ï¼ä¸éè¦å°±å»å¸¸æ¸©ä¸
|
var stationManagers = _stationManagerRepository.QueryData(x => x.stationPLC == "1018" && x.stationArea == "Cache");
|
var station = stationManagers.Select(x => x.stationChildCode).ToList();
|
|
// è·åWCSipå°å
|
var configz = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
|
var wcsBasez = configz.Where(x => x.ConfigKey == SysConfigConst.WCSIPAddress).FirstOrDefault()?.ConfigValue;
|
var address = configz.Where(x => x.ConfigKey == SysConfigConst.GetStation).FirstOrDefault()?.ConfigValue;
|
if (wcsBasez == null || address == null)
|
{
|
throw new InvalidOperationException("WCS IP æªé
ç½®");
|
}
|
var wcsIpAddrss = wcsBasez + address;
|
|
var abc = HttpHelper.PostAsync(wcsIpAddrss, station.ToJsonString()).Result;
|
content = JsonConvert.DeserializeObject<WebResponseContent>(abc);
|
if (content.Data.ObjToInt() > 0)
|
{
|
// TODO éè³å
è£
|
List<string> strings = stationManagers.Where(x => x.stationType == 0).Select(x => x.Roadway).ToList();
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings, 3);
|
return content;
|
}
|
else
|
{
|
var config = _configService.GetByConfigKey("SYS_InStacker", "CW3InStacker");
|
var strings = config.ConfigValue.Split(',').ToList();
|
// TODO å
¥åº
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings);
|
if (content.Status)
|
await _boxingInfoRepository.AddDataNavAsync(boxing);
|
}
|
}
|
else
|
{
|
// TODO è·åæ¬å°ææ¡å±æ§ä¸æ´ççµè¯å±æ§è·åçå¼è¿è¡å¯¹æ¯ï¼å¦æä¸è´åç»§ç»ï¼å¦åè¿åé误信æ¯
|
//var productions = await _productionRepository.QueryDataAsync(x => result.TrayBarcodePropertys.Select(x => x.TrayBarcodeProperty).ToList().Contains(x.TrayBarcodeProperty));
|
//if (productions.Count <= 0)
|
// return content.Error("ææ¡å±æ§ä¸åå¨");
|
|
// è°ç¨CreateBoxingInfoæ¹æ³ï¼å建ç»çä¿¡æ¯
|
|
//var boxing = CreateBoxingInfo(result, input.PalletCode);
|
////Console.WriteLine(boxing.ToJsonString());
|
//if (boxing == null) return content.Error("ç»ç失败");
|
|
// è°ç¨GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºè·¯çº¿
|
ProcessApplyDto process = await GetProcessApplyAsync(result);
|
|
// 妿process为nullï¼åè¿åcontent
|
if (process == null) return content;
|
|
// å¹¶èµå¼ä¸ä½è½¯ä»¶åç§°å设å¤ç¼ç
|
process.Software = area.Spare3;
|
process.EquipmentCode = area.Spare2;
|
|
// è°ç¨GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºç³è¯·
|
|
// è°ç¨_processApplyService.GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºç³è¯·
|
content = await _processApplyService.GetProcessApplyAsync(process);
|
|
// å¦æç¶æä¸ºfalseï¼åè¿ånull
|
if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString());
|
if (!resultProcessApply.Success) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode == boxing.ProcessCode).FirstOrDefault().Number.ToInt32();
|
foreach (var item in resultProcessApply.ProcessInfo)
|
{
|
if (item.Number.ToInt32() == number + 1)
|
{
|
boxing.NextProcessCode = item.ProcessCode;
|
}
|
}
|
Console.WriteLine();
|
Console.WriteLine($"å½åå·¥åºï¼{boxing.ProcessCode}");
|
Console.WriteLine($"ä¸ä¸å·¥åºï¼{boxing.NextProcessCode}");
|
|
Console.WriteLine(area.AreaCode + "-----------------------");
|
Console.WriteLine(input.Position + "-----------------------");
|
|
var areaIn = string.Empty;
|
switch (boxing.NextProcessCode)
|
{
|
case "CH01":
|
areaIn = "CH001";
|
break;
|
|
case "JZ01":
|
areaIn = "JZ001";
|
break;
|
|
case "GW01":
|
areaIn = "GWSC1";
|
break;
|
|
case "CW01":
|
areaIn = "CWSC1";
|
break;
|
|
case "CW02":
|
areaIn = "CWSC2";
|
break;
|
|
default:
|
break;
|
}
|
|
var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position && x.stationArea.Contains(areaIn)).FirstOrDefault();
|
if (stationManagers == null)
|
{
|
throw new Exception("æªæ¾å°å
¥åºç«å°é
ç½®");
|
}
|
List<string> strings = stationManagers.Roadway.Split(',').ToList();
|
Console.WriteLine(strings.ToJsonString() + "b-----------------------");
|
//// è°ç¨CreateNewTaskæ¹æ³ï¼å建æ°ä»»å¡
|
content = await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings);
|
if (content.Status)
|
{
|
var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing);
|
}
|
//}
|
}
|
}
|
catch (Exception err)
|
{
|
// 妿åçå¼å¸¸ï¼åè°ç¨content.Erroræ¹æ³ï¼è®°å½é误信æ¯ï¼å¹¶è¾åºé误信æ¯
|
content.Error(err.Message);
|
Console.WriteLine(err.Message);
|
}
|
|
// è¿åcontent
|
return content;
|
}
|
|
#endregion 请æ±ä»»å¡å
¥åº
|
|
public async Task<WebResponseContent> RequestTaskAsync(RequestTaskDto input)
|
{
|
WebResponseContent content = new WebResponseContent();
|
|
try
|
{
|
// æ¥è¯¢ä»»å¡
|
var task = await QueryTaskByPalletCode(input.PalletCode);
|
if (task != null)
|
{
|
return CreateAndReturnWMSTaskDTO(task);
|
}
|
|
// æ¥è¯¢åºåä¿¡æ¯ï¼è¿éåç»è¦å®åè´¨æ£ååºé»è¾ï¼
|
var stock = await QueryStockInfo(input.PalletCode);
|
if (stock != null)
|
{
|
Dt_Task taskNew = new Dt_Task
|
{
|
Grade = 1,
|
Roadway = stock.LocationInfo.RoadwayNo,
|
TargetAddress = stock.LocationInfo.RoadwayNo,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = stock.LocationInfo.RoadwayNo,
|
OrderNo = null,
|
PalletCode = stock.PalletCode,
|
SourceAddress = input.Position,
|
CurrentAddress = input.Position,
|
TaskState = stock.LocationInfo.RoadwayNo.Contains("CH") ? (int)TaskInStatusEnum.InNew : (int)TaskInStatusEnum.Line_InFinish,
|
TaskType = (int)TaskInboundTypeEnum.InQuality,
|
TaskNum = BaseDal.GetTaskNo().Result,
|
Creater = "System", // ä¿®æ£æ¼åé误
|
CreateDate = DateTime.Now,
|
TaskId = 0,
|
ProductionLine = stock.ProductionLine,
|
ProcessCode = stock.ProcessCode,
|
};
|
|
var taskDTO = CreateTaskDTO(taskNew);
|
BaseDal.AddData(taskNew);
|
return content.OK(data: taskDTO);
|
// TODOè´¨æ£ååº
|
}
|
|
// æ ¹æ®ä½ç½®æ¥è¯¢åºåä¿¡æ¯
|
var areaCode = Regex.Replace(input.Position, @"-(\d+)", "");
|
var area = await QueryAreaInfoByPosition(areaCode);
|
if (area == null)
|
{
|
return content.Error("该ç¹ä½ä¸å¨åºåå表ä¸åå¨");
|
}
|
|
// å建并è·åæ´ççµè¯ç¶æ
|
TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, input.PalletCode);
|
content = await GetTrayCellStatusAsync(trayCells);
|
if (!content.Status)
|
{
|
ConsoleHelper.WriteErrorLine($"è·åçµè¯ç¶æå¤±è´¥:{content.Message}");
|
return content;
|
}
|
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
|
if (!result.Success)
|
{
|
ConsoleHelper.WriteErrorLine($"è·åçµè¯ç¶æå¤±è´¥:{result.MOMMessage}");
|
if (result.SerialNos.Count <= 0)
|
{
|
// 空æçå
¥åºé»è¾
|
var staion = _stationManagerRepository.QueryFirst(x => x.stationChildCode == input.Position && x.stationType == 1 && x.remark == "IN");
|
if (staion != null)
|
{
|
return await HandleErrorCells(input, area);
|
}
|
else
|
{
|
return await RequestTrayInTaskAsync(input);
|
}
|
}
|
else
|
return content.Error(result.MOMMessage);
|
}
|
|
if (result.SerialNos.Count <= 0)
|
{
|
var config = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStacker, SysConfigConst.InboundIsEmpty);
|
var strings = config.ConfigValue.Split(',').ToList();
|
if (strings.Contains(input.Position))
|
{
|
// todoéè³NGå£
|
ConsoleHelper.WriteErrorLine($"å½åä½ç½®ä¸è½å
¥ç©ºæç");
|
return content.Error("å½åä½ç½®ä¸è½å
¥ç©ºæç");
|
}
|
else
|
return await RequestTrayInTaskAsync(input);
|
}
|
else
|
{
|
// å¤çå¼å¸¸çµè¯æ
åµ
|
var serialNosError = result.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList();
|
if (serialNosError.Count > 0)
|
{
|
return await HandleErrorCells(input, area, serialNosError);
|
}
|
|
var boxing = CreateBoxingInfo(result, input.PalletCode);
|
if (boxing == null) return content.Error("ç»ç失败");
|
|
input.ProductionLine = result.ProductionLine;
|
return await ProcessBasedOnProcessCode(boxing, area, input, result);
|
}
|
}
|
catch (Exception err)
|
{
|
// æ´è¯¦ç»çå¼å¸¸å¤çï¼å¯ä»¥æ ¹æ®å¼å¸¸ç±»åè®°å½ä¸åçé误æ¥å¿ç
|
content.Error(err.Message);
|
Console.WriteLine(err.Message);
|
}
|
|
return content;
|
}
|
|
/// <summary>
|
/// æ´æ°ä»»å¡è´§ä½
|
/// </summary>
|
/// <param name="input"></param>
|
/// <returns></returns>
|
public async Task<WebResponseContent> UpdateExistingTask(RequestTaskDto input)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
|
if (task == null)
|
return content.Error($"ææªæ¾å°ã{input.PalletCode}ãçä»»å¡");
|
|
return content = await UpdateExistingTask(input, task);
|
}
|
catch (Exception err)
|
{
|
return content.Error(err.Message);
|
}
|
}
|
|
/// <summary>
|
/// 空æçå
¥åºç³è¯·
|
/// </summary>
|
/// <param name="input"></param>
|
/// <returns></returns>
|
public async Task<WebResponseContent> RequestTrayInTaskAsync(RequestTaskDto input)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// è°ç¨BaseDal.QueryFirstAsyncæ¹æ³ï¼æ¥è¯¢ä»»å¡
|
var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
|
if (task != null && task.TaskState == (int)TaskInStatusEnum.InNew)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateTaskDTO(task);
|
//WMSTaskDTO taskDTO = new WMSTaskDTO()
|
//{
|
// TaskNum = task.TaskNum.Value,
|
// Grade = 1,
|
// PalletCode = task.PalletCode,
|
// RoadWay = task.Roadway,
|
// SourceAddress = task.SourceAddress,
|
// TargetAddress = task.Roadway,
|
// TaskState = task.TaskState.Value,
|
// Id = 0,
|
// TaskType = task.TaskType,
|
//};
|
return content.OK(data: task);
|
}
|
|
// æ ¹æ®ä½ç½®æ¥è¯¢åºåä¿¡æ¯
|
var areaCode = Regex.Replace(input.Position, @"-(\d+)", "");
|
var area = await QueryAreaInfoByPosition(areaCode);
|
if (area == null)
|
{
|
return content.Error("该ç¹ä½ä¸å¨åºåå表ä¸åå¨");
|
}
|
|
// è·åæ´ççµè¯å±æ§ç¶æ
|
TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, input.PalletCode);
|
content = await GetTrayCellStatusAsync(trayCells);
|
if (!content.Status)
|
{
|
ConsoleHelper.WriteErrorLine($"è·åçµè¯ç¶æå¤±è´¥:{content.Message}");
|
return content;
|
}
|
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (result.ProductionLine.IsNullOrEmpty())
|
{
|
ConsoleHelper.WriteErrorLine($"å½åæçæ 产线,èç³»MOMæ·»å 产线");
|
return content.Error("å½åæçæ 产线,èç³»MOMæ·»å 产线");
|
}
|
|
var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 6 && x.stationChildCode == input.Position).FirstOrDefault();
|
if (stationManagers == null)
|
{
|
stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position).FirstOrDefault();
|
if (stationManagers == null)
|
throw new Exception("æªæ¾å°ç©ºæçå
¥åºç«å°åå
¥åºç«å°é
ç½®");
|
}
|
List<string> strings = stationManagers.Roadway.Split(',').ToList();
|
|
return await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings, 1);
|
}
|
catch (Exception)
|
{
|
throw;
|
}
|
}
|
|
// è·åæçåå
æ ¼ç¶æ
|
private async Task<WebResponseContent> GetTrayCellStatusAsync(TrayCellsStatusDto trayCells)
|
{
|
// è°ç¨_cellStateService.GetTrayCellStatusAsyncæ¹æ³ï¼è·åæçåå
æ ¼ç¶æ
|
return await _cellStateService.GetTrayCellStatusAsync(trayCells);
|
}
|
|
// è·åç»çä¿¡æ¯
|
private DtBoxingInfo CreateBoxingInfo(ResultTrayCellsStatus result, string palletCode)
|
{
|
return new DtBoxingInfo
|
{
|
PalletCode = palletCode,
|
IsFull = true,
|
ProcessCode = result.ProcessCode,
|
ProductionLine = result.ProductionLine,
|
BoxingInfoDetails = result.SerialNos.Select(serialNoObj => new DtBoxingInfoDetail
|
{
|
SerialNumber = serialNoObj.SerialNo,
|
OrderNo = serialNoObj.PositionNo.ToString(),
|
Status = serialNoObj.SerialNoStatus,
|
MaterielCode = result.BindCode,
|
Remark = result.TrayBarcodePropertys.ToJsonString(),
|
}).ToList()
|
};
|
}
|
|
// è·åå·¥èºç³è¯·
|
private async Task<ProcessApplyDto> GetProcessApplyAsync(ResultTrayCellsStatus content)
|
{
|
// å建ä¸ä¸ªProcessApplyDto对象ï¼å¹¶èµå¼
|
return new ProcessApplyDto()
|
{
|
//WipOrderNo = result.BindCode,
|
SerialNos = content.SerialNos.Select(item => new SerialNos
|
{
|
SerialNo = item.SerialNo
|
}).ToList()
|
};
|
}
|
|
#endregion å¤é¨æ¥å£æ¹æ³
|
|
#region 请æ±åºåºï¼å®ç&空çï¼
|
|
/// <summary>
|
/// è¯·æ±æçä»»å¡
|
/// </summary>
|
/// <param name="position">ç®æ ä½ç½®</param>
|
/// <param name="tag">æçç±»åï¼1ï¼å®çï¼2ï¼ç©ºçï¼</param>
|
/// <param name="areaCode">åºåç¼ç </param>
|
/// <param name="roadways">å··éç¼ç éå</param>
|
/// <returns>è¿åç»æé</returns>
|
public async Task<WebResponseContent> RequestTrayOutTaskAsync(string position, int tag, string areaCode, List<string> areaCodes, string productionLine)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ ¹æ®æçç±»åæ¥è¯¢åºåä¿¡æ¯
|
DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound
|
? areaCode != "CWSC1" ? await QueryStockInfoForRealTrayAsync(areaCode, areaCodes, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine)
|
: await QueryStockInfoForEmptyTrayAsync(areaCode, position);
|
|
if (stockInfo == null)
|
{
|
return content.Error("åºåä¿¡æ¯ä¸åå¨");
|
}
|
|
//ConsoleHelper.WriteColorLine(JsonConvert.SerializeObject(stockInfo), ConsoleColor.DarkMagenta);
|
|
// æ°å¢éå¤ä»»å¡æ ¡éª
|
var hasTask = BaseDal.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
|
if (hasTask != null)
|
{
|
WMSTaskDTO taskDTO1 = CreateTaskDTO(hasTask);
|
return content.OK("å·²åå¨åºåºä»»å¡", data: taskDTO1);
|
}
|
|
// å建æ°ä»»å¡å®ä¾
|
var task = CreateTask(stockInfo, position, tag);
|
var taskId = await BaseDal.AddDataAsync(task);
|
bool isResult = taskId > 0;
|
if (!isResult)
|
{
|
return content.Error("ä»»å¡å建失败");
|
}
|
|
// å建任å¡DTO
|
WMSTaskDTO taskDTO = CreateTaskDTO(task);
|
//if (tag == 1)
|
{
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
stockInfo.LocationInfo.LocationStatus = (int)LocationEnum.InStockDisable;
|
await _locationRepository.UpdateDataAsync(stockInfo.LocationInfo);
|
}
|
|
// è¿åæåååº
|
return content.OK(data: taskDTO);
|
}
|
catch (Exception ex)
|
{
|
// è®°å½å¼å¸¸ä¿¡æ¯å¹¶æåº
|
LogFactory.GetLog("è¯·æ±æçä»»å¡").Error(true, ex);
|
ConsoleHelper.WriteErrorLine("请æ±ç©º/宿çä»»å¡" + ex.Message);
|
return content.Error(ex.Message);
|
}
|
}
|
|
/// <summary>
|
/// æ¥è¯¢å®çåºåä¿¡æ¯
|
/// </summary>
|
private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, List<string> devices, string productionLine)
|
{
|
var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
|
if (area == null)
|
{
|
ConsoleHelper.WriteErrorLine($"æ¥è¯¢å®çåºåä¿¡æ¯æ¶,æªæ¾å°åºå代ç 为{areaCode}çæ°æ®");
|
return null;
|
}
|
|
var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
|
List<string> materielCodes = null;
|
if (outBoundMateriel.Count != 0)
|
{
|
materielCodes = outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == area.AreaCode).Select(x => x.MaterielCode).ToList();
|
}
|
|
IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
|
List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
|
var result = new DtStockInfo();
|
if (stockInfoList.IsNullOrEmpty())
|
{
|
stockInfoList = await _stockInfoRepository.Db.Queryable<DtStockInfo>().IncludesAllFirstLayer().ToListAsync();
|
|
result = stockInfoList.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true)
|
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
|
.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
.OrderBy(x => x.OutboundTime) // æåº
|
.FirstOrDefault(); // è·å第ä¸ä¸ªå
ç´
|
|
if (result != null)
|
{
|
// æé¤ result ä¸çå
ç´
|
stockInfoList = stockInfoList.Where(x => x != result).ToList();
|
}
|
foreach (var item in stockInfoList)
|
{
|
_simpleCacheService.HashAdd(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, item.PalletCode, item);
|
}
|
}
|
else
|
{
|
result = stockInfoList.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true)
|
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
|
.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
.OrderBy(x => x.OutboundTime) // æåº
|
.FirstOrDefault(); // è·å第ä¸ä¸ªå
ç´
|
if (result != null)
|
{
|
// æé¤ result ä¸çå
ç´
|
stockInfoList = stockInfoList.Where(x => x != result).ToList();
|
}
|
string[] xfasd = new string[] { result.PalletCode };
|
_simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { result.PalletCode });
|
}
|
|
#region
|
//var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
|
// .Includes(x => x.LocationInfo) // é¢å è½½LocationInfo
|
// .Includes(x => x.StockInfoDetails) // é¢å è½½StockInfoDetails
|
// .Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true) // è¿æ»¤æ¡ä»¶
|
// .WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
// .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
// .WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
|
// .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
// .OrderBy(x => x.OutboundTime) // æåº
|
// .FirstAsync(); // è·å第ä¸ä¸ªå
ç´
|
#endregion
|
|
return result;
|
}
|
|
/// <summary>
|
/// æ¥è¯¢å¸¸æ¸©å®çåºåä¿¡æ¯
|
/// </summary>
|
private async Task<DtStockInfo> QueryStockInfoForRealTrayCWAsync(List<string> areaCodes, string productionLine)
|
{
|
var areaId = (await _areaInfoRepository.QueryDataAsync(x => areaCodes.Contains(x.AreaCode))).Select(x => x.AreaID).ToList();
|
if (areaId.Count == 0)
|
{
|
ConsoleHelper.WriteErrorLine($"æ¥è¯¢å¸¸æ¸©å®çåºåä¿¡æ¯æ¶,æªæ¾å°åºå代ç 为{JsonConvert.SerializeObject(areaCodes)}çæ°æ®");
|
return null;
|
}
|
|
var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
|
List<string> materielCodes = null;
|
if (outBoundMateriel.Count != 0)
|
{
|
materielCodes = outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == areaCodes[0]).Select(x => x.MaterielCode).ToList();
|
}
|
|
var devices = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
|
.Where(x => x.DeviceStatus == "1")
|
.Where(x => x.DeviceCode.Contains("CWSC"))
|
.ToList();
|
var deviceCode = devices.Select(x => x.DeviceCode).ToList();
|
|
var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
|
.Includes(x => x.LocationInfo) // é¢å è½½LocationInfo
|
.Includes(x => x.StockInfoDetails) // é¢å è½½StockInfoDetails
|
.Where(x => areaCodes.Contains(x.AreaCode) && x.OutboundTime < DateTime.Now && x.IsFull == true) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && areaId.Contains(x.LocationInfo.AreaId) && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
|
.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
.OrderBy(x => x.OutboundTime) // æåº
|
.FirstAsync(); // è·å第ä¸ä¸ªå
ç´
|
return result;
|
}
|
|
/// <summary>
|
/// æ¥è¯¢ç©ºçåºåä¿¡æ¯
|
/// </summary>
|
private async Task<DtStockInfo> QueryStockInfoForEmptyTrayAsync(string areaCode, string position)
|
{
|
var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
|
|
ConsoleHelper.WriteColorLine(position + "..." + areaCode, ConsoleColor.Magenta);
|
var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationChildCode == position && x.stationType == 17);
|
|
ConsoleHelper.WriteColorLine(station.Roadway, ConsoleColor.Magenta);
|
var stackers = station.Roadway.Split(',').ToList();
|
|
var devices = SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
|
.Where(x => x.DeviceStatus == "1")
|
.Where(x => stackers.Contains(x.DeviceCode))
|
.ToList();
|
|
var deviceCode = devices.Select(x => x.DeviceCode).ToList();
|
|
var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
|
.Includes(x => x.LocationInfo) // é¢å è½½LocationInfo
|
.Includes(x => x.StockInfoDetails) // é¢å è½½StockInfoDetails
|
.Where(x => x.ProductionLine == station.productLine)
|
.Where(x => x.AreaCode == areaCode && x.IsFull == false)
|
.Where(x => x.StockInfoDetails.Any(y => y.MaterielCode == "空æç"))
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // è¿æ»¤æ¡ä»¶
|
.WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
|
.OrderBy(x => x.CreateDate) // æåº
|
.FirstAsync(); // 转æ¢ä¸ºå表
|
|
//var firstOrDefault = result[0]; // æ¥æ¾ç¬¬ä¸ä¸ªå¹é
çå
ç´
|
//return firstOrDefault;
|
return result;
|
}
|
|
/// <summary>
|
/// å建任å¡å®ä¾
|
/// </summary>
|
private Dt_Task CreateTask(DtStockInfo stockInfo, string position, int tag)
|
{
|
return new Dt_Task
|
{
|
Grade = tag == 104 ? (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 1 : 2) : (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 2 : 1),
|
Roadway = stockInfo.LocationInfo.RoadwayNo,
|
TargetAddress = position,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = position,
|
OrderNo = null,
|
PalletCode = stockInfo.PalletCode,
|
SourceAddress = stockInfo.LocationCode,
|
CurrentAddress = stockInfo.LocationCode,
|
TaskState = (int)TaskOutStatusEnum.OutNew,
|
TaskType = tag,
|
TaskNum = BaseDal.GetTaskNo().Result,
|
Creater = "System", // ä¿®æ£æ¼åé误
|
CreateDate = DateTime.Now,
|
TaskId = 0,
|
ProductionLine = stockInfo.ProductionLine,
|
ProcessCode = stockInfo.ProcessCode,
|
};
|
}
|
|
/// <summary>
|
/// å建任å¡DTO
|
/// </summary>
|
private WMSTaskDTO CreateTaskDTO(Dt_Task task)
|
{
|
return new WMSTaskDTO
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = task.Grade.Value,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.TargetAddress,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
ProductionLine = task.ProductionLine,
|
};
|
}
|
|
#endregion 请æ±åºåºï¼å®ç&空çï¼
|
|
#region ä»»å¡ç¶ææ´æ¹
|
|
/// <summary>
|
/// æ´æ°ä»»å¡ç¶æ&åºåºè§£ç
|
/// </summary>
|
/// <param name="taskNum"></param>
|
/// <param name="taskState"></param>
|
/// <returns></returns>
|
public async Task<WebResponseContent> UpdateTaskStatus(int taskNum, int taskState)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
var task = await BaseDal.QueryFirstAsync(x => x.TaskNum == taskNum);
|
if (task == null)
|
return content.Error("æªæ¾å°ä»»å¡");
|
|
if (taskState == (int)TaskOutStatusEnum.Line_OutFinish || taskState == (int)TaskInStatusEnum.SC_InFinish)
|
{
|
var taskHty = CreateHistoricalTask(task);
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
var asb = await BaseDal.DeleteDataByIdAsync(task.TaskId);
|
var asbHty = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
|
if (asb && asbHty)
|
content.OK();
|
else
|
throw new Exception();
|
});
|
content.OK();
|
}
|
else
|
{
|
task.TaskState = taskState;
|
var asb = await BaseDal.UpdateDataAsync(task);
|
if (asb)
|
content.OK();
|
else
|
content.Error();
|
}
|
}
|
catch (Exception ex)
|
{
|
content.Error(ex.Message);
|
}
|
return content;
|
}
|
|
#endregion ä»»å¡ç¶ææ´æ¹
|
|
#region æå®ä»»å¡åºåº
|
|
public async Task<WebResponseContent> CreateAndSendOutboundTask(string locationCode, string palletCode)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ¥è¯¢åºåä¿¡æ¯
|
var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.LocationCode == locationCode && x.PalletCode == palletCode);
|
if (stockInfo == null)
|
{
|
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)
|
{
|
return content.Error($"ã{palletCode}ãå·²åå¨ä»»å¡");
|
}
|
|
int taskType = 0;
|
if (stockInfo.IsFull)
|
taskType = (int)TaskOutboundTypeEnum.OutQuality;
|
else
|
taskType = (int)TaskOutboundTypeEnum.OutTray;
|
|
if (stockInfo.AreaCode.Contains("CH"))
|
{
|
// å建并添å ä»»å¡å°æ°æ®åº
|
task = CreateTask(stockInfo, "1020-1", taskType);
|
}
|
else
|
{
|
if (stockInfo.LocationInfo.RoadwayNo.Contains("JZSC"))
|
{
|
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);
|
//if (taskId <= 0)
|
//{
|
// return content.Error("ä»»å¡å建失败");
|
//}
|
|
// å建任å¡ä¼ è¾ç¨çDTO对象
|
var taskDTO = CreateTaskDTO(task);
|
|
// è·åWMS IPå°åç¨äºåéä»»å¡è¯·æ±
|
var wmsIpAddress = GetWCSIpReceiveTask();
|
if (wmsIpAddress == null)
|
{
|
throw new InvalidOperationException("WMS IP æªé
ç½®");
|
}
|
|
var tasks = new List<WMSTaskDTO>() { taskDTO };
|
// åéä»»å¡è¯·æ±å°WMS
|
var result = await HttpHelper.PostAsync(wmsIpAddress, tasks.ToJsonString());
|
content = JsonConvert.DeserializeObject<WebResponseContent>(result);
|
if (content.Status)
|
{
|
// æ·»å ä»»å¡å°æ°æ®åº
|
await BaseDal.AddDataAsync(task);
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
stockInfo.LocationInfo.LocationStatus = (int)LocationEnum.InStockDisable;
|
await _locationRepository.UpdateDataAsync(stockInfo.LocationInfo);
|
}
|
}
|
catch (Exception ex)
|
{
|
Console.WriteLine($"åçå¼å¸¸: {ex.Message}");
|
content.Error(ex.Message);
|
}
|
|
return content;
|
}
|
|
private string GetWCSIpReceiveTask()
|
{
|
var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
|
var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
|
var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveTask)?.ConfigValue;
|
if (wmsBase == null || ipAddress == null)
|
{
|
return null;
|
}
|
return wmsBase + ipAddress;
|
}
|
|
#endregion æå®ä»»å¡åºåº
|
|
#region éç½®å¼å¸¸å£å
¥åº
|
|
public async Task<WebResponseContent> CreateAndSendInboundTask(string palletCode, string position)
|
{
|
#region
|
//WebResponseContent content = new WebResponseContent();
|
//try
|
//{
|
// // æ¥è¯¢åºåä¿¡æ¯
|
// var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == palletCode);
|
// if (stockInfo == null)
|
// {
|
// var taskOld = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
|
// if (!taskOld.IsNullOrEmpty())
|
// {// å建WMSä»»å¡
|
// WMSTaskDTO taskDTO = new WMSTaskDTO()
|
// {
|
// TaskNum = taskOld.TaskNum.Value,
|
// Grade = 1,
|
// PalletCode = taskOld.PalletCode,
|
// RoadWay = taskOld.Roadway,
|
// SourceAddress = taskOld.CurrentAddress,
|
// TargetAddress = taskOld.TargetAddress,
|
// TaskState = taskOld.TaskState.Value,
|
// Id = 0,
|
// TaskType = taskOld.TaskType,
|
// };
|
// return content.OK(data: taskDTO);
|
// }
|
// var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
// var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == position);
|
// TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, palletCode);
|
// content = await GetTrayCellStatusAsync(trayCells);
|
// if (!content.Status) return content;
|
|
// ConsoleHelper.WriteErrorLine(content.ToJsonString());
|
// var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
// if (!result.Success) return content.Error(result.MOMMessage);
|
|
// if (result.SerialNos.Count > 0)
|
// {
|
// var boxing = CreateBoxingInfo(result, palletCode);
|
// if (boxing == null) return content.Error("ç»ç失败");
|
|
// // è·åå·¥èºè·¯çº¿
|
// ProcessApplyDto process = await GetProcessApplyAsync(result);
|
// // èµå¼ä¸ä½è½¯ä»¶åç§°å设å¤ç¼ç
|
// process.Software = area.Spare3;
|
// process.EquipmentCode = area.Spare2;
|
// content = await _processApplyService.GetProcessApplyAsync(process);
|
// if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
// var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString());
|
// if (!resultProcessApply.Success) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
// var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault().Number.ToInt32();
|
// foreach (var item in resultProcessApply.ProcessInfo)
|
// {
|
// if (item.Number.ToInt32() == number + 1)
|
// {
|
// boxing.NextProcessCode = item.ProcessCode;
|
// }
|
// }
|
// var location = await GetLocationDistributeAsync(station.Roadway);
|
|
// ConsoleHelper.WriteErrorLine(location.ToJsonString());
|
|
// // å建æ°ä»»å¡å®ä¾
|
// var task = new Dt_Task
|
// {
|
// CurrentAddress = station.stationLocation,
|
// Grade = 1,
|
// Roadway = station.Roadway,
|
// TargetAddress = location.LocationCode,
|
// Dispatchertime = DateTime.Now,
|
// MaterialNo = "",
|
// NextAddress = location.LocationCode,
|
// OrderNo = null,
|
// PalletCode = palletCode,
|
// SourceAddress = position,
|
// TaskState = (int)TaskInStatusEnum.Line_InFinish,
|
// TaskType = (int)TaskInboundTypeEnum.Inbound,
|
// TaskNum = await BaseDal.GetTaskNo(),
|
// Creater = "Systeam"
|
// };
|
|
// // å建WMSä»»å¡
|
// WMSTaskDTO taskDTO = new WMSTaskDTO()
|
// {
|
// TaskNum = task.TaskNum.Value,
|
// Grade = 1,
|
// PalletCode = task.PalletCode,
|
// RoadWay = task.Roadway,
|
// SourceAddress = task.SourceAddress,
|
// TargetAddress = task.TargetAddress,
|
// TaskState = task.TaskState.Value,
|
// Id = 0,
|
// TaskType = task.TaskType,
|
// };
|
|
// await _unitOfWorkManage.UseTranAsync(async () =>
|
// {
|
// // æ·»å ä»»å¡å°æ°æ®åº
|
// await BaseDal.AddDataAsync(task);
|
// // æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
// location.LocationStatus = (int)LocationEnum.InStockDisable;
|
// await _locationRepository.UpdateDataAsync(location);
|
// await _boxingInfoRepository.AddDataNavAsync(boxing);
|
// });
|
|
// content.OK(data: taskDTO);
|
// }
|
// else
|
// content.Error(result.MOMMessage);
|
// }
|
// else
|
// {
|
// // TODOè´¨æ£ååº
|
// var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
// }
|
//}
|
//catch (Exception ex)
|
//{
|
// content.Error(ex.Message);
|
//}
|
//return content;
|
#endregion éç½®å¼å¸¸å£å
¥åº
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
// æ¥è¯¢åºåä¿¡æ¯
|
var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == palletCode);
|
if (stockInfo == null)
|
{
|
var taskOld = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
|
if (taskOld != null)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateWMSTaskDTO(taskOld);
|
return content.OK(data: taskDTO);
|
}
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == position);
|
TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, palletCode);
|
content = await GetTrayCellStatusAsync(trayCells);
|
if (!content.Status) return content;
|
|
ConsoleHelper.WriteErrorLine(content.ToJsonString());
|
var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (result == null || !result.Success) return content.Error(result?.MOMMessage ?? "Deserialization error");
|
|
if (result.SerialNos.Count > 0)
|
{
|
var boxing = CreateBoxingInfo(result, palletCode);
|
if (boxing == null) return content.Error("ç»ç失败");
|
|
// è·åå·¥èºè·¯çº¿
|
ProcessApplyDto process = await GetProcessApplyAsync(result);
|
// èµå¼ä¸ä½è½¯ä»¶åç§°å设å¤ç¼ç
|
process.Software = area.Spare3;
|
process.EquipmentCode = area.Spare2;
|
|
content = await _processApplyService.GetProcessApplyAsync(process);
|
if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString()) as ResultProcessApply;
|
if (resultProcessApply == null || !resultProcessApply.Success) return content.Error("å·¥èºç³è¯·å¤±è´¥");
|
|
var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault()?.Number.ToInt32() ?? 0;
|
foreach (var item in resultProcessApply.ProcessInfo)
|
{
|
if (item.Number.ToInt32() == number + 1)
|
{
|
boxing.NextProcessCode = item.ProcessCode;
|
}
|
}
|
var location = await GetLocationDistributeAsync(station.Roadway);
|
|
ConsoleHelper.WriteErrorLine(location.ToJsonString());
|
|
// å建æ°ä»»å¡å®ä¾
|
var task = new Dt_Task
|
{
|
CurrentAddress = station.stationLocation,
|
Grade = 1,
|
Roadway = station.Roadway,
|
TargetAddress = location.LocationCode,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = location.LocationCode,
|
OrderNo = null,
|
PalletCode = palletCode,
|
SourceAddress = position,
|
TaskState = (int)TaskInStatusEnum.Line_InFinish,
|
TaskType = (int)TaskInboundTypeEnum.Inbound,
|
TaskNum = await BaseDal.GetTaskNo(),
|
Creater = "Systeam",
|
ProductionLine = result.ProductionLine,
|
ProcessCode = result.ProcessCode,
|
};
|
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateWMSTaskDTO(task);
|
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
// æ·»å ä»»å¡å°æ°æ®åº
|
await BaseDal.AddDataAsync(task);
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
location.LocationStatus = (int)LocationEnum.Lock;
|
await _locationRepository.UpdateDataAsync(location);
|
await _boxingInfoRepository.AddDataNavAsync(boxing);
|
});
|
|
content.OK(data: taskDTO);
|
}
|
else
|
{
|
var location = await GetLocationDistributeAsync(station.Roadway);
|
var task = new Dt_Task
|
{
|
CurrentAddress = station.stationLocation,
|
Grade = 1,
|
Roadway = station.Roadway,
|
TargetAddress = location.LocationCode,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = location.LocationCode,
|
OrderNo = null,
|
PalletCode = palletCode,
|
SourceAddress = position,
|
TaskState = (int)TaskInStatusEnum.Line_InFinish,
|
TaskType = (int)TaskInboundTypeEnum.InTray,
|
TaskNum = await BaseDal.GetTaskNo(),
|
Creater = "Systeam",
|
ProductionLine = result.ProductionLine,
|
ProcessCode = result.ProcessCode,
|
};
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = CreateWMSTaskDTO(task);
|
|
await _unitOfWorkManage.UseTranAsync(async () =>
|
{
|
// æ·»å ä»»å¡å°æ°æ®åº
|
await BaseDal.AddDataAsync(task);
|
// æ´æ°åºåä½ç½®ç¶æä¸ºä¸å¯ç¨
|
location.LocationStatus = (int)LocationEnum.Lock;
|
await _locationRepository.UpdateDataAsync(location);
|
});
|
|
content.OK(data: taskDTO);
|
}
|
}
|
else
|
{
|
// TODOè´¨æ£ååº
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
|
}
|
}
|
catch (Exception ex)
|
{
|
// æ´è¯¦ç»çæ¥å¿è®°å½ï¼å¯ä½¿ç¨æ¥å¿æ¡æ¶æ¿æ¢ Console.WriteLine
|
Console.WriteLine($"Error in CreateAndSendInboundTask: {ex.Message}");
|
content.Error(ex.Message);
|
}
|
return content;
|
}
|
|
private WMSTaskDTO CreateWMSTaskDTO(object source)
|
{
|
if (source is Dt_Task taskOld)
|
{
|
return new WMSTaskDTO()
|
{
|
TaskNum = taskOld.TaskNum.Value,
|
Grade = 1,
|
PalletCode = taskOld.PalletCode,
|
RoadWay = taskOld.Roadway,
|
SourceAddress = taskOld.SourceAddress,
|
TargetAddress = taskOld.TargetAddress,
|
TaskState = taskOld.TaskState.Value,
|
Id = 0,
|
TaskType = taskOld.TaskType,
|
ProductionLine = taskOld.ProductionLine
|
};
|
}
|
else if (source is Dt_Task task)
|
{
|
return new WMSTaskDTO()
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = 1,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.TargetAddress,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
ProductionLine = task.ProductionLine
|
};
|
}
|
else
|
{
|
throw new ArgumentException("Invalid source object type for WMSTaskDTO creation.");
|
}
|
}
|
|
#endregion éç½®å¼å¸¸å£å
¥åº
|
|
#endregion å¤é¨æ¥å£æ¹æ³
|
|
#region å
é¨è°ç¨æ¹æ³
|
|
/// <summary>
|
/// å建ä¸ä¸ªæ°çä»»å¡
|
/// </summary>
|
/// <param name="model">任塿¨¡å</param>
|
/// <returns>å建çä»»å¡</returns>
|
public async Task<Dt_Task> Create(Dt_Task model)
|
{
|
return await BaseDal.Create(model);
|
}
|
|
/// <summary>
|
/// æ¹éå建任å¡
|
/// </summary>
|
/// <param name="models">任塿¨¡åå表</param>
|
/// <returns>æ¯å¦å建æå</returns>
|
public async Task<bool> Create(List<Dt_Task> models)
|
{
|
return await BaseDal.Create(models);
|
}
|
|
/// <summary>
|
/// å é¤ä¸ä¸ªä»»å¡
|
/// </summary>
|
/// <param name="id">ä»»å¡ID</param>
|
/// <returns>æ¯å¦å 餿å</returns>
|
public async Task<bool> Delete(int id)
|
{
|
return await BaseDal.Delete(id);
|
}
|
|
/// <summary>
|
/// æ¹éå é¤ä»»å¡
|
/// </summary>
|
/// <param name="ids">ä»»å¡IDå表</param>
|
/// <returns>æ¯å¦å 餿å</returns>
|
public async Task<bool> Delete(List<int> ids)
|
{
|
return await BaseDal.Delete(ids);
|
}
|
|
public override WebResponseContent DeleteData(object[] key)
|
{
|
WebResponseContent content = new WebResponseContent();
|
// å建åå²ä»»å¡å®ä¾æ¨¡å
|
try
|
{
|
Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key[0]));
|
if (task == null)
|
{
|
return content.Error("æªæ¾å°ä»»å¡ä¿¡æ¯!");
|
}
|
var taskHtyNG = CreateHistoricalTask(task, true);
|
|
// æ§è¡æ°æ®åºäºå¡
|
|
// æ·»å åå²ä»»å¡
|
var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0;
|
|
// å é¤ä»»å¡æ°æ®
|
var isTaskDelete = BaseDal.Delete(task.TaskId);
|
|
return content.OK("å 餿å!");
|
}
|
catch (Exception ex)
|
{
|
return content.Error("å é¤ä»»å¡å¼å¸¸ï¼" + ex.Message);
|
}
|
}
|
|
/// <summary>
|
/// éè¿IDè·åä»»å¡
|
/// </summary>
|
/// <param name="id">ä»»å¡ID</param>
|
/// <returns>任塿¨¡å</returns>
|
public async Task<Dt_Task> GetById(int id)
|
{
|
return await BaseDal.GetById(id);
|
}
|
|
/// <summary>
|
/// è·åææä»»å¡å表
|
/// </summary>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetList()
|
{
|
return await BaseDal.GetList();
|
}
|
|
/// <summary>
|
/// æ ¹æ®åºåºè®¢åIDè·åä»»å¡å表
|
/// </summary>
|
/// <param name="outOrderId">åºåºè®¢åID</param>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetListByOutOrder(int outOrderId)
|
{
|
return await BaseDal.GetListByOutOrder(outOrderId);
|
}
|
|
/// <summary>
|
/// æ ¹æ®åºåºè®¢åIDåç¶æè·åä»»å¡å表
|
/// </summary>
|
/// <param name="outOrderId">åºåºè®¢åID</param>
|
/// <param name="status">ä»»å¡ç¶æ</param>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetListByOutOrderAndStatus(int outOrderId, int status)
|
{
|
return await BaseDal.GetListByOutOrderAndStatus(outOrderId, status);
|
}
|
|
/// <summary>
|
/// æ ¹æ®ç¶æè·åä»»å¡å表
|
/// </summary>
|
/// <param name="status">ä»»å¡ç¶æ</param>
|
/// <returns>任塿¨¡åå表</returns>
|
public async Task<List<Dt_Task>> GetListByStatus(int status)
|
{
|
return await BaseDal.GetListByStatus(status);
|
}
|
|
/// <summary>
|
/// æ´æ°ä¸ä¸ªä»»å¡
|
/// </summary>
|
/// <param name="model">任塿¨¡å</param>
|
/// <returns>æ¯å¦æ´æ°æå</returns>
|
public async Task<bool> Update(Dt_Task model)
|
{
|
return await BaseDal.UpdateDataAsync(model);
|
}
|
|
/// <summary>
|
/// æ¹éæ´æ°ä»»å¡
|
/// </summary>
|
/// <param name="models">任塿¨¡åå表</param>
|
/// <returns>æ¯å¦æ´æ°æå</returns>
|
public async Task<bool> Update(List<Dt_Task> models)
|
{
|
return await BaseDal.UpdateDataAsync(models);
|
}
|
|
/// <summary>
|
/// æ£æ¥ä»»å¡æ¯å¦åå¨
|
/// </summary>
|
/// <param name="palletCode">æçç¼ç </param>
|
/// <returns>任塿¯å¦åå¨</returns>
|
public bool IsExist(string palletCode)
|
{
|
return Db.Queryable<Dt_Task>().Any(x => x.PalletCode == palletCode);
|
}
|
|
/// <summary>
|
/// æ ¹æ®è´§ä½IDè·åä»»å¡
|
/// </summary>
|
/// <param name="locationID"></param>
|
/// <returns></returns>
|
public async Task<Dt_Task> GetByLocation(string locationID)
|
{
|
return await BaseDal.QueryFirstAsync(x => x.SourceAddress == locationID);
|
}
|
|
/// <summary>
|
/// æ ¹æ®ä»»å¡å·è·åä»»å¡
|
/// </summary>
|
/// <param name="taskNum"></param>
|
/// <returns></returns>
|
public async Task<Dt_Task> GetByTaskNum(int taskNum)
|
{
|
return await BaseDal.QueryFirstAsync(x => x.TaskNum == taskNum);
|
}
|
|
#endregion å
é¨è°ç¨æ¹æ³
|
|
#region private å
鍿¹æ³
|
|
/// <summary>
|
/// å建åå²ä»»å¡è®°å½
|
/// </summary>
|
/// <param name="task"></param>
|
/// <returns></returns>
|
private Dt_Task_Hty CreateHistoricalTask(Dt_Task task, bool isHand = false)
|
{
|
// æ´æ°ä»»å¡ç¶æ
|
task.TaskState = task.TaskType > 199 ? (int)TaskInStatusEnum.InFinish : (int)TaskOutStatusEnum.OutFinish;
|
task.CurrentAddress = task.NextAddress;
|
|
// å建åå²ä»»å¡
|
var taskHty = _mapper.Map<Dt_Task_Hty>(task);
|
taskHty.FinishTime = DateTime.Now;
|
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 = task.TaskType > 199 ? (int)TaskInStatusEnum.InFinish : (int)TaskOutStatusEnum.OutFinish;
|
return taskHty;
|
}
|
|
/// <summary>
|
/// æ´æ°åºåä½ç½®
|
/// </summary>
|
/// <param name="stock">åºå对象</param>
|
/// <param name="toLocation">ç®æ ä½ç½®</param>
|
// æ´æ°åºååä½ç½®ä¿¡æ¯
|
private (DtStockInfo, DtLocationInfo, DtLocationInfo) UpdateStockLocation(DtStockInfo stock, Dt_Task task)
|
{
|
//ä¿®æ¹æ¥æºåºä½å ç®æ åºä½ç¶æ
|
var fromLocation = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
|
fromLocation.LocationStatus = LocationEnum.Free.ObjToInt();
|
var toLocation = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
|
toLocation.LocationStatus = LocationEnum.InStock.ObjToInt();
|
|
// å°åºåä½ç½®è®¾ç½®ä¸ºç®æ ä½ç½®
|
stock.LocationCode = task.TargetAddress;
|
|
// è¿åæ´æ°åçåºååä½ç½®ä¿¡æ¯
|
return (stock, fromLocation, toLocation);
|
}
|
|
/// <summary>
|
/// æ§è¡æ°æ®åºäºå¡
|
/// </summary>
|
/// <param name="stock">åºå对象</param>
|
/// <param name="taskHty">åå²ä»»å¡å¯¹è±¡</param>
|
/// <param name="taskId">ä»»å¡ID</param>
|
/// <returns></returns>
|
private async Task<bool> ExecuteTransaction(DtStockInfo stock, Dt_Task_Hty taskHty, DtLocationInfo locationInfo, int taskId, DtBoxingInfo boxingInfo = null)
|
{
|
_unitOfWorkManage.BeginTran();
|
try
|
{
|
var isUpdateStock = true;
|
var isDeleteBoxing = true;
|
if (taskHty.TaskType == (int)TaskTypeEnum.Outbound)
|
{
|
// æ´æ°åºå
|
isUpdateStock = await _stockInfoRepository.UpdateDataAsync(stock);
|
}
|
else
|
{
|
// æ·»å åºå
|
isUpdateStock = await _stockInfoRepository.AddDataNavAsync(stock);
|
if (boxingInfo != null)
|
{
|
isDeleteBoxing = await _boxingInfoRepository.Db.DeleteNav<DtBoxingInfo>(x => x.Id == boxingInfo.Id)
|
.Include(x => x.BoxingInfoDetails)
|
.ExecuteCommandAsync();
|
}
|
}
|
|
if (stock.IsFull)
|
{
|
// æ¥è¯¢ç¬¦åæ¡ä»¶çåºåä¿¡æ¯
|
var stocks = _stockInfoRepository.QueryData(x => x.AreaCode == stock.AreaCode && x.ProductionLine == stock.ProductionLine && x.SpecialParameterDuration != stock.SpecialParameterDuration);
|
|
// æ¥è¯¢ä»»å¡ä¿¡æ¯
|
var tasks = BaseDal.QueryData(x => x.PalletCode != stock.PalletCode && x.ProductionLine == stock.ProductionLine).Select(x => x.PalletCode).ToList();
|
|
if (stocks != null && stocks.Count > 0)
|
{
|
// è¿æ»¤åºéè¦æ´æ°çåºåä¿¡æ¯
|
var stocksToUpdate = stocks.Where(item => !tasks.Contains(item.PalletCode)).ToList();
|
foreach (var item in stocksToUpdate)
|
{
|
// æ´æ°åºåä¿¡æ¯çç¹å®åæ°
|
item.SpecialParameterDuration = stock.SpecialParameterDuration;
|
item.ParameterInfos = stock.ParameterInfos;
|
item.OutboundTime = Convert.ToDateTime(item.LinedProcessFeedbackTime == null ? item.CreateDate : item.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(stock.SpecialParameterDuration));
|
}
|
if (stocksToUpdate.Count > 0)
|
{
|
// 弿¥æ´æ°åºåä¿¡æ¯
|
var isUpdates = await _stockInfoRepository.UpdateDataAsync(stocksToUpdate);
|
}
|
}
|
}
|
|
// æ·»å åå²ä»»å¡
|
var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
|
|
// ä¿®æ¹ç§»åºåè´§ä½ç¶æ
|
var isUpdateLoc = _locationRepository.UpdateData(locationInfo);
|
|
// å é¤ä»»å¡æ°æ®
|
var isTaskDelete = await Delete(taskId);
|
|
// æäº¤æåæ»äºå¡
|
if (isUpdateStock && isTaskHtyAdd && isTaskDelete && isUpdateLoc && isDeleteBoxing)
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ä»»å¡å®æ", $"äºå¡å¤ç宿,æäº¤äºå¡ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°ææ·»å åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}");
|
_unitOfWorkManage.CommitTran();
|
return true;
|
}
|
else
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ä»»å¡å®æ", $"æ°æ®å¤ç失败,è¯·æ£æ¥æ°æ®æ¯å¦æ£ç¡®,æ°æ®åæ»ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}");
|
_unitOfWorkManage.RollbackTran();
|
return false;
|
}
|
}
|
catch (Exception err)
|
{
|
LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, $"ä»»å¡å®æ,ç³»ç»å¼å¸¸ï¼å¼å¸¸ä¿¡æ¯ï¼{err.Message}", "æ åæ°");
|
_unitOfWorkManage.RollbackTran();
|
throw; // æåºå¼å¸¸ä»¥ä¾¿å¤é¨æè·
|
}
|
}
|
|
#region ä»»å¡è¯·æ±æ¹æ³
|
|
private static readonly SemaphoreSlim _semaphoreUpdate = new SemaphoreSlim(1, 1);
|
// æ´æ°ä»»å¡è´§ä½
|
|
private async Task<WebResponseContent> UpdateExistingTask(RequestTaskDto input, Dt_Task task)
|
{
|
await _semaphoreUpdate.WaitAsync();
|
try
|
{
|
if (task == null)
|
{
|
return new WebResponseContent().Error("ä»»å¡å¯¹è±¡ä¸ºç©º");
|
}
|
|
try
|
{
|
// å建WebResponseContent对象
|
var content = new WebResponseContent();
|
|
// è·åç®æ å°ååæ´æ°ä»»å¡ç¶æ
|
|
input.Position = Regex.Replace(input.Position, @"-(\d+)", "");
|
if (Convert.ToInt32(input.Position) > 1999)
|
{
|
input.Position = (Convert.ToInt32(input.Position) - 1000).ToString();
|
}
|
|
if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
|
{
|
// TODO æ ¹æ®å··éæ¥æ¾å¯¹åºNGå£ï¼ç°å¨é»è®¤å»éç½®å åæºçå¼å¸¸å£è´§ä½å·
|
task.CurrentAddress = input.Position;
|
task.TargetAddress = "002-021-000";
|
task.NextAddress = "002-021-000";
|
task.TaskState = (int)TaskInStatusEnum.Line_InFinish;
|
bool isResult = await BaseDal.UpdateDataAsync(task);
|
return content.OK(data: task);
|
}
|
else if (task.TaskType == (int)TaskInboundTypeEnum.InQuality)
|
{
|
var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == input.PalletCode);
|
task.CurrentAddress = input.Position;
|
task.TargetAddress = stockInfo.LocationInfo.LocationCode;
|
task.NextAddress = stockInfo.LocationInfo.LocationCode;
|
task.TaskState = (int)TaskInStatusEnum.Line_InFinish;
|
bool isResult = await BaseDal.UpdateDataAsync(task);
|
return content.OK(data: task);
|
}
|
else
|
{
|
var location = await GetLocationDistributeAsync(task.Roadway);
|
if (location == null)
|
{
|
return content.Error("æ æ³è·åè´§ä½ä¿¡æ¯");
|
}
|
|
string toAddress = location.LocationCode;
|
int taskState = (int)TaskInStatusEnum.Line_InFinish;
|
int beforeStatus = location.LocationStatus;
|
// æ´æ°è´§ä½ä¿¡æ¯
|
location.LocationStatus = (int)LocationEnum.Lock;
|
|
// æ´æ°ä»»å¡ä¿¡æ¯
|
MapTaskProperties(task, input, toAddress, taskState);
|
|
// å¼å§äºå¡
|
var isResult = await UpdateTaskAsync(task, location, beforeStatus);
|
if (!isResult)
|
{
|
_unitOfWorkManage.RollbackTran();
|
return content.Error("æ´æ°ä»»å¡å¤±è´¥");
|
}
|
|
// æäº¤äºå¡
|
_unitOfWorkManage.CommitTran();
|
return content.OK(data: task);
|
}
|
}
|
catch (Exception ex)
|
{
|
// åæ»äºå¡
|
_unitOfWorkManage.RollbackTran();
|
// è¿éå¯ä»¥æ·»å æ¥å¿è®°å½
|
return new WebResponseContent().Error($"æ´æ°ä»»å¡æ¶åçé误: {ex.Message}");
|
}
|
}
|
catch (Exception)
|
{
|
throw;
|
}
|
finally { _semaphoreUpdate.Release(); }
|
}
|
|
private void MapTaskProperties(Dt_Task task, RequestTaskDto input, string toAddress, int taskState)
|
{
|
task.CurrentAddress = input.Position;
|
task.TargetAddress = toAddress;
|
task.NextAddress = toAddress;
|
task.TaskState = taskState;
|
}
|
|
// ä¿®æ¹ä»»å¡
|
private async Task<bool> UpdateTaskAsync(Dt_Task task, DtLocationInfo location, int beforeStatus)
|
{
|
bool isResult = await BaseDal.UpdateDataAsync(task);
|
bool isTaskDetail = await _taskExecuteDetailRepository.AddDetailAsync(task, false, TaskDescription.GetTaskUpdateDescription(task.PalletCode, task.CurrentAddress, task.TargetAddress, TaskInStatusEnum.Line_InFinish.GetIntegralRuleTypeEnumDesc()));
|
|
LocationChangeRecordDto changeRecordDto = new LocationChangeRecordDto()
|
{
|
AfterStatus = location.LocationStatus,
|
BeforeStatus = beforeStatus,
|
TaskNum = task.TaskNum.Value,
|
LocationId = location.Id,
|
LocationCode = location.LocationCode,
|
ChangeType = (int)StatusChangeTypeEnum.AutomaticStorage,
|
};
|
|
bool isUpdateChange = _locationStatusChangeRecordRepository.AddStatusChangeRecord(changeRecordDto);
|
bool isUpdateLo = await _locationRepository.UpdateDataAsync(location);
|
|
return isResult && isUpdateLo && isTaskDetail;
|
}
|
|
/// <summary>
|
/// å建æ°ä»»å¡
|
/// </summary>
|
/// <param name="input">è¯·æ±æ¨¡å</param>
|
/// <param name="process">å··é</param>
|
/// <param name="flag">æ è¯ï¼0-å
¥åºï¼1-空æçå
¥åºï¼2-NGå
¥åºï¼3-åºåºï¼</param>
|
/// <returns></returns>
|
private async Task<WebResponseContent> CreateNewTask(RequestTaskDto input, string productionLine, string processCode, List<string> process = null, int flag = 0)
|
{
|
WebResponseContent content = new WebResponseContent();
|
|
// è·åç®æ å°å
|
//string ToAddress = await GetRoadWayAsync(process);
|
string ToAddress = string.Empty;
|
if (flag < 2)
|
ToAddress = await GetRoadWayAsync(process);
|
else
|
ToAddress = process[0];
|
|
// å建æ°ä»»å¡å®ä¾
|
var task = new Dt_Task
|
{
|
CurrentAddress = input.Position,
|
Grade = 1,
|
Roadway = ToAddress,
|
TargetAddress = ToAddress,
|
Dispatchertime = DateTime.Now,
|
MaterialNo = "",
|
NextAddress = ToAddress,
|
OrderNo = null,
|
PalletCode = input.PalletCode,
|
SourceAddress = input.Position,
|
TaskState = flag == 3 ? (int)TaskOutStatusEnum.OutNew : (int)TaskInStatusEnum.InNew,
|
TaskType = flag == 0 ? (int)TaskInboundTypeEnum.Inbound : flag == 1 ? (int)TaskInboundTypeEnum.InTray : flag == 2 ? (int)TaskInboundTypeEnum.InNG : (int)TaskOutboundTypeEnum.Outbound,
|
TaskNum = await BaseDal.GetTaskNo(),
|
Creater = "Systeam",
|
ProductionLine = productionLine,
|
ProcessCode = processCode
|
};
|
|
// å°è¯æ·»å æ°ä»»å¡
|
var taskId = await BaseDal.AddDataAsync(task);
|
bool isResult = taskId > 0;
|
if (isResult)
|
{
|
task.TaskId = taskId;
|
isResult = await _taskExecuteDetailRepository.AddDetailAsync(task, false, TaskDescription.GetTaskUpdateDescription(input.PalletCode, input.Position, ToAddress, TaskInStatusEnum.InNew.GetIntegralRuleTypeEnumDesc()));
|
|
//var location = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress);
|
//location.LocationStatus = (int)LocationEnum.Lock;
|
//var isLocation = _locationRepository.UpdateData(location);
|
|
if (isResult)
|
{
|
// å建WMSä»»å¡
|
WMSTaskDTO taskDTO = new WMSTaskDTO()
|
{
|
TaskNum = task.TaskNum.Value,
|
Grade = 1,
|
PalletCode = task.PalletCode,
|
RoadWay = task.Roadway,
|
SourceAddress = task.SourceAddress,
|
TargetAddress = task.TargetAddress,
|
TaskState = task.TaskState.Value,
|
Id = 0,
|
TaskType = task.TaskType,
|
ProductionLine = task.ProductionLine
|
};
|
content.OK(data: taskDTO);
|
}
|
else
|
content.Error("æ·»å ä»»å¡å¤±è´¥");
|
}
|
else
|
content.Error("æ·»å ä»»å¡å¤±è´¥");
|
return content;
|
}
|
|
private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1);
|
|
/// <summary>
|
/// æ¥æ¾è´§ä½
|
/// </summary>
|
/// <param name="IsFull">åºå主é®</param>
|
/// <param name="roadWay">å··é</param>
|
/// <returns></returns>
|
public async Task<DtLocationInfo> GetLocationDistributeAsync(string roadWay, bool IsFull = true)
|
{
|
#region è·åè´§ä½
|
|
await _semaphore.WaitAsync();
|
try
|
{
|
List<DtLocationInfo> locations;
|
if (IsFull)
|
{
|
locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo == roadWay && x.EnalbeStatus == (int)EnableEnum.Enable);
|
}
|
else
|
{
|
locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo == roadWay && x.EnalbeStatus == (int)EnableEnum.Enable);
|
}
|
|
if (locations == null)
|
{
|
return null;
|
}
|
|
return locations.OrderBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault();
|
}
|
catch (Exception err)
|
{
|
Console.WriteLine(err.Message.ToString());
|
return null;
|
}
|
finally
|
{
|
_semaphore.Release();
|
}
|
|
#endregion è·åè´§ä½
|
}
|
|
/// <summary>
|
/// æ ¹æ®å··éè·åå··éæç«å°
|
/// </summary>
|
/// <returns></returns>
|
public async Task<string> GetRoadWayAsync(List<string> process)
|
{
|
var deviceCode = await SqlSugarHelper.DbWCS.Queryable<Dt_DeviceInfo>()
|
.Where(x => x.DeviceStatus == 1.ToString() && process.Contains(x.DeviceCode))
|
.Select(x => x.DeviceCode).ToListAsync();
|
|
var minGroup = _locationRepository.QueryData(x => deviceCode.Contains(x.RoadwayNo) && x.LocationStatus == (int)LocationEnum.Free)
|
.GroupBy(x => x.RoadwayNo)
|
.OrderByDescending(g => g.Count()) // æ ¹æ®æ¯ä¸ªç»çå
ç´ æ°éæåº
|
.ToList(); // ååºæ°éæå¤çç»
|
|
Dictionary<string, int> result = new Dictionary<string, int>();
|
foreach (var item in minGroup)
|
{
|
var number = BaseDal.QueryData(x => x.TargetAddress == item.Key).Count();
|
result.Add(item.Key, item.Count() - number);
|
}
|
|
string minRoadwayNo = result.OrderByDescending(x => x.Value).FirstOrDefault().Key; // æ°éæå¤çç»çKey
|
|
return minRoadwayNo;
|
}
|
|
/// <summary>
|
/// æ ¹æ®åºåè·åå··éæç«å°
|
/// </summary>
|
/// <returns></returns>
|
public async Task<string> GetRoadWayAsync(int areaCode)
|
{
|
var minGroup = _locationRepository.QueryData(x => x.AreaId == areaCode && x.LocationStatus == (int)LocationEnum.Free)
|
.GroupBy(x => x.RoadwayNo)
|
.OrderBy(g => g.Count()) // æ ¹æ®æ¯ä¸ªç»çå
ç´ æ°éæåº
|
.ToList(); // ååºæ°éæå°çç»
|
|
Dictionary<string, int> result = new Dictionary<string, int>();
|
foreach (var item in minGroup)
|
{
|
var number = BaseDal.QueryData(x => x.TargetAddress == item.Key).Count();
|
result.Add(item.Key, item.Count() - number);
|
}
|
|
string minRoadwayNo = result.OrderByDescending(x => x.Value).FirstOrDefault().Key; // æ°éæå¤çç»çKey
|
|
return minRoadwayNo;
|
}
|
|
// æ°çåºåºé误å¤çé»è¾
|
private async Task HandleOutBoundError(DtStockInfo stock, Dt_Task task)
|
{
|
WebResponseContent content = new WebResponseContent();
|
var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == stock.AreaCode);
|
if (area == null)
|
{
|
throw new Exception("æªæ¾å°å¯¹åºçåºåºä¿¡æ¯");
|
}
|
|
var trayCells = new TrayCellsStatusDto
|
{
|
Software = area.Spare3,
|
TrayBarcode = task.PalletCode,
|
EquipmentCode = area.Spare2,
|
SceneType = area.Spare4
|
};
|
|
content = await _cellStateService.GetTrayCellStatusAsync(trayCells);
|
if (!content.Status) return;
|
|
var ResultTray = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
|
if (ResultTray.SerialNos.Count > 0)
|
{
|
var parameterInfo = GetParameterInfo(stock);
|
|
var outHours = CalculateOutHours(stock);
|
var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble()
|
&& outHours < parameterInfo.UpperSpecificationsLimit.ToDouble();
|
|
var defectCode = !isNG ? "TQCK" : string.Empty;
|
|
var outputDto = CreateAgingOutputDto(area, stock, ResultTray, parameterInfo, outHours, defectCode);
|
content = await _agingInOrOutInputService.GetOCVOutputAsync(outputDto);
|
|
var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString());
|
if (!result.Success)
|
task.Remark = "NG";
|
}
|
}
|
|
// 计ç®åºåºå°æ¶çæ¹æ³
|
private double CalculateOutHours(DtStockInfo stock) =>
|
(DateTime.Now - Convert.ToDateTime(stock.LinedProcessFeedbackTime ?? stock.CreateDate.ToString())).TotalHours;
|
|
// çæ AgingOutputDto çå°è£
æ¹æ³
|
private AgingOutputDto CreateAgingOutputDto(Dt_AreaInfo area, DtStockInfo stock, ResultTrayCellsStatus resultTray,
|
ParameterInfo parameterInfo, double outHours, string defectCode)
|
{
|
return new AgingOutputDto
|
{
|
OpFlag = 1,
|
Software = area.Spare3,
|
EquipmentCode = area.Spare2,
|
TrayBarcode = stock.PalletCode,
|
SerialNos = resultTray.SerialNos.Select(x => new SerialNoOutDto
|
{
|
SlotNo = x.PositionNo,
|
SerialNo = x.SerialNo,
|
SerialNoResult = true,
|
ParameterInfo = new List<ParameterInfoOutput>
|
{
|
new ParameterInfoOutput
|
{
|
Value = outHours.ToString(),
|
ParameterCode = parameterInfo.ParameterCode,
|
ParameterDesc = parameterInfo.Description,
|
ParameterResult = "OK",
|
TargetValue = parameterInfo.TargetValue,
|
LowerLimit = parameterInfo.LowerSpecificationsLimit,
|
UpperLimit = parameterInfo.UpperSpecificationsLimit,
|
DefectCode = defectCode,
|
}
|
}
|
}).ToList()
|
};
|
}
|
|
// è·ååæ°ä¿¡æ¯çè¾
婿¹æ³
|
private ParameterInfo GetParameterInfo(DtStockInfo stock) =>
|
JsonConvert.DeserializeObject<List<ParameterInfo>>(stock.ParameterInfos)
|
.FirstOrDefault(y => y.Description.Contains("æ¶é´"));
|
|
#endregion ä»»å¡è¯·æ±æ¹æ³
|
|
#endregion private å
鍿¹æ³
|
}¯OriginalContentÀªSelections¥CaretÀ¥StartÍÎ*£EndÍߺ¨FilePathÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_StorageTaskServices\Task\Dt_TaskService.cs¨Language¢C#¯CopilotTypeName¯DocumentContext¨TypeName¤Name¯DocumentContext§IsArray¢IdÙ$55f6670b-d52d-4cd6-b54a-4c3c87a0b4ac¯ProviderMoniker¤NameÙ6Microsoft.VisualStudio.Copilot.DocumentContextProvider§Version£0.3¦SourceÙ6Microsoft.VisualStudio.Copilot.DocumentContextProvider¦Member¤file©CanReduceéRequestIdÙ$c036f5e8-639f-4e51-bada-20628d7757e9©ReferenceÀ¦Traits¯ProviderMoniker¤NameÙ9Microsoft.VisualStudio.Copilot.CSharpProjectTraitProvider§Version£0.3£Key¯LanguageVersion¥Value®ValueContainerÙMicrosoft.VisualStudio.Copilot.LanguageVersionTrait, Microsoft.VisualStudio.Copilot, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ ¨Language¢C#§Version¤10.0¯CopilotTypeName¯LanguageVersion¨TypeName¤Name¯LanguageVersion§IsArray¯ProviderMoniker¤NameÙ9Microsoft.VisualStudio.Copilot.CSharpProjectTraitProvider§Version£0.3£Key¶CSharpTargetFrameworks¥Value®ValueContainerÙ£Microsoft.VisualStudio.Copilot.CSharpTargetFrameworkTrait, Microsoft.VisualStudio.Copilot.Core, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ (°TargetFrameworks¨'.NET 6'ªIsDocumentïCopilotTypeName¶CSharpTargetFrameworks¨TypeName¤Name¶CSharpTargetFrameworks§IsArray«IsEphemeral®ValueContainerÙ«Microsoft.VisualStudio.Copilot.UnstableInternalApi.RichDocumentContext, Microsoft.VisualStudio.Copilot, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ §Content ¯OriginalContentÀªSelections¨FilePathÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_StorageTaskServices\Task\Dt_TaskService.cs¨LanguageÀªReferencesÜ y¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ%WIDESEA_Core.BaseServices.ServiceBase¯UnqualifiedName«ServiceBase¬CommentRange¥Start ¦Length ©NameRange¥StartÍB¦Length©BodyRange¥StartÍô¦LengthÍså«ExtentRange¥StartÍ5¦LengthÍt¤¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ9WIDESEA_Core.BaseServices.ServiceBase.ValidatePageOptions¯UnqualifiedName³ValidatePageOptions¬CommentRange¥Start ¦Length ©NameRange¥StartÍã¦Length©BodyRange¥StartÍ ¦LengthÍ «ExtentRange¥StartÍÒ¦LengthÍ Ï¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ5WIDESEA_Core.BaseServices.ServiceBase.GetPageDataSort¯UnqualifiedName¯GetPageDataSort¬CommentRange¥StartͦLength̸©NameRange¥StartͦLength©BodyRange¥StartÍæ¦LengthÍæ«ExtentRange¥StartÍo¦LengthÍ]¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ0WIDESEA_Core.BaseServices.ServiceBase.UpdateData¯UnqualifiedNameªUpdateData¬CommentRange¥StartÍ>¦LengthÌ©NameRange¥StartÍ?=¦Length
|
©BodyRange¥StartÍ?f¦LengthÍ5«ExtentRange¥StartÍ?¦LengthͤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ1WIDESEA_Core.BaseServices.ServiceBase.GetPageData¯UnqualifiedName«GetPageData¬CommentRange¥Start ¦Length ©NameRange¥Startͳ¦Length©BodyRange¥StartÍá¦LengthÍã«ExtentRange¥StartͦLengthÍ6¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseServices.ServiceBase.AddData¯UnqualifiedName§AddData¬CommentRange¥StartÍ)±¦LengthÌ©NameRange¥StartÍ*c¦Length©BodyRange¥StartÍ*¦LengthÍ ö«ExtentRange¥StartÍ*A¦LengthÍ
|
>¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ;WIDESEA_Core.BaseServices.ServiceBase.AddDataIncludesDetail¯UnqualifiedNameµAddDataIncludesDetail¬CommentRange¥Start ¦Length ©NameRange¥StartÍ4¥¦Length©BodyRange¥StartÍ58¦LengthÍõ«ExtentRange¥StartÍ4¦LengthÍ¢¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ,WIDESEA_Core.BaseServices.ServiceBase.Import¯UnqualifiedName¦Import¬CommentRange¥StartÍk4¦LengthÌ©NameRange¥StartÍkâ¦Length©BodyRange¥StartÍl ¦LengthÍ«ExtentRange¥StartÍkÀ¦LengthÍѤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ3WIDESEA_Core.BaseServices.ServiceBase.GetDetailPage¯UnqualifiedNameGetDetailPage¬CommentRange¥Start ¦Length ©NameRange¥StartÍ î¦Length ©BodyRange¥StartÍ!¦LengthÍ:«ExtentRange¥StartÍ Ø¦LengthͤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ>WIDESEA_Core.BaseServices.ServiceBase.UpdateDataInculdesDetail¯UnqualifiedName¸UpdateDataInculdesDetail¬CommentRange¥Start ¦Length ©NameRange¥StartÍJÁ¦Length©BodyRange¥StartÍKm¦Lengthͨ«ExtentRange¥StartÍJ§¦LengthÍn¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ0WIDESEA_Core.BaseServices.ServiceBase.DeleteData¯UnqualifiedNameªDeleteData¬CommentRange¥StartÍY=¦LengthÌ
©NameRange¥StartÍYî¦Length
|
©BodyRange¥StartÍZ¦LengthÍt«ExtentRange¥StartÍY̦Length͹¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ,WIDESEA_Core.BaseServices.ServiceBase.Export¯UnqualifiedName¦Export¬CommentRange¥StartÍdá¦LengthÌ
©NameRange¥StartÍe¦Length©BodyRange¥StartÍe»¦LengthÍm«ExtentRange¥StartÍep¦Length͸¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ6WIDESEA_Core.BaseServices.ServiceBase.DownLoadTemplate¯UnqualifiedName°DownLoadTemplate¬CommentRange¥StartÍr¼¦LengthX©NameRange¥StartÍs@¦Length©BodyRange¥StartÍs\¦LengthÍv«ExtentRange¥StartÍs¦LengthÍ´¤Kind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ1WIDESEA_Core.BaseServices.ServiceBase.TProperties¯UnqualifiedName«TProperties¬CommentRange¥Start ¦Length ©NameRange¥StartÍL¦Length©BodyRange¥StartÍa¦LengthÍ!«ExtentRange¥StartÍ6¦LengthÍL¤Kind¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseServices.ServiceBase.AddData¯UnqualifiedName§AddData¬CommentRange¥StartÍ%e¦LengthÌ©NameRange¥StartÍ&¦Length©BodyRange¥StartÍ&9¦LengthÍ@«ExtentRange¥StartÍ%ö¦LengthͤKind ¨FileNameÙ_D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseServices\ServiceBase.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseServices.ServiceBase.AddData¯UnqualifiedName§AddData¬CommentRange¥StartÍ'
¦LengthÌ©NameRange¥StartÍ(:¦Length©BodyRange¥StartÍ(c¦LengthÍB«ExtentRange¥StartÍ(¦LengthͤKind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ,WIDESEA_IStorageTaskServices.IDt_TaskService¯UnqualifiedName¯IDt_TaskService¬CommentRange¥Start ¦Length ©NameRange¥StartR¦Length©BodyRange¥Startw¦LengthÍ-«ExtentRange¥StartA¦LengthÍc¤Kind¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙDWIDESEA_IStorageTaskServices.IDt_TaskService.RequestTrayOutTaskAsync¯UnqualifiedName·RequestTrayOutTaskAsync¬CommentRange¥StartͦLengthÍ ©NameRange¥StartÍI¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍ0¦Length̤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙGWIDESEA_IStorageTaskServices.IDt_TaskService.GetListByOutOrderAndStatus¯UnqualifiedNameºGetListByOutOrderAndStatus¬CommentRange¥StartÍý¦LengthÌ»©NameRange¥StartÍÒ¦Length©BodyRange¥Start ¦Length «ExtentRange¥Start;¦LengthK¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙCWIDESEA_IStorageTaskServices.IDt_TaskService.CompleteStackTaskAsync¯UnqualifiedName¶CompleteStackTaskAsync¬CommentRange¥StartÍ
|
¦LengthÌ©NameRange¥StartÍ1¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartͦLengthZ¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙFWIDESEA_IStorageTaskServices.IDt_TaskService.CompleteTransferTaskAsync¯UnqualifiedName¹CompleteTransferTaskAsync¬CommentRange¥StartÍq¦LengthÌ©NameRange¥StartͦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍú¦Length]¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ:WIDESEA_IStorageTaskServices.IDt_TaskService.GetByLocation¯UnqualifiedNameGetByLocation¬CommentRange¥StartÍ%¦Length}©NameRange¥StartͶ¦Length ©BodyRange¥Start ¦Length «ExtentRange¥Startͨ¦Length/¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ>WIDESEA_IStorageTaskServices.IDt_TaskService.GetListByOutOrder¯UnqualifiedName±GetListByOutOrder¬CommentRange¥StartÍ,¦LengthÌ©NameRange¥StartÍÓ¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍ¿¦Length6¤Kind ¨FileNameÙjD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskService\Task\IDt_TaskService.cs²FullyQualifiedNameÙ4WIDESEA_IStorageTaskServices.IDt_TaskService.GetById¯UnqualifiedName§GetById¬CommentRange¥Start~¦Length{©NameRange¥StartÍ ¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÌÿ¦Length¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName²LogLibrary.Log.Log¯UnqualifiedName£Log¬CommentRange¥Start ¦Length ©NameRange¥Starto¦Length©BodyRange¥Starty¦LengthÍo«ExtentRange¥Start[¦LengthÍo"¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.InfoFormat¯UnqualifiedNameªInfoFormat¬CommentRange¥StartÍGŦLengthÍ 8©NameRange¥StartÍQ¦Length
|
©BodyRange¥StartÍQ`¦LengthÍØ«ExtentRange¥StartÍQ¦LengthÍ1¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.InfoFormat¯UnqualifiedNameªInfoFormat¬CommentRange¥StartÍE¦LengthÌá©NameRange¥StartÍF¦Length
|
©BodyRange¥StartÍFW¦LengthÍb«ExtentRange¥StartÍF ¦LengthͰ¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ&[¦LengthÍ©NameRange¥StartÍ'¦Length©BodyRange¥StartÍ'ó¦LengthÍ«ExtentRange¥StartÍ'¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Error¯UnqualifiedName¥Error¬CommentRange¥StartͦLength̲©NameRange¥StartÍY¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÍM¦LengthÍI¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Info¯UnqualifiedName¤Info¬CommentRange¥StartÍ@}¦Lengtẖ©NameRange¥StartÍAD¦Length©BodyRange¥StartÍAt¦LengthÍ
|
«ExtentRange¥StartÍA8¦LengthÍF¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ!¦LengthÌâ©NameRange¥StartÍ"¦Length©BodyRange¥StartÍ"Õ¦LengthÍ«ExtentRange¥StartÍ"¦LengthÍd¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ#ö¦LengthÌâ©NameRange¥StartÍ$î¦Length©BodyRange¥StartÍ%:¦LengthÍ«ExtentRange¥StartÍ$â¦LengthÍm¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ)¦LengthÍ©NameRange¥StartÍ*H¦Length©BodyRange¥StartÍ*¦LengthÍ«ExtentRange¥StartÍ*<¦LengthÍw¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.ErrorFormat¯UnqualifiedName«ErrorFormat¬CommentRange¥StartÍ+¿¦LengthÍF©NameRange¥StartÍ-¦Length©BodyRange¥StartÍ-x¦LengthÍ«ExtentRange¥StartÍ-¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍ/¦LengthÍ©NameRange¥StartÍa¦Length©BodyRange¥StartÍǦLengthÍ7«ExtentRange¥StartÍU¦LengthÍ©¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ8!¦LengthÍ"©NameRange¥StartÍ9Y¦Length©BodyRange¥StartÍ9¿¦LengthÍ«ExtentRange¥StartÍ9M¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Info¯UnqualifiedName¤Info¬CommentRange¥StartÍB¦LengthÌí©NameRange¥StartÍC¦Length©BodyRange¥StartÍCÒ¦LengthÍ@«ExtentRange¥StartÍC¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍ]ª¦LengthÍ©NameRange¥StartÍ^Þ¦Length
|
©BodyRange¥StartÍ_C¦LengthÍ«ExtentRange¥StartÍ^Ò¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Error¯UnqualifiedName¥Error¬CommentRange¥StartÍ¢¦LengthÌî©NameRange¥Startͦ¦Length©BodyRange¥StartÍì¦LengthÍ¢«ExtentRange¥StartͦLengthÍô¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedNameÙ!LogLibrary.Log.Log.GetDataTimeLog¯UnqualifiedName®GetDataTimeLog¬CommentRange¥Start ¦Length ©NameRange¥StartÍ
|
¦Length©BodyRange¥StartÍ
|
0¦Lengthq«ExtentRange¥StartÍ þ¦LengthÌ£¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Debug¯UnqualifiedName¥Debug¬CommentRange¥StartÍ
|
¦Length̲©NameRange¥StartÍu¦Length©BodyRange¥Startͦ¦LengthÍ«ExtentRange¥StartÍi¦LengthÍI¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Fatal¯UnqualifiedName¥Fatal¬CommentRange¥StartÍ.¦Length̸©NameRange¥StartÍ/m¦Length©BodyRange¥StartÍ/¦LengthÍ«ExtentRange¥StartÍ/a¦LengthÍI¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Warn¯UnqualifiedName¤Warn¬CommentRange¥StartÍTD¦LengthÌ´©NameRange¥StartÍU¦Length©BodyRange¥StartÍU>¦LengthÍ
|
«ExtentRange¥StartÍU¦LengthÍF¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍV¦LengthÌâ©NameRange¥StartÍN¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÍB¦LengthÍd¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ3T¦LengthÌè©NameRange¥StartÍ4R¦Length©BodyRange¥StartÍ4¦LengthÍ«ExtentRange¥StartÍ4F¦LengthÍd¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍXë¦LengthÌä©NameRange¥StartÍYå¦Length
|
©BodyRange¥StartÍZ'¦LengthÍ«ExtentRange¥StartÍYÙ¦LengthÍa¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartͲ¦LengthÌâ©NameRange¥Startͪ¦Length©BodyRange¥StartÍö¦LengthÍ-«ExtentRange¥StartͦLengthÍ
¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍ
|
¦LengthÍ©NameRange¥StartÍ4¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÍ(¦LengthÍw¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ5¶¦LengthÌè©NameRange¥StartÍ6´¦Length©BodyRange¥StartÍ7 ¦LengthÍ«ExtentRange¥StartÍ6¨¦LengthÍm¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ:ê¦LengthÍ©NameRange¥StartÍ<¦Length©BodyRange¥StartÍ<j¦LengthÍ«ExtentRange¥StartÍ<¦LengthÍw¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍ[F¦LengthÌä©NameRange¥StartÍ\@¦Length
|
©BodyRange¥StartÍ\¦LengthÍ«ExtentRange¥StartÍ\4¦LengthÍj¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍ`l¦LengthÍ©NameRange¥StartÍa¦Length
|
©BodyRange¥StartÍaç¦LengthÍ«ExtentRange¥StartÍa¦LengthÍt¤Kind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.DebugFormat¯UnqualifiedName«DebugFormat¬CommentRange¥StartÍ«¦LengthÍF©NameRange¥StartͦLength©BodyRange¥StartÍd¦LengthÍ!«ExtentRange¥StartÍû¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¾LogLibrary.Log.Log.FatalFormat¯UnqualifiedName«FatalFormat¬CommentRange¥StartÍ=¦LengthÍL©NameRange¥StartÍ>ó¦Length©BodyRange¥StartÍ?P¦LengthÍ!«ExtentRange¥StartÍ>ç¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName½LogLibrary.Log.Log.WarnFormat¯UnqualifiedNameªWarnFormat¬CommentRange¥StartÍc¦LengthÍH©NameRange¥StartÍdj¦Length
|
©BodyRange¥StartÍdƦLengthÍ«ExtentRange¥StartÍd^¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Debug¯UnqualifiedName¥Debug¬CommentRange¥Start;¦LengthÌî©NameRange¥StartÍ Â¦Length©BodyRange¥StartͦLengthÍB«ExtentRange¥StartÍ ¶¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName¸LogLibrary.Log.Log.Fatal¯UnqualifiedName¥Fatal¬CommentRange¥StartÍ0¶¦LengthÌô©NameRange¥StartÍ1À¦Length©BodyRange¥StartÍ2¦LengthÍB«ExtentRange¥StartÍ1´¦LengthͤKind ¨FileNameÙLD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\LogLibrary\Log\Log.cs²FullyQualifiedName·LogLibrary.Log.Log.Warn¯UnqualifiedName¤Warn¬CommentRange¥StartÍVT¦LengthÌð©NameRange¥StartÍWZ¦Length©BodyRange¥StartÍW¦LengthÍ@«ExtentRange¥StartÍWN¦LengthͤKind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageBasicRepository\Location\ILocationStatusChangeRecordRepository.cs²FullyQualifiedNameÙEWIDESEA_IStorageBasicRepository.ILocationStatusChangeRecordRepository¯UnqualifiedNameÙ%ILocationStatusChangeRecordRepository¬CommentRange¥Start ¦Length ©NameRange¥StartU¦Length%©BodyRange¥Start̨¦LengthÍÑ«ExtentRange¥StartD¦LengthÍ5¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageBasicRepository\Location\ILocationStatusChangeRecordRepository.cs²FullyQualifiedNameÙcWIDESEA_IStorageBasicRepository.ILocationStatusChangeRecordRepository.AddLocationStatusChangeRecord¯UnqualifiedName½AddLocationStatusChangeRecord¬CommentRange¥Start ¦Length ©NameRange¥StartÍ ¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍû¦Length{¤Kind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageBasicRepository\Location\ILocationStatusChangeRecordRepository.cs²FullyQualifiedNameÙcWIDESEA_IStorageBasicRepository.ILocationStatusChangeRecordRepository.AddLocationStatusChangeRecord¯UnqualifiedName½AddLocationStatusChangeRecord¬CommentRange¥Start ¦Length ©NameRange¥StartͦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍ
¦Lengthn¤Kind ¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ WIDESEA_Model.Models.Dt_AreaInfo¯UnqualifiedName«Dt_AreaInfo¬CommentRange¥StarțLength-©NameRange¥StartÌþ¦Length©BodyRange¥StartͦLengthÍ ~«ExtentRange¥StartÌЦLengthÍ Ê¤Kind ¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ:WIDESEA_Model.Models.Dt_AreaInfo.Dt_WareAreaInfoDetailList¯UnqualifiedName¹Dt_WareAreaInfoDetailList¬CommentRange¥StartÍ ¦Length7©NameRange¥StartÍ
|
l¦Length©BodyRange¥StartÍ
|
¦Length «ExtentRange¥StartÍ ×¦Length̼¤Kind¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ)WIDESEA_Model.Models.Dt_AreaInfo.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartͦLengthM©NameRange¥StartÍ«¦Length©BodyRange¥Start͵¦Length«ExtentRange¥StartÍm¦Length_¤Kind¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ2WIDESEA_Model.Models.Dt_AreaInfo.AreaCode.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartͦLengthM©NameRange¥StartÍ«¦Length©BodyRange¥StartÍÆ¦Length«ExtentRange¥StartÍm¦Length_¤Kind¨FileNameÙ`D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_AreaInfo.cs²FullyQualifiedNameÙ'WIDESEA_Model.Models.Dt_AreaInfo.AreaID¯UnqualifiedName¦AreaID¬CommentRange¥StartÍ8¦LengthM©NameRange¥StartÍî¦Length©BodyRange¥StartÍö¦Length«ExtentRange¥StartͦLengthu¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\MOM\ProcessApply\IProcessApplyService.cs²FullyQualifiedNameÙ7WIDESEA_IStoragIntegrationServices.IProcessApplyService¯UnqualifiedName´IProcessApplyService¬CommentRange¥Start ¦Length ©NameRange¥StartÌæ¦Length©BodyRange¥StartÍ
|
¦LengthÍn«ExtentRange¥StartÌÕ¦LengthÍ£¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\MOM\ProcessApply\IProcessApplyService.cs²FullyQualifiedNameÙYWIDESEA_IStoragIntegrationServices.IProcessApplyService.StockInDataBackfillInterfaceAsync¯UnqualifiedNameÙ!StockInDataBackfillInterfaceAsync¬CommentRange¥StartÍ^¦Lengtḩ©NameRange¥StartÍ$¦Length!©BodyRange¥Start ¦Length «ExtentRange¥StartͦLengthZ¤Kind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\MOM\ProcessApply\IProcessApplyService.cs²FullyQualifiedNameÙZWIDESEA_IStoragIntegrationServices.IProcessApplyService.StockOutDataBackfillInterfaceAsync¯UnqualifiedNameÙ"StockOutDataBackfillInterfaceAsync¬CommentRange¥StartÍm¦Lengtḩ©NameRange¥StartÍ3¦Length"©BodyRange¥Start ¦Length «ExtentRange¥StartͦLength[¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ WIDESEA_Model.Models.DtStockInfo¯UnqualifiedName«DtStockInfo¬CommentRange¥Start ¦Length ©NameRange¥StartÍ9¦Length©BodyRange¥StartÍW¦LengthÍ«ExtentRange¥StartÌý¦LengthÍv¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ1WIDESEA_Model.Models.DtStockInfo.StockInfoDetails¯UnqualifiedName°StockInfoDetails¬CommentRange¥StartÍZ¦Length7©NameRange¥StartÍB¦Length©BodyRange¥StartÍS¦Length «ExtentRange¥StartͦLengthÌŤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtStockInfo.OutboundTime¯UnqualifiedName¬OutboundTime¬CommentRange¥StartÍð¦Length8©NameRange¥StartÍå¦Length©BodyRange¥StartÍò¦Length «ExtentRange¥StartÍ2¦LengthÌͤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ/WIDESEA_Model.Models.DtStockInfo.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥StartÍ Ê¦Length7©NameRange¥StartÍ
|
¸¦Length©BodyRange¥StartÍ
|
ǦLength «ExtentRange¥StartÍ
|
¦LengthÌɤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ)WIDESEA_Model.Models.DtStockInfo.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartÍ
|
à¦Length7©NameRange¥StartÍΦLength©BodyRange¥StartÍצLength «ExtentRange¥StartÍ!¦LengthÌäKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ,WIDESEA_Model.Models.DtStockInfo.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartÍ0¦Length7©NameRange¥StartͦLength©BodyRange¥StartÍ*¦Length «ExtentRange¥StartÍq¦LengthÌÆ¤Kind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtStockInfo.LocationInfo¯UnqualifiedName¬LocationInfo¬CommentRange¥StartÍl¦Length7©NameRange¥StartÍR¦Length©BodyRange¥StartÍ_¦Length «ExtentRange¥StartͦLengthÌ¿¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ$WIDESEA_Model.Models.DtStockInfo_Hty¯UnqualifiedName¯DtStockInfo_Hty¬CommentRange¥Start ¦Length ©NameRange¥StartÌÆ¦Length©BodyRange¥StartÌè¦LengthÍô«ExtentRange¥StarțLengthÍX¤Kind ¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ5WIDESEA_Model.Models.DtStockInfo_Hty.StockInfoDetails¯UnqualifiedName°StockInfoDetails¬CommentRange¥StartÍ»¦Length7©NameRange¥StartÍ«¦Length©BodyRange¥Startͼ¦Length «ExtentRange¥StartÍü¦LengthÌͤKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ1WIDESEA_Model.Models.DtStockInfo_Hty.OutboundTime¯UnqualifiedName¬OutboundTime¬CommentRange¥StartÍ;¦Length8©NameRange¥StartÍ0¦Length©BodyRange¥StartÍ=¦Length «ExtentRange¥StartÍ}¦LengthÌͤKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtStockInfo_Hty.AreaCode¯UnqualifiedName¨AreaCode¬CommentRange¥StartÍ
|
+¦Length7©NameRange¥StartͦLength©BodyRange¥StartÍ"¦Length «ExtentRange¥StartÍ
|
l¦LengthÌäKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ0WIDESEA_Model.Models.DtStockInfo_Hty.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartͦLength7©NameRange¥StartͦLength©BodyRange¥StartͦLength «ExtentRange¥StartÍÒ¦LengthÌÆ¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtStockInfo_Hty.cs²FullyQualifiedNameÙ1WIDESEA_Model.Models.DtStockInfo_Hty.LocationInfo¯UnqualifiedName¬LocationInfo¬CommentRange¥StartÍÕ¦Length7©NameRange¥StartÍ»¦Length©BodyRange¥StartÍȦLength «ExtentRange¥StartͦLengthÌ¿¤Kind¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ!WIDESEA_Model.Models.DtBoxingInfo¯UnqualifiedName¬DtBoxingInfo¬CommentRange¥Start ¦Length ©NameRange¥StartÌè¦Length©BodyRange¥StartͦLengthÍ«ExtentRange¥StartÌ«¦LengthÍø¤Kind ¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ3WIDESEA_Model.Models.DtBoxingInfo.BoxingInfoDetails¯UnqualifiedName±BoxingInfoDetails¬CommentRange¥StartÍc¦Length7©NameRange¥StartÍ}¦Length©BodyRange¥StartͦLength «ExtentRange¥Startͤ¦LengthÌø¤Kind¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ0WIDESEA_Model.Models.DtBoxingInfo.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥StartÍ.¦Length7©NameRange¥StartÍæLength©BodyRange¥StartÍÒ¦Length «ExtentRange¥StartÍo¦Lengthp¤Kind¨FileNameÙfD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\BasicModel\DtBoxingInfo.cs²FullyQualifiedNameÙ-WIDESEA_Model.Models.DtBoxingInfo.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartÍë¦Length7©NameRange¥StartͦLength©BodyRange¥StartͦLength «ExtentRange¥StartÍ,¦Lengthm¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheHashService.cs²FullyQualifiedNameÙ!WIDESEA_Cache.ISimpleCacheService¯UnqualifiedName³ISimpleCacheService¬CommentRange¥Start¦Length'©NameRange¥Start^¦Length©BodyRange¥Starts¦LengthÍV«ExtentRange¥StartE¦LengthͤKind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheHashService.cs²FullyQualifiedNameÙ,WIDESEA_Cache.ISimpleCacheService.HashGetAll¯UnqualifiedNameªHashGetAll¬CommentRange¥StartÍí¦LengthÌ¢©NameRange¥Startͬ¦Length
|
©BodyRange¥Start ¦Length «ExtentRange¥StartͦLength1¤Kind ¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙ1WIDESEA_IStorageTaskRepository.IDt_TaskRepository¯UnqualifiedName²IDt_TaskRepository¬CommentRange¥Start ¦Length ©NameRange¥Start>¦Length©BodyRange¥Starti¦LengthÍ«ExtentRange¥Start-¦LengthÍŤKind¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙLWIDESEA_IStorageTaskRepository.IDt_TaskRepository.GetListByOutOrderAndStatus¯UnqualifiedNameºGetListByOutOrderAndStatus¬CommentRange¥Start ¦Length ©NameRange¥StartͦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍú¦LengthK¤Kind ¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙCWIDESEA_IStorageTaskRepository.IDt_TaskRepository.GetListByOutOrder¯UnqualifiedName±GetListByOutOrder¬CommentRange¥Start ¦Length ©NameRange¥StartÍЦLength©BodyRange¥Start ¦Length «ExtentRange¥Startͼ¦Length6¤Kind ¨FileNameÙpD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageTaskRepository\Task\IDt_TaskRepository.cs²FullyQualifiedNameÙ9WIDESEA_IStorageTaskRepository.IDt_TaskRepository.GetById¯UnqualifiedName§GetById¬CommentRange¥Start ¦Length ©NameRange¥Start~¦Length©BodyRange¥Start ¦Length «ExtentRange¥Startp¦Length¤Kind ¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ'WIDESEA_Core.BaseRepository.IRepository¯UnqualifiedName«IRepository¬CommentRange¥Start ¦Length ©NameRange¥StartÍ ¦Length©BodyRange¥StartÍe¦LengthÍAw«ExtentRange¥StartͦLengthÍAͤKind¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ7WIDESEA_Core.BaseRepository.IRepository.QueryFirstAsync¯UnqualifiedName¯QueryFirstAsync¬CommentRange¥Start ¦Length ©NameRange¥StartÍe¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍW¦Lengthx¤Kind ¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ6WIDESEA_Core.BaseRepository.IRepository.QueryDataAsync¯UnqualifiedName®QueryDataAsync¬CommentRange¥Start ¦Length ©NameRange¥StartÍЦLength©BodyRange¥Start ¦Length «ExtentRange¥Startͼ¦LengthZ¤Kind ¨FileNameÙaD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\IRepository.cs²FullyQualifiedNameÙ1WIDESEA_Core.BaseRepository.IRepository.QueryPage¯UnqualifiedName©QueryPage¬CommentRange¥Start ¦Length ©NameRange¥StartÍ5̦Length ©BodyRange¥Start ¦Length «ExtentRange¥StartÍ5¶¦Lengtht¤Kind ¨FileNameÙlD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\UnitOfWorks\UnitOfWork.cs²FullyQualifiedNameÙ&WIDESEA_Core.BaseRepository.UnitOfWork¯UnqualifiedNameªUnitOfWork¬CommentRange¥Start ¦Length ©NameRange¥StartÌì¦Length
|
©BodyRange¥StartÍ
|
¦LengthÍ«ExtentRange¥StartÌߦLength͵¤Kind ¨FileNameÙlD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\UnitOfWorks\UnitOfWork.cs²FullyQualifiedNameÙ-WIDESEA_Core.BaseRepository.UnitOfWork.Commit¯UnqualifiedName¦Commit¬CommentRange¥Start ¦Length ©NameRange¥StartÍĦLength©BodyRange¥StartÍÖ¦LengthÍ·«ExtentRange¥Start͸¦LengthÍÕ¤Kind ¨FileNameÙlD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseRepository\UnitOfWorks\UnitOfWork.cs²FullyQualifiedNameÙ.WIDESEA_Core.BaseRepository.UnitOfWork.Dispose¯UnqualifiedName§Dispose¬CommentRange¥Start ¦Length ©NameRange¥StartÍd¦Length©BodyRange¥StartÍw¦LengthÍ5«ExtentRange¥StartÍX¦LengthÍT¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheService.cs²FullyQualifiedNameÙ!WIDESEA_Cache.ISimpleCacheService¯UnqualifiedName³ISimpleCacheService¬CommentRange¥Start¦Length'©NameRange¥Start^¦Length©BodyRange¥Starts¦LengthÍl«ExtentRange¥StartE¦LengthͤKind¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheService.cs²FullyQualifiedNameÙ/WIDESEA_Cache.ISimpleCacheService.GetDictionary¯UnqualifiedNameGetDictionary¬CommentRange¥StartÍæLengthÌ©NameRange¥StartÍ k¦Length ©BodyRange¥Start ¦Length «ExtentRange¥StartÍ T¦Length4¤Kind ¨FileNameÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheService.cs²FullyQualifiedNameÙ(WIDESEA_Cache.ISimpleCacheService.SetAll¯UnqualifiedName¦SetAll¬CommentRange¥StartͦLengthÌ©©NameRange¥StartÍȦLength©BodyRange¥Start ¦Length «ExtentRange¥StartÍæLength?¤Kind ¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageOutOrderRepository\OutboundOrder\IDt_OutOrderRepository.cs²FullyQualifiedNameÙ9WIDESEA_IStorageOutOrderRepository.IDt_OutOrderRepository¯UnqualifiedName¶IDt_OutOrderRepository¬CommentRange¥Start ¦Length ©NameRange¥StartY¦Length©BodyRange¥StarțLengthÍ«ExtentRange¥StartH¦LengthÍR¤Kind¨FileNameÙD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStorageOutOrderRepository\OutboundOrder\IDt_OutOrderRepository.cs²FullyQualifiedNameÙRWIDESEA_IStorageOutOrderRepository.IDt_OutOrderRepository.GetOutOrderByNumberAsync¯UnqualifiedName¸GetOutOrderByNumberAsync¬CommentRange¥Start ¦Length ©NameRange¥StartÍj¦Length©BodyRange¥Start ¦Length «ExtentRange¥StartÍX¦Length?¤Kind ¨FileNameÙdD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseModels\WebResponseContent.cs²FullyQualifiedName¿WIDESEA_Core.WebResponseContent¯UnqualifiedName²WebResponseContent¬CommentRange¥Start ¦Length ©NameRange¥Starţ¦Length©BodyRange¥StartÌ¿¦LengthÍ«ExtentRange¥StarțLengthÍ@¤Kind ¨FileNameÙdD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseModels\WebResponseContent.cs²FullyQualifiedNameÙ%WIDESEA_Core.WebResponseContent.Error¯UnqualifiedName¥Error¬CommentRange¥Start ¦Length ©NameRange¥StartÍJ¦Length©BodyRange¥StartÍp¦Lengthc«ExtentRange¥StartÍ0¦LengthÌ£¤Kind ¨FileNameÙdD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Core\BaseModels\WebResponseContent.cs²FullyQualifiedNameÙ"WIDESEA_Core.WebResponseContent.OK¯UnqualifiedName¢OK¬CommentRange¥Start ¦Length ©NameRange¥StartÍq¦Length©BodyRange¥Startͨ¦Length|«ExtentRange¥StartÍW¦LengthÌͤKind ¨FileNameÙ\D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_Task.cs²FullyQualifiedName¼WIDESEA_Model.Models.Dt_Task¯UnqualifiedName§Dt_Task¬CommentRange¥StartU¦Length%©NameRange¥StartÌ©¦Length©BodyRange¥StartÌ¿¦LengthÍ«ExtentRange¥Start|¦LengthÍÒ¤Kind ¨FileNameÙ\D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_Task.cs²FullyQualifiedNameÙ+WIDESEA_Model.Models.Dt_Task.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥Startͺ¦LengthB©NameRange¥StartÍ c¦Length©BodyRange¥StartÍ r¦Length «ExtentRange¥StartÍ ¦Length}¤Kind¨FileNameÙ\D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\Basic\Dt_Task.cs²FullyQualifiedNameÙ(WIDESEA_Model.Models.Dt_Task.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartÍ ¦LengthB©NameRange¥StartÍ.¦Length©BodyRange¥StartÍ:¦Length «ExtentRange¥StartÍ Ï¦Lengthx¤Kind¨FileNameÙhD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\OutboundOrder\Dt_OutOrder.cs²FullyQualifiedNameÙ WIDESEA_Model.Models.Dt_OutOrder¯UnqualifiedName«Dt_OutOrder¬CommentRange¥StartU¦Length*©NameRange¥StartÌ·¦Length©BodyRange¥StartÌѦLengthÍã«ExtentRange¥StarțLengthÍ3¤Kind ¨FileNameÙhD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Model\Models\OutboundOrder\Dt_OutOrder.cs²FullyQualifiedNameÙ0WIDESEA_Model.Models.Dt_OutOrder.OrderDetailList¯UnqualifiedName¯OrderDetailList¬CommentRange¥StartÍÆ¦Length1©NameRange¥StartͦLength©BodyRange¥Startͤ¦Length «ExtentRange¥StartÍý¦LengthÌ´¤Kind¨FileNameÙZD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\Basic\RequestTaskDto.cs²FullyQualifiedNameºWIDESEA_DTO.RequestTaskDto¯UnqualifiedName®RequestTaskDto¬CommentRange¥Start ¦Length ©NameRange¥Start'¦Length©BodyRange¥Start7¦LengthÍQ«ExtentRange¥Start¦LengthÍn¤Kind ¨FileNameÙZD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\Basic\RequestTaskDto.cs²FullyQualifiedNameÙ%WIDESEA_DTO.RequestTaskDto.PalletCode¯UnqualifiedNameªPalletCode¬CommentRange¥StarțLength.©NameRange¥StartÌá¦Length
|
©BodyRange¥StartÌì¦Length «ExtentRange¥StartÌÓ¦Length&¤Kind¨FileNameÙZD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\Basic\RequestTaskDto.cs²FullyQualifiedNameÙ)WIDESEA_DTO.RequestTaskDto.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥Start ¦Length ©NameRange¥StartÍi¦Length©BodyRange¥StartÍx¦Length «ExtentRange¥StartÍ[¦Length*¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\MOM\CellState\ResultTrayCellsStatus.cs²FullyQualifiedNameÙ%WIDESEA_DTO.MOM.ResultTrayCellsStatus¯UnqualifiedNameµResultTrayCellsStatus¬CommentRange¥Start"¦Length1©NameRange¥Startf¦Length©BodyRange¥StarțLengthÍ-«ExtentRange¥StartY¦LengthÍc¤Kind ¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\MOM\CellState\ResultTrayCellsStatus.cs²FullyQualifiedNameÙ4WIDESEA_DTO.MOM.ResultTrayCellsStatus.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥StartͦLength7©NameRange¥StartÍf¦Length©BodyRange¥StartÍu¦Length «ExtentRange¥StartÍX¦Length*¤Kind¨FileNameÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\MOM\CellState\ResultTrayCellsStatus.cs²FullyQualifiedNameÙ1WIDESEA_DTO.MOM.ResultTrayCellsStatus.ProcessCode¯UnqualifiedName«ProcessCode¬CommentRange¥StartͦLength;©NameRange¥StartÍá¦Length©BodyRange¥StartÍí¦Length «ExtentRange¥StartÍÓ¦Length'¤Kind¨FileNameÙTD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\WMS\WMSTaskDTO.cs²FullyQualifiedNameºWIDESEA_DTO.WMS.WMSTaskDTO¯UnqualifiedNameªWMSTaskDTO¬CommentRange¥Start ¦Length ©NameRange¥StartÌ»¦Length
|
©BodyRange¥StartÌ˦LengthÍj«ExtentRange¥StartÌ®¦LengthͤKind ¨FileNameÙTD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\WMS\WMSTaskDTO.cs²FullyQualifiedNameÙ%WIDESEA_DTO.WMS.WMSTaskDTO.PalletCode¯UnqualifiedNameªPalletCode¬CommentRange¥StartͦLength6©NameRange¥StartÍû¦Length
|
©BodyRange¥StartͦLength «ExtentRange¥StartÍí¦Length&¤Kind¨FileNameÙTD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_DTO\WMS\WMSTaskDTO.cs²FullyQualifiedNameÙ)WIDESEA_DTO.WMS.WMSTaskDTO.ProductionLine¯UnqualifiedName®ProductionLine¬CommentRange¥Startͽ¦Length<©NameRange¥StartͦLength©BodyRange¥StartÍ!¦Length «ExtentRange¥StartͦLength+¤Kind²OriginalReferences¯CopilotTypeName¯DocumentContext¨TypeName¤Name¯DocumentContext§IsArray¢IdÙ$9abe80de-1e1c-40dd-9b54-6e8dc7b15652¯ProviderMoniker¤NameÙ6Microsoft.VisualStudio.Copilot.DocumentContextProvider§Version£0.3¦SourceÙ3Microsoft.VisualStudio.Copilot.SemanticContextScope¦Member¤file©CanReduceéRequestIdÙ$c036f5e8-639f-4e51-bada-20628d7757e9©ReferenceÀ¦Traits«IsEphemeral®ValueContainerÙ£Microsoft.VisualStudio.Copilot.Core.IDEContext.IdeContext, Microsoft.VisualStudio.Copilot.Core, Version=17.13.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aÓ F°IsDebuggerPaused«CurrentFileÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_StorageTaskServices\Task\Dt_TaskService.cs©OpenFilesÙhD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_StorageTaskServices\AspNetCoreSchedule.csÙeD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Service\RedisCacheHashService.csÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Interface\ISimpleCacheHashService.csÙYD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_WMSServer\appsettings.jsonÙXD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_Cache\Const\CacheConst.csÙiD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_StorageTaskServices\Task\Dt_TaskService.csÙSD:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_WMSServer\Program.cs¯CopilotTypeNameªIdeContext¨TypeName¤NameªIdeContext§IsArray¢IdÙ$caf571b3-b8bc-4794-bd90-21e9a6aa6625¯ProviderMoniker¤NameÙ)Microsoft.VisualStudio.Copilot.IdeContext§Version£0.3¦SourceÙ)Microsoft.VisualStudio.Copilot.IdeContext¦Member¨idestate©CanReduce©RequestIdÙ$c036f5e8-639f-4e51-bada-20628d7757e9©ReferenceÀ¦Traits«IsEphemeralçContent
¢IdÄ×ÝÂE¾RHÚJäªVisibility«Annotations§ContentÙ好çï¼æä¼å¯¹ `QueryStockInfoForRealTrayAsync` æ¹æ³è¿è¡ä¼åï¼ä¸»è¦æ¯åå°éå¤ä»£ç å¹¶æé«ä»£ç çå¯è¯»æ§ã
|
|
¨Mentions¢IdÄ3ÐÉôY.MA5®³mÈ#ªVisibility«Annotations§ContentÚhprivate async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, List<string> devices, string productionLine)
|
{
|
var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
|
if (area == null)
|
{
|
ConsoleHelper.WriteErrorLine($"æ¥è¯¢å®çåºåä¿¡æ¯æ¶,æªæ¾å°åºå代ç 为{areaCode}çæ°æ®");
|
return null;
|
}
|
|
var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
|
List<string> materielCodes = outBoundMateriel.Count != 0
|
? outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == area.AreaCode)
|
.Select(x => x.MaterielCode)
|
.ToList()
|
: null;
|
|
IDictionary<string, DtStockInfo> stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
|
List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
|
DtStockInfo result = null;
|
|
if (stockInfoList.IsNullOrEmpty())
|
{
|
stockInfoList = await _stockInfoRepository.Db.Queryable<DtStockInfo>().IncludesAllFirstLayer().ToListAsync();
|
}
|
|
result = stockInfoList.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull)
|
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
|
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable)
|
.WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
|
.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
|
.OrderBy(x => x.OutboundTime)
|
.FirstOrDefault();
|
|
if (result != null)
|
{
|
stockInfoList = stockInfoList.Where(x => x != result).ToList();
|
_simpleCacheService.HashAdd(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, result.PalletCode, result);
|
}
|
|
return result;
|
}
|
¨Language¢C#ºLanguageMarkdownIdentifier¦csharp¬IsRefinement¤FileÀ§OptionsÀ¨Commands
¢IdÄ]¸ìòçN®H)O
|
ªVisibility«Annotations§ContentÚH
|
### ä¼åç¹ï¼
|
1. åå¹¶äº `if` æ¡ä»¶ï¼åå°äºéå¤ä»£ç ã
|
2. ä½¿ç¨ `WhereIF` æ¹æ³ç®åäºæ¡ä»¶å¤æã
|
3. å° `materielCodes` çåå§ååå¹¶å°ä¸ä¸ªä¸å
è¿ç®ç¬¦ä¸ã
|
4. å° `result` çèµå¼é»è¾åå¹¶å°ä¸ä¸ªæ¥è¯¢ä¸ï¼åå°äºä»£ç éå¤ã
|
|
è¿æ ·å¯ä»¥æé«ä»£ç çå¯è¯»æ§åç»´æ¤æ§ã¨Mentions¨Metadata©SessionIdÙ$85d61362-b687-48eb-8099-932a817719a7¢IdÙ4Microsoft.VisualStudio.Conversations.Chat.HelpWindow¦Author¤Name®GitHub Copilot¤Icon¤GuidÙ$4515b9bd-70a1-45fa-9545-d4536417c596¢Id§Service¤NameÙ7Microsoft.VisualStudio.Copilot.CopilotChatAgentProvider§Version£0.3¦Status©FollowUps§MessageÙ<å¦ä½å¨è¿ä¸ªæ¹æ³ä¸æ·»å æ¥å¿è®°å½ä»¥ä¾¿äºè°è¯ï¼
|