| | |
| | | return content.Error("æªæ¾å°ä»»å¡ä¿¡æ¯!"); |
| | | } |
| | | |
| | | if (task.TaskState != (int)TaskInStatusEnum.InNew && task.TaskState != (int)TaskOutStatusEnum.OutNew && task.TaskState != (int)TaskStatus.Created) |
| | | if (task.TaskState != (int)TaskInStatusEnum.InNew && task.TaskState != (int)TaskOutStatusEnum.OutNew && task.TaskState != (int)TaskStatus.Created && task.TaskState != (int)TaskInStatusEnum.InAbnormalCompletion && task.TaskState != (int)TaskOutStatusEnum.OutAbnormalCompletion) |
| | | { |
| | | return content.Error("ä»»å¡ä¸å¤äºæ°å»ºç¶æ,ç¦æ¢å é¤!"); |
| | | } |
| | |
| | | // æ ¹æ®ä»»å¡ç±»åè°ç¨ç¸åºç宿任塿¹æ³ |
| | | |
| | | // éªè¯åºåæ¯å¦åå¨ |
| | | var stock = _WheelsStockRepository.QueryFirstNavAsync(x => x.Wheels_Num.Contains(task.PalletCode) && x.Wheels_Location == task.SourceAddress); |
| | | var ZdpStock = _ZdpStockRepository.QueryFirstNavAsync(x => x.Zdp_code == task.PalletCode && x.Zdp_Location == task.SourceAddress); |
| | | bool res = false; |
| | | switch (task.TaskType) |
| | | if(task.TaskState== (int)TaskInStatusEnum.InAbnormalCompletion || task.TaskState == (int)TaskOutStatusEnum.OutAbnormalCompletion) |
| | | { |
| | | case (int)TaskInboundTypeEnum.Inbound: |
| | | case (int)TaskInboundTypeEnum.InWheels: |
| | | case (int)TaskInboundTypeEnum.InBrake: |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡", ""); |
| | | res = SellectLocationInfo(task,1); |
| | | break; |
| | | var taskHtyNG2 = CreateHistoricalTask(task, true); |
| | | |
| | | case (int)TaskOutboundTypeEnum.Outbound: |
| | | case (int)TaskOutboundTypeEnum.OutWheels: |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåºä»»å¡", ""); |
| | | res = SellectLocationInfo(task,2); |
| | | break; |
| | | //if (task.TaskState == (int)TaskInStatusEnum.InNew || task.TaskState == (int)TaskOutStatusEnum.OutNew) |
| | | //{ |
| | | // //if(task.TaskType == ) |
| | | //} |
| | | |
| | | case (int)TaskOutboundTypeEnum.OutBrake: |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å¶å¨çåºåºä»»å¡", ""); |
| | | res = SellectLocationInfo(task,3); |
| | | break; |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd2 = _task_HtyRepository.AddData(taskHtyNG2) > 0; |
| | | |
| | | case (int)TaskRelocationTypeEnum.Relocation: |
| | | if (stock != null) |
| | | { |
| | | res = SellectLocationInfo(task,4); |
| | | } |
| | | else |
| | | { |
| | | res = SellectLocationInfo(task,5); |
| | | } |
| | | break; |
| | | // å é¤ä»»å¡æ°æ® |
| | | var isTaskDelete2 = BaseDal.Delete(task.TaskId); |
| | | |
| | | default: |
| | | return content.Error("ä»»å¡ç±»åä¸åå¨"); |
| | | return content.OK("å 餿å!"); |
| | | } |
| | | |
| | | if (!res) |
| | | else |
| | | { |
| | | return content.Error("卿§è¡ä»»å¡åç±»çæ¶ååºç°é误ï¼"); |
| | | var stock = _WheelsStockRepository.QueryFirstNavAsync(x => x.Wheels_Num.Contains(task.PalletCode) && x.Wheels_Location == task.SourceAddress); |
| | | var ZdpStock = _ZdpStockRepository.QueryFirstNavAsync(x => x.Zdp_code == task.PalletCode && x.Zdp_Location == task.SourceAddress); |
| | | bool res = false; |
| | | switch (task.TaskType) |
| | | { |
| | | case (int)TaskInboundTypeEnum.Inbound: |
| | | case (int)TaskInboundTypeEnum.InWheels: |
| | | case (int)TaskInboundTypeEnum.InBrake: |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡", ""); |
| | | res = SellectLocationInfo(task, 1); |
| | | break; |
| | | |
| | | case (int)TaskOutboundTypeEnum.Outbound: |
| | | case (int)TaskOutboundTypeEnum.OutWheels: |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåºä»»å¡", ""); |
| | | res = SellectLocationInfo(task, 2); |
| | | break; |
| | | |
| | | case (int)TaskOutboundTypeEnum.OutBrake: |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å¶å¨çåºåºä»»å¡", ""); |
| | | res = SellectLocationInfo(task, 3); |
| | | break; |
| | | |
| | | case (int)TaskRelocationTypeEnum.Relocation: |
| | | if (stock != null) |
| | | { |
| | | res = SellectLocationInfo(task, 4); |
| | | } |
| | | else |
| | | { |
| | | res = SellectLocationInfo(task, 5); |
| | | } |
| | | break; |
| | | |
| | | default: |
| | | return content.Error("ä»»å¡ç±»åä¸åå¨"); |
| | | } |
| | | |
| | | if (!res) |
| | | { |
| | | return content.Error("卿§è¡ä»»å¡åç±»çæ¶ååºç°é误ï¼"); |
| | | } |
| | | } |
| | | |
| | | |
| | | var taskHtyNG = CreateHistoricalTask(task, true); |
| | | |