WXDao_getWeekWorkStati.sql 352 B

12345678910
  1. select left(task.planendtime,10) date,
  2. floor((sum(case when task.taskstatus ='20' then 1 else 0 end)/count(task.id))*100) rate
  3. from p_projecttask task
  4. where 1=1
  5. <#if projectid ?exists && projectid ?length gt 0>
  6. and task.projectid = :projectid
  7. </#if>
  8. and left(task.planendtime,10) <= :today
  9. and left(task.planendtime,10) > :laseweekday
  10. group by date