111
schangxiang@126.com
2024-11-23 7603e93e19891ec2aff0ad67e555fd55d9175b99
111
已修改5个文件
83 ■■■■■ 文件已修改
CC/iWareCC_ASRS/FormCC.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/2、DataProcess_RobotBuffer_FinishTask.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/1、DataProcess_RobotBuffer_AutoQiTaoOutbound.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/2、DataProcess_RobotBuffer_IssueOutboundTask.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/FormCC.cs
@@ -213,26 +213,25 @@
            // rgvService.StartService();
            //处理【下发中】的出库计划任务
            // new Thread(OutPlanTaskDecompose.HandlerIssuingTask).Start();
            //任务分解线程-出库
            // new Thread(MainTaskDecompose.HandlerMainTaskDecompose).Start();
            new Thread(DataProcess_RobotBuffer_ModeChange.Handler).Start();
            //任务分解线程-组盘入库
            // new Thread(MainTaskDecompose_ZPRK.HandlerMainTaskDecompose_ZPRK).Start();
            new Thread(DataProcess_RobotBuffer_IssueOutboundTask.Handler).Start();
            new Thread(DataProcess_RobotBuffer_AutoQiTaoOutbound.Handler).Start();
            new Thread(DataProcess_RobotBuffer_FinishTaskForOutbound.Handler).Start();
            //自动组盘任务
            new Thread(DataProcess_RobotBuffer_FinishTask.Handler).Start();
            new Thread(DataProcess_BZ01.Handler).Start();
            //重新获取发动机信息
            new Thread(DataProcess_269.Handler).Start();
            //1014库位转运到1020线程
            new Thread(DataProcess_BZ39.Handler).Start();
@@ -1594,15 +1593,13 @@
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound, ckDataProcess_RobotBuffer_AutoQiTaoOutbound);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask, ckEmptySalverTransfer);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_BZ39, ck_DataProcess_BZ39);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_BZ01, ck_AutoIssueInStoreTask);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_269, ck_DataProcess_269);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_Place1014To1020Task, ck_DataProcess_RobotBuffer_IssueOutboundTask);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask, ck_DataProcess_RobotBuffer_IssueOutboundTask);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_OutTaskRetryToMes, checkBox_OutTaskRetryToMes);
        }
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Inbound/2¡¢DataProcess_RobotBuffer_FinishTask.cs
@@ -30,7 +30,7 @@
            LogType logType = LogType.DataProcess_RobotBuffer_FinishTask;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                Thread.Sleep(500);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = string.Empty;
                try
                {
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/1¡¢DataProcess_RobotBuffer_AutoQiTaoOutbound.cs
@@ -43,8 +43,11 @@
                                if (allCount == group.ToList().Count())
                                {
                                    //满足齐套,出库
                                    group.ToList().ForEach(x =>
                                    //注意:排序严格按照 æ¬¡åº è¿›è¡ŒæŽ’序。 ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼
                                    var doList = upiList.Where(x => x.PackageCode == packageCode).OrderBy(x => x.Shelf).ToList();
                                    foreach (var item in doList)
                                    {
                                        var x = group.ToList().Find(b => b.Upi == item.UPI);
                                        x.StockStatus = (int)StockStatusEnum.齐包待出库;
                                        //生成出库任务
@@ -69,7 +72,7 @@
                                            RbTaskTypeEnumName = RbTaskTypeEnum.出库任务.ToString(),
                                            TaskStatus = (int)TaskStatusEnum.新建,
                                            TaskStatusName = TaskStatusEnum.新建.ToString(),
                                            TaskMsg = "入库",
                                            TaskMsg = "出库任务",
                                            CreateTime = DateTime.Now,
@@ -82,7 +85,7 @@
                                        var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB);
                                        place.PlaceStatus = (int)PlaceStatusEnum.锁定;
                                    });
                                    }
                                }
                            }
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/2¡¢DataProcess_RobotBuffer_IssueOutboundTask.cs
@@ -41,17 +41,7 @@
                         * 1、从数据库中判断是否齐套
                         * 2、根据齐套结果,推送给PLC
                         */
                        var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
                        if (obj.R_ReqParseData)
                        {
                            var result = obj.R_ReadCodeResult;
                            if (string.IsNullOrEmpty(result))
                            {
                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()}-请求了解码,但是结果是空的,此次循环结束";
                                continue;
                            }
                            var upiCode = result;
                            var qitaoReault = false;
                            using (WmsDBModel wmsDB = new WmsDBModel())
                            {
                                //要是有已下发的任务,就不要执行
@@ -64,25 +54,19 @@
                                var taskList = wmsDB.wms_rbline_task.Where(x => x.PlaceCode == obj.R_OutboundNumber
                              && x.RbTaskType == (int)RbTaskTypeEnum.出库任务
                            var taskList = wmsDB.wms_rbline_task.Where(x =>
                           x.RbTaskType == (int)RbTaskTypeEnum.出库任务
                              && x.TaskStatus == (int)TaskStatusEnum.新建).OrderBy(x => x.PackageCode).ToList();
                                if (taskList == null)
                                {
                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},根据 R_OutboundNumber:{obj.R_OutboundNumber}没有找到已下发的任务 ";
                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},根据 æ²¡æœ‰æ‰¾åˆ° æ–°å»º çš„任务 ";
                                    continue;
                                }
                                var doTask = taskList.FirstOrDefault();
                                var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
                                if (upiObj == null)
                                {
                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},根据UPI:{upiCode}没有找到对象 ";
                                    continue;
                                }
                                //这里改为 ä¸‹å‘ å‡ºåº“任务
                            //这里下发 å‡ºåº“任务
                                using (StationServiceClient client = new StationServiceClient())
                                {
                                    //首先要清理
@@ -109,9 +93,12 @@
                                    }
                                }
                            doTask.TaskStatus = (int)TaskStatusEnum.已下发;
                            doTask.TaskStatusName = TaskStatusEnum.已下发.ToString();
                                wmsDB.SaveChanges();
                            }
                        }
                    }
                }
                catch (Exception ex)
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -403,20 +403,11 @@
                var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
                var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, true, view_stationObj.W_Outbound_TaskID);
                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, outbound_TaskID, view_stationObj.W_Outbound_TaskID);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ å‡ºåº“任务号 " + true + "失败,返回结果:" + b2.resMsg,
                    msg = string.Format("向Station地址{0} å†™ å‡ºåº“任务号 " + outbound_TaskID + "失败,返回结果:" + b2.resMsg,
                       stationObj.W_Outbound_TaskID);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, true, view_stationObj.W_ReqOut);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ è¯·æ±‚出库 " + true + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_ReqOut);
                    return false;
                }
@@ -428,6 +419,13 @@
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, true, view_stationObj.W_ReqOut);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ è¯·æ±‚出库 " + true + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_ReqOut);
                    return false;
                }
                return true;
            }