From d835c96f2fd591994a18915c6825cc87c108ade3 Mon Sep 17 00:00:00 2001
From: majian <780924089@qq.com>
Date: Wed, 18 Sep 2024 18:40:29 +0800
Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E5=AF=B9=E6=8E=A5=E4=BB=A5?=
=?UTF-8?q?=E5=8F=8A=E7=8E=B0=E5=9C=BA=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Dto/ErpInputs/PurchaseOrderInput.cs | 5 ++++
.../Entity/WmsCarryCode.cs | 10 +++++++
.../Entity/WmsPackInstockD.cs | 10 +++++++
.../Entity/WmsPrdInstockD.cs | 5 ++++
.../Entity/WmsPrdInstockH.cs | 5 ----
.../Entity/WmsPurchaseD.cs | 13 ++++++++-
.../Entity/WmsPurchaseOrderD.cs | 5 ++++
.../Tnb.WarehouseMgr/ErpToWmsService.cs | 2 +-
.../Tnb.WarehouseMgr/WareHouseService.cs | 27 +++++++++++++++++++
.../Tnb.WarehouseMgr/WmsPrdInstockHService.cs | 6 ++---
.../Tnb.WarehouseMgr/WmsPurchaseDService.cs | 2 +-
.../Tnb.WarehouseMgr/WmsPurchaseService.cs | 6 +++++
12 files changed, 85 insertions(+), 11 deletions(-)
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/PurchaseOrderInput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/PurchaseOrderInput.cs
index c50466ff..7455f78f 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/PurchaseOrderInput.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/PurchaseOrderInput.cs
@@ -90,5 +90,10 @@ namespace Tnb.WarehouseMgr.Entities.Dto.ErpInputs
/// 是否赠品
///
public int? gift { get; set; }
+
+ ///
+ /// 供应商(辅助属性)
+ ///
+ public string auxprop_gys { get; set; }
}
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs
index e3d01c04..836e4155 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCarryCode.cs
@@ -120,4 +120,14 @@ public partial class WmsCarryCode : BaseEntity, IWmsCarryEntity
/// 箱号
///
public string? container_no { get; set; }
+
+ ///
+ /// 辅助属性(供应商)
+ ///
+ public string? auxprop_gys { get; set; }
+
+ ///
+ /// 辅助属性(小批号)
+ ///
+ public string? auxprop_xph { get; set; }
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPackInstockD.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPackInstockD.cs
index 5249818c..ba2077b9 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPackInstockD.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPackInstockD.cs
@@ -134,4 +134,14 @@ public partial class WmsPackInstockD : BaseEntity
///
public string? lineno { get; set; }
+ ///
+ /// 供应商(辅助属性)
+ ///
+ public string? auxprop_gys { get; set; }
+
+ ///
+ /// 小批号(辅助属性)
+ ///
+ public string? auxprop_xph { get; set; }
+
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockD.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockD.cs
index 56376f34..9e3e57e9 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockD.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockD.cs
@@ -63,4 +63,9 @@ public partial class WmsPrdInstockD : BaseEntity
/// 入库仓库
///
public string? rkwarehouse_id { get; set; }
+
+ ///
+ /// 汇报记录id
+ ///
+ public string? prd_report_id { get; set; }
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockH.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockH.cs
index a47c4eb2..9d0c6479 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockH.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPrdInstockH.cs
@@ -89,9 +89,4 @@ public partial class WmsPrdInstockH : BaseEntity
///
public string? type { get; set; }
- ///
- /// 汇报记录id
- ///
- public string? prd_report_id { get; set; }
-
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseD.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseD.cs
index 47ca2c4e..9e8faf59 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseD.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseD.cs
@@ -144,5 +144,16 @@ public partial class WmsPurchaseD : BaseEntity
public string erp_purchase_order_d_pk { get; set; }
public string erp_purchase_order_d_lineno { get; set; }
-
+
+ ///
+ /// 辅助属性(小批号)
+ ///
+ public string? auxprop_xph { get; set; }
+
+ ///
+ /// 供应商(辅助属性)
+ ///
+ public string? auxprop_gys { get; set; }
+
+
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseOrderD.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseOrderD.cs
index ec256097..b1c701ab 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseOrderD.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseOrderD.cs
@@ -134,4 +134,9 @@ public partial class WmsPurchaseOrderD : BaseEntity
///
public int? gift { get; set; }
+ ///
+ /// 供应商(辅助属性)
+ ///
+ public string? auxprop_gys { get; set; }
+
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/ErpToWmsService.cs b/WarehouseMgr/Tnb.WarehouseMgr/ErpToWmsService.cs
index 5c7ef114..3f6bbf0c 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/ErpToWmsService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/ErpToWmsService.cs
@@ -438,7 +438,7 @@ namespace Tnb.WarehouseMgr
wmsPurchaseOrderD.matcode_id = material.id;
wmsPurchaseOrderD.matspecification = material.material_specification;
}
-
+ wmsPurchaseOrderD.auxprop_gys = detail.auxprop_gys;
wmsPurchaseOrderDs.Add(wmsPurchaseOrderD);
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
index 7d169ae0..56b029c0 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
@@ -301,6 +301,15 @@ namespace Tnb.WarehouseMgr
.Where((a, b) => b.is_type == ((int)EnumLocationType.存储库位).ToString())
.WhereIF(!string.IsNullOrEmpty(input.Region_id), (a, b) => b.region_id == input.Region_id)
.Select((a, b) => b.passage).ToListAsync();
+
+
+ string sss = db.Queryable()
+ .InnerJoin((a, b) =>
+ (a.status != WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID && a.status != WmsWareHouseConst.PRETASK_BILL_STATUS_CANCEL_ID)
+ && (b.id == a.startlocation_id || b.id == a.endlocation_id))
+ .Where((a, b) => b.wh_id == input.warehouse_id)
+ .Where((a, b) => b.is_type == ((int)EnumLocationType.存储库位).ToString())
+ .WhereIF(!string.IsNullOrEmpty(input.Region_id), (a, b) => b.region_id == input.Region_id).ToSqlString();
}
Expression> whereExp = Expressionable.Create()
@@ -1090,6 +1099,15 @@ namespace Tnb.WarehouseMgr
getdic.Add("ZS-A12-2", new string[] { "hxjA", "A14AGV允许入满箱", "true" });
+ getdic.Add("ZS-D01-2", new string[] { "hxjA", "A1AGV允许入满箱", "true" });
+ getdic.Add("ZS-D02-2", new string[] { "hxjA", "A2AGV允许入满箱", "true" });
+ getdic.Add("ZS-D03-2", new string[] { "hxjA", "A3AGV允许入满箱", "true" });
+ getdic.Add("ZS-D04-2", new string[] { "hxjA", "A4AGV允许入满箱", "true" });
+ getdic.Add("ZS-D05-2", new string[] { "hxjA", "A5AGV允许入满箱", "true" });
+ getdic.Add("ZS-D06-2", new string[] { "hxjA", "A6AGV允许入满箱", "true" });
+ getdic.Add("ZS-D07-2", new string[] { "hxjA", "A7AGV允许入满箱", "true" });
+ getdic.Add("ZS-D08-2", new string[] { "hxjA", "A8AGV允许入满箱", "true" });
+
putdic.Add("SSX-021-007", new string[] { "东面提升机输送线", "出库输送线7入箱完毕", "true" });
putdic.Add("SSX-011-006", new string[] { "YTCS", "EmptyIn_CS06Done", "true" });
@@ -1224,6 +1242,15 @@ namespace Tnb.WarehouseMgr
getdic.Add("ZS-A11-2", new string[] { "hxjA", "A13AGV允许入满箱", "true" });
getdic.Add("ZS-A12-2", new string[] { "hxjA", "A14AGV允许入满箱", "true" });
+ getdic.Add("ZS-D01-2", new string[] { "hxjA", "A1AGV允许入满箱", "false" });
+ getdic.Add("ZS-D02-2", new string[] { "hxjA", "A2AGV允许入满箱", "false" });
+ getdic.Add("ZS-D03-2", new string[] { "hxjA", "A3AGV允许入满箱", "false" });
+ getdic.Add("ZS-D04-2", new string[] { "hxjA", "A4AGV允许入满箱", "false" });
+ getdic.Add("ZS-D05-2", new string[] { "hxjA", "A5AGV允许入满箱", "false" });
+ getdic.Add("ZS-D06-2", new string[] { "hxjA", "A6AGV允许入满箱", "false" });
+ getdic.Add("ZS-D07-2", new string[] { "hxjA", "A7AGV允许入满箱", "false" });
+ getdic.Add("ZS-D08-2", new string[] { "hxjA", "A8AGV允许入满箱", "false" });
+
putdic.Add("SSX-021-007", new string[] { "东面提升机输送线", "出库输送线7入箱完毕", "true" });
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs
index 3b6329ef..b4fe3cd8 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs
@@ -86,7 +86,6 @@ namespace Tnb.WarehouseMgr
wmsPrdInstockH.create_time = DateTime.Now;
wmsPrdInstockH.prd_bill_code = input.prd_bill_code;
wmsPrdInstockH.bill_code = bill_code;
- wmsPrdInstockH.prd_report_id = input.prd_report_id;
wmsPrdInstockH.material_id = input.material_id;
wmsPrdInstockH.material_code = input.material_code;
wmsPrdInstockH.material_name = input.material_name;
@@ -153,8 +152,9 @@ namespace Tnb.WarehouseMgr
prd_instock_id = prd_instock_code_id,
status = WmsWareHouseConst.TASK_BILL_STATUS_YXD_ID,
scwarehouse_id = scwarehouse_id,
- rkwarehouse_id = rkwarehouse_id
- };
+ rkwarehouse_id = rkwarehouse_id,
+ prd_report_id = input.prd_report_id
+ };
WmsPrdInstockDs.Add(wmsPrdInstockD);
foreach (WmsPrdInstockCodeInput prdInstockCodeInput in input.prdInstockCodes)
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs
index fe2b5f15..913ac7a6 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs
@@ -97,7 +97,7 @@ namespace Tnb.WarehouseMgr
}
#endregion
-
+
List wmsOutinStockDetails = await _db.Queryable()
.Where(x => x.source_detail_id == wmsPurchaseD.id && x.source_type == WmsWareHouseConst.BIZTYPE_WMSINSTOCK_ID)
.ToListAsync();
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs
index 24c7a9e4..78a0017a 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs
@@ -136,6 +136,7 @@ namespace Tnb.WarehouseMgr
await _db.Insertable(instockDs).ExecuteCommandAsync();
var purchase = await _db.Queryable().FirstAsync(it => it.id == purchaseDs.First().bill_id);
+
if (string.IsNullOrEmpty(purchase.supplier_id))
{
BasSupplier basSupplier = await _db.Queryable().Where(x=>x.supplier_code==purchase.supplier_code).FirstAsync();
@@ -149,6 +150,11 @@ namespace Tnb.WarehouseMgr
purchase.supplier_id = basSupplier.id;
}
}
+
+ //purchase.supplier_code
+
+
+
List dList = await _db.Queryable().Where(x=>x.bill_id==purchaseDs.First().bill_id).OrderBy(x=>x.id).ToListAsync();
List materialIds = purchaseDs.Select(x=>x.material_id).Distinct().ToList();
List unitCodes = purchaseDs.Select(x => x.unit_id).Distinct().ToList();