|
@@ -26,15 +26,15 @@ public interface ManHourMapper extends JpaRepository<ManHourInfoEntity, Integer>
|
|
|
"man.start_date startDate,man.end_date endDate,man.create_time createTime,man.flow_task_status flowTaskStatus, " +
|
|
|
"man.process_instance_id processInstanceId ,man.process_definition_id processDefinitionId " +
|
|
|
"from man_hour_info man WHERE " +
|
|
|
- "if( ?1 !='', (man.create_user = ?1 or man.ratify_user like %?1% ) , 1=1) and " +
|
|
|
- "if( ?2 !='', man.flow_task_status = ?2 , 1=1) and " +
|
|
|
- "if( ?3 !='', man.create_date >=?3 , 1=1) and " +
|
|
|
- "if( ?4 !='', man.end_date <=?4 , 1=1) order by man.create_date desc"
|
|
|
+ "if( ?1 !=null, (man.create_user = ?1 or man.ratify_user like %?1% ) , 1=1) and " +
|
|
|
+ "if( ?2 !='' , man.flow_task_status = ?2 , 1=1) and " +
|
|
|
+ "if( ?3 !=null, man.start_date >=?3 , 1=1) and " +
|
|
|
+ "if( ?4 !=null, man.end_date <=?4 , 1=1) order by man.create_time desc"
|
|
|
, countQuery = "SELECT count(1) from man_hour_info man WHERE 1=1 and " +
|
|
|
- "if( ?1 !='', (man.create_user = ?1 or man.ratify_user like %?1% ) , 1=1) and " +
|
|
|
+ "if( ?1 !=null, (man.create_user = ?1 or man.ratify_user like %?1% ) , 1=1) and " +
|
|
|
"if( ?2 !='', man.flow_task_status = ?2 , 1=1) and " +
|
|
|
- "if( ?3 !='', man.create_date >=?3 , 1=1) and " +
|
|
|
- "if( ?4 !='', man.end_date <=?4 , 1=1) "
|
|
|
+ "if( ?3 !=null, man.start_date >=?3 , 1=1) and " +
|
|
|
+ "if( ?4 !=null, man.end_date <=?4 , 1=1) "
|
|
|
, nativeQuery = true)
|
|
|
Page<Map<String, String>> findManHourAll(String userId, Integer flowTaskStatus, Date createDate, String endDate, Pageable page);
|
|
|
|