From f2bc936ea7f9a0a9002bcef21f3d6b930b81b86f Mon Sep 17 00:00:00 2001
From: zhou keda <1315948824@qq.com>
Date: Sat, 12 Oct 2024 14:06:16 +0800
Subject: [PATCH] =?UTF-8?q?erp=E7=89=A9=E6=96=99=E5=90=8C=E6=AD=A5?=
=?UTF-8?q?=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Tnb.BasicData.Entities/Consts/FactoryConfigConst.cs | 5 +++++
EquipMgr/Tnb.EquipMgr/EquipmentService.cs | 1 +
ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs | 3 ++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/BasicData/Tnb.BasicData.Entities/Consts/FactoryConfigConst.cs b/BasicData/Tnb.BasicData.Entities/Consts/FactoryConfigConst.cs
index 6f743894..d42718d2 100644
--- a/BasicData/Tnb.BasicData.Entities/Consts/FactoryConfigConst.cs
+++ b/BasicData/Tnb.BasicData.Entities/Consts/FactoryConfigConst.cs
@@ -49,5 +49,10 @@ namespace Tnb.BasicData
/// 换批号天数
///
public const string CHANGEBATCHDAY = "changeBatchDay";
+
+ ///
+ /// erp全物料更新
+ ///
+ public const string MATERIALALLUPDATE = "materialAllUpDate";
}
}
\ No newline at end of file
diff --git a/EquipMgr/Tnb.EquipMgr/EquipmentService.cs b/EquipMgr/Tnb.EquipMgr/EquipmentService.cs
index e6f6d370..b4b5d78b 100644
--- a/EquipMgr/Tnb.EquipMgr/EquipmentService.cs
+++ b/EquipMgr/Tnb.EquipMgr/EquipmentService.cs
@@ -78,6 +78,7 @@ namespace Tnb.EquipMgr
.WhereIF(!string.IsNullOrEmpty(code),a=>a.code.Contains(code))
.WhereIF(!string.IsNullOrEmpty(name),a=>a.name.Contains(name))
.WhereIF(!string.IsNullOrEmpty(contract_no),a=>a.contract_no.Contains(contract_no))
+ .OrderBy(a=>a.code)
.Select((a, b,c,d,e,f,g,h,i,j) => new EquipListOuput()
{
id = a.id,
diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs
index 3ce5c9f0..b86cdf65 100644
--- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs
@@ -854,6 +854,7 @@ namespace Tnb.ProductionMgr
Dictionary materialcategoryDic = await _db.Queryable()
.Where(x => x.DictionaryTypeId == DictConst.MaterialCatagoryID)
.ToDictionaryAsync(x => x.FullName, y => y.EnCode);
+ BasFactoryConfig materialAllUpDate = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.MATERIALALLUPDATE);
List materials = await _db.Queryable().ToListAsync();
List basEbomHs = await _db.Queryable().ToListAsync();
List insertMaterial = new List();
@@ -975,7 +976,7 @@ namespace Tnb.ProductionMgr
string materialId = extendField?.table_id ?? "";
BasMaterial basMaterial = await _db.Queryable().SingleAsync(x => x.id == materialId);
// if (extendField.erp_modify_time==null || erpBdMaterial.MODIFIEDTIME != extendField.erp_modify_time)
- if (erpBdMaterial.MODIFIEDTIME != extendField.erp_modify_time)
+ if (materialAllUpDate.value=="1" || erpBdMaterial.MODIFIEDTIME != extendField.erp_modify_time)
{
string unitId = erpExtendFields.Find(x => x.cunitid == erpBdMaterial.PK_MEASDOC)?.table_id ?? "";
unitId = unitDic.ContainsKey(unitId) ? unitDic[unitId].ToString() : "";