wangzelong
2022-11-30 44e4286e0384f8daf9b89e8f551f0f743b60ebb3
Service/IStation.Service.Basic/property/special_property/SpecialProperty.cs
@@ -115,6 +115,15 @@
            return all.Where(x => x.ObjectType == ObjectType).OrderBy(x => x.SortCode).ToList();
        }
        /// <summary>
        /// 通过 GroupID 获取
        /// </summary>
        public List<Model.SpecialProperty> GetByGroupID(long CorpID, long GroupID)
        {
            var all = GetByCorpID(CorpID);
            return all.Where(x => x.GroupID == GroupID).OrderBy(x => x.SortCode).ToList();
        }
        #endregion
        #region Insert
@@ -236,7 +245,22 @@
            return bol;
        }
        /// <summary>
        /// 更新 GroupID
        /// </summary>
        public bool UpdateGroupID(long CorpID, long ID, long GroupID, long UpdateUserID, DateTime UpdateTime)
        {
            var dal = new DAL.SpecialProperty();
            var bol = dal.UpdateGroupID(CorpID, ID, GroupID, UpdateUserID, UpdateTime);
            if (bol)
            {
                UpdateCorpCache(CorpID, ID);
            }
            return bol;
        }
        #endregion
        #region Exist
@@ -249,8 +273,31 @@
            return all.Exists(x => x.ID == ID);
        }
        /// <summary>
        /// 判断 Identifier 是否存在
        /// </summary>
        public bool IsExistIdentifier(long CorpID,string ObjectType, string Identifier)
        {
            if (string.IsNullOrEmpty(Identifier))
                return false;
            var all = GetByObjectType(CorpID,ObjectType);
            return all.Exists(x => x.Identifier == Identifier);
        }
        /// <summary>
        /// 判断 Identifier 排除ID是否存在
        /// </summary>
        public bool IsExistIdentifierExceptID(long CorpID,string ObjectType, string Identifier, long ID)
        {
            if (string.IsNullOrEmpty(Identifier))
                return false;
            var all = GetByObjectType(CorpID,ObjectType);
            return all.Exists(x => x.Identifier == Identifier && x.ID != ID);
        }
        #endregion
        #region Delete
        /// <summary>