Browse Source

薪酬统计修改和排序

shenhao 3 years ago
parent
commit
12aaef3929

+ 4 - 4
src/main/java/com/ssj/statistics/dao/impl/StatisticsQueryImpl.java

@@ -208,7 +208,7 @@ public class StatisticsQueryImpl implements IStatisticsQueryDao {
         sql.append("where t.type=8 and t11.is_mark in(0,2) and t11.is_feedback=1 \n");
         sql.append("and t.end_time like concat(?,'%') \n");
         queryParams.add(month);
-        sql.append("GROUP BY t11.teacher_id\n");
+        sql.append("GROUP BY t11.teacher_id,DATE_FORMAT(t.end_time,'%Y-%m-%d')\n");
         sql.append(") a");
         return dao.findList(sql.toString(),queryParams.toArray(),TeacherSalarysVO.class);
     }
@@ -263,12 +263,12 @@ public class StatisticsQueryImpl implements IStatisticsQueryDao {
         StringBuffer sql = new StringBuffer();
         List<Object> queryParams = new ArrayList<>();
         sql.append("select t.work_date as workDate,t.correct_nums as  correctNums,  \n");
-        sql.append("t.overtime_nums as overtimeNums,t.correct_nums as  perkNums,  \n");
-        sql.append(" SEC_TO_TIME(t.perk_efficiency) as perkEfficiency,t.error_nums as  errorNums,  \n");
+        sql.append("t.overtime_nums as overtimeNums,t.perk_nums as  perkNums,  \n");
+        sql.append(" ifnull(replace(concat(SEC_TO_TIME(t.perk_efficiency),''),'.000000',''),'00:00:00') as perkEfficiency,t.error_nums as  errorNums,  \n");
         sql.append(" t.accuracy,t.perk_salary as  perkSalary,  \n");
         sql.append(" t.other_salary as otherSalary,t.salary as  salary  \n");
         sql.append("from tb_teacher_salary t \n");
-        sql.append("where t.teacher_id = ? and t.month=? and t.year=?");
+        sql.append("where t.teacher_id = ? and t.month=? and t.year=? order by t.work_date asc");
         queryParams.add(userId);
         queryParams.add(month);
         queryParams.add(year);