| | |
| | | //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True", |
| | | //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True", |
| | | //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True", |
| | | //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //跨域 |
| | |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | | using System.Drawing; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using Mapster; |
| | | |
| | | namespace WIDESEAWCS_TaskInfoService |
| | | { |
| | |
| | | |
| | | var task = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString()); |
| | | ConsoleHelper.WriteSuccessLine(content.Data.ToString()); |
| | | content = ReceiveByBZOtuTask(task); |
| | | //_taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO })‘ |
| | | content = ReceiveWMSTask(new List<WMSTaskDTO> { task }); |
| | | //content = ReceiveByBZOtuTask(task); |
| | | //if (content.Status) |
| | | //{ |
| | | // //相应的在途数据+1 |
| | |
| | | if (content.Status) |
| | | { |
| | | task.TaskState = 1; //任务完成 |
| | | var taskHty = task.Adapt<Dt_Task_Hty>(); |
| | | _taskHtyRepository.AddData(taskHty); |
| | | BaseDal.DeleteData(task); |
| | | } |
| | | |
| | |
| | | private readonly IDt_StationManagerRepository _stationManagerRepository; |
| | | private readonly ICacheService _cacheService; |
| | | private readonly INoticeService _noticeService; |
| | | private readonly IDt_needBarcodeRepository _needBarcodeRepository; |
| | | |
| | | public CommonConveyorLine_GWJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService) |
| | | public CommonConveyorLine_GWJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDt_needBarcodeRepository needBarcodeRepository) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _stationManagerRepository = stationManagerRepository; |
| | | _cacheService = cacheService; |
| | | _noticeService = noticeService; |
| | | _needBarcodeRepository = needBarcodeRepository; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | taskCommand.InteractiveSignal = command.InteractiveSignal; |
| | | Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationPLC == conveyorLine.DeviceCode && x.stationChildCode == childDeviceCode); |
| | | if (task.PalletCode != command.ConveyorLineBarcode) |
| | | { |
| | | var NGAddress = _platFormRepository.QueryFirst(x => x.PlatCode == task.TargetAddress).Capacity; |
| | | taskCommand.ConveyorLineTargetAddress = (short)NGAddress; |
| | | //var NGAddress = _platFormRepository.QueryFirst(x => x.PlatCode == task.TargetAddress).Capacity; |
| | | //taskCommand.ConveyorLineTargetAddress = (short)NGAddress; |
| | | taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode); |
| | | } |
| | | else |
| | | { |
| | | Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationPLC == conveyorLine.DeviceCode && x.stationChildCode == childDeviceCode); |
| | | //Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationPLC == conveyorLine.DeviceCode && x.stationChildCode == childDeviceCode); |
| | | taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationLocation); |
| | | } |
| | | |
| | | if (stationManager.stationPLC == "1018" && stationManager.stationArea == "Cache") //更新在途数据 |
| | | { |
| | | dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == stationManager.productLine && x.toArea == stationManager.stationChildCode); |
| | | |
| | | if (needBarcode != null) |
| | | { |
| | | needBarcode.inLineNum--; |
| | | _needBarcodeRepository.UpdateData(needBarcode); |
| | | } |
| | | } |
| | | |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); |
| | |
| | | ExecuteStationAction(stationManager, conveyorLine, command, childDeviceCode); |
| | | } |
| | | break; |
| | | |
| | | case 1: |
| | | case 6: |
| | | case 10: |
| | | ExecuteStationAction(stationManager, conveyorLine, command, childDeviceCode); |
| | | break; |
| | | //case 16: |
| | | // ExecuteStationAction(stationManager, conveyorLine, command, childDeviceCode); |
| | | // break; |
| | | } |
| | | |
| | | #region |
| | |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到出库站台【{task.TargetAddress}】对应的通讯对象,无法判断出库站台是否被占用"); |
| | | } |
| | | } |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.TargetAddress}】信息,无法校验站台"); |
| | | //_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.TargetAddress}】信息,无法校验站台"); |
| | | } |
| | | } |
| | | else |
| | |
| | | let loadingInstance |
| | | let loadingStatus = false |
| | | if (process.env.NODE_ENV == 'development') { |
| | | // axios.defaults.baseURL = 'http://localhost:5000/'; |
| | | axios.defaults.baseURL = 'http://192.168.5.251:5000/'; |
| | | axios.defaults.baseURL = 'http://localhost:5000/'; |
| | | //axios.defaults.baseURL = 'http://192.168.5.251:5000/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:9991/'; |
| | |
| | | /// <summary> |
| | | /// 区域 |
| | | /// </summary> |
| | | public string zone { get; set; } |
| | | public int zone { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 行 |
| | |
| | | { |
| | | Inbound = 1, |
| | | Outbound, |
| | | AbnormalStation, |
| | | AbnormalStation, //分容出库段(异常排出口) |
| | | NGTakeStation, |
| | | NGPutStation, |
| | | EmptyInbound, |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 异常排出口(入库端) --分容入库段 |
| | | /// 异常排出口(入库段) --分容入库段 |
| | | /// </summary> |
| | | AbnormalInStation =15, |
| | | |
| | |
| | | // 更新库存状态和任务状态 |
| | | (var loc, var tas) = UpdateStockAndTaskStatus(stock, task); |
| | | var taskHty = task.Adapt<Dt_Task_Hty>(); |
| | | //taskHty.FinishTime = DateTime.Now; |
| | | |
| | | // 事务处理 |
| | | await _unitOfWorkManage.UseTranAsync(async () => |
| | |
| | | Remark = boxing.BoxingInfoDetails.Count().ToString(), |
| | | }; |
| | | |
| | | if (boxing.ProcessCode != "OCVB" && !task.Roadway.Contains("FR")) |
| | | if (boxing.ProcessCode != "OCVB" || !task.Roadway.Contains("FR")) |
| | | { |
| | | // 处理请求参数 |
| | | AgingInputDto agingInputDto = new AgingInputDto() |
| | |
| | | { |
| | | Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position && x.stationType == 12 && x.stationArea == "Call"); |
| | | |
| | | DtStockInfo stockInfo = _stockInfoRepository.QueryFirst(X => X.IsFull && X.AreaCode == "CWSC3" && X.ProductionLine == station.productLine); |
| | | var stockInfo = _stockInfoRepository.Db.Queryable<DtStockInfo>() |
| | | .Includes(x => x.LocationInfo) // 预加载LocationInfo |
| | | .Includes(x => x.StockInfoDetails) // 预加载StockInfoDetails |
| | | .Where(x => x.AreaCode == "CWSC3" && x.IsFull == true) // 过滤条件 |
| | | .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock) // 过滤条件 |
| | | .OrderBy(x => x.OutboundTime) // 排序 |
| | | .First(); // 获取第一个元素 |
| | | |
| | | //DtStockInfo stockInfo = _stockInfoRepository.QueryFirst(X => X.IsFull && X.AreaCode == "CWSC3" && X.ProductionLine == station.productLine); |
| | | if (stockInfo == null) throw new Exception("库内无满足条件的库存可出库"); |
| | | |
| | | DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.AreaId == 5 && x.LocationCode == stockInfo.LocationCode); |
| | |
| | | // 创建新任务实例 |
| | | var task = new Dt_Task |
| | | { |
| | | CurrentAddress = locationInfo.RoadwayNo, |
| | | CurrentAddress = stockInfo.LocationCode, |
| | | Grade = 1, |
| | | Roadway = locationInfo.RoadwayNo, |
| | | TargetAddress = json.Position, |
| | |
| | | |
| | | WMSTaskDTO taskDTO = CreateTaskDTO(task); |
| | | |
| | | BaseDal.AddData(task); |
| | | stockInfo.LocationInfo.LocationStatus = (int)LocationEnum.InStockDisable; |
| | | _locationRepository.UpdateData(stockInfo.LocationInfo); |
| | | |
| | | return content.OK(data: taskDTO); |
| | | } |
| | |
| | | |
| | | if (emergencyTask == null) throw new Exception("火警参数为空"); |
| | | |
| | | DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == emergencyTask.row && x.Column == emergencyTask.column && x.Layer == emergencyTask.layer && x.RoadwayNo == emergencyTask.Roadway); |
| | | DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == emergencyTask.row && x.Column == emergencyTask.column && x.Layer == emergencyTask.layer && x.AreaId == emergencyTask.zone); |
| | | if (locationInfo == null) |
| | | { |
| | | throw new Exception("未知库位"); |
| | |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | //[HttpPost, AllowAnonymous, Route("EmergencyTask")] |
| | | //public WebResponseContent EmergencyTask([FromBody] object input) |
| | | //{ |
| | | // //return Service.EmergencyTask(input); |
| | | //} |
| | | [HttpPost, AllowAnonymous, Route("EmergencyTask")] |
| | | public WebResponseContent EmergencyTask([FromBody] object input) |
| | | { |
| | | return Service.EmergencyTask(input); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true |
| | | //连接字符串 |
| | | //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", |
| | | "ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | |
| | | //跨域 |