|
|
@@ -31,37 +31,42 @@ public class AuditServiceImpl implements AuditService {
|
|
|
@Override
|
|
|
public void NoticeByOneMonth(){
|
|
|
|
|
|
- String sql = "select ri_qi_,bian_zhi_bu_men_,di_dian_,date_format(date_sub(ri_qi_, interval 5 day),'%Y-%m-%d') as advance,now() as current_date_,YEAR(ri_qi_) as year_ from t_gglpsjhx " +
|
|
|
+ String sql = "select id_,ri_qi_,bian_zhi_bu_men_,di_dian_,date_format(date_sub(ri_qi_, interval 5 day),'%Y-%m-%d') as advance,now() as current_date_,YEAR(ri_qi_) as year_ from t_gglpsjhx " +
|
|
|
" where shi_fou_guo_shen_='已完成' and (date_format(ri_qi_,'%Y-%m-%d')<=date_format(date_add(now(), interval 1 month),'%Y-%m-%d')" +
|
|
|
" and date_format(ri_qi_,'%Y-%m-%d')>=CURRENT_DATE ) ";
|
|
|
List<Map<String, Object>> list = (List<Map<String, Object>>) commonDao.query(sql);
|
|
|
|
|
|
if (BeanUtils.isNotEmpty(list)){
|
|
|
for (Map<String, Object> glps : list) {
|
|
|
- String name = getJykzr(glps.get("di_dian_").toString());
|
|
|
- String time = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
|
|
|
- String content = "<p style=\"font-weight: 600; font-size: 24px; text-align: center;\"> " +
|
|
|
- "<strong>关于"+glps.get("year_")+"年度管理评审的通知</strong> </p > <p style=\"margin: 16px 0 10px;\">科室管理层及各专业组:</p > " +
|
|
|
- "<p style=\"text-indent: 2em; line-height: 2;\">经检验科管理层商议决定,计划于"+glps.get("ri_qi_")+"召开质量管理体系运行的管理评审会议," +
|
|
|
- "请各职能组别和专业组负责人按照日程计划表,编制管理评审输入汇报材料,并提前5个工作日,于"+glps.get("advance")+"前发送给质量负责人核实整理后提交检验科主任," +
|
|
|
- "如有异议,可在3个工作日内提出。</p > <p style=\"margin: 10px 0; text-indent: 2em;\">特此通知</p > <p style=\"margin: 10px 0;" +
|
|
|
- " text-align: right;\">科室主任:"+name+"</p > <p style=\"text-align: right;\">"+time+"</p >";
|
|
|
-
|
|
|
- NewsPo newsPo = new NewsPo();
|
|
|
- newsPo.setAuthor("系统管理员");
|
|
|
- newsPo.setContent(content);
|
|
|
- newsPo.setPublicDate(new Date());
|
|
|
- newsPo.setPublicItem("notices");
|
|
|
- newsPo.setPublic0("Y");
|
|
|
- newsPo.setStatus("publish");
|
|
|
- newsPo.setTitle("管理评审通知");
|
|
|
- newsPo.setUserId("1");
|
|
|
- newsPo.setUserName("系统用户");
|
|
|
- newsPo.setDepId(glps.get("bian_zhi_bu_men_").toString());
|
|
|
- if (BeanUtils.isNotEmpty(glps.get("di_dian_"))){
|
|
|
- newsPo.setType(glps.get("di_dian_").toString());
|
|
|
+ String id = glps.get("id_").toString();
|
|
|
+ Map<String, Object> map = commonDao.queryOne(" SELECT id_ from ibps_news WHERE KEY_ ='"+id+"' limit 1");
|
|
|
+ if (BeanUtils.isEmpty(map)){
|
|
|
+ String name = getJykzr(glps.get("di_dian_").toString());
|
|
|
+ String time = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
|
|
|
+ String content = "<p style=\"font-weight: 600; font-size: 24px; text-align: center;\"> " +
|
|
|
+ "<strong>关于"+glps.get("year_")+"年度管理评审的通知</strong> </p > <p style=\"margin: 16px 0 10px;\">科室管理层及各专业组:</p > " +
|
|
|
+ "<p style=\"text-indent: 2em; line-height: 2;\">经检验科管理层商议决定,计划于"+glps.get("ri_qi_")+"召开质量管理体系运行的管理评审会议," +
|
|
|
+ "请各职能组别和专业组负责人按照日程计划表,编制管理评审输入汇报材料,并提前5个工作日,于"+glps.get("advance")+"前发送给质量负责人核实整理后提交检验科主任," +
|
|
|
+ "如有异议,可在3个工作日内提出。</p > <p style=\"margin: 10px 0; text-indent: 2em;\">特此通知</p > <p style=\"margin: 10px 0;" +
|
|
|
+ " text-align: right;\">科室主任:"+name+"</p > <p style=\"text-align: right;\">"+time+"</p >";
|
|
|
+
|
|
|
+ NewsPo newsPo = new NewsPo();
|
|
|
+ newsPo.setAuthor("系统管理员");
|
|
|
+ newsPo.setContent(content);
|
|
|
+ newsPo.setPublicDate(new Date());
|
|
|
+ newsPo.setPublicItem("notices");
|
|
|
+ newsPo.setPublic0("Y");
|
|
|
+ newsPo.setStatus("publish");
|
|
|
+ newsPo.setTitle("管理评审通知");
|
|
|
+ newsPo.setUserId("1");
|
|
|
+ newsPo.setKey(id);
|
|
|
+ newsPo.setUserName("系统用户");
|
|
|
+ newsPo.setDepId(glps.get("bian_zhi_bu_men_").toString());
|
|
|
+ if (BeanUtils.isNotEmpty(glps.get("di_dian_"))){
|
|
|
+ newsPo.setType(glps.get("di_dian_").toString());
|
|
|
+ }
|
|
|
+ newsMgrService.save(newsPo);
|
|
|
}
|
|
|
- newsMgrService.save(newsPo);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -70,44 +75,50 @@ public class AuditServiceImpl implements AuditService {
|
|
|
// 内审通知
|
|
|
@Override
|
|
|
public void internalAudit(){
|
|
|
- String sql = "SELECT nei_shen_kai_shi_,nei_shen_jie_shu_,bian_zhi_bu_men_,di_dian_,kuai_zhao_,nei_shen_zu_cheng,nei_shen_zu_zu_ch,nei_shen_ren_yuan from t_nbss WHERE shi_fou_guo_shen_='已完成' " +
|
|
|
+ String sql = "SELECT id_,nei_shen_kai_shi_,nei_shen_jie_shu_,bian_zhi_bu_men_,di_dian_,kuai_zhao_,nei_shen_zu_cheng,nei_shen_zu_zu_ch,nei_shen_ren_yuan from t_nbss WHERE shi_fou_guo_shen_='已完成' " +
|
|
|
"and (date_format(nei_shen_kai_shi_,'%Y-%m-%d')<=date_format(date_add(now(), interval 1 month),'%Y-%m-%d') and date_format(nei_shen_kai_shi_,'%Y-%m-%d')>=CURRENT_DATE ) ";
|
|
|
List<Map<String, Object>> list = (List<Map<String, Object>>) commonDao.query(sql);
|
|
|
|
|
|
if (BeanUtils.isNotEmpty(list)){
|
|
|
for (Map<String, Object> nbps : list) {
|
|
|
- String group = getUserName(nbps.get("nei_shen_ren_yuan").toString());//组员
|
|
|
- String leaders = getUserName(nbps.get("nei_shen_zu_zu_ch").toString());// 组长
|
|
|
- String director = getUserName(nbps.get("nei_shen_zu_cheng").toString());// 检验科主任
|
|
|
- String time = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
|
|
|
-
|
|
|
- String content = "<p style=\"font-weight: 600; font-size: 24px; text-align: center;\"> <strong>内部审核通知</strong> " +
|
|
|
- "</p > <p style=\"margin: 16px 0 10px;\">科室管理层及各专业组:</p > <p style=\"text-indent: 2em; line-height: 2;\">" +
|
|
|
- "经科室管理层商议决定,如期于"+nbps.get("nei_shen_kai_shi_")+"至"+nbps.get("nei_shen_jie_shu_")+"开展质量管理体系运行的内部审核," +
|
|
|
- "内部审核组(组长:<span style=\"font-weight: bold;\">"+leaders+"</span>," +
|
|
|
- "组员:<span style=\"font-weight: bold;\">"+group+"</span>)对检验科管理体系覆盖的所有场所、区域,包括检验前、检验中、" +
|
|
|
- "检验后及支持性管理过程进行现场审核,请按计划时间做好准备,如有异议,可在3个工作日内提出。附:《内审实施计划》。</p > " +
|
|
|
- "<p style=\"margin: 10px 0; text-indent: 2em;\">特此通知</p > <p style=\"text-align: right;\">内部审核组长:"+leaders+"</p > " +
|
|
|
- "<p style=\"margin: 10px 0; text-align: right;\">科室主任:"+director+"</p > <p style=\"text-align: right;\">"+time+"</p >";
|
|
|
-
|
|
|
- NewsPo newsPo = new NewsPo();
|
|
|
- newsPo.setAuthor("系统管理员");
|
|
|
- newsPo.setContent(content);
|
|
|
- newsPo.setPublicDate(new Date());
|
|
|
- newsPo.setPublicItem("notices");
|
|
|
- newsPo.setPublic0("Y");
|
|
|
- newsPo.setStatus("publish");
|
|
|
- newsPo.setTitle("内审实施计划通知");
|
|
|
- newsPo.setUserId("1");
|
|
|
- newsPo.setUserName("系统用户");
|
|
|
- newsPo.setDepId(nbps.get("bian_zhi_bu_men_").toString());
|
|
|
- if (BeanUtils.isNotEmpty(nbps.get("di_dian_"))){
|
|
|
- newsPo.setType(nbps.get("di_dian_").toString());
|
|
|
+ String id = nbps.get("id_").toString();
|
|
|
+ Map<String, Object> map = commonDao.queryOne(" SELECT id_ from ibps_news WHERE KEY_ ='"+id+"' limit 1");
|
|
|
+ if (BeanUtils.isEmpty(map)){
|
|
|
+ String group = getUserName(nbps.get("nei_shen_ren_yuan").toString());//组员
|
|
|
+ String leaders = getUserName(nbps.get("nei_shen_zu_zu_ch").toString());// 组长
|
|
|
+ String director = getUserName(nbps.get("nei_shen_zu_cheng").toString());// 检验科主任
|
|
|
+ String time = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
|
|
|
+
|
|
|
+ String content = "<p style=\"font-weight: 600; font-size: 24px; text-align: center;\"> <strong>内部审核通知</strong> " +
|
|
|
+ "</p > <p style=\"margin: 16px 0 10px;\">科室管理层及各专业组:</p > <p style=\"text-indent: 2em; line-height: 2;\">" +
|
|
|
+ "经科室管理层商议决定,如期于"+nbps.get("nei_shen_kai_shi_")+"至"+nbps.get("nei_shen_jie_shu_")+"开展质量管理体系运行的内部审核," +
|
|
|
+ "内部审核组(组长:<span style=\"font-weight: bold;\">"+leaders+"</span>," +
|
|
|
+ "组员:<span style=\"font-weight: bold;\">"+group+"</span>)对检验科管理体系覆盖的所有场所、区域,包括检验前、检验中、" +
|
|
|
+ "检验后及支持性管理过程进行现场审核,请按计划时间做好准备,如有异议,可在3个工作日内提出。附:《内审实施计划》。</p > " +
|
|
|
+ "<p style=\"margin: 10px 0; text-indent: 2em;\">特此通知</p > <p style=\"text-align: right;\">内部审核组长:"+leaders+"</p > " +
|
|
|
+ "<p style=\"margin: 10px 0; text-align: right;\">科室主任:"+director+"</p > <p style=\"text-align: right;\">"+time+"</p >";
|
|
|
+
|
|
|
+ NewsPo newsPo = new NewsPo();
|
|
|
+ newsPo.setAuthor("系统管理员");
|
|
|
+ newsPo.setContent(content);
|
|
|
+ newsPo.setPublicDate(new Date());
|
|
|
+ newsPo.setPublicItem("notices");
|
|
|
+ newsPo.setPublic0("Y");
|
|
|
+ newsPo.setStatus("publish");
|
|
|
+ newsPo.setTitle("内审实施计划通知");
|
|
|
+ newsPo.setUserId("1");
|
|
|
+ newsPo.setKey(id);
|
|
|
+ newsPo.setUserName("系统用户");
|
|
|
+ newsPo.setDepId(nbps.get("bian_zhi_bu_men_").toString());
|
|
|
+ if (BeanUtils.isNotEmpty(nbps.get("di_dian_"))){
|
|
|
+ newsPo.setType(nbps.get("di_dian_").toString());
|
|
|
+ }
|
|
|
+ if (BeanUtils.isNotEmpty(nbps.get("kuai_zhao_"))){
|
|
|
+ newsPo.setFileAttach(nbps.get("kuai_zhao_").toString());
|
|
|
+ }
|
|
|
+ newsMgrService.save(newsPo);
|
|
|
}
|
|
|
- if (BeanUtils.isNotEmpty(nbps.get("kuai_zhao_"))){
|
|
|
- newsPo.setFileAttach(nbps.get("kuai_zhao_").toString());
|
|
|
- }
|
|
|
- newsMgrService.save(newsPo);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|