import { ProductDocumentDto, ProductManufactureBomDto, ProductManufactureBomQueryDto, ProductManufactureBomEntryQueryDto, ProductManufactureBomEntryDto, View_BomQueryDto, View_BomDto, MultiLevelProductManufactureBomEntryDto, MultiView_BomDto, ExtProductQueryDto, ExtProductInfo, ProductManufactureBomGroupDto } from './../mdp-model'; import { Injectable } from '@angular/core'; import { OpResult, DataResultT, RhSelectItem } from 'rh-base/model'; import { RhApiUrlsService } from 'rh-base/core'; import { Observable } from 'rxjs'; @Injectable() export class RhProductDefineService { constructor(private apiUrls: RhApiUrlsService) {} /** * 删除产品档案 */ RemoveProductDocumentDatas(ProductDocumentDto: ProductDocumentDto[]): Observable { return this.apiUrls.PostMdp('ProductMaterialWebApi', 'RemoveProductDocumentDatas', ProductDocumentDto); } /** * 获取bom表头列表 */ GetBomSettingEntry(): Observable> { const controller = 'YGSysConfigApi'; const Interface = 'GetParameterSettingEntrySelectItems'; return this.apiUrls.GetPp(controller, Interface, { params: { moduleKey: 'MDP', groupKey: 'MaterialManagement', paraCode: 'ProductBomGroup' } }); } /** * 获取bom表头分组 */ GetProductManufactureBomGroupDatas(): Observable> { return this.apiUrls.GetMdp('ProductBomWebApi', 'GetProductManufactureBomGroupDatas'); } /** * 获取产品制造BOM数据 */ GetProductBomDatas(queryDto: View_BomQueryDto): Observable> { return this.apiUrls.PostMdp('ProductBomWebApi', 'GetProductBomDatas', queryDto); } /** * 启动禁用BOM */ // EnableProductManufactureBom(dto: ProductManufactureBomDto): Observable { // return this.apiUrls.PostMdp('ProductBomWebApi', 'EnableProductManufactureBom', dto); // } /** * 获取产品制造BOM数据 */ GetProductManufactureBomDatas(queryDto: ProductManufactureBomQueryDto): Observable> { return this.apiUrls.PostMdp('ProductBomWebApi', 'GetProductManufactureBomDatas', queryDto); } /** * 保存产品制造BOM数据 */ StoreProductManufactureBomData(dto: ProductManufactureBomDto): Observable { return this.apiUrls.PostMdp('ProductBomWebApi', 'StoreProductManufactureBomData', dto); } /** * 保存产品制造BOM明细 */ StoreProductManufactureBomEntry(dto: ProductManufactureBomEntryDto): Observable { return this.apiUrls.PostMdp('ProductBomWebApi', 'StoreProductManufactureBomEntry', dto); } /** * 获取产品制造BOM明细数据 */ GetProductManufactureBomEntryDatas( queryDto: ProductManufactureBomEntryQueryDto ): Observable> { return this.apiUrls.PostMdp('ProductBomWebApi', 'GetProductManufactureBomEntryDatas', queryDto); } /** * 批量移除产品制造BOM明细 */ RemoveProductManufactureBomEntryDatas(ProductManufactureBomEntryDto: ProductManufactureBomEntryDto[]): Observable { return this.apiUrls.PostMdp('ProductBomWebApi', 'RemoveProductManufactureBomEntryDatas', ProductManufactureBomEntryDto); } /** * GetMultiLevelBomTree */ GetMultiLevelBomTree(queryDto: ProductManufactureBomDto): Observable> { return this.apiUrls.PostMdp('ProductBomWebApi', 'GetMultiLevelBomTree', queryDto); } /** * 批量更新产品制造BOM明细排序 */ UpdateProductManufactureBomEntriesSort(dtos: ProductManufactureBomEntryDto[]): Observable { return this.apiUrls.PostMdp('ProductBomWebApi', 'UpdateProductManufactureBomEntriesSort', dtos); } /** * 获取产品制造BOM视图数据 */ GetMultiLevelBomViewTree(queryDto: ProductManufactureBomDto): Observable> { return this.apiUrls.PostMdp('ProductBomWebApi', 'GetMultiLevelBomViewTree', queryDto); } /** * 获取外部产品信息 */ GetExtProductInfo(queryDto: ExtProductQueryDto): Observable> { return this.apiUrls.PostMdp('ExternalDataFetcherApi', 'GetExtProductInfo', queryDto); } /** * 批量保存产品档案 */ StoreProductDocumentDatas(ProductDocumentDto: ProductDocumentDto[]): Observable { return this.apiUrls.PostMdp('ProductMaterialWebApi', 'StoreProductDocumentDatas', ProductDocumentDto); } /** * 获取物料单位选择项 */ GetMeasureUnitSelectItems(): Observable> { return this.apiUrls.GetMdp('ProductMaterialWebApi', 'GetMeasureUnitSelectItems'); } }