|
@@ -2,6 +2,7 @@ package com.ssj.statistics.dao.impl;
|
|
|
|
|
|
import com.ssj.api.domain.vo.homework.CheckDetailVO;
|
|
import com.ssj.api.domain.vo.homework.CheckDetailVO;
|
|
import com.ssj.api.domain.vo.statistics.ListVO;
|
|
import com.ssj.api.domain.vo.statistics.ListVO;
|
|
|
|
+import com.ssj.api.domain.vo.statistics.TeacherSalarysVO;
|
|
import com.ssj.framework.core.persistence.PagingHibernateJdbcDao;
|
|
import com.ssj.framework.core.persistence.PagingHibernateJdbcDao;
|
|
import com.ssj.statistics.dao.IStatisticsQueryDao;
|
|
import com.ssj.statistics.dao.IStatisticsQueryDao;
|
|
import org.apache.commons.collections4.MapUtils;
|
|
import org.apache.commons.collections4.MapUtils;
|
|
@@ -167,6 +168,35 @@ public class StatisticsQueryImpl implements IStatisticsQueryDao {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
+ public List<TeacherSalarysVO> addTeacherSalarysData(String month) {
|
|
|
|
+ StringBuffer sql = new StringBuffer();
|
|
|
|
+ List<Object> queryParams = new ArrayList<>();
|
|
|
|
+ sql.append("SELECT a.correct_nums,a.teacher_id,a.overtime_nums,a.perk_nums,a.error_nums,a.work_date,a.`month`,a.`year`,FLOOR(a.sum_perk)/a.perk_nums as perk_efficiency,Floor(100*(a.correct_nums-a.error_nums)/a.correct_nums) as accuracy,\n");
|
|
|
|
+ sql.append("(a.perk_nums-a.error_nums)*0.15 as perk_salary,(a.correct_nums-a.perk_nums-a.error_nums)*0.15 as other_salary,a.create_time\n" );
|
|
|
|
+ sql.append("from (\n" );
|
|
|
|
+ sql.append("SELECT\n" );
|
|
|
|
+ sql.append("count(1) as correct_nums,\n" );
|
|
|
|
+ sql.append("0 as overtime_nums,\n" );
|
|
|
|
+ sql.append("count(IF(DATE_FORMAT(t.start_time,'%H:%s')>='18:00' and DATE_FORMAT(t.start_time,'%H:%s')<='20:00',TRUE,null)) as perk_nums,\n" );
|
|
|
|
+ sql.append("count(IF(t.is_check_error=1,TRUE,null)) as error_nums,\n" );
|
|
|
|
+ sql.append("DATE_FORMAT(t.start_time,'%Y-%m-%d') as work_date,\n" );
|
|
|
|
+ sql.append("2 as month,\n" );
|
|
|
|
+ sql.append("2021 as year,\n" );
|
|
|
|
+ sql.append("NOW() as create_time,\n" );
|
|
|
|
+ sql.append("sum(IF(DATE_FORMAT(t.start_time,'%H:%s')>='18:00' and DATE_FORMAT(t.start_time,'%H:%s')<='20:00',t.correction_time,0)) as sum_perk,\n" );
|
|
|
|
+ sql.append("t11.teacher_id,\n" );
|
|
|
|
+ sql.append("t.end_time,\n" );
|
|
|
|
+ sql.append("t.start_time \n" );
|
|
|
|
+ sql.append("from scon_homework_picture_correct t \n" );
|
|
|
|
+ sql.append("join scon_homework_picture t11 on t.homework_picture_id = t11.id\n" );
|
|
|
|
+ sql.append("where t.type=8 and t11.is_mark in(0,2) \n" );
|
|
|
|
+ sql.append("and t.start_time like '%2021-02%'\n" );
|
|
|
|
+ sql.append("GROUP BY t11.teacher_id\n" );
|
|
|
|
+ sql.append(") a");
|
|
|
|
+ return dao.findList(sql.toString(),queryParams.toArray(),TeacherSalarysVO.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
public List<CheckDetailVO> checkDetailList(String homeworkId) {
|
|
public List<CheckDetailVO> checkDetailList(String homeworkId) {
|
|
StringBuffer sql = new StringBuffer();
|
|
StringBuffer sql = new StringBuffer();
|
|
List<Object> queryParams = new ArrayList<>();
|
|
List<Object> queryParams = new ArrayList<>();
|