xwt
2025-05-22 cc88a464d5f1d8d9f00f4eae04f63ce54ecc077d
StandardInterface/MES.Service/service/WomcaaManager.cs
@@ -77,6 +77,7 @@
            .Deleteable<Womcab>().In(decimals)
            .ExecuteCommand() > 0;
        if (update && insertOrUpdate) return true;
        throw new NotImplementedException("更新失败");
    }
@@ -237,6 +238,7 @@
                Lot = dto.FLot,                               //批号
                DepotCode = dto.FStockID,                     //仓库
                IssueType = dto.FIssueType,                   //发料方式
                Cab008 = dto.GY,            //工艺
                Cab009 = dto.FUnitID,                          //单位
                SupplyType = dto.FSupplyType,                  //供应类型
                Cab012 = Convert.ToDecimal(dto.FStdQty),        // 标准用量
@@ -264,8 +266,12 @@
            var entity = Db.Queryable<Womcab>()
                .Where(s => s.Erpid == womcab.Erpid).Single();
            if (entity != null) womcab.Id = entity.Id;
            if (entity != null)
            {
                // 删除已有的 Erpid 相关的 Womcab 数据
              //  Db.Deleteable<Womcab>().Where(s => s.Erpid == womcab.Erpid).ExecuteCommand();
                womcab.Id = entity.Id;
            }
            womcabList.Add(womcab);
        }