| | |
| | | /// </summary> |
| | | [Route("GetByObjectTypeAndObjectID@V1.0")] |
| | | [HttpGet] |
| | | public List<BimfaceFileRelationDto> GetByObjectTypeAndObjectID([FromQuery][Required] ObjectInput input) |
| | | public List<BimfaceFileRelationStdDto> GetByObjectTypeAndObjectID([FromQuery][Required] ObjectInput input) |
| | | { |
| | | var list = new Yw.Service.BimfaceFileRelation().GetByObjectTypeAndObjectID(input.ObjectType, input.ObjectID); |
| | | var vmList = list?.Select(x => new BimfaceFileRelationDto(x)).ToList(); |
| | | var vmList = list?.Select(x => new BimfaceFileRelationStdDto(x)).ToList(); |
| | | return vmList; |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | [Route("GetByObjectTypeAndObjectIDOfPurpose@V1.0")] |
| | | [HttpGet] |
| | | public List<BimfaceFileRelationDto> GetByObjectTypeAndObjectIDOfPurpose([FromQuery][Required] ObjectOfPurposeInput input) |
| | | public List<BimfaceFileRelationStdDto> GetByObjectTypeAndObjectIDOfPurpose([FromQuery][Required] ObjectOfPurposeInput input) |
| | | { |
| | | var list = new Yw.Service.BimfaceFileRelation().GetByObjectTypeAndObjectIDOfPurpose(input.ObjectType, input.ObjectID, input.Purpose); |
| | | var vmList = list?.Select(x => new BimfaceFileRelationDto(x)).ToList(); |
| | | var vmList = list?.Select(x => new BimfaceFileRelationStdDto(x)).ToList(); |
| | | return vmList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 通过 ObjectType 和 ObjectID 获取 Purpose 下默认 |
| | | /// </summary> |
| | | [Route("GetDefaultByObjectTypeAndObjectIDOfPurpose@V1.0")] |
| | | [HttpGet] |
| | | public BimfaceFileRelationStdDto GetDefaultByObjectTypeAndObjectIDOfPurpose([FromQuery][Required] ObjectOfPurposeInput input) |
| | | { |
| | | var model = new Yw.Service.BimfaceFileRelation().GetDefaultByObjectTypeAndObjectIDOfPurpose(input.ObjectType, input.ObjectID, input.Purpose); |
| | | return model == null ? null : new BimfaceFileRelationStdDto(model); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |