|
@@ -18,10 +18,7 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.Date;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author gaozl
|
|
* @author gaozl
|
|
@@ -50,7 +47,8 @@ public class PersonnelTrainJob extends BaseJob2 {
|
|
|
" pei_xun_jie_shu_s,p.pei_xun_ren_yuan_,p.pei_xun_di_dian_,p.pei_xun_lao_shi_,p.di_dian_ from t_rypxcjb p " +
|
|
" pei_xun_jie_shu_s,p.pei_xun_ren_yuan_,p.pei_xun_di_dian_,p.pei_xun_lao_shi_,p.di_dian_ from t_rypxcjb p " +
|
|
|
"left join ibps_party_employee e on e.id_=p.bian_zhi_ren_ " +
|
|
"left join ibps_party_employee e on e.id_=p.bian_zhi_ren_ " +
|
|
|
"left join ibps_party_position d on d.id_=p.bian_zhi_bu_men_ " +
|
|
"left join ibps_party_position d on d.id_=p.bian_zhi_bu_men_ " +
|
|
|
- "where shi_fou_guo_shen_ ='未发布' and pei_xun_shi_jian_ >=now() and pei_xun_shi_jian_<=date_add(now(), interval 1 week)";
|
|
|
|
|
|
|
+ "where shi_fou_guo_shen_ ='未发布' and pei_xun_shi_jian_ >=CURRENT_DATE " +
|
|
|
|
|
+ " and pei_xun_shi_jian_<=DATE_FORMAT(date_add(now(), interval 1 week),'%Y-%m-%d')";
|
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
List<Map<String, Object>> pxList = (List<Map<String, Object>>) commonDao.query(sql);
|
|
List<Map<String, Object>> pxList = (List<Map<String, Object>>) commonDao.query(sql);
|
|
|
|
|
|
|
@@ -87,6 +85,19 @@ public class PersonnelTrainJob extends BaseJob2 {
|
|
|
|
|
|
|
|
if (BeanUtils.isNotEmpty(teachIds)){
|
|
if (BeanUtils.isNotEmpty(teachIds)){
|
|
|
nameIds = nameIds + "," + teachIds;
|
|
nameIds = nameIds + "," + teachIds;
|
|
|
|
|
+ String[] idsArray = nameIds.split(",");
|
|
|
|
|
+ Set<String> uniqueIds = new HashSet<>();
|
|
|
|
|
+ for (String ids : idsArray) {
|
|
|
|
|
+ uniqueIds.add(ids.trim());
|
|
|
|
|
+ }
|
|
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
|
|
+ for (String ids : uniqueIds) {
|
|
|
|
|
+ if (sb.length() > 0) {
|
|
|
|
|
+ sb.append(",");
|
|
|
|
|
+ }
|
|
|
|
|
+ sb.append(ids);
|
|
|
|
|
+ }
|
|
|
|
|
+ nameIds = sb.toString();
|
|
|
}
|
|
}
|
|
|
StringBuilder nameStr = new StringBuilder();
|
|
StringBuilder nameStr = new StringBuilder();
|
|
|
String[] ids = nameIds.split(",");
|
|
String[] ids = nameIds.split(",");
|