| | |
| | | return vmList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 通过 ObjectType 和 ObjectID 获取特定目的的列表 |
| | | /// </summary> |
| | | [Route("GetByObjectTypeAndObjectIDOfPurpose@V1.0")] |
| | | [HttpGet] |
| | | public List<BimfaceFileRelationDto> GetByObjectTypeAndObjectIDOfPurpose([FromQuery][Required] ObjectOfPurposeInput input) |
| | | { |
| | | var list = _service.GetByObjectTypeAndObjectIDOfPurpose(input.ObjectType, input.ObjectID, input.Purpose); |
| | | var vmList = list?.Select(x => new BimfaceFileRelationDto(x)).ToList(); |
| | | return vmList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 通过 ObjectType 和 ObjectID 获取特定目的的默认数据 |
| | | /// </summary> |
| | | [Route("GetGetDefaultByObjectTypeAndObjectIDOfPurpose@V1.0")] |
| | | [HttpGet] |
| | | public BimfaceFileRelationDto GetGetDefaultByObjectTypeAndObjectIDOfPurpose([FromQuery][Required] ObjectOfPurposeInput input) |
| | | { |
| | | var model = _service.GetDefaultByObjectTypeAndObjectIDOfPurpose(input.ObjectType, input.ObjectID, input.Purpose); |
| | | return model == null ? null : new BimfaceFileRelationDto(model); |
| | | } |
| | | |
| | | |
| | | #endregion |