lixiaojun
2024-09-09 c0f3c3f170846197d8d3f74ac123e0ac93a6dd67
IStation.Application.SZJT/01-logic-dma/1-mgr/LogicDma_Controller.cs
ÎļþÃû´Ó IStation.Application.SZJT/05-logic-dma/1-mgr/LogicDma_Controller.cs ÐÞ¸Ä
@@ -60,13 +60,6 @@
        [HttpPost]
        public long Insert([Required] AddLogicDmaInput 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))
@@ -95,13 +88,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))
            {
@@ -198,28 +184,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是否存在