import { ProductionEmployeeDto, WorkShopLineInfoDto, WorkShopLineInfoQueryDto, WorkShopLineExtProperyQueryDto, WorkShopLineProductionParameter } from '../business-model'; import { Injectable } from '@angular/core'; import { DataResultT, OpResult } from 'rh-base/model'; import { RhApiUrlsService } from 'rh-base/core'; import { Observable } from 'rxjs'; import { ProductionEmployeeQueryDto, ProductionTaskDispatchDto, ProductionTaskOrderDto, ProductionTaskOrderQueryDto } from './task-dispatch-model'; import { SharedService } from 'rh-itm/shared'; import { RhBusinessService } from '../business.service'; @Injectable() export class RhTaskDispatchService { /** 车间列表 */ workshopList: WorkShopLineInfoDto[] = []; /** 生产模块当前选中车间 */ get currentWorkShop(): WorkShopLineInfoDto { return this.businessSer.getWorkshop(); } set currentWorkShop(value: WorkShopLineInfoDto) { this.businessSer.storeWorkshop(value); } constructor(private apiUrls: RhApiUrlsService, public sharedSer: SharedService, public businessSer: RhBusinessService) { // } /** * 获取车间生产参数 */ GetWorkShopLineProductionParameterData( queryDto: WorkShopLineExtProperyQueryDto ): Observable> { return this.businessSer.GetWorkShopLineProductionParameterData(queryDto); } /** * 获取离散车间信息 */ GetDiscreteWorkShopLineInfoDatas(queryDto: WorkShopLineInfoQueryDto): Observable> { return this.apiUrls.PostMdp('FactoryLayoutWebApi', 'GetDiscreteWorkShopLineInfoDatas', queryDto); } /** * 登录生产员工-离散 */ LoginProductionEmployeeDiscrete(queryDto: ProductionEmployeeQueryDto): Observable> { return this.apiUrls.PostEmp('ProductDiscreteApi', 'LoginProductionEmployee', queryDto); } /** * 获取待分派的工序任务单 */ GetWaitDispatchTaskOrderDatas(queryDto: ProductionTaskOrderQueryDto): Observable> { return this.apiUrls.PostEmp('ProductDiscreteApi', 'GetWaitDispatchTaskOrderDatas', queryDto); } /** * 分派生产任务 */ DispatchProcessProduction(dto: ProductionTaskDispatchDto): Observable { return this.apiUrls.PostEmp('ProductDiscreteApi', 'DispatchProcessProduction', dto); } }