| | |
| | | throw new Exception(); |
| | | } |
| | | |
| | | |
| | | //todo ä¼å 妿ªæ¥è¯¢å°ä»»å¡åå¤ç |
| | | //if (content.Data != null) |
| | | //{ |
| | |
| | | { |
| | | if(task.NextAddress == task.TargetAddress) |
| | | { |
| | | int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskOutStatusEnum>(); |
| | | task.TaskState = nextStatus; |
| | | task.CurrentAddress = task.NextAddress; |
| | | task.NextAddress = task.NextAddress; |
| | | task.ModifyDate = DateTime.Now; |
| | | task.Modifier = "System"; |
| | | int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskOutStatusEnum>(); |
| | | |
| | | task.TaskState = nextStatus; |
| | | Dt_Task_Hty task_Hty = _mapper.Map<Dt_Task_Hty>(task); |
| | | task_Hty.TaskId = 0; |
| | | //task_Hty.CarType = task.CarType; |
| | | task_Hty.PVI = task.PVI; |
| | | BaseDal.DeleteData(task); |
| | | _taskHtyRepository.AddData(task_Hty); |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | var routers = _routerService.QueryNextRoutes(task.NextAddress, task.TargetAddress); |
| | | if (!routers.Any()) return WebResponseContent.Instance.Error($"æªæ¾å°è®¾å¤è·¯ç±ä¿¡æ¯"); |
| | | |
| | |
| | | _stationManagerRepository = stationManagerRepository; |
| | | } |
| | | |
| | | static Dictionary<string, string> TCRoadWay = new Dictionary<string, string>() |
| | | { |
| | | { "TC05", "SC02-SC04" }, |
| | | { "TC06", "SC06-SC08" }, |
| | | }; |
| | | //static Dictionary<string, string> TCRoadWay = new Dictionary<string, string>() |
| | | //{ |
| | | // { "TC05", "SC02-SC04" }, |
| | | // { "TC06", "SC06-SC08" }, |
| | | //}; |
| | | |
| | | public async Task Execute(IJobExecutionContext context) |
| | | { |
| | |
| | | onClick: function () { |
| | | this.printClick() |
| | | } |
| | | },{ |
| | | }, { |
| | | name: 'ä»»å¡å®æ', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | |
| | | // color: '#529b2e', |
| | | value: 'TaskHandComplete', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | },{ |
| | | }, { |
| | | name: 'ç´æ¥åºåº', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | |
| | | // color: '#529b2e', |
| | | value: 'OutBound', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | },{ |
| | | }, { |
| | | name: 'åå§ååºä½', |
| | | type: 'primary', |
| | | // color: '#529b2e', |
| | | value: 'initializeLocation', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | |
| | | },{ |
| | | |
| | | }, { |
| | | name: 'è¡¥å½æ°æ®', |
| | | type: 'primary', |
| | | // color: '#529b2e', |
| | | value: 'SupplementationData', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | },{ |
| | | }, { |
| | | name: 'æå®åºåº', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | |
| | | // color: '#529b2e', |
| | | value: 'ManualOutBound', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | } |
| | | ,{ |
| | | , { |
| | | name: 'å¯ç¨', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | |
| | | // color: '#529b2e', |
| | | value: 'EnableLocation', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | },{ |
| | | }, { |
| | | name: 'ç¦ç¨', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | |
| | | // color: '#529b2e', |
| | | value: 'DisableLocation', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | }, |
| | | { |
| | |
| | | // color: '#529b2e', |
| | | value: 'Boxing', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | } |
| | | , |
| | |
| | | // color: '#529b2e', |
| | | value: 'RequestIn', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | },{ |
| | | }, { |
| | | name: '确认任å¡', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | |
| | | // color: '#529b2e', |
| | | value: 'confirmTask', |
| | | onClick: function () { |
| | | |
| | | |
| | | } |
| | | } |
| | | , { |
| | | name: 'éå®', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | | // plain: true, |
| | | // color: '#529b2e', |
| | | value: 'stockLock', |
| | | onClick: function () { |
| | | |
| | | } |
| | | } |
| | | , { |
| | | name: 'è§£é', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | | // plain: true, |
| | | // color: '#529b2e', |
| | | value: 'stockUnLock', |
| | | onClick: function () { |
| | | |
| | | } |
| | | } |
| | | ] |
| | |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | // åºåéå® |
| | | var stockLock = this.buttons.find(x => x.value == "stockLock"); |
| | | if (stockLock != null) { |
| | | stockLock.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) { |
| | | return this.$error("è¯·éæ©æ°æ®!"); |
| | | } |
| | | let ids = rows.map(x => { |
| | | return x.id; |
| | | }) |
| | | this.http.post(`/api/VV_StockInfo/stockLock`, ids, "åºåéå®ä¸...").then((result) => { |
| | | if (result.status) { |
| | | this.$Message.success(result.message); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(result.message); |
| | | this.refresh(); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }; |
| | | |
| | | // åºåè§£é |
| | | var stockUnLock = this.buttons.find(x => x.value == "stockUnLock"); |
| | | if (stockUnLock != null) { |
| | | stockUnLock.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) { |
| | | return this.$error("è¯·éæ©æ°æ®!"); |
| | | } |
| | | let ids = rows.map(x => { |
| | | return x.id; |
| | | }) |
| | | this.http.post(`/api/VV_StockInfo/stockUnLock`, ids, "åºåè§£éä¸...").then((result) => { |
| | | if (result.status) { |
| | | this.$Message.success(result.message); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(result.message); |
| | | this.refresh(); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }; |
| | | |
| | | |
| | | // this.columns.forEach((column) => { |
| | | // if (column.field == 'materielName') { |
| | | // column.formatter = (row) => { |
| | |
| | | |
| | | public interface IVV_StockInfoService : IService<VV_StockInfo> |
| | | { |
| | | WebResponseContent stockLock(object[] keys); |
| | | |
| | | WebResponseContent stockUnLock(object[] keys); |
| | | } |
| | |
| | | public int TaskStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿çç¶æ |
| | | /// ä¿çç¶æ 0-ä¸ä¿ç 1-ä¿ç |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿çç¶æ")] |
| | | [ExporterHeader(DisplayName = "ä¿çç¶æ")] |
| | |
| | | var assemblyOrderInfo = _assemblyOrderInfoRepository.QueryFirst(x => x.workOrderNo == item.workOrderNo && x.orderType == item.workOrderType); |
| | | if (assemblyOrderInfo == null) throw new Exception($"æå¨é车失败:æªç¥æ»è£
å·¥åå·{item.workOrderNo}"); |
| | | |
| | | Dt_PalletStockInfo carinfo = null; |
| | | //Dt_PalletStockInfo carinfo = null; |
| | | VV_StockInfo OutStock = new VV_StockInfo(); |
| | | Dt_CarBodyInfo carbodyinfo = null; |
| | | //Dt_CarBodyInfo carbodyinfo = null; |
| | | if (!string.IsNullOrEmpty(item.pvi)) |
| | | { |
| | | // carinfo = _palletStockInfoRepository.QueryFirst(x => x.PVI == item.pvi && x.pbMaterial == item.pbMaterial); |
| | | //carbodyinfo = _carBodyRepository.QueryFirst(x => x.pbMaterial == item.pbMaterial && x.PVI == item.pvi); |
| | | OutStock = _VVStockInfoRepository.QueryFirst(X => X.PVI == item.pvi && X.pbMaterial == item.pbMaterial); |
| | | OutStock = _VVStockInfoRepository.QueryFirst(x => x.PVI == item.pvi && x.pbMaterial == item.pbMaterial && x.StockStatus == 0 && x.LockOrder == 0 && x.StayStatus == 0); |
| | | if (OutStock == null) |
| | | { |
| | | throw new Exception($"æªæ¾å°æå®PVI车身信æ¯{item.pvi}"); |
| | |
| | | { |
| | | //carinfo = _palletStockInfoRepository.QueryData(x => x.pbMaterial == item.pbMaterial).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | //carbodyinfo = _carBodyRepository.QueryData(x => x.pbMaterial == item.pbMaterial && x.BodyStatus == 0).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | OutStock = _VVStockInfoRepository.QueryData(x => x.pbMaterial == item.pbMaterial && x.StockStatus == 0 && x.LockOrder == 0 && x.workOrderType == item.workOrderType).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | OutStock = _VVStockInfoRepository.QueryData(x => x.pbMaterial == item.pbMaterial && x.StockStatus == 0 && x.LockOrder == 0 && x.StayStatus == 0 && x.workOrderType == item.workOrderType).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | } |
| | | |
| | | if (OutStock == null) |
| | |
| | | foreach (var item in maxGroup) |
| | | { |
| | | var number = _taskRepository.QueryData(x => x.TargetAddress == item.Key).Count(); |
| | | if (item.Count() - number <= 0) |
| | | { |
| | | continue; |
| | | } |
| | | result.Add(item.Key, item.Count() - number); |
| | | } |
| | | |
| | |
| | | TaskNum = _taskRepository.GetTaskNo().Result, |
| | | Creater = "Systeam", |
| | | PVI = json.PVI, |
| | | |
| | | CarType = carInfo.CarType |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | |
| | | |
| | | public class VV_StockInfoService : ServiceBase<VV_StockInfo, IVV_StockInfoRepository>, IVV_StockInfoService |
| | | { |
| | | public VV_StockInfoService(IVV_StockInfoRepository BaseDal) : base(BaseDal) |
| | | private readonly IDt_PalletStockInfoRepository _repository; |
| | | public VV_StockInfoService(IVV_StockInfoRepository BaseDal, IDt_PalletStockInfoRepository repository) : base(BaseDal) |
| | | { |
| | | _repository = repository; |
| | | } |
| | | |
| | | public WebResponseContent stockLock(object[] keys) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | foreach (var item in keys) |
| | | { |
| | | var stock = _repository.QueryFirst(x => x.Id == Convert.ToInt32(item)); |
| | | if (stock.LockOrder != 1){ |
| | | stock.StockStatus = 1; |
| | | _repository.UpdateData(stock); |
| | | } |
| | | |
| | | } |
| | | return content.OK("é宿å!"); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return content.Error(e.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | public WebResponseContent stockUnLock(object[] keys) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | foreach (var item in keys) |
| | | { |
| | | var stock = _repository.QueryFirst(x => x.Id == Convert.ToInt32(item)); |
| | | stock.StockStatus = 0; |
| | | _repository.UpdateData(stock); |
| | | |
| | | } |
| | | return content.OK("è§£éæå!"); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return content.Error(e.Message); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | // å建并添å ä»»å¡å°æ°æ®åº |
| | | hasTask = new Dt_Task |
| | | { |
| | | Grade = 1, |
| | | Grade = 3, |
| | | Roadway = Outstation.Roadway, |
| | | TargetAddress = "RB043", |
| | | Dispatchertime = DateTime.Now, |
| | |
| | | { |
| | | //æ¶è£
ä¸ç产 å忢æå¨åºåº |
| | | var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == "2"); |
| | | if (area.AreaStatus != 1l) { return Task.CompletedTask; } |
| | | if (area.AreaStatus != 1) { return Task.CompletedTask; } |
| | | |
| | | var stockInfo = _palletStockInfoRepository.Db.Queryable<Dt_PalletStockInfo>() |
| | | //.Where(x => x.LockStatue == 0) |
| | | .Includes(x => x.CarBodyInfo) |
| | | .Where(x => x.CarBodyInfo.CarType == 1 && x.TaskStatus == 0) |
| | | .Where(x => x.CarBodyInfo.CarType == 1 && x.TaskStatus == 0 && x.LockOrder == 0 && x.StayStatus == 0) |
| | | .OrderBy(x => x.CreateDate) // æåº |
| | | .ToList(); // è·å第ä¸ä¸ªå
ç´ |
| | | |
| | |
| | | var location = _locationRepository.QueryFirst(x => x.LocationCode == stock.LocationCode); |
| | | location.LocationStatus = (int)LocationEnum.InStockDisable; |
| | | lockStock.TaskStatus = 1; |
| | | if (stationLists == null || stationLists.Count == 0) throw new Exception("åºåºç«å°æªé
ç½®ææªå¯ç¨"); |
| | | if (!stationLists.Any()) throw new Exception("åºåºç«å°æªé
ç½®ææªå¯ç¨"); |
| | | |
| | | Dt_StationManager Outstation = null; |
| | | |
| | |
| | | // å建并添å ä»»å¡å°æ°æ®åº |
| | | hasTask = new Dt_Task |
| | | { |
| | | Grade = 1, |
| | | Grade = 3, |
| | | Roadway = Outstation.Roadway, |
| | | TargetAddress = Outstation.stationChildCode, |
| | | Dispatchertime = DateTime.Now, |
| | |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// åºåéå® |
| | | /// </summary> |
| | | /// <param name="keys"></param> |
| | | /// <returns></returns> |
| | | [HttpPost,HttpGet,Route("stockLock"),AllowAnonymous] |
| | | public WebResponseContent stockLock([FromBody]object[] keys) |
| | | { |
| | | return Service.stockLock(keys); |
| | | } |
| | | /// <summary> |
| | | /// åºåè§£é |
| | | /// </summary> |
| | | /// <param name="keys"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("stockUnLock"), AllowAnonymous] |
| | | public WebResponseContent stockUnLock([FromBody] object[] keys) |
| | | { |
| | | return Service.stockUnLock(keys); |
| | | } |
| | | |
| | | } |