| | |
| | | { |
| | | return Service.RollbackTaskStatusToLast(taskNum); |
| | | } |
| | | private static object lock_containerFlow = new object(); |
| | | /// <summary> |
| | | /// 容卿µå¨æ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("ContainerFlow"), AllowAnonymous] |
| | | public WebResponseContent ContainerFlow([FromBody] ContainerFlowDTO containerFlowDTO) |
| | | { |
| | | lock (lock_containerFlow) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | |
| | | if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"ä¼ å
¥æç®±ç {containerFlowDTO.ContainerCode}ï¼è¾éæç®±ç {PickBarCode}æ°æ®é误"); |
| | | if (containerFlowDTO.Direction == "100") |
| | | { |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode); |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode); |
| | | if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | } |
| | | commonConveyorLine.Communicator.Write("22", (short)(containerFlowDTO.Direction == "100" ? 256 : 512)); |
| | | commonConveyorLine.Communicator.Write("22", (containerFlowDTO.Direction == "100" ? new byte[] { 1, 0 } : new byte[] { 2, 0 })); |
| | | } |
| | | else |
| | | { |
| | |
| | | if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"ä¼ å
¥æç®±ç {containerFlowDTO.ContainerCode}ï¼è¾éæç®±ç {PickBarCode}æ°æ®é误"); |
| | | if (containerFlowDTO.Direction == "100") |
| | | { |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode); |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode); |
| | | if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | } |
| | | commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode); |
| | |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æç§å¢åå§å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("InitLight"), AllowAnonymous] |
| | | public WebResponseContent InitLight() |
| | | { |
| | | return Service.InitLight(); |
| | | } |
| | | /// <summary> |
| | | /// æç§å¢ç»æä½ä¸ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("EndLight"), AllowAnonymous] |
| | | public WebResponseContent EndLight() |
| | | { |
| | | return Service.EndLight(); |
| | | } |
| | | /// <summary> |
| | | /// æç§å¢äº®ç¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("SendLight"), AllowAnonymous] |
| | | public WebResponseContent SendLight([FromBody] TaskSendLight taskSendLight) |
| | | { |
| | | return Service.SendLight(taskSendLight); |
| | | } |
| | | /// <summary> |
| | | /// ç³è¯·å
¥åº |
| | | /// </summary> |