lixiaojun
2024-06-07 dad0c33f18a3175d1235512673c6fc71d0d87dcc
Yw.Application.DMA.Core/02-dma_site/DmaSite_Controller.cs
@@ -58,13 +58,6 @@
        [HttpPost]
        public long Insert([Required] AddDmaSiteInput input)
        {
            if (!string.IsNullOrEmpty(input.Code))
            {
                if (_service.IsExistCode(input.Code))
                {
                    throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"Code:{input.Code}", "编码已存在");
                }
            }
            if (!string.IsNullOrEmpty(input.TagName))
            {
                if (_service.IsExistTagName(input.TagName))
@@ -93,13 +86,6 @@
            if (model == null)
            {
                throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 数据不存在");
            }
            if (!string.IsNullOrEmpty(input.Code))
            {
                if (_service.IsExistCodeExceptID(input.Code, input.ID))
                {
                    throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"Code:{input.Code}", "编码已存在");
                }
            }
            if (!string.IsNullOrEmpty(input.TagName))
            {
@@ -180,28 +166,6 @@
        #endregion
        #region Exist
        /// <summary>
        /// 判断 Code 是否存在
        /// </summary>
        [Route("IsExistCode@V1.0")]
        [HttpGet]
        public bool IsExistCode([FromQuery][Required] CodeInput input)
        {
            var bol = _service.IsExistCode(input.Code);
            return bol;
        }
        /// <summary>
        ///  判断 Code 是否存在 ExceptID
        /// </summary>
        [Route("IsExistCodeExceptID@V1.0")]
        [HttpGet]
        public bool IsExistCodeExceptID([FromQuery][Required] CodeExceptInput input)
        {
            var bol = _service.IsExistCodeExceptID(input.Code, input.ExceptID);
            return bol;
        }
        /// <summary>
        /// 判断TagName是否存在