|
@@ -54,7 +54,7 @@ public class PersonnelTrainJob extends BaseJob2 {
|
|
|
|
|
|
|
|
String sql = "select p.id_,p.bian_zhi_ren_,e.name_,p.bian_zhi_bu_men_,d.name_ as dept_name_,p.pei_xun_nei_rong_," +
|
|
String sql = "select p.id_,p.bian_zhi_ren_,e.name_,p.bian_zhi_bu_men_,d.name_ as dept_name_,p.pei_xun_nei_rong_," +
|
|
|
"date_format(p.pei_xun_shi_jian_,'%Y-%m-%d') pei_xun_shi_jian_,date_format(p.pei_xun_jie_shu_s,'%Y-%m-%d') " +
|
|
"date_format(p.pei_xun_shi_jian_,'%Y-%m-%d') pei_xun_shi_jian_,date_format(p.pei_xun_jie_shu_s,'%Y-%m-%d') " +
|
|
|
- " pei_xun_jie_shu_s,p.pei_xun_ren_yuan_,p.pei_xun_di_dian_,p.pei_xun_lao_shi_ 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_ >=now() and pei_xun_shi_jian_<=date_add(now(), interval 1 week)";
|
|
@@ -64,18 +64,20 @@ public class PersonnelTrainJob extends BaseJob2 {
|
|
|
if (BeanUtils.isNotEmpty(pxList)){
|
|
if (BeanUtils.isNotEmpty(pxList)){
|
|
|
for (Map<String, Object> train : pxList) {
|
|
for (Map<String, Object> train : pxList) {
|
|
|
String id = train.get("id_").toString();
|
|
String id = train.get("id_").toString();
|
|
|
- String userId = train.get("bian_zhi_ren_").toString();
|
|
|
|
|
- String userName = train.get("name_").toString();
|
|
|
|
|
- String deptName = train.get("dept_name_").toString();
|
|
|
|
|
|
|
+ String userId = StringUtil.defaultString(train.get("bian_zhi_ren_").toString(),"");
|
|
|
|
|
+ String userName = StringUtil.defaultString(train.get("name_").toString(),"");
|
|
|
|
|
+ String deptName = StringUtil.defaultString(train.get("dept_name_").toString(),"");
|
|
|
|
|
|
|
|
commonDao.execute("update t_rypxcjb set shi_fou_guo_shen_='未开始' where id_= '"+id+"'");
|
|
commonDao.execute("update t_rypxcjb set shi_fou_guo_shen_='未开始' where id_= '"+id+"'");
|
|
|
|
|
|
|
|
- String peiXunNeiRong = train.get("pei_xun_nei_rong_").toString();
|
|
|
|
|
- String starDate = train.get("pei_xun_shi_jian_").toString();
|
|
|
|
|
- String endDate = train.get("pei_xun_jie_shu_s").toString();
|
|
|
|
|
- String didian = train.get("pei_xun_jie_shu_s").toString();
|
|
|
|
|
- String nameIds = train.get("pei_xun_ren_yuan_").toString();
|
|
|
|
|
- String teachIds = train.get("pei_xun_lao_shi_").toString();
|
|
|
|
|
|
|
+ String peiXunNeiRong = StringUtil.defaultString(train.get("pei_xun_nei_rong_").toString(),"");
|
|
|
|
|
+ String starDate = StringUtil.defaultString(train.get("pei_xun_shi_jian_").toString(),"");
|
|
|
|
|
+ String endDate = StringUtil.defaultString(train.get("pei_xun_jie_shu_s").toString(),"");
|
|
|
|
|
+ String didian = StringUtil.defaultString(train.get("di_dian_").toString(),"");
|
|
|
|
|
+ String peiXunDiDian = StringUtil.defaultString(train.get("pei_xun_di_dian_").toString(),"");
|
|
|
|
|
+ String nameIds = StringUtil.defaultString(train.get("pei_xun_ren_yuan_").toString(),"");
|
|
|
|
|
+ String teachIds = StringUtil.defaultString(train.get("pei_xun_lao_shi_").toString(),"");
|
|
|
|
|
+ String bianZhiBuMen = StringUtil.defaultString(train.get("pei_xun_lao_shi_").toString(),"");
|
|
|
|
|
|
|
|
if (BeanUtils.isNotEmpty(teachIds)){
|
|
if (BeanUtils.isNotEmpty(teachIds)){
|
|
|
nameIds = nameIds + "," + teachIds;
|
|
nameIds = nameIds + "," + teachIds;
|
|
@@ -93,7 +95,7 @@ public class PersonnelTrainJob extends BaseJob2 {
|
|
|
|
|
|
|
|
for (String str : ids){
|
|
for (String str : ids){
|
|
|
String name = partyEmployeeRepository.get(str).getName();
|
|
String name = partyEmployeeRepository.get(str).getName();
|
|
|
- sendCalendar(id,str,name,peiXunNeiRong,starDate,endDate,didian,nameStr.toString());
|
|
|
|
|
|
|
+ sendCalendar(id,str,name,peiXunNeiRong,starDate,endDate,peiXunDiDian,nameStr.toString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String content = "<p> " +
|
|
String content = "<p> " +
|
|
@@ -102,13 +104,13 @@ public class PersonnelTrainJob extends BaseJob2 {
|
|
|
"<p> <br/></p ><p><strong>一、培训主题:</strong></p ><p> ${pei_xun_nei_rong_}</p >" +
|
|
"<p> <br/></p ><p><strong>一、培训主题:</strong></p ><p> ${pei_xun_nei_rong_}</p >" +
|
|
|
"<p><strong>二、时间安排:</strong></p ><p> 开始时间:"+starDate+" </p >" +
|
|
"<p><strong>二、时间安排:</strong></p ><p> 开始时间:"+starDate+" </p >" +
|
|
|
"<p> 结束时间:"+endDate+"</p ><p><strong>三、培训地点:</strong></p >" +
|
|
"<p> 结束时间:"+endDate+"</p ><p><strong>三、培训地点:</strong></p >" +
|
|
|
- "<p> "+didian+"</p ><p><strong>四、参加人员:</strong></p >" +
|
|
|
|
|
|
|
+ "<p> "+peiXunDiDian+"</p ><p><strong>四、参加人员:</strong></p >" +
|
|
|
"<p> "+nameStr+"</p ><p><br style=\"text-wrap: wrap;\"/></p ><p><br/></p >";
|
|
"<p> "+nameStr+"</p ><p><br style=\"text-wrap: wrap;\"/></p ><p><br/></p >";
|
|
|
|
|
|
|
|
NewsPo newsPo = new NewsPo();
|
|
NewsPo newsPo = new NewsPo();
|
|
|
newsPo.setAuthor(userName);
|
|
newsPo.setAuthor(userName);
|
|
|
newsPo.setContent(content);
|
|
newsPo.setContent(content);
|
|
|
- newsPo.setDepId(train.get("bian_zhi_bu_men_").toString());
|
|
|
|
|
|
|
+ newsPo.setDepId(bianZhiBuMen);
|
|
|
newsPo.setDepName(deptName);
|
|
newsPo.setDepName(deptName);
|
|
|
newsPo.setPublicDate(new Date());
|
|
newsPo.setPublicDate(new Date());
|
|
|
newsPo.setPublicItem("notices");
|
|
newsPo.setPublicItem("notices");
|
|
@@ -116,6 +118,7 @@ public class PersonnelTrainJob extends BaseJob2 {
|
|
|
newsPo.setTitle("培训通知");
|
|
newsPo.setTitle("培训通知");
|
|
|
newsPo.setUserId(userId);
|
|
newsPo.setUserId(userId);
|
|
|
newsPo.setUserName(userName);
|
|
newsPo.setUserName(userName);
|
|
|
|
|
+ newsPo.setType(didian);
|
|
|
newsMgrService.save(newsPo);
|
|
newsMgrService.save(newsPo);
|
|
|
|
|
|
|
|
}
|
|
}
|