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() : "";