yuyou_x
2024-03-15 83d9ed975c0747feaebb9ca7505193f2c8c17897
修改质检想想
3个文件已修改
50 ■■■■■ 已修改文件
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.Entity/DataEntity/DataStockDetail.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -563,16 +563,16 @@
        #region 指定储位
        //指定储位数据源(正常的空储位)
        public List<LocatDto> GetLocateList(string houseNo, string roadwayNo, string row, string column, string layer,
        public List<LocatDto> GetLocateList(string houseNo, string roadwayNo, string row, string column, string layer,
            string locateNo, string BindId, int page, int limit, out int count)
        {
            try
            {
                //获取托盘绑定
                var bindASNDetailNo = Db.Queryable<BllPalletBind>().Where(a => a.IsDel == "0" && a.Status == "0"
                var bindASNDetailNo = Db.Queryable<BllPalletBind>().Where(a => a.IsDel == "0" && a.Status == "0"
                && a.Id == int.Parse(BindId)).Select(a => a.ASNDetailNo).First();
                //获取单据明细
                var noticeDetailSkuNo = Db.Queryable<BllArrivalNoticeDetail>().Where(a => a.Id == bindASNDetailNo
                var noticeDetailSkuNo = Db.Queryable<BllArrivalNoticeDetail>().Where(a => a.Id == bindASNDetailNo
                && a.IsDel == "0").Select(a => a.SkuNo).First();
                //获取物料
                var skuCategoryNo = Db.Queryable<SysMaterials>().Where(a => a.IsDel == "0" && a.SkuNo == noticeDetailSkuNo)
@@ -1632,7 +1632,17 @@
                            }
                            //获取该批次最终质检结果
                            var quality = Db.Queryable<BllQualityInspect>().Where(a => a.IsDel == "0" && a.LotNo == noticeDetail.LotNo).OrderByDescending(a => a.CreateTime).First();
                            BllQualityInspect quality = new BllQualityInspect();
                            //判断是否为退货入库单
                            if (notice.Type == "3")
                            {
                                quality = Db.Queryable<BllQualityInspect>().Where(a => a.IsDel == "0" && a.ASNNo == noticeDetail.ASNNo && a.SkuNo == noticeDetail.SkuNo && a.LotNo == noticeDetail.LotNo).OrderByDescending(a => a.CreateTime).First();
                            }
                            else
                            {
                                quality = Db.Queryable<BllQualityInspect>().Where(a => a.IsDel == "0" && a.SkuNo == noticeDetail.SkuNo && a.LotNo == noticeDetail.LotNo).OrderByDescending(a => a.CreateTime).First();
                            }
                            #region 库存明细
                            var sd = new DataStockDetail()
                            {
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -105,7 +105,7 @@
            {
                throw new Exception("批次号不可为空,请核查!");
            }
            int isTui = 0;
            //int isTui = 0;
            //验证入库单号是否为空
            if (!string.IsNullOrEmpty(model.ASNNo))
            {
@@ -122,24 +122,24 @@
                {
                    throw new Exception("输入的批次或物料信息与入库单据不符,请核查!");
                }
                isTui = 1;
                //isTui = 1;
            }
            //查找质检信息中是否存在同批次质检录入记录
            BllQualityInspect quality = Db.Queryable<BllQualityInspect>().First(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo);
            //BllQualityInspect quality = Db.Queryable<BllQualityInspect>().First(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo);
            if (quality != null)
            {
                //判断是否为退货入库单
                if (isTui == 1)
                {
                    if (quality.ASNNo == model.ASNNo)
                    {
                        throw new Exception("当前退货入库单已创建质检信息,请勿重复创建!");
                    }
                }
                throw new Exception("当前批次已进行质检,请核查!");
            }
            //if (quality != null)
            //{
                ////判断是否为退货入库单
                //if (isTui == 1)
                //{
                //    if (quality.ASNNo == model.ASNNo)
                //    {
                //        throw new Exception("当前退货入库单已创建质检信息,请勿重复创建!");
                //    }
                //}
            //    throw new Exception("当前物料和批次已进行质检,请核查!");
            //}
            ////查找同批次 同单据 入库单信息、
            //BllArrivalNoticeDetail arrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.ASNNo == model.ASNNo && m.LotNo == model.LotNo);
Wms/WMS.Entity/DataEntity/DataStockDetail.cs
@@ -216,7 +216,7 @@
        /// <summary>
        /// Desc:质量状态
        /// Default:
        /// Default: 1:合格 2:不合格
        /// Nullable:True
        /// </summary>           
        public string InspectStatus {get;set;}