admin
13 小时以前 4da743d3d8b1cd3c9c1bd118c74ef1aa297b2a3a
Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs
@@ -18,10 +18,10 @@
namespace WMS.BLL.BllSoServer
{
    public class ExportNoticeDetailServer: DbHelper<BllExportNoticeDetail>,IExportNoticeDetailServer
    public class ExportNoticeDetailServer : DbHelper<BllExportNoticeDetail>, IExportNoticeDetailServer
    {
        private static readonly SqlSugarScope Db = DataContext.Db;
        public ExportNoticeDetailServer():base(Db)
        public ExportNoticeDetailServer() : base(Db)
        {
        }
        public async Task<List<ExportNoticeDetailDto>> GetExportNoticeDetailList(GetExportNoticeDetailVm model, RefAsync<int> count)
@@ -37,7 +37,7 @@
            }
            var data = await GetAllWhereAsync(a => a.SONo == model.SoNo)
                .LeftJoin<SysPackag>((a, b) => a.PackagNo == b.PackagNo)
                .LeftJoin<SysPackag>((a, b) => b.IsDel == "0" && a.PackagNo == b.PackagNo)
                .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id)
                .LeftJoin<SysUserInfor>((a, b, c, d) => a.UpdateUser == d.Id)
                .Select((a, b, c, d) => new ExportNoticeDetailDto()
@@ -78,7 +78,7 @@
        public bool DelExportNoticeDetail(int id, int userId)
        {
            try
            {
            {
                //出库单明细
                var noticeDetail = Db.Queryable<BllExportNoticeDetail>().Where(m => m.IsDel == "0" && m.Id == id).ToList().FirstOrDefault();
                //出库单明细                
@@ -86,7 +86,7 @@
                if (noticeDetail == null)
                {
                    throw  new Exception("未查询到出库单明细信息");
                    throw new Exception("未查询到出库单明细信息");
                }
                if (notice == null)
                {
@@ -134,7 +134,7 @@
                        n = Db.Updateable(notice).ExecuteCommand();
                        j = 1;
                    }
                    }
                    var m = Db.Updateable(sd).UpdateColumns(it => new { it.LockQty }).ExecuteCommand();
                    var i = Db.Updateable(noticeDetail).ExecuteCommand();
@@ -142,7 +142,7 @@
                    //添加操作日志记录
                    var k = new OperationSOServer().AddLogOperationSo("出库作业", "出库单据", notice.SONo, "删除", $"删除了单据号为{notice.SONo}、物料为{noticeDetail.SkuNo}、批次号为{noticeDetail.LotNo}的单据明细信息", userId);
                    if (j>0)
                    if (j > 0)
                    {
                        if (n > 0 && m > 0 && i > 0 && k)
                        {
@@ -152,13 +152,13 @@
                    }
                    else
                    {
                        if ( m > 0 && i > 0 && k)
                        if (m > 0 && i > 0 && k)
                        {
                            Db.CommitTran();
                            return true;
                        }
                    }
                    Db.RollbackTran();
                    return false;
                }
@@ -171,7 +171,7 @@
            }
            catch (Exception e)
            {
                throw new Exception("删除出库单明细失败:"+e.Message);
                throw new Exception("删除出库单明细失败:" + e.Message);
            }
        }