示例#1
0
        public override CheckResult CheckData()
        {
            CheckResult result = base.CheckData();

            bool pinseCheckBool = false;
            bool allCheckBool   = false;

            Invoke(new Action(() =>
            {
                pinseCheckBool = pinseCheck.Checked;
                allCheckBool   = allCheck.Checked;
            }));
            if (allCheckBool)
            {
                if (tagDetailList != null && tagDetailList.Count > 0)
                {
                    TagDetailInfo t = tagDetailList[0];
                    foreach (var v in tagDetailList)
                    {
                        if (v.ZSATNR == t.ZSATNR && v.ZCOLSN == t.ZCOLSN && v.ZSIZTX == t.ZSIZTX)
                        {
                        }
                        else
                        {
                            result.UpdateMessage(@"品色规不唯一");
                            result.InventoryResult = false;

                            break;
                        }
                    }
                }
            }
            if (pinseCheckBool)
            {
                if (tagDetailList != null && tagDetailList.Count > 0)
                {
                    TagDetailInfo t = tagDetailList[0];
                    foreach (var v in tagDetailList)
                    {
                        if (v.ZSATNR == t.ZSATNR && v.ZCOLSN == t.ZCOLSN)
                        {
                        }
                        else
                        {
                            result.UpdateMessage(@"品色不唯一");
                            result.InventoryResult = false;

                            break;
                        }
                    }
                }
            }

            if (result.InventoryResult)
            {
                result.UpdateMessage(Consts.Default.RIGHT);
            }

            return(result);
        }
示例#2
0
        public override CheckResult CheckData()
        {
            //基础检查,出错不上传
            CheckResult result = base.CheckData();

            if (string.IsNullOrEmpty(mCurBoxNo))
            {
                result.UpdateMessage("箱号为空");
                result.InventoryResult = false;
            }
            List <BoxPickTaskMapInfo> jiehuodan = LocalDataService.GetBoxPickTaskMapInfoListByHU(mCurBoxNo);

            if (jiehuodan == null)
            {
                result.UpdateMessage("找不到拣货单:" + mCurBoxNo);
                result.InventoryResult = false;
            }
            if (jiehuodan != null && jiehuodan.Count > 1)
            {
                result.UpdateMessage("箱号对应多个拣货单:" + mCurBoxNo);
                result.InventoryResult = false;
            }
            if (jiehuodan != null && jiehuodan.Count == 1)
            {
                mCurJieHuoDan = SAPDataService.GetJieHuoDan(SysConfig.LGNUM, jiehuodan[0].PICK_TASK);
                if (mCurJieHuoDan.mJieHuo.Count <= 0)
                {
                    result.UpdateMessage("无法获取拣货单信息:" + jiehuodan[0].PICK_TASK);
                    result.InventoryResult = false;
                }
            }

            //基础检查ok
            if (result.InventoryResult)
            {
                //逻辑检查,打印,出错也要上传
                logicCheck(ref result);
            }
            else
            {
                Invoke(new Action(() =>
                {
                    grid.Rows.Add(mCurBoxNo, mCurJieHuoDan.PICK_LIST, "", "", "", "", "", "", "", result.Message);
                }));
            }

            if (result.InventoryResult)
            {
                SetInventoryResult(1);
            }
            else
            {
                //异常口排出
                SetInventoryResult(3);
            }

            return(result);
        }
示例#3
0
        private void logicCheck(ref CheckResult result)
        {
            try
            {
                Dictionary <string, CJianHuoContrastRe> re = contrastEpc();
                bool conOK = isContrastReOK(re);
                if (!conOK)
                {
                    result.InventoryResult = false;
                    result.UpdateMessage("异常");
                }
                else
                {
                    result.UpdateMessage(Consts.Default.RIGHT);
                }
                // add grid
                addGrid(re);
                //print
                if (conOK)
                {
                    PrintHelper.PrintRightTag(getPrintRightData());
                }
                else
                {
                    PrintHelper.PrintErrorTag(getPrintErrorData());
                }
                //save upload
                LocalDataService.SaveJianHuoInfo(mCurBoxNo, mCurJieHuoDan.PICK_LIST, re.Values.ToList());

                CJianHuoUpload uploadData = getUploadData(re);

                CUploadData cu = new CUploadData();
                cu.Guid       = Guid.NewGuid().ToString();
                cu.IsUpload   = 0;
                cu.Data       = uploadData;
                cu.CreateTime = DateTime.Now;
                SqliteDataService.saveToSqlite(cu);

                UploadServer.GetInstance().AddToQueue(cu);
            }
            catch (Exception e)
            {
                Log4netHelper.LogError(e);
            }
        }
示例#4
0
        public override CheckResult CheckData()
        {
            CheckResult result = base.CheckData();

            if (result.InventoryResult)
            {
                result.UpdateMessage("正常");
            }

            return(result);
        }
示例#5
0
        public virtual CheckResult CheckData()
        {
            CheckResult result = new CheckResult();

            if (epcList.Count == 0)
            {
                result.UpdateMessage("未扫描到EPC");
                result.InventoryResult = false;
            }

            return(result);
        }
示例#6
0
        public override CheckResult CheckData()
        {
            CheckResult result = base.CheckData();

            if (string.IsNullOrEmpty(mCurBoxNo))
            {
                result.UpdateMessage(@"未扫描到箱号");
                result.InventoryResult = false;
            }

            bool pinseCheckBool = false;
            bool allCheckBool   = false;

            pinseCheckBool = pinseCheck.Checked;
            allCheckBool   = allCheck.Checked;

            if (allCheckBool)
            {
                if (tagDetailList != null && tagDetailList.Count > 0)
                {
                    TagDetailInfo t = tagDetailList[0];
                    foreach (var v in tagDetailList)
                    {
                        if (v.ZSATNR == t.ZSATNR && v.ZCOLSN == t.ZCOLSN && v.ZSIZTX == t.ZSIZTX)
                        {
                        }
                        else
                        {
                            result.UpdateMessage(@"品色规不唯一");
                            result.InventoryResult = false;

                            break;
                        }
                    }
                }
            }
            if (pinseCheckBool)
            {
                if (tagDetailList != null && tagDetailList.Count > 0)
                {
                    TagDetailInfo t = tagDetailList[0];
                    foreach (var v in tagDetailList)
                    {
                        if (v.ZSATNR == t.ZSATNR && v.ZCOLSN == t.ZCOLSN)
                        {
                        }
                        else
                        {
                            result.UpdateMessage(@"品色不唯一");
                            result.InventoryResult = false;

                            break;
                        }
                    }
                }
            }

            if (result.InventoryResult)
            {
                result.UpdateMessage(Consts.Default.RIGHT);
            }

            return(result);
        }