@Query(value = "SELECT * from map_patrol_plan " +
" where if(:planId !='', plan_id = :planId,1=1) " +
" AND if(:planName !='', plan_name like :planName,1=1) " +
" AND if(:patrolType !='', patrol_type = :patrolType,1=1) " +
" AND if(:state !='', statee = :state,1=1),nativeQuery = true)
Page<Map<String, Object>> getPatrolPlanList (String planId, String planName, String
patrolType, String state,String beginDate,String endDate,Pageable pageable);
@Query(value = "SELECT *" +
" COUNT(tab2.doneTime) as countDoneTime,tab2.doneTime " +
"FROM ( SELECT " +
" LEFT (tab1.done_time, 10) AS doneTime,tab1.* " +
" FROM " +
" jc_main_form tab1 " +
" WHERE " +
" tab1.process_state = '已完成' " +
" AND tab1.is_delete = 0 " +
"AND tab1.done_time BETWEEN ?2 AND ?3 " +
"and if( ?1 != '', tab1.province = ?1 ,1=1) ) tab2 "
+ "GROUP BY tab2.doneTime "
,nativeQuery = true)
List<JcMainForm> getProvinceNum2(String province,String beginDate, String endDate);