package com.ho.flow.service;

import com.ho.common.tools.util.PageResult;
import com.ho.flow.entity.WorkOrder;
import com.ho.flow.vo.req.workorder.WorkOrderAddReqVO;
import com.ho.flow.vo.req.workorder.WorkOrderPageReq;
import com.ho.flow.vo.req.workorder.WorkOrderUpdateReqVO;
import com.ho.flow.vo.resp.workorder.WorkOrderRespVO;
import com.ho.common.tools.entity.OrderDept;

import java.util.List;

/**
 * @Description 工单业务数据
 * Author yule
 * Date 2023/2/4 12:45
 */
public interface WorkOrderService {

    int add(WorkOrderAddReqVO vo);

    int delete(List<Long> ids);

    //单独修改工单表
    int update(WorkOrder vo);

    //修改工单
    int updateWorkOrder(WorkOrderUpdateReqVO vo);

    WorkOrderRespVO getOne(Long id);

    //根据工单号查对象
    WorkOrderRespVO findByOrderId(String orderId);

    WorkOrderRespVO findByProcInstId(String procInstId);

    WorkOrderRespVO findByProcInstIdAndTitle(String processInstanceId, String title);

    //查工单列表
    List<WorkOrderRespVO> findList(WorkOrderPageReq vo);

    PageResult<WorkOrderRespVO> getPage(WorkOrderPageReq vo);

    List<OrderDept> selectOrderUser(Integer groupId , List<String> postCodes);

    WorkOrderRespVO selectByProcessInstId(String processInstId);

    WorkOrderRespVO findByOrderIdAndTitle(String orderId, String title);

    Integer selectByStationId(Integer stationId);

}
