|
@@ -65,15 +65,20 @@ public class TrainingStatisticsServiceImpl implements TrainingStatisticsService
|
|
|
String employee = map.get("id_").toString();
|
|
String employee = map.get("id_").toString();
|
|
|
String sumSql = "";
|
|
String sumSql = "";
|
|
|
String signSql = "";
|
|
String signSql = "";
|
|
|
|
|
+ //当userList中某些用户有多个部门的时候,本来查的A部门,但是会实际上把其他部门的数据也统计进来,所以做这个修改
|
|
|
|
|
+ String deptCondition = "";
|
|
|
|
|
+ if (BeanUtils.isNotEmpty(deptId)){
|
|
|
|
|
+ deptCondition = " and bian_zhi_bu_men_='" + deptId + "'";
|
|
|
|
|
+ }
|
|
|
if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
|
|
if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
|
|
|
//新版培训
|
|
//新版培训
|
|
|
- sumSql = "select count(*)as planedjoin from t_lhrypxjlb where pei_xun_zhuang_ta='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'";
|
|
|
|
|
|
|
+ sumSql = "select count(*)as planedjoin from t_lhrypxjlb where pei_xun_zhuang_ta='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'" + deptCondition;
|
|
|
signSql = "select count(distinct guan_lian_id_) as truejoin from t_qdxxb where ren_yuan_id_ ='"+employee+"' and guan_lian_id_ " +
|
|
signSql = "select count(distinct guan_lian_id_) as truejoin from t_qdxxb where ren_yuan_id_ ='"+employee+"' and guan_lian_id_ " +
|
|
|
- " in(select id_ from t_lhrypxjlb where pei_xun_zhuang_ta='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'";
|
|
|
|
|
|
|
+ " in(select id_ from t_lhrypxjlb where pei_xun_zhuang_ta='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'" + deptCondition;
|
|
|
}else{
|
|
}else{
|
|
|
- sumSql = "select count(*)as planedjoin from t_rypxcjb where shi_fou_guo_shen_='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'";
|
|
|
|
|
|
|
+ sumSql = "select count(*)as planedjoin from t_rypxcjb where shi_fou_guo_shen_='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'" + deptCondition;
|
|
|
signSql = "select count(distinct guan_lian_id_) as truejoin from t_qdxxb where ren_yuan_id_ ='"+employee+"' and guan_lian_id_ " +
|
|
signSql = "select count(distinct guan_lian_id_) as truejoin from t_qdxxb where ren_yuan_id_ ='"+employee+"' and guan_lian_id_ " +
|
|
|
- " in(select id_ from t_rypxcjb where shi_fou_guo_shen_='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'";
|
|
|
|
|
|
|
+ " in(select id_ from t_rypxcjb where shi_fou_guo_shen_='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'" + deptCondition;
|
|
|
}
|
|
}
|
|
|
if (BeanUtils.isNotEmpty(startTime)){
|
|
if (BeanUtils.isNotEmpty(startTime)){
|
|
|
sumSql = sumSql + " and date_format(pei_xun_shi_jian_,'%Y-%m-%d')>='"+startTime+"' ";
|
|
sumSql = sumSql + " and date_format(pei_xun_shi_jian_,'%Y-%m-%d')>='"+startTime+"' ";
|