|
|
@@ -4,6 +4,7 @@ import com.lc.ibps.base.core.constants.StringPool;
|
|
|
import com.lc.ibps.base.core.util.BeanUtils;
|
|
|
import com.lc.ibps.base.framework.table.ICommonDao;
|
|
|
import com.lc.ibps.business.service.TrainingStatisticsService;
|
|
|
+import com.lc.ibps.untils.settingUtil;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -58,10 +59,22 @@ public class TrainingStatisticsServiceImpl implements TrainingStatisticsService
|
|
|
sql.append(" order by create_time_ desc");
|
|
|
|
|
|
List<Map<String,Object>> userList = (List<Map<String, Object>>) commonDao.query(sql.toString());
|
|
|
+ String version = settingUtil.getPx();
|
|
|
for (Map<String,Object> map : userList){
|
|
|
|
|
|
String employee = map.get("id_").toString();
|
|
|
- String sumSql = "select count(*)as planedjoin from t_rypxcjb where shi_fou_guo_shen_='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'";
|
|
|
+ String sumSql = "";
|
|
|
+ String signSql = "";
|
|
|
+ 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+"%'";
|
|
|
+ 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+"%'";
|
|
|
+ }else{
|
|
|
+ sumSql = "select count(*)as planedjoin from t_rypxcjb where shi_fou_guo_shen_='已结束' and pei_xun_ren_yuan_ like '%"+employee+"%'";
|
|
|
+ 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+"%'";
|
|
|
+ }
|
|
|
if (BeanUtils.isNotEmpty(startTime)){
|
|
|
sumSql = sumSql + " and date_format(pei_xun_shi_jian_,'%Y-%m-%d')>='"+startTime+"' ";
|
|
|
}
|
|
|
@@ -71,8 +84,6 @@ public class TrainingStatisticsServiceImpl implements TrainingStatisticsService
|
|
|
Map<String,Object> total = commonDao.queryOne(sumSql);
|
|
|
map.put("planedjoin",total.get("planedjoin"));
|
|
|
|
|
|
- String 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+"%'";
|
|
|
if (BeanUtils.isNotEmpty(startTime)){
|
|
|
signSql = signSql + " and date_format(pei_xun_shi_jian_,'%Y-%m-%d')>='"+startTime+"' ";
|
|
|
}
|