| | |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error($"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ã"); |
| | | QuartzLogger.WriteLogToFile($"Info_å容任å¡å®æ", $"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ãå¼å¸¸ä¿¡æ¯ã{ex.StackTrace}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | QuartzLogger.WriteLogToFile($"Info_å容任å¡å®æ", $"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ãå¼å¸¸ä¿¡æ¯ã{ex.Message}ã{Environment.NewLine}å¼å¸¸ä¿¡æ¯ã{ex.StackTrace}ã{Environment.NewLine}"); |
| | | } |
| | | QuartzLogger.WriteLogToFile($"Info_å容任å¡å®æ", $"ä»»å¡å®æ,ä»»å¡å·:ã{taskNum}ãè¿ååæ°ã{JsonConvert.SerializeObject(content)}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | return content; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error($"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ã"); |
| | | QuartzLogger.WriteLogToFile($"Info_ä»»å¡å®æ", $"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ãå¼å¸¸ä¿¡æ¯ã{ex.StackTrace}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | QuartzLogger.WriteLogToFile($"Info_ä»»å¡å®æ", $"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ãå¼å¸¸ä¿¡æ¯ã{ex.Message}ã{Environment.NewLine}å¼å¸¸ä¿¡æ¯ã{ex.StackTrace}ã{Environment.NewLine}"); |
| | | } |
| | | QuartzLogger.WriteLogToFile($"Info_ä»»å¡å®æ", $"ä»»å¡å®æ,ä»»å¡å·:ã{taskNum}ãè¿ååæ°ã{JsonConvert.SerializeObject(content)}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | return content; |
| | |
| | | |
| | | if (_taskRepository.QueryFirst(x => x.PalletCode == taskDTO.PalletCode) != null) |
| | | { |
| | | if (_taskRepository.QueryFirst(x => x.PalletCode == command.Barcode) != null) |
| | | { |
| | | |
| | | var taskExecuting = _taskRepository.QueryFirst(x => x.PalletCode == command.Barcode && (x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting|| x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)); |
| | | |
| | | if (taskExecuting != null) |
| | | { |
| | | taskExecuting.ExceptionMessage = "æªæ¥æ¶å°çº¿ä½å®æä¿¡å·ç³»ç»å
é¨èªå¨å®æ"; |
| | | _taskService.Delete(taskExecuting); |
| | | } |
| | | |
| | | ConsoleHelper.WriteErrorLine($"å½åæçåå¨ä»»å¡ï¼ã{command.Barcode}ã"); |
| | | |
| | | WriteInfo(conveyorLine.DeviceName, $"å½åæçåå¨ä»»å¡{command.Barcode}"); |
| | | |
| | | } |
| | | WriteInfo(conveyorLine.DeviceName, "å½åæçåå¨ä»»å¡"); |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | private async void RequestWmsTask(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode, Dt_StationManager stationManager) |
| | | { |
| | | if (command.ConveyorLineBarcode.IsNullOrEmpty()) return; |
| | | var content = await _taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode); |
| | | if (content.Status) |
| | | try |
| | | { |
| | | var task = _taskService.QueryBarCodeConveyorLineTask(command.ConveyorLineBarcode, childDeviceCode); |
| | | if (task != null) |
| | | if (command.ConveyorLineBarcode.IsNullOrEmpty()) return; |
| | | var content = await _taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode); |
| | | if (content.Status) |
| | | { |
| | | var GWTask = _taskRepository.QueryData(x => x.Roadway.Contains("GWSC2") && x.SourceAddress == "1039" && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskInStatusEnum.Line_InFinish)).ToList(); |
| | | if (GWTask.Count >= 2 && childDeviceCode == "1039" && task.Roadway.Contains("GWSC2")) |
| | | var task = _taskService.QueryBarCodeConveyorLineTask(command.ConveyorLineBarcode, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | ConsoleHelper.WriteErrorLine($"æçå·ï¼ã{command.ConveyorLineBarcode}ã髿¸©äºå·²åå¨ã{GWTask.Count}ã个任å¡å¤§äº2个任å¡ä¸å¯ä¸å"); |
| | | return; |
| | | } |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | var GWTask = _taskRepository.QueryData(x => x.Roadway.Contains("GWSC2") && x.SourceAddress == "1039" && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskInStatusEnum.Line_InFinish)).ToList(); |
| | | if (GWTask.Count >= 2 && childDeviceCode == "1039" && task.Roadway.Contains("GWSC2")) |
| | | { |
| | | ConsoleHelper.WriteErrorLine($"æçå·ï¼ã{command.ConveyorLineBarcode}ã髿¸©äºå·²åå¨ã{GWTask.Count}ã个任å¡å¤§äº2个任å¡ä¸å¯ä¸å"); |
| | | return; |
| | | } |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | bool sendFlag = SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | if (sendFlag) |
| | | bool sendFlag = SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | if (sendFlag) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (content.Message != "请æ±è¿äºé¢ç¹ï¼è¯·ç¨ååè¯" || content.Message != "æ æ³è·åç®æ å°å") |
| | | { |
| | | WriteInfo(conveyorLine.DeviceName, content.Message); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationManager.stationNGChildCode, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | ConsoleHelper.WriteErrorLine($"ã{conveyorLine.DeviceName}ãæçå·ï¼ã{command.ConveyorLineBarcode}ã请æ±ç¹ä½ï¼ã{childDeviceCode}ãå¼å¸¸ä¿¡æ¯ã{content.Message}ã"); |
| | | WriteInfo(conveyorLine.DeviceName, $"ã{conveyorLine.DeviceName}ãæçå·ï¼ã{command.ConveyorLineBarcode}ã请æ±ç¹ä½ï¼ã{childDeviceCode}ãå¼å¸¸ä¿¡æ¯ã{content.Message}ã"); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (content.Message != "请æ±è¿äºé¢ç¹ï¼è¯·ç¨ååè¯" || content.Message != "æ æ³è·åç®æ å°å") |
| | | { |
| | | WriteInfo(conveyorLine.DeviceName, content.Message); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationManager.stationNGChildCode, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | ConsoleHelper.WriteErrorLine($"ã{conveyorLine.DeviceName}ãæçå·ï¼ã{command.ConveyorLineBarcode}ã请æ±ç¹ä½ï¼ã{childDeviceCode}ãå¼å¸¸ä¿¡æ¯ã{content.Message}ã"); |
| | | WriteInfo(conveyorLine.DeviceName, $"ã{conveyorLine.DeviceName}ãæçå·ï¼ã{command.ConveyorLineBarcode}ã请æ±ç¹ä½ï¼ã{childDeviceCode}ãå¼å¸¸ä¿¡æ¯ã{content.Message}ã"); |
| | | } |
| | | ConsoleHelper.WriteErrorLine($"ã{conveyorLine.DeviceName}ãæçå·ï¼ã{command.ConveyorLineBarcode}ã请æ±ç¹ä½ï¼ã{childDeviceCode}ãå¼å¸¸ä¿¡æ¯ã{content.Message}ã"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteInfo(conveyorLine.DeviceName, $"ã{conveyorLine.DeviceName}ãæçå·ï¼ã{command.ConveyorLineBarcode}ã请æ±ç¹ä½ï¼ã{childDeviceCode}ãå¼å¸¸ä¿¡æ¯ã{ex.Message}ãå¼å¸¸è¡ã{ex.StackTrace}ã"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | let loadingStatus = false |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = 'http://localhost:5000/'; |
| | | // axios.defaults.baseURL = 'http://192.168.20.253:5000/'; |
| | | // axios.defaults.baseURL = 'http://192.168.15.253:5000/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://192.168.15.253:5000/'; |
| | |
| | | { |
| | | path: '/Dt_LocationStatus', |
| | | name: 'Dt_LocationStatus', |
| | | component: () => import('@/views/widesea_wms/basicinfo/LocationStatusChange.vue'), |
| | | component: () => import('@/views/widesea_wms/basicinfo/Dt_LocationStatus.vue'), |
| | | meta: { |
| | | |
| | | } |
| | |
| | | [ |
| | | { "title": "è´§ä½ç¼å·", "field": "locationCode", type: "text" }, |
| | | { "title": "è´§ä½ç¶æ", "field": "locationStatus", "type": "select", dataKey: "LocationState", data: [] }, |
| | | { "title": "å··éç¼å·", "field": "roadWayNO", type: "text" }, |
| | | { "title": "å··éç¼å·", "field": "roadWayNO", type: "text" }, |
| | | { "title": "å¯ç¨ç¶æ", "field": "enalbeStatus", "type": "select", dataKey: "EnalbeStatus", data: [] }, |
| | | |
| | | ], |
| | | [ |
| | | { "title": "è¡", "field": "row", type: "text" }, |
| | |
| | | footer: "Foots", |
| | | cnName: 'è´§ä½ä¿¡æ¯', |
| | | name: '/api', |
| | | url: "/Task/LocationStatus", |
| | | url: "/LocationError/", |
| | | sortName: "id" |
| | | }); |
| | | const editFormFields = ref({ "locationStatus": "" }); |
| | |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/widesea_wms/stock/Dt_OutTime.jsx"; |
| | | import extend from "@/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'id', |
| | | footer: "Foots", |
| | | cnName: 'è¶
æ¶åºåä¿¡æ¯', |
| | | name: 'stock/StockInfoTimeout', |
| | | url: "/StockInfo/", |
| | | cnName: 'åºåä¿¡æ¯', |
| | | name: 'stock/Dt_BillGroupStock', |
| | | url: "/StockInfoTimeout/", |
| | | sortName: "createDate" |
| | | }); |
| | | const editFormFields = ref({ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_IStorageBasicRepository; |
| | | |
| | | public interface ILocationErrorRepository : IRepository<DtLocationInfo> |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using WIDESEA_DTO; |
| | | |
| | | namespace WIDESEA_IStorageBasicService; |
| | | |
| | | public interface ILocationErrorService : IService<DtLocationInfo> |
| | | { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_StorageBasicRepository |
| | | { |
| | | public class LocationErrorRepository : RepositoryBase<DtLocationInfo>, ILocationErrorRepository |
| | | { |
| | | public LocationErrorRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AngleSharp.Dom; |
| | | using Mapster; |
| | | using SqlSugar; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StorageBasicService; |
| | | |
| | | public class LocationErrorService : ServiceBase<DtLocationInfo, ILocationErrorRepository>, ILocationErrorService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | |
| | | public LocationErrorService(ILocationErrorRepository BaseDal,IMapper mapper,IDt_TaskService taskService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | } |
| | | public override PageGridData<DtLocationInfo> GetPageData(PageDataOptions options) |
| | | { |
| | | string wheres = ValidatePageOptions(options); |
| | | //è·åæåºå段 |
| | | Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties); |
| | | List<OrderByModel> orderByModels = new List<OrderByModel>(); |
| | | foreach (var item in orderbyDic) |
| | | { |
| | | OrderByModel orderByModel = new() |
| | | { |
| | | FieldName = item.Key, |
| | | OrderByType = item.Value |
| | | }; |
| | | orderByModels.Add(orderByModel); |
| | | } |
| | | |
| | | |
| | | int totalCount = 0; |
| | | List<SearchParameters> searchParametersList = new List<SearchParameters>(); |
| | | if (!string.IsNullOrEmpty(options.Wheres)) |
| | | { |
| | | try |
| | | { |
| | | searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>(); |
| | | options.Filter = searchParametersList; |
| | | } |
| | | catch { } |
| | | } |
| | | |
| | | var now = DateTime.Now; |
| | | // 使ç¨Subtractæ¹æ³ |
| | | var threeHoursAgo = now.Subtract(TimeSpan.FromHours(3)); |
| | | |
| | | var data = BaseDal.Db.Queryable<DtLocationInfo>() |
| | | .Where(x => x.LocationStatus != 2 && x.LocationStatus != 0) |
| | | .WhereIF(!wheres.IsNullOrEmpty(), wheres) |
| | | .OrderBy(orderByModels) |
| | | .ToPageList(options.Page, options.Rows, ref totalCount); |
| | | return new PageGridData<DtLocationInfo>(totalCount, data); |
| | | } |
| | | } |
| | |
| | | var data = BaseDal.Db.Queryable<DtStockInfo_Hty>() |
| | | .Includes(x => x.StockInfoDetails) |
| | | .Includes(x => x.LocationInfo) |
| | | .Where(x=>x.CreateDate>DateTime.Now.AddMonths(-1)) |
| | | .WhereIF(!wheres.IsNullOrEmpty(), wheres) |
| | | .WhereIF(locationStatus != null, locationStatus) |
| | | .WhereIF(roadwayNo != null, roadwayNo) |
| | |
| | | using Mapster; |
| | | using Masuit.Tools; |
| | | using SixLabors.Fonts.Tables.AdvancedTypographic; |
| | | using SqlSugar; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | |
| | | // æ´è¯¦ç»çå¼å¸¸å¤çï¼å¯ä»¥æ ¹æ®å¼å¸¸ç±»åè®°å½ä¸åçé误æ¥å¿ç |
| | | content.Error(err.Message); |
| | | Console.WriteLine(err.Message); |
| | | LogFactory.GetLog($"请æ±å
¥åºå¼å¸¸").Info(true, $"å¼å¸¸ä¿¡æ¯ã{err.Message}ãå¼å¸¸è¡ã{err.StackTrace}ã"); |
| | | } |
| | | |
| | | return content; |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | // è®°å½å¼å¸¸ä¿¡æ¯å¹¶æåº |
| | | LogFactory.GetLog($"{position}请æ±{productionLine}ä»»å¡").Info(true, $"{position}-{tag}-{areaCode}-{JsonConvert.SerializeObject(areaCodes)}-{productionLine}"); |
| | | // æ ¹æ®æçç±»åæ¥è¯¢åºåä¿¡æ¯ |
| | | DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound |
| | | ? areaCode != "CWSC1" ? await QueryStockInfoForRealTrayAsync(areaCode, areaCodes, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine) |
| | |
| | | // å建åå²ä»»å¡å®ä¾æ¨¡å |
| | | try |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key[0])); |
| | | if (task == null) |
| | | foreach (var item in key) |
| | | { |
| | | return content.Error("æªæ¾å°ä»»å¡ä¿¡æ¯!"); |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key)); |
| | | if (task == null) |
| | | { |
| | | return content.Error("æªæ¾å°ä»»å¡ä¿¡æ¯!"); |
| | | } |
| | | var taskHtyNG = CreateHistoricalTask(task, true); |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0; |
| | | |
| | | // å é¤ä»»å¡æ°æ® |
| | | var isTaskDelete = BaseDal.Delete(task.TaskId); |
| | | } |
| | | var taskHtyNG = CreateHistoricalTask(task, true); |
| | | |
| | | // æ§è¡æ°æ®åºäºå¡ |
| | | |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0; |
| | | |
| | | // å é¤ä»»å¡æ°æ® |
| | | var isTaskDelete = BaseDal.Delete(task.TaskId); |
| | | |
| | | return content.OK("å 餿å!"); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | taskHty.Creater = App.User.UserName != null ? App.User.UserName : "System"; |
| | | } |
| | | taskHty.TaskState = task.TaskType > 199 ? (int)TaskInStatusEnum.InFinish : (int)TaskOutStatusEnum.OutFinish; |
| | | return taskHty; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Masuit.Tools.Models; |
| | | using WIDESEA_DTO; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers; |
| | | |
| | | [Route("api/LocationError")] |
| | | [ApiController] |
| | | public class LocationErrorController : ApiBaseController<ILocationErrorService, DtLocationInfo> |
| | | { |
| | | public LocationErrorController(ILocationErrorService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using WIDESEA_IStorageBasicService; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers; |
| | | |
| | | [Route("api/StockInfoHty")] |
| | | [ApiController] |
| | | public class StockInfoHtyController : ApiBaseController<IStockInfoHtyService, DtStockInfo_Hty> |
| | | { |
| | | public StockInfoHtyController(IStockInfoHtyService service) : base(service) |
| | | { |
| | | } |
| | | } |