hao
2025-06-04 d7bf5fce0a442c858d02675a2c71a8af49937ae2
StandardInterface/MES.Service/service/WomcaaManager.cs
@@ -60,7 +60,7 @@
            .IgnoreColumns(true).ExecuteCommand() > 0;
        //批量插入忽略空字段
        var baOrUpdate = db.Insertable(mesWomcabs).PageSize(1)
        var baOrUpdate = db.Insertable(mesWomcabs).PageSize(10)
            .IgnoreColumnsNull()
            .ExecuteCommand() > 0;
@@ -76,6 +76,7 @@
        var insertOrUpdate = db
            .Deleteable<Womcab>().In(decimals)
            .ExecuteCommand() > 0;
        if (update && insertOrUpdate) return true;
        throw new NotImplementedException("更新失败");
@@ -200,7 +201,7 @@
            Typea = dto.TypeA, ///     单据状态
            RkOrg = dto.RK_ORG,           //入库组织
            Rcn=dto.RCN,                 //日产能
            Cglineid=dto.CG_LINE_ID, //采购订单行id
            //沃尔新增
            // WR_F_SCDD_SCTZD = dto.F_SCDD_SCTZD
@@ -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);
        }