| | |
| | | [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; |
| | | } |
| | |
| | | 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 |
| | | |
| | | } |