package cn.quantgroup.third.customer.repo;

import cn.quantgroup.customer.rest.vo.thirdworkorder.ThirdWorkOrderVo;
import cn.quantgroup.third.customer.entity.LhpdsCustomer2;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface LhpdsCustomer2Repo extends JpaRepository<LhpdsCustomer2, Long> , JpaSpecificationExecutor<LhpdsCustomer2> {

 /*   @Query(value = "SELECT new cn.quantgroup.customer.rest.vo.thirdworkorder.ThirdWorkOrderVo (lc.id,lwpi.processInstanceId,lc.field10,lc.createUser,"
        + "assignee.assignee,lwpi.priority,lwpi.global_state,lc.field17)"
        + "FROM LhpdsCustomer2 lc  left join WorkflowProcessInstance lwpi on lc .id =lwpi.dataId "
        + "left join WorkflowProcessInstanceTaskAssignee assignee "
        + "on lwpi.processInstanceId = assignee.processInstanceId and assignee.taskName ='处理工单' and assignee.state =0", nativeQuery = true)
    Page<ThirdWorkOrderVo> findWorkOrder(String a,Pageable pageable);

*/
 /* @Query(value = "SELECT new cn.quantgroup.customer.rest.vo.thirdworkorder.ThirdWorkOrderVo ()"
      + "lc.id,lc.create_user,assignee.assignee ,lc.field10 orderId,lc.field17 problemDesc,lwpi.process_instance_id ,lwpi.priority ,lwpi.global_state "
      + "FROM lhpds_customer_2 lc  left join lhpds_workflow_process_instance lwpi on lc .id =lwpi.data_id "
      + "left join lhpds_workflow_process_instance_task_assignee assignee "
      + "on lwpi.process_instance_id = assignee.process_instance_id and assignee.task_name ='处理工单' and assignee.state =0", nativeQuery = true)
  Page<ThirdWorkOrderVo> findWorkOrder(String a,Pageable pageable);*/
}
