admin
8 天以前 657a052c5ec133abd43ab397d679304a1a8a61e3
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -195,7 +195,7 @@
            List<DataStockDetail> detail = Db.SqlQueryable<DataStockDetail>(sqlStr2).ToList();
            foreach (var item in detail)
            {
                List<BllBoxInfo> box = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();
                //List<BllBoxInfo> box = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();
                //判断合格状态是否合格
                if (model.IsQualified == "1")
                {
@@ -211,13 +211,18 @@
                    item.InspectStatus = "2"; //2不合格
                }
                Db.Updateable(box).ExecuteCommand();
                //Db.Updateable(box).ExecuteCommand();
                Db.Updateable(item).ExecuteCommand();
            }
            Db.Updateable(arrivalDetail).ExecuteCommand();
            var isquality = Db.Insertable(model).ExecuteCommand();
            //修改库存箱码质检状态
            string uptDataBoxStatusSql = $@"update DataBoxInfo set InspectStatus='1' where IsDel='0' and SkuNo='{model.SkuNo}' and LotNo='{model.LotNo}' and StockDetailId in (select Id from DataStockDetail where IsDel='0' and SkuNo='{model.SkuNo}' and LotNo='{model.LotNo}' and InspectStatus='1') ";
            int uptDataBoxStatus = Db.Ado.ExecuteCommand(uptDataBoxStatusSql);
            return isquality;
        }
        /// <summary>