Pārlūkot izejas kodu

[task-1611] 多人串行 通知模板标题修改

szjbdgzl 2 gadi atpakaļ
vecāks
revīzija
ba4c58fa53

+ 11 - 6
ibps-model-root/modules/org-model/src/main/resources/com/lc/ibps/system/persistence/mapping/News.map.xml

@@ -7,8 +7,8 @@
 		<result property="title" column="TITLE_" jdbcType="VARCHAR"/>
 		<result property="userName" column="USER_NAME_" jdbcType="VARCHAR"/>
 		<result property="userId" column="USER_ID_" jdbcType="VARCHAR"/>
-		<result property="publicDate" column="PUBLIC_DATE_" jdbcType="DATE"/>
-		<result property="loseDate" column="LOSE_DATE_" jdbcType="DATE"/>
+		<result property="publicDate" column="PUBLIC_DATE_" jdbcType="TIMESTAMP"/>
+		<result property="loseDate" column="LOSE_DATE_" jdbcType="TIMESTAMP"/>
 		<result property="key" column="KEY_" jdbcType="VARCHAR"/>
 		<result property="author" column="AUTHOR_" jdbcType="VARCHAR"/>
 		<result property="depName" column="DEP_NAME_" jdbcType="VARCHAR"/>
@@ -26,14 +26,19 @@
 	</resultMap>
 	
 	<sql id="columns">
-		ID_,TITLE_,USER_NAME_,USER_ID_,PUBLIC_DATE_,LOSE_DATE_,KEY_,AUTHOR_,DEP_NAME_,DEP_ID_,IS_PUBLIC_,TYPE_,TYPE_ID_,PICTURE_,FILE_ATTACH_,STATUS_,PUBLIC_ITEM_,CONTENT_,TENANT_ID_,IS_INCLUDE_CHILD_
+		ID_,TITLE_,USER_NAME_,USER_ID_,PUBLIC_DATE_,LOSE_DATE_,KEY_,AUTHOR_,DEP_NAME_,DEP_ID_,IS_PUBLIC_,TYPE_,TYPE_ID_,
+		PICTURE_,FILE_ATTACH_,STATUS_,PUBLIC_ITEM_,CONTENT_,TENANT_ID_,IS_INCLUDE_CHILD_
 	</sql>
 	
 	<insert id="create" parameterType="com.lc.ibps.common.system.persistence.entity.NewsPo">
 		INSERT INTO IBPS_NEWS
 		(<include refid="columns"/>)
 		VALUES 
-		(#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{publicDate,jdbcType=DATE}, #{loseDate,jdbcType=DATE}, #{key,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{depName,jdbcType=VARCHAR}, #{depId,jdbcType=VARCHAR}, #{public0,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{typeId,jdbcType=VARCHAR}, #{picture,jdbcType=VARCHAR}, #{fileAttach,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{publicItem,jdbcType=VARCHAR}, #{content,jdbcType=CLOB}, #{tenantId,jdbcType=VARCHAR}, #{includeChild,jdbcType=VARCHAR})
+		(#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
+		#{publicDate,jdbcType=TIMESTAMP}, #{loseDate,jdbcType=TIMESTAMP}, #{key,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
+		#{depName,jdbcType=VARCHAR}, #{depId,jdbcType=VARCHAR}, #{public0,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
+		#{typeId,jdbcType=VARCHAR}, #{picture,jdbcType=VARCHAR}, #{fileAttach,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
+		#{publicItem,jdbcType=VARCHAR}, #{content,jdbcType=CLOB}, #{tenantId,jdbcType=VARCHAR}, #{includeChild,jdbcType=VARCHAR})
 	</insert>
 	
 	<select id="get"   parameterType="java.lang.String" resultMap="NewsPo">
@@ -101,8 +106,8 @@
 		TITLE_=#{title,jdbcType=VARCHAR},
 		USER_NAME_=#{userName,jdbcType=VARCHAR},
 		USER_ID_=#{userId,jdbcType=VARCHAR},
-		PUBLIC_DATE_=#{publicDate,jdbcType=DATE},
-		LOSE_DATE_=#{loseDate,jdbcType=DATE},
+		PUBLIC_DATE_=#{publicDate,jdbcType=TIMESTAMP},
+		LOSE_DATE_=#{loseDate,jdbcType=TIMESTAMP},
 		KEY_=#{key,jdbcType=VARCHAR},
 		AUTHOR_=#{author,jdbcType=VARCHAR},
 		DEP_NAME_=#{depName,jdbcType=VARCHAR},

+ 16 - 13
ibps-provider-root/modules/provider-platform/src/main/java/com/lc/ibps/platform/plan/job/PersonnelTrainJob.java

@@ -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_," +
                 "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_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)";
@@ -64,18 +64,20 @@ public class PersonnelTrainJob extends BaseJob2 {
         if (BeanUtils.isNotEmpty(pxList)){
             for (Map<String, Object> train : pxList) {
                 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+"'");
 
-                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)){
                     nameIds = nameIds + "," + teachIds;
@@ -93,7 +95,7 @@ public class PersonnelTrainJob extends BaseJob2 {
 
                 for (String str : ids){
                     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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
@@ -102,13 +104,13 @@ public class PersonnelTrainJob extends BaseJob2 {
                         "<p>&nbsp;&nbsp;&nbsp;<br/></p ><p><strong>一、培训主题:</strong></p ><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${pei_xun_nei_rong_}</p >" +
                         "<p><strong>二、时间安排:</strong></p ><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始时间:"+starDate+"&nbsp;&nbsp;</p >" +
                         "<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;结束时间:"+endDate+"</p ><p><strong>三、培训地点:</strong></p >" +
-                        "<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+didian+"</p ><p><strong>四、参加人员:</strong></p >" +
+                        "<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+peiXunDiDian+"</p ><p><strong>四、参加人员:</strong></p >" +
                         "<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+nameStr+"</p ><p><br style=\"text-wrap: wrap;\"/></p ><p><br/></p >";
 
                 NewsPo newsPo = new NewsPo();
                 newsPo.setAuthor(userName);
                 newsPo.setContent(content);
-                newsPo.setDepId(train.get("bian_zhi_bu_men_").toString());
+                newsPo.setDepId(bianZhiBuMen);
                 newsPo.setDepName(deptName);
                 newsPo.setPublicDate(new Date());
                 newsPo.setPublicItem("notices");
@@ -116,6 +118,7 @@ public class PersonnelTrainJob extends BaseJob2 {
                 newsPo.setTitle("培训通知");
                 newsPo.setUserId(userId);
                 newsPo.setUserName(userName);
+                newsPo.setType(didian);
                 newsMgrService.save(newsPo);
 
             }