diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs
index 35516af2..6d775ed9 100644
--- a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs
@@ -3222,8 +3222,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
Floor4DMJ2MJXtimer = new Timer(Floor4DMJ2MJX, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
Floor4MJX2MJCtimer = new Timer(Floor4MJX2MJC, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
- // 需求变更弃用
- //Floor4DMC2CPKtimer = new Timer(Floor4DMC2CPK, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
+ Floor4DMC2CPKtimer = new Timer(Floor4DMC2CPK, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
F2KTPsupplementtimer = new Timer(F2KTPsupplement, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
YCLInternalTransfertimer = new Timer(YCLInternalTransfer, null, TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(185));
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/FinishproductOutstockSortInput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/FinishproductOutstockSortInput.cs
index 43cf8a79..67daeb38 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/FinishproductOutstockSortInput.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/FinishproductOutstockSortInput.cs
@@ -9,5 +9,15 @@
/// 分拣任务id
///
public string? source_id { get; set; }
+
+ ///
+ /// 转移托盘
+ ///
+ public int? change_carry { get; set; }
+
+ ///
+ /// 新托盘
+ ///
+ public string? new_carrycode { get; set; }
}
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Queries/OutStockStrategyQuery.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Queries/OutStockStrategyQuery.cs
index 61fb4bf2..f8435da9 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Queries/OutStockStrategyQuery.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Queries/OutStockStrategyQuery.cs
@@ -55,6 +55,11 @@ namespace Tnb.WarehouseMgr.Entities.Dto
// 策略编号
public string PolicyCode { get; set; }
+ ///
+ /// 过滤质检结果
+ ///
+ public List qcres_list { get; set; }
+
public ISqlSugarClient dbConn { get; set; } = null;
}
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs
index 836e4155..5a0eb7fe 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs
@@ -130,4 +130,9 @@ public partial class WmsCarryCode : BaseEntity, IWmsCarryEntity
/// 辅助属性(小批号)
///
public string? auxprop_xph { get; set; }
+
+ ///
+ /// 质检结果
+ ///
+ public string? qc_res { get; set; }
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryStockReportH.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryStockReportH.cs
index b9f7fcf5..f938dab5 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryStockReportH.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryStockReportH.cs
@@ -129,6 +129,20 @@ public partial class WmsCarryStockReport
/// 绑定时间
///
public string? bind_time { get; set; }
+ ///
+ /// 质检结果
+ ///
+ public string qc_res { get; set; } = string.Empty;
+
+ ///
+ /// 辅助属性(供应商)
+ ///
+ public string? auxprop_gys { get; set; } = string.Empty;
+
+ ///
+ /// 辅助属性(小批号)
+ ///
+ public string? auxprop_xph { get; set; } = string.Empty;
}
@@ -273,6 +287,21 @@ public partial class WmsCarryStockReportCode
///
public string? bind_time { get; set; }
+ ///
+ /// 辅助属性(供应商)
+ ///
+ public string? auxprop_gys { get; set; }
+
+ ///
+ /// 辅助属性(小批号)
+ ///
+ public string? auxprop_xph { get; set; }
+
+ ///
+ /// 质检结果
+ ///
+ public string? qc_res { get; set; }
+
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsOutsourceD.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsOutsourceD.cs
index 0badc11a..a1a61d45 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsOutsourceD.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsOutsourceD.cs
@@ -169,6 +169,11 @@ public partial class WmsOutsourceD : BaseEntity
///
public int? gift { get; set; }
+ ///
+ /// 本次收货数量
+ ///
+ public decimal? outsource_arriveqty { get; set; }
+
public string erp_outsource_order_d_pk { get; set; }
public string erp_outsource_order_d_lineno { get; set; }
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsStockReportH.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsStockReportH.cs
index 3fd95b23..b95a1e28 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsStockReportH.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsStockReportH.cs
@@ -75,6 +75,20 @@ public partial class WmsStockReportH : BaseEntity
///
public string code_batch { get; set; } = string.Empty;
+ ///
+ /// 质检结果
+ ///
+ public string qc_res { get; set; } = string.Empty;
+
+ ///
+ /// 辅助属性(供应商)
+ ///
+ public string? auxprop_gys { get; set; } = string.Empty;
+
+ ///
+ /// 辅助属性(小批号)
+ ///
+ public string? auxprop_xph { get; set; } = string.Empty;
/////
///// 现有库存
/////
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
index 816edd99..dff11fea 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
@@ -577,7 +577,8 @@ namespace Tnb.WarehouseMgr
.AndIF(!string.IsNullOrEmpty(input.container_no), (a, b, c) => b.container_no == input.container_no)
.AndIF(!string.IsNullOrEmpty(input.carrystd_id), (a, b, c) => a.carrystd_id == input.carrystd_id)
.AndIF(input.AvoidBusyPassage, (a, b, c) => !busyPassages.Contains(c.passage))
- .AndIF(!string.IsNullOrEmpty(input.Region_id), (a, b, c) => c.region_id == input.Region_id);
+ .AndIF(!string.IsNullOrEmpty(input.Region_id), (a, b, c) => c.region_id == input.Region_id)
+ .AndIF(input.qcres_list != null, (a, b, c) => input.qcres_list.Contains(b.qc_res));
if (input.filter_carry_status)
{
@@ -605,7 +606,6 @@ namespace Tnb.WarehouseMgr
.Select()
.ToListAsync();
-
items = items.DistinctBy(r => r.id).ToList();
return input.Size > 0 ? items.Take(input.Size).ToList() : items;
}
@@ -4431,8 +4431,8 @@ namespace Tnb.WarehouseMgr
material_id = input.material_id,
code_batch = input.code_batch,
Size = 100,
- Region_id = WmsWareHouseConst.REGION_Purchase_ID,
- PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK
+ PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK,
+ qcres_list = new List() { "vergeOk", "ok" }
};
List items = await OutStockStrategy(outStockStrategyInput);
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs
index 7955f22e..591cc137 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs
@@ -64,7 +64,7 @@ namespace Tnb.WarehouseMgr
.WhereIF(!string.IsNullOrEmpty(carry_code), (a, b, c, d) => b.carry_code.Contains(carry_code))
.WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e, f) => f.code.Contains(material_code))
.WhereIF(!string.IsNullOrEmpty(code_batch), (a, b, c, d, e, f) => e.code_batch.Contains(code_batch))
- .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f) => f.container_no.Contains(container_no))
+ .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f) => f.material_standard.Contains(container_no))
.OrderByDescending((a, b, c, d, e, f) => b.carry_code)
.Select((a, b, c, d, e, f) => new WmsCarryStockReport
{
@@ -88,7 +88,10 @@ namespace Tnb.WarehouseMgr
container_no = f.material_standard,
unit = e.unit_id,
creator = e.create_id,
- bind_time = e.create_time != null ? e.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""
+ bind_time = e.create_time != null ? e.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
+ qc_res = SqlFunc.IF(e.qc_res.Equals("await") || string.IsNullOrEmpty(e.qc_res)).Return("待检").ElseIF(e.qc_res.Equals("vergeOk")).Return("让步接收").ElseIF(e.qc_res.Equals("ok")).Return("合格").ElseIF(e.qc_res.Equals("no")).Return("不合格").End(""),
+ auxprop_gys = e.auxprop_gys,
+ auxprop_xph = e.auxprop_xph,
})
.OrderBy((a) => a.location_code)
.ToListAsync();
@@ -107,7 +110,7 @@ namespace Tnb.WarehouseMgr
.WhereIF(!string.IsNullOrEmpty(carry_code), (a, b, c, d, e, f, g, h) => b.carry_code.Contains(carry_code) || h.carry_code.Contains(carry_code))
.WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e, f, g) => g.code.Contains(material_code))
.WhereIF(!string.IsNullOrEmpty(code_batch), (a, b, c, d, e, f, g) => f.code_batch.Contains(code_batch))
- .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f, g) => g.container_no.Contains(container_no))
+ .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f, g) => g.material_standard.Contains(container_no))
.Select((a, b, c, d, e, f, g, h) => new WmsCarryStockReport
{
warehouse_name = c.whname,
@@ -132,7 +135,10 @@ namespace Tnb.WarehouseMgr
container_no = g.material_standard,
unit = f.unit_id,
creator = f.create_id,
- bind_time = f.create_time != null ? f.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""
+ bind_time = f.create_time != null ? f.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
+ qc_res = SqlFunc.IF(f.qc_res.Equals("await") || string.IsNullOrEmpty(f.qc_res)).Return("待检").ElseIF(f.qc_res.Equals("vergeOk")).Return("让步接收").ElseIF(f.qc_res.Equals("ok")).Return("合格").ElseIF(f.qc_res.Equals("no")).Return("不合格").End(""),
+ auxprop_gys = f.auxprop_gys,
+ auxprop_xph = f.auxprop_xph,
})
.OrderBy((a) => a.location_code)
.ToListAsync();
@@ -170,6 +176,9 @@ namespace Tnb.WarehouseMgr
wmsCarryStockReportCode.unit = x.unit;
wmsCarryStockReportCode.material_specification = x.material_specification;
wmsCarryStockReportCode.container_no = x.container_no;
+ wmsCarryStockReportCode.qc_res = x.qc_res;
+ wmsCarryStockReportCode.auxprop_gys = x.auxprop_gys;
+ wmsCarryStockReportCode.auxprop_xph = x.auxprop_xph;
//wmsCarryStockReportCode.创建用户 = x.操作用户;
wmsCarryStockReportCode.bind_time = x.bind_time;
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
index 7d0a8923..125a7ac9 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
@@ -248,7 +248,8 @@ namespace Tnb.WarehouseMgr
material_id = input.material_id,
code_batch = input.code_batch,
Size = input.palletCount,
- PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK
+ PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK,
+ qcres_list = new List() { "vergeOk", "ok" }
};
List items = await _wareHouseService.OutStockStrategy(outStockStrategyInput);
@@ -362,7 +363,8 @@ namespace Tnb.WarehouseMgr
material_id = wmsMaterialTransferD.material_id,
code_batch = input.code_batch,
Size = input.palletCount,
- PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK
+ PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK,
+ qcres_list = new List() { "vergeOk", "ok" }
};
List items = await _wareHouseService.OutStockStrategy(outStockStrategyInput);
@@ -2367,6 +2369,13 @@ namespace Tnb.WarehouseMgr
{
WmsCarryH wmsCarryH = await _db.Queryable().Where(r => r.carry_code == input.carry_code).FirstAsync();
+ WmsPretaskH wmsPretaskH = _db.Queryable().Where(r => r.carry_code == wmsCarryH.carry_code && r.status != WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID && r.status != WmsWareHouseConst.PRETASK_BILL_STATUS_CANCEL_ID).First();
+ if (wmsPretaskH != null)
+ {
+ Logger.LogWarning($"【RackInstock】此料架{wmsCarryH.carry_code}存在未完成的预任务{wmsPretaskH.bill_code}!");
+ throw new AppFriendlyException($"此料架{wmsCarryH.carry_code}存在未完成的预任务{wmsPretaskH.bill_code}!", 500);
+ }
+
// 料架到暂存仓
if (wmsCarryH.carrystd_id == "26037267399717")
{
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs
index fc08db33..cf9c24bd 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs
@@ -208,7 +208,7 @@ namespace Tnb.WarehouseMgr
.Where(x => x.id == item.outsource_order_d_id)
.ExecuteCommandAsync();
}
-
+
List instockDs = new();
if (purchaseDs?.Count > 0)
{
@@ -251,7 +251,29 @@ namespace Tnb.WarehouseMgr
}
await _db.Insertable(instockDs).ExecuteCommandAsync();
- List dList = input.details;
+
+ List dList = await _db.Queryable().Where(x => x.fk_wms_outsource_order_id == purchaseDs.First().fk_wms_outsource_order_id).OrderBy(x => x.id).ToListAsync();
+
+ List wmsOutsourceOrderDs = await _db.Queryable().Where(r => dList.Select(x => x.erp_outsource_order_d_pk).Contains(r.erp_line_pk)).OrderBy(x => x.id).ToListAsync();
+ foreach (var item in dList)
+ {
+ decimal? outsource_arriveqty = input.details.Where(r => r.id == item.id).ToList()[0].outsource_arriveqty;
+ item.actual_quantity += outsource_arriveqty;
+ if (item.actual_quantity > item.outsource_quantity)
+ {
+ throw Oops.Bah($"委外收货单明细行物料{item.matcode} 批次{item.code_batch} 到货数量不能超过采购数量!");
+ }
+ WmsOutsourceOrderD wmsOutsourceOrderD = wmsOutsourceOrderDs.Where(r => r.erp_line_pk == item.erp_outsource_order_d_pk).ToList()[0];
+ wmsOutsourceOrderD.actual_quantity += outsource_arriveqty;
+ if (wmsOutsourceOrderD.actual_quantity > wmsOutsourceOrderD.outsource_quantity)
+ {
+ throw Oops.Bah($"采购订单明细行物料{wmsOutsourceOrderD.matcode} 批次{wmsOutsourceOrderD.code_batch} 到货数量不能超过采购数量!");
+ }
+ }
+ await _db.Updateable(dList).UpdateColumns(r => r.actual_quantity).ExecuteCommandAsync();
+ await _db.Updateable(wmsOutsourceOrderDs).UpdateColumns(r => r.actual_quantity).ExecuteCommandAsync();
+
+
List materialIds = purchaseDs.Select(x => x.matcode_id).Distinct().ToList();
List unitCodes = purchaseDs.Select(x => x.unit_id).Distinct().ToList();
List unitDatas = await _db.Queryable()
@@ -331,6 +353,7 @@ namespace Tnb.WarehouseMgr
// ["nastnum"] = item.purchase_arriveqty,
["nnum"] = item.bind_qty,
// ["nplanastnum"] = 0,
+ ["nplannum"] = item.outsource_arriveqty,
["nplannum"] = item.outsource_quantity,
["pk_apfinanceorg"] = erpOrg.corpoid,
["pk_apfinanceorg_v"] = erpOrg.corpvid,
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseAndSaleCommonService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseAndSaleCommonService.cs
index 67f5f10f..7257dc43 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseAndSaleCommonService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseAndSaleCommonService.cs
@@ -88,7 +88,7 @@ namespace Tnb.WarehouseMgr
x.purchase_arriveqty = 0;
});
- await _db.Updateable(purchaseDs).UpdateColumns(it => new { it.purchase_prqty, it.line_status }).ExecuteCommandAsync();
+ await _db.Updateable(purchaseDs).UpdateColumns(it => new { it.line_status }).ExecuteCommandAsync();
if (purchaseDs.All(x => x.line_status == WmsWareHouseConst.BILLSTATUS_COMPLETE_ID))
{
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs
index 2a5e2c3a..258e5a9f 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs
@@ -110,6 +110,14 @@ namespace Tnb.WarehouseMgr
wmsPurchaseQcrecord.result = qcRes;
await _db.Insertable(wmsPurchaseQcrecord).ExecuteCommandAsync();
+
+ List wmscarrycodes = await _db.Queryable()
+ .InnerJoin((a, b) => a.barcode == b.barcode)
+ .InnerJoin((a, b, c) => c.id == b.require_id)
+ .Where((a, b, c) => c.id == wmsPurchaseD.id).ToListAsync();
+ foreach (var item in wmscarrycodes)
+ item.qc_res = qcRes;
+ await _db.Updateable(wmscarrycodes).UpdateColumns(r => r.qc_res).ExecuteCommandAsync();
}
#endregion
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs
index a3d406a9..45486224 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs
@@ -40,6 +40,7 @@ using JNPF.VisualDev.Entitys;
using Tnb.BasicData.Interfaces;
using JNPF.Common.Enums;
using System.Reflection;
+using Aop.Api.Domain;
namespace Tnb.WarehouseMgr
{
@@ -192,6 +193,26 @@ namespace Tnb.WarehouseMgr
List dList = await _db.Queryable().Where(x=>x.bill_id==purchaseDs.First().bill_id).OrderBy(x=>x.id).ToListAsync();
+
+ List wmsPurchaseOrderDs = await _db.Queryable().Where(r => dList.Select(x => x.erp_purchase_order_d_pk).Contains(r.erp_line_pk)).OrderBy(x => x.id).ToListAsync();
+ foreach (var item in dList)
+ {
+ decimal purchase_arriveqty = input.details.Where(r => r.id == item.id).ToList()[0].purchase_arriveqty;
+ item.purchase_prqty += purchase_arriveqty;
+ if (item.purchase_prqty > item.purchase_qty)
+ {
+ throw Oops.Bah($"采购收货单明细行物料{item.material_code} 批次{item.code_batch} 到货数量不能超过采购数量!");
+ }
+ WmsPurchaseOrderD wmsPurchaseOrderD = wmsPurchaseOrderDs.Where(r => r.erp_line_pk == item.erp_purchase_order_d_pk).ToList()[0];
+ wmsPurchaseOrderD.actual_quantity += purchase_arriveqty;
+ if (wmsPurchaseOrderD.actual_quantity > wmsPurchaseOrderD.purchase_quantity)
+ {
+ throw Oops.Bah($"采购订单明细行物料{wmsPurchaseOrderD.matcode} 批次{wmsPurchaseOrderD.code_batch} 到货数量不能超过采购数量!");
+ }
+ }
+ await _db.Updateable(dList).UpdateColumns(r => r.purchase_prqty).ExecuteCommandAsync();
+ await _db.Updateable(wmsPurchaseOrderDs).UpdateColumns(r => r.actual_quantity).ExecuteCommandAsync();
+
List materialIds = purchaseDs.Select(x=>x.material_id).Distinct().ToList();
List unitCodes = purchaseDs.Select(x => x.unit_id).Distinct().ToList();
List unitDatas = await _db.Queryable()
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs
index 841a48db..4cebeca9 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs
@@ -543,6 +543,7 @@ namespace Tnb.WarehouseMgr
WmsSaleH newWmsSaleH = wmsSaleHs[0].Adapt();
newWmsSaleH.id = SnowflakeIdHelper.NextId();
newWmsSaleH.bill_code = Code;
+ newWmsSaleH.erp_pk = string.Join(",", wmsSaleHs.Select(x => x.erp_pk));
newWmsSaleH.erp_bill_code = string.Join(",", wmsSaleHs.Select(x => x.erp_bill_code));
newWmsSaleH.customer_id = string.Join(",", wmsSaleHs.Select(x => x.customer_id));
newWmsSaleH.customer_code = string.Join(",", wmsSaleHs.Select(x => x.customer_code));
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsStockReportService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsStockReportService.cs
index 7d78cf00..094f397c 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsStockReportService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsStockReportService.cs
@@ -63,7 +63,7 @@ namespace Tnb.WarehouseMgr
.LeftJoin((a, b, c, d, e, f, g, h) => h.id == g.bill_id)
.WhereIF(!string.IsNullOrEmpty(material_specification), (a, b, c, d, e, f) => f.material_specification.Contains(material_specification))
.WhereIF(!string.IsNullOrEmpty(code_batch), (a, b, c, d, e, f) => a.code_batch.Contains(code_batch))
- .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f) => f.container_no.Contains(container_no))
+ .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f) => f.material_standard.Contains(container_no))
.WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e, f) => f.code.Contains(material_code))
.WhereIF(!string.IsNullOrEmpty(warehouse_id), (a, b, c, d, e, f) => c.wh_id == warehouse_id)
.Where((a, b, c, d, e, f) => c.is_type == ((int)EnumLocationType.存储库位).ToString())
@@ -81,6 +81,9 @@ namespace Tnb.WarehouseMgr
code_batch = a.code_batch,
supplier_code = "",
supplier_name = "",
+ qc_res = SqlFunc.IF(a.qc_res.Equals("await") || string.IsNullOrEmpty(a.qc_res)).Return("待检").ElseIF(a.qc_res.Equals("vergeOk")).Return("让步接收").ElseIF(a.qc_res.Equals("ok")).Return("合格").ElseIF(a.qc_res.Equals("no")).Return("不合格").End(""),
+ auxprop_gys = a.auxprop_gys,
+ auxprop_xph = a.auxprop_xph,
}, true).ToListAsync();
List carryCodes = await _db.Queryable()
@@ -134,7 +137,7 @@ namespace Tnb.WarehouseMgr
.WhereIF(!string.IsNullOrEmpty(material_specification), (a, b, c, d, e, f) => f.material_specification.Contains(material_specification))
.WhereIF(!string.IsNullOrEmpty(code_batch), (a, b, c, d, e, f) => a.code_batch.Contains(code_batch))
.WhereIF(!string.IsNullOrEmpty(supplier_code), (a, b, c, d, e, f, g, h) => h.supplier_code.Contains(supplier_code))
- .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f, g, h) => f.container_no.Contains(container_no))
+ .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d, e, f, g, h) => f.material_standard.Contains(container_no))
.WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e, f) => f.code.Contains(material_code))
.WhereIF(!string.IsNullOrEmpty(warehouse_id), (a, b, c, d, e, f) => c.wh_id == warehouse_id)
.Where((a, b, c, d, e, f) => c.is_type == ((int)EnumLocationType.存储库位).ToString())
@@ -152,6 +155,9 @@ namespace Tnb.WarehouseMgr
code_batch = a.code_batch,
supplier_code = h.supplier_code,
supplier_name = h.supplier_name,
+ qc_res = SqlFunc.IF(a.qc_res.Equals("await") || string.IsNullOrEmpty(a.qc_res)).Return("待检").ElseIF(a.qc_res.Equals("vergeOk")).Return("让步接收").ElseIF(a.qc_res.Equals("ok")).Return("合格").ElseIF(a.qc_res.Equals("no")).Return("不合格").End(""),
+ auxprop_gys = a.auxprop_gys,
+ auxprop_xph = a.auxprop_xph,
}, true).ToListAsync();
List carryCodes = await _db.Queryable()