wangxinhui
2 天以前 6d3ea08855337c0cfcc60df2903d3431611c7097
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -56,12 +56,15 @@
        {
            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
@@ -80,10 +83,10 @@
                    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
                {
@@ -92,7 +95,7 @@
                    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);
@@ -105,6 +108,34 @@
            }
            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>