ningshuxia
2022-11-22 e0738c0754dd80a3b8d972f03d84b0611fd8254c
Application/IStation.Application.Monitor/monitor_point_mapping/MonitorPointMapping_Controller.cs
@@ -240,16 +240,21 @@
        [HttpPost]
        public bool SetOfObject([Required] SetObjectMonitorPointMappingInput input)
        {
            var list = input.Items.Select(x => new Model.MonitorPointMapping()
            var list = new List<Model.MonitorPointMapping>();
            if (input.Items != null && input.Items.Count > 0)
            {
                ID = x.ID,
                CorpID = input.CorpID,
                ObjectType = input.ObjectType,
                ObjectID = input.ObjectID,
                MonitorPointID=x.MonitorPointID,
                SortCode = x.SortCode,
                AccordParas = x.AccordParas
            }).ToList();
                list = input.Items.Select(x => new Model.MonitorPointMapping()
                {
                    ID = x.ID,
                    CorpID = input.CorpID,
                    ObjectType = input.ObjectType,
                    ObjectID = input.ObjectID,
                    MonitorPointID = x.MonitorPointID,
                    SortCode = x.SortCode,
                    AccordParas = x.AccordParas
                }).ToList();
            }
            var bol = _service.SetOfObject(input.CorpID, input.ObjectType, input.ObjectID, list);
            return bol;
        }
@@ -269,6 +274,18 @@
            return new DeleteReasonOutput() { Success = bol, Reason = Msg };
        }
        /// <summary>
        /// 删除
        /// </summary>
        [Route("DeleteByMonitorPointID@V1.0")]
        [HttpDelete]
        public DeleteReasonOutput DeleteByMonitorPointID([FromQuery][Required] MonitorPointIDUnderCorpInput input)
        {
            var bol = _service.DeleteByMonitorPointID(input.CorpID, input.MonitorPointID, out string Msg);
            return new DeleteReasonOutput() { Success = bol, Reason = Msg };
        }
        #endregion
    }