|
@@ -1119,9 +1119,17 @@ public class StatisticServiceImpl implements StatisticService {
|
|
|
"FROM t_rypxcjb " +
|
|
"FROM t_rypxcjb " +
|
|
|
"WHERE shi_fou_guo_shen_ = '已结束' %s) AS subquery";
|
|
"WHERE shi_fou_guo_shen_ = '已结束' %s) AS subquery";
|
|
|
|
|
|
|
|
- String signSqlTemplate = "SELECT count(DISTINCT b.ren_yuan_id_) total_num from t_rypxcjb a,t_qdxxb b " +
|
|
|
|
|
- " WHERE a.id_ =b.guan_lian_id_ and FIND_IN_SET(b.ren_yuan_id_,a.pei_xun_ren_yuan_) " +
|
|
|
|
|
- " and a.shi_fou_guo_shen_ = '已结束' %s ";
|
|
|
|
|
|
|
+ // String signSqlTemplate = "SELECT count(DISTINCT b.ren_yuan_id_) total_num from t_rypxcjb a,t_qdxxb b " +
|
|
|
|
|
+ // " WHERE a.id_ =b.guan_lian_id_ and FIND_IN_SET(b.ren_yuan_id_,a.pei_xun_ren_yuan_) " +
|
|
|
|
|
+ // " and a.shi_fou_guo_shen_ = '已结束' %s ";
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ String signSqlTemplate = "SELECT COUNT(*) total_num " +
|
|
|
|
|
+ " FROM t_rypxcjb a " +
|
|
|
|
|
+ " JOIN t_qdxxb b ON a.id_ = b.guan_lian_id_ " +
|
|
|
|
|
+ " WHERE a.shi_fou_guo_shen_ = '已结束' %s " ;
|
|
|
|
|
+
|
|
|
|
|
+ String str = " AND FIND_IN_SET(b.ren_yuan_id_, a.pei_xun_ren_yuan_) > 0";
|
|
|
|
|
|
|
|
String sumRealSqlTemplate = "SELECT COALESCE(SUM(num),0) AS realNum FROM (" +
|
|
String sumRealSqlTemplate = "SELECT COALESCE(SUM(num),0) AS realNum FROM (" +
|
|
|
"SELECT count(id_) as num FROM t_qdxxb " +
|
|
"SELECT count(id_) as num FROM t_qdxxb " +
|
|
@@ -1129,6 +1137,11 @@ public class StatisticServiceImpl implements StatisticService {
|
|
|
"WHERE shi_fou_guo_shen_ = '已结束' %s) " +
|
|
"WHERE shi_fou_guo_shen_ = '已结束' %s) " +
|
|
|
"GROUP BY guan_lian_id_, ren_yuan_id_) AS re";
|
|
"GROUP BY guan_lian_id_, ren_yuan_id_) AS re";
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
for (String date : dateStr) {
|
|
for (String date : dateStr) {
|
|
|
TraineeStatisticsDto traineeDto = new TraineeStatisticsDto();
|
|
TraineeStatisticsDto traineeDto = new TraineeStatisticsDto();
|
|
|
|
|
|
|
@@ -1164,6 +1177,7 @@ public class StatisticServiceImpl implements StatisticService {
|
|
|
traineeDto.setNumReal(numReal);
|
|
traineeDto.setNumReal(numReal);
|
|
|
// 未签到人数
|
|
// 未签到人数
|
|
|
// 实际参训签到(属于该培训的)
|
|
// 实际参训签到(属于该培训的)
|
|
|
|
|
+ signSql = signSql + str;
|
|
|
Map<String, Object> signMap = commonDao.queryOne(signSql);
|
|
Map<String, Object> signMap = commonDao.queryOne(signSql);
|
|
|
int numSign = Integer.parseInt(signMap==null?"0":signMap.get("total_num").toString());
|
|
int numSign = Integer.parseInt(signMap==null?"0":signMap.get("total_num").toString());
|
|
|
traineeDto.setNumUn(numAll==0?0:numAll-numSign);
|
|
traineeDto.setNumUn(numAll==0?0:numAll-numSign);
|