Selaa lähdekoodia

LY 会议 邮件配置

ly 1 vuosi sitten
vanhempi
commit
1f5d79b8c8
30 muutettua tiedostoa jossa 1627 lisäystä ja 30 poistoa
  1. 2 0
      master/src/main/java/com/ruoyi/common/sendEmail/IMailService.java
  2. 24 0
      master/src/main/java/com/ruoyi/common/sendEmail/IMailServiceImpl.java
  3. 0 1
      master/src/main/java/com/ruoyi/project/listener/semsWeekCheck/WeekcheckEndSuccessListener.java
  4. 193 6
      master/src/main/java/com/ruoyi/project/plant/controller/TMtdDailyController.java
  5. 103 0
      master/src/main/java/com/ruoyi/project/plant/controller/TMtdEmailController.java
  6. 9 1
      master/src/main/java/com/ruoyi/project/plant/domain/TMtdDaily.java
  7. 193 0
      master/src/main/java/com/ruoyi/project/plant/domain/TMtdEmail.java
  8. 11 1
      master/src/main/java/com/ruoyi/project/plant/domain/TMtdItem.java
  9. 63 0
      master/src/main/java/com/ruoyi/project/plant/mapper/TMtdEmailMapper.java
  10. 61 0
      master/src/main/java/com/ruoyi/project/plant/service/ITMtdEmailService.java
  11. 93 0
      master/src/main/java/com/ruoyi/project/plant/service/impl/TMtdEmailServiceImpl.java
  12. 2 1
      master/src/main/java/com/ruoyi/project/sems/controller/TMeasureRecordController.java
  13. 9 1
      master/src/main/java/com/ruoyi/project/sems/safecheck/controller/TSpecWeekcheckController.java
  14. 111 6
      master/src/main/java/com/ruoyi/project/training/controller/TTrainingController.java
  15. 1 1
      master/src/main/java/com/ruoyi/project/training/newstaff/controller/TTnNewController.java
  16. 2 2
      master/src/main/resources/application.yml
  17. 5 2
      master/src/main/resources/mybatis/plant/TMtdDailyMapper.xml
  18. 116 0
      master/src/main/resources/mybatis/plant/TMtdEmailMapper.xml
  19. 1 0
      master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml
  20. 0 1
      master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml
  21. BIN
      master/src/main/resources/static/word/plant/dailymeeting.docx
  22. BIN
      master/src/main/resources/static/word/training/signCBPS.xlsx
  23. 53 0
      ui/src/api/plant/dailyMeetingemail.js
  24. 6 0
      ui/src/router/index.js
  25. 3 3
      ui/src/views/monitor/job/index.vue
  26. 12 0
      ui/src/views/plant/dailyMeeting/index.vue
  27. 2 2
      ui/src/views/plant/dailyMeetingConfig/index.vue
  28. 520 0
      ui/src/views/plant/dailyMeetingEmail/index.vue
  29. 27 2
      ui/src/views/sems/safecheck/weekcheck/index.vue
  30. 5 0
      ui/src/views/training/newstaff/tnNew/index.vue

+ 2 - 0
master/src/main/java/com/ruoyi/common/sendEmail/IMailService.java

@@ -37,4 +37,6 @@ public interface IMailService {
      * @param filePath 附件
      */
     public void sendAttachmentsMail(String to, String subject, String content, String filePath);
+
+    public void sendAttachmentsMail(String[] to, String subject, String content, String cc[], String filePath);
 }

+ 24 - 0
master/src/main/java/com/ruoyi/common/sendEmail/IMailServiceImpl.java

@@ -192,4 +192,28 @@ public class IMailServiceImpl implements IMailService {
             logger.error("发送邮件时发生异常!", e);
         }
     }
+
+    @Override
+    public void sendAttachmentsMail(String[] to, String subject, String content, String[] cc, String filePath) {
+        MimeMessage message = mailSender.createMimeMessage();
+        try {
+            MimeMessageHelper helper = new MimeMessageHelper(message, true);
+            helper.setFrom(from);
+            helper.setTo(to);
+            helper.setSubject(subject);
+            helper.setTo(cc);
+            helper.setText(content, true);
+
+            FileSystemResource file = new FileSystemResource(new File(filePath));
+            logger.info("filePath::::::::::" + filePath);
+            String fileName = filePath.substring(filePath.lastIndexOf("/") + 1);
+            logger.info("fileName::::::::::" + fileName);
+            helper.addAttachment(fileName, file);
+            mailSender.send(message);
+            //日志信息
+            logger.info("邮件已经发送。");
+        } catch (MessagingException e) {
+            logger.error("发送邮件时发生异常!", e);
+        }
+    }
 }

+ 0 - 1
master/src/main/java/com/ruoyi/project/listener/semsWeekCheck/WeekcheckEndSuccessListener.java

@@ -31,7 +31,6 @@ public class WeekcheckEndSuccessListener implements Serializable, ExecutionListe
         ITSpecWeekcheckService itSpecWeekcheckService = (ITSpecWeekcheckService) SpringContextUtils.getBean("tSpecWeekcheckServiceImpl");
         TSpecWeekcheck t = itSpecWeekcheckService.selectTSpecWeekcheckById(Long.parseLong(id));
         t.setStatus(1);
-        t.setSafeDirDate(new Date());
         itSpecWeekcheckService.updateTSpecWeekcheck(t);
 
     }

+ 193 - 6
master/src/main/java/com/ruoyi/project/plant/controller/TMtdDailyController.java

@@ -1,14 +1,32 @@
 package com.ruoyi.project.plant.controller;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import com.alibaba.fastjson.JSON;
+import com.deepoove.poi.XWPFTemplate;
+import com.deepoove.poi.config.Configure;
+import com.deepoove.poi.data.Pictures;
+import com.deepoove.poi.data.Texts;
+import com.deepoove.poi.plugin.table.LoopColumnTableRenderPolicy;
+import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
+import com.deepoove.poi.policy.RenderPolicy;
 import com.ruoyi.common.sendEmail.IMailService;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.project.plant.domain.TMtdItem;
 import com.ruoyi.project.plant.mapper.TMtdItemMapper;
+import com.ruoyi.project.sems.safecheck.domain.TSpecWeekcheck;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.mapper.SysUserMapper;
+import io.jsonwebtoken.lang.Assert;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -49,6 +67,9 @@ public class TMtdDailyController extends BaseController
     //系统基础配置
     @Autowired
     private RuoYiConfig ruoyiConfig;
+    @Resource
+    private SysUserMapper sysUserMapper;
+
     /**
      * 查询调度会议列表
      */
@@ -90,6 +111,7 @@ public class TMtdDailyController extends BaseController
         item.setDailyId(id);
         item.setItemType(0);
         List<TMtdItem> item0 = tMtdItemMapper.selectTMtdItemList(item);
+
         tMtdDaily.setItems0(item0);
 
         item.setItemType(1);
@@ -133,9 +155,10 @@ public class TMtdDailyController extends BaseController
     @PreAuthorize("@ss.hasPermi('plant:dailyMeeting:edit')")
     @Log(title = "调度会议", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TMtdDaily tMtdDaily)
-    {
+    public AjaxResult edit(@RequestBody TMtdDaily tMtdDaily) throws IOException {
         logger.info(JSON.toJSONString(tMtdDaily));
+        String url = PreView(tMtdDaily.getId());
+        tMtdDaily.setWordUrl(url);
         return toAjax(tMtdDailyService.updateTMtdDaily(tMtdDaily));
     }
 
@@ -151,7 +174,7 @@ public class TMtdDailyController extends BaseController
     }
 
     /**
-     * 查询调度会议列表
+     * 发送调度会议邮件
      */
     @PreAuthorize("@ss.hasPermi('plant:dailyMeeting:edit')")
     @Log(title = "发送调度会议邮件", businessType = BusinessType.OTHER)
@@ -176,10 +199,10 @@ public class TMtdDailyController extends BaseController
         String prime = "";
         String firstcenter = "<tr><td><div style=\"padding:25px 35px 40px; background-color:#fff;\"><h2 style=\"margin: 5px 0px; \">" +
                 "<font color=\"#333333\" style=\"line-height: 20px; \"><font style=\"line-height: 22px; \" size=\"4\">" +
-                "亲爱的 用户</font><br><font style=\"line-height: 22px; \" size=\"4\">" +
+                "亲爱的 CPMS用户</font><br><font style=\"line-height: 22px; \" size=\"4\">" +
                 "<p>您有一条新的调度会议:<br>" +
                 "会议日期:<b>meetingDate</b><br>" +
-                "请前往<a href=\"requestJumpPath/plant/meeting/detail/dailyId\">会议详情</a>查看。<br>" +
+                "请前往<a href=\"requestJumpPath/plant/meeting/detail/dailyId\">会议详情</a>查看或下载邮件附件。<br>" +
                 "<p align=\"right\">date</p>" +
                 "<div style=\"width:700px;margin:0 auto;\">" +
                 "<div style=\"padding:10px 10px 0;border-top:1px solid #ccc;color:#747474;margin-bottom:20px;line-height:1.3em;font-size:12px;\">" +
@@ -199,7 +222,171 @@ public class TMtdDailyController extends BaseController
         prime = prime + result;
         //拼接html
         String html = start + prime + end;
-        mailService.sendHtmlMail(email, "CPMS:您有一条"+ formattedDate+"装置调度会议信息", html, emailCc);
+
+        // 需要转换的文件路径
+        String filePath = RuoYiConfig.getProfile()+daily.getWordUrl().replace("/profile","");
+
+
+        mailService.sendAttachmentsMail(email, "CPMS:您有一条"+ formattedDate+"装置调度会议信息", html, emailCc,filePath);
         return AjaxResult.success();
     }
+
+
+    /**
+     * @param id 生成文件名
+     * @return
+     * @throws IOException
+     */
+    public String PreView(Long id) throws IOException {
+        //根据ID查询并生成
+        TMtdDaily tMtdDaily = tMtdDailyService.selectTMtdDailyById(id);
+        //获取item列表
+        TMtdItem item = new TMtdItem();
+        item.setDailyId(id);
+        item.setItemType(0);
+        List<TMtdItem> item0 = tMtdItemMapper.selectTMtdItemList(item);
+        tMtdDaily.setItems0(item0);
+
+        item.setItemType(1);
+        List<TMtdItem> item1 = tMtdItemMapper.selectTMtdItemList(item);
+        tMtdDaily.setItems1(getItemAndName(item1 , "1",tMtdDaily));
+
+        item.setItemType(2);
+        List<TMtdItem> item2 = tMtdItemMapper.selectTMtdItemList(item);
+        tMtdDaily.setItems2(getItemAndName(item2 , "2",tMtdDaily));
+
+        item.setItemType(3);
+        List<TMtdItem> item3 = tMtdItemMapper.selectTMtdItemList(item);
+        tMtdDaily.setItems3(getItemAndName(item3 , "3",tMtdDaily));
+
+        item.setItemType(4);
+        List<TMtdItem> item4 = tMtdItemMapper.selectTMtdItemList(item);
+        tMtdDaily.setItems4(getItemAndName(item4 , "4",tMtdDaily));
+
+        item.setItemType(5);
+        List<TMtdItem> item5 = tMtdItemMapper.selectTMtdItemList(item);
+        tMtdDaily.setItems5(getItemAndName(item5 , "5",tMtdDaily));
+        String url = this.createcheck(tMtdDaily);
+        return url;
+    }
+
+    private List<TMtdItem> getItemAndName(List<TMtdItem> items, String itemNum, TMtdDaily tMtdDaily){
+        int num = 1;
+        for (TMtdItem t: items
+        ) {
+            t.setItem(itemNum + "." + num);
+            SysUser sysUser = sysUserMapper.selectUserByStaffId(t.getActionby());
+            t.setActionName(sysUser.getNickName());
+            t.setBeginTime(DateUtils.parseDateToStr("MM-dd",tMtdDaily.getMeetingDate()));
+            num++;
+        }
+        return items;
+    }
+
+    /**
+     * 生成wordt
+     */
+    public String createcheck(TMtdDaily tMtdDaily) throws IOException {
+        //生成word
+        //渲染文本
+        Map<String, Object> params = getWordData(tMtdDaily);
+        // 模板路径
+        String templatePath = "static/word/plant/dailymeeting.docx";
+        // 生成word的路径
+        String fileDir = RuoYiConfig.getProfile() + "/" + "plant/dailymeeting";
+        // 生成word的文件名称
+        String fileName = DateUtils.parseDateToStr("YYYY-MM-dd",tMtdDaily.getMeetingDate())+"装置调度会议"+tMtdDaily.getId() + ".docx";
+        String wordPath = this.createWord(templatePath, fileDir, fileName, params);
+        return wordPath;
+    }
+
+    /**
+     * 获取word数据
+     */
+    public Map<String, Object> getWordData(TMtdDaily tMtdDaily) {
+        Map<String, Object> params = new HashMap<>();
+        params.put("meetingDate", DateUtils.parseDateToStr("YYYY-MM-dd",tMtdDaily.getMeetingDate()));
+        params.put("reDate", DateUtils.parseDateToStr("MM-dd",tMtdDaily.getMeetingDate()));
+        params.put("venue", tMtdDaily.getVenue());
+
+        params.put("optMode", tMtdDaily.getOptMode());
+        params.put("optItem", tMtdDaily.getOptItem());
+        params.put("split", tMtdDaily.getSplit());
+        params.put("pgu", tMtdDaily.getPgu());
+        params.put("aeu", tMtdDaily.getAeu());
+
+        SysUser recorder = sysUserMapper.selectUserByStaffId(tMtdDaily.getRecorder());
+        params.put("recorder", recorder.getNickName());
+
+        params.put("cracker",tMtdDaily.getAttendCracker());
+        params.put("ctm",tMtdDaily.getAttendCtm());
+        params.put("cta",tMtdDaily.getAttendCta());
+        params.put("lab",tMtdDaily.getAttendLab());
+
+        params.put("item1",tMtdDaily.getItems1());
+        params.put("item2",tMtdDaily.getItems2());
+        params.put("item3",tMtdDaily.getItems3());
+        params.put("item4",tMtdDaily.getItems4());
+        params.put("item5",tMtdDaily.getItems5());
+        // 渲染文本
+        return params;
+    }
+
+      private String getUserName(String str){
+        String names = "";
+        if (str == null) return "";
+        String[] arr = str.split(",");
+          for (int i = 0; i < arr.length; i++) {
+             SysUser user = sysUserMapper.selectUserByStaffId(arr[i]);
+              names = names + user.getNickName() + ",";
+          }
+        return names;
+      };
+
+    /**
+     * @param templatePath word模板文件路径
+     * @param fileDir      生成的文件存放地址
+     * @param fileName     生成的文件名
+     * @param paramMap     参数集合
+     * @return 返回word生成的路径
+     */
+    public String createWord(String templatePath, String fileDir, String fileName, Map<String, Object> paramMap) throws IOException {
+        Assert.notNull(templatePath, "word模板文件路径不能为空");
+        Assert.notNull(fileDir, "生成的文件存放地址不能为空");
+        Assert.notNull(fileName, "生成的文件名不能为空");
+        File dir = new File(fileDir);
+        if (!dir.exists()) {
+            logger.info("目录不存在,创建文件夹{}!", fileDir);
+            dir.mkdirs();
+        }
+        fileName = fileName.replaceAll("/", "_"); //替换文件中敏感字段
+        logger.info("目录文件{}!", fileName);
+        String filePath = fileDir + "/" + fileName;
+        logger.info("目录{}!", filePath);
+        // 读取模板渲染参数
+        InputStream is = getClass().getClassLoader().getResourceAsStream(templatePath);
+
+        LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
+        RenderPolicy hackLoopSameLineTableRenderPolicy = new LoopColumnTableRenderPolicy(true);
+
+        Configure config = Configure.builder()
+                .bind("item1", policy)
+                .bind("item2", policy)
+                .bind("item3", policy)
+                .bind("item4", policy)
+                .bind("item5", policy)
+                .build();
+
+        XWPFTemplate template = XWPFTemplate.compile(is,config).render(paramMap);
+        try {
+            // 将模板参数写入路径
+            template.writeToFile(filePath);
+            template.close();
+        } catch (Exception e) {
+            logger.error("生成word异常{}", e.getMessage());
+            e.printStackTrace();
+        }
+        String pathFileName = FileUploadUtils.getPathFileName(RuoYiConfig.getFilePath("/" + "plant/dailymeeting"), fileName);
+        return pathFileName;
+    }
 }

+ 103 - 0
master/src/main/java/com/ruoyi/project/plant/controller/TMtdEmailController.java

@@ -0,0 +1,103 @@
+package com.ruoyi.project.plant.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.project.plant.domain.TMtdEmail;
+import com.ruoyi.project.plant.service.ITMtdEmailService;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.web.page.TableDataInfo;
+
+/**
+ * 会议邮件配置Controller
+ *
+ * @author ssy
+ * @date 2023-12-05
+ */
+@RestController
+@RequestMapping("/plant/email")
+public class TMtdEmailController extends BaseController
+{
+    @Autowired
+    private ITMtdEmailService tMtdEmailService;
+
+    /**
+     * 查询会议邮件配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('plant:email:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TMtdEmail tMtdEmail)
+    {
+        startPage();
+        List<TMtdEmail> list = tMtdEmailService.selectTMtdEmailList(tMtdEmail);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出会议邮件配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('plant:email:export')")
+    @Log(title = "会议邮件配置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TMtdEmail tMtdEmail)
+    {
+        List<TMtdEmail> list = tMtdEmailService.selectTMtdEmailList(tMtdEmail);
+        ExcelUtil<TMtdEmail> util = new ExcelUtil<TMtdEmail>(TMtdEmail.class);
+        return util.exportExcel(list, "email");
+    }
+
+    /**
+     * 获取会议邮件配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('plant:email:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tMtdEmailService.selectTMtdEmailById(id));
+    }
+
+    /**
+     * 新增会议邮件配置
+     */
+    @PreAuthorize("@ss.hasPermi('plant:email:add')")
+    @Log(title = "会议邮件配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TMtdEmail tMtdEmail)
+    {
+        return toAjax(tMtdEmailService.insertTMtdEmail(tMtdEmail));
+    }
+
+    /**
+     * 修改会议邮件配置
+     */
+    @PreAuthorize("@ss.hasPermi('plant:email:edit')")
+    @Log(title = "会议邮件配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TMtdEmail tMtdEmail)
+    {
+        return toAjax(tMtdEmailService.updateTMtdEmail(tMtdEmail));
+    }
+
+    /**
+     * 删除会议邮件配置
+     */
+    @PreAuthorize("@ss.hasPermi('plant:email:remove')")
+    @Log(title = "会议邮件配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tMtdEmailService.deleteTMtdEmailByIds(ids));
+    }
+}

+ 9 - 1
master/src/main/java/com/ruoyi/project/plant/domain/TMtdDaily.java

@@ -125,7 +125,7 @@ public class TMtdDaily extends BaseEntity
 
     private String aeu;
 
-
+    private String wordUrl;
     private String deptName;
 
     private List<TMtdItem> items0;
@@ -394,6 +394,14 @@ public class TMtdDaily extends BaseEntity
         this.aeu = aeu;
     }
 
+    public String getWordUrl() {
+        return wordUrl;
+    }
+
+    public void setWordUrl(String wordUrl) {
+        this.wordUrl = wordUrl;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 193 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TMtdEmail.java

@@ -0,0 +1,193 @@
+package com.ruoyi.project.plant.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 会议邮件配置对象 t_mtd_email
+ *
+ * @author ssy
+ * @date 2023-12-05
+ */
+public class TMtdEmail extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识id */
+    private Long id;
+
+    /** 类型 1-发送 2-抄送 */
+    @Excel(name = "类型 1-发送 2-抄送")
+    private Long type;
+
+    /** 装置 */
+    @Excel(name = "装置")
+    private String plantCode;
+
+    /** 负责人姓名 */
+    @Excel(name = "负责人姓名")
+    private String userName;
+
+    /** 删除标识 */
+    private Long delFlag;
+
+
+    private String createrCode;
+
+    /** 创建日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 更新人 */
+    @Excel(name = "更新人")
+    private String updaterCode;
+
+    /** 更新日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "更新日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 员工号,userId */
+    @Excel(name = "员工号,userId")
+    private String staffid;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setType(Long type)
+    {
+        this.type = type;
+    }
+
+    public Long getType()
+    {
+        return type;
+    }
+    public void setPlantCode(String plantCode)
+    {
+        this.plantCode = plantCode;
+    }
+
+    public String getPlantCode()
+    {
+        return plantCode;
+    }
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+
+    public String getUserName()
+    {
+        return userName;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(String createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public String getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(String updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public String getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setStaffid(String staffid)
+    {
+        this.staffid = staffid;
+    }
+
+    public String getStaffid()
+    {
+        return staffid;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("type", getType())
+            .append("plantCode", getPlantCode())
+            .append("userName", getUserName())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("deptId", getDeptId())
+            .append("remarks", getRemarks())
+            .append("staffid", getStaffid())
+            .toString();
+    }
+}

+ 11 - 1
master/src/main/java/com/ruoyi/project/plant/domain/TMtdItem.java

@@ -37,7 +37,9 @@ public class TMtdItem extends BaseEntity
     /** 执行人 */
     @Excel(name = "执行人")
     private String actionby;
-
+    /** 执行人 */
+    @Excel(name = "执行人")
+    private String actionName;
     /** 删除 */
     private Long delFlag;
 
@@ -63,6 +65,14 @@ public class TMtdItem extends BaseEntity
     @Excel(name = "所属部门")
     private Long deptId;
 
+    public String getActionName() {
+        return actionName;
+    }
+
+    public void setActionName(String actionName) {
+        this.actionName = actionName;
+    }
+
     public void setId(Long id)
     {
         this.id = id;

+ 63 - 0
master/src/main/java/com/ruoyi/project/plant/mapper/TMtdEmailMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.plant.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.plant.domain.TMtdEmail;
+
+/**
+ * 会议邮件配置Mapper接口
+ *
+ * @author ssy
+ * @date 2023-12-05
+ */
+public interface TMtdEmailMapper
+{
+    /**
+     * 查询会议邮件配置
+     *
+     * @param id 会议邮件配置ID
+     * @return 会议邮件配置
+     */
+    public TMtdEmail selectTMtdEmailById(Long id);
+
+    /**
+     * 查询会议邮件配置列表
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 会议邮件配置集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TMtdEmail> selectTMtdEmailList(TMtdEmail tMtdEmail);
+
+    /**
+     * 新增会议邮件配置
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 结果
+     */
+    public int insertTMtdEmail(TMtdEmail tMtdEmail);
+
+    /**
+     * 修改会议邮件配置
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 结果
+     */
+    public int updateTMtdEmail(TMtdEmail tMtdEmail);
+
+    /**
+     * 删除会议邮件配置
+     *
+     * @param id 会议邮件配置ID
+     * @return 结果
+     */
+    public int deleteTMtdEmailById(Long id);
+
+    /**
+     * 批量删除会议邮件配置
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTMtdEmailByIds(Long[] ids);
+}

+ 61 - 0
master/src/main/java/com/ruoyi/project/plant/service/ITMtdEmailService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.plant.service;
+
+import java.util.List;
+import com.ruoyi.project.plant.domain.TMtdEmail;
+
+/**
+ * 会议邮件配置Service接口
+ *
+ * @author ssy
+ * @date 2023-12-05
+ */
+public interface ITMtdEmailService
+{
+    /**
+     * 查询会议邮件配置
+     *
+     * @param id 会议邮件配置ID
+     * @return 会议邮件配置
+     */
+    public TMtdEmail selectTMtdEmailById(Long id);
+
+    /**
+     * 查询会议邮件配置列表
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 会议邮件配置集合
+     */
+    public List<TMtdEmail> selectTMtdEmailList(TMtdEmail tMtdEmail);
+
+    /**
+     * 新增会议邮件配置
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 结果
+     */
+    public int insertTMtdEmail(TMtdEmail tMtdEmail);
+
+    /**
+     * 修改会议邮件配置
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 结果
+     */
+    public int updateTMtdEmail(TMtdEmail tMtdEmail);
+
+    /**
+     * 批量删除会议邮件配置
+     *
+     * @param ids 需要删除的会议邮件配置ID
+     * @return 结果
+     */
+    public int deleteTMtdEmailByIds(Long[] ids);
+
+    /**
+     * 删除会议邮件配置信息
+     *
+     * @param id 会议邮件配置ID
+     * @return 结果
+     */
+    public int deleteTMtdEmailById(Long id);
+}

+ 93 - 0
master/src/main/java/com/ruoyi/project/plant/service/impl/TMtdEmailServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.plant.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.plant.mapper.TMtdEmailMapper;
+import com.ruoyi.project.plant.domain.TMtdEmail;
+import com.ruoyi.project.plant.service.ITMtdEmailService;
+
+/**
+ * 会议邮件配置Service业务层处理
+ *
+ * @author ssy
+ * @date 2023-12-05
+ */
+@Service
+public class TMtdEmailServiceImpl implements ITMtdEmailService
+{
+    @Autowired
+    private TMtdEmailMapper tMtdEmailMapper;
+
+    /**
+     * 查询会议邮件配置
+     *
+     * @param id 会议邮件配置ID
+     * @return 会议邮件配置
+     */
+    @Override
+    public TMtdEmail selectTMtdEmailById(Long id)
+    {
+        return tMtdEmailMapper.selectTMtdEmailById(id);
+    }
+
+    /**
+     * 查询会议邮件配置列表
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 会议邮件配置
+     */
+    @Override
+    public List<TMtdEmail> selectTMtdEmailList(TMtdEmail tMtdEmail)
+    {
+        return tMtdEmailMapper.selectTMtdEmailList(tMtdEmail);
+    }
+
+    /**
+     * 新增会议邮件配置
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 结果
+     */
+    @Override
+    public int insertTMtdEmail(TMtdEmail tMtdEmail)
+    {
+        return tMtdEmailMapper.insertTMtdEmail(tMtdEmail);
+    }
+
+    /**
+     * 修改会议邮件配置
+     *
+     * @param tMtdEmail 会议邮件配置
+     * @return 结果
+     */
+    @Override
+    public int updateTMtdEmail(TMtdEmail tMtdEmail)
+    {
+        return tMtdEmailMapper.updateTMtdEmail(tMtdEmail);
+    }
+
+    /**
+     * 批量删除会议邮件配置
+     *
+     * @param ids 需要删除的会议邮件配置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTMtdEmailByIds(Long[] ids)
+    {
+        return tMtdEmailMapper.deleteTMtdEmailByIds(ids);
+    }
+
+    /**
+     * 删除会议邮件配置信息
+     *
+     * @param id 会议邮件配置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTMtdEmailById(Long id)
+    {
+        return tMtdEmailMapper.deleteTMtdEmailById(id);
+    }
+}

+ 2 - 1
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureRecordController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.project.sems.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -259,7 +260,7 @@ public class TMeasureRecordController extends BaseController {
                     } else if (j == 5) {//数值
                         entity.setMeasureValue(Double.parseDouble(cellValue));
                     } else if (j == 6) {//时间
-                        entity.setMeasureDate(sdf.parse(cellValue));
+                        entity.setMeasureDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
                     } else if (j == 7) {//记录人
                         entity.setRecorder(cellValue);
                     }

+ 9 - 1
master/src/main/java/com/ruoyi/project/sems/safecheck/controller/TSpecWeekcheckController.java

@@ -169,6 +169,8 @@ public class TSpecWeekcheckController extends BaseController
         logger.info("流程部署id:" + pi.getDeploymentId());
         logger.info("流程定义id:" + pi.getProcessDefinitionId());
         logger.info("流程实例id:" + pi.getProcessInstanceId());
+        tSpecWeekcheck.setPlantCode(pi.getProcessInstanceId());
+        tSpecWeekcheckService.updateTSpecWeekcheck(tSpecWeekcheck);
         return AjaxResult.success();
     }
 
@@ -180,6 +182,12 @@ public class TSpecWeekcheckController extends BaseController
     @PutMapping
     public AjaxResult edit(@RequestBody TSpecWeekcheck tSpecWeekcheck)
     {
+        long userId = getUserId();
+        tSpecWeekcheck.setCreaterCode(userId);
+        tSpecWeekcheck.setSafeAdminId(String.valueOf(userId));
+        tSpecWeekcheck.setSafeAdminDate(tSpecWeekcheck.getCheckDate());
+        SysUser admin = sysUserService.selectUserById(Long.valueOf(tSpecWeekcheck.getSafeAdminId()));
+        tSpecWeekcheck.setSafeAdminName(admin.getNickName());
         return toAjax(tSpecWeekcheckService.updateTSpecWeekcheck(tSpecWeekcheck));
     }
 
@@ -401,7 +409,7 @@ public class TSpecWeekcheckController extends BaseController
         String taskName = task.getName();//实例名
         if (taskName.equals("安全总监")) {
             String jsonString = JSON.toJSONString(devTask.getApproveObject()) ;
-// 将JSON字符串转换为TSpecWeekcheck对象
+            // 将JSON字符串转换为TSpecWeekcheck对象
             TSpecWeekcheck weekcheck = JSON.parseObject(jsonString, TSpecWeekcheck.class);
             weekcheck.setSafeDirDate(weekcheck.getCheckDate());
             tSpecWeekcheckService.updateTSpecWeekcheck(weekcheck);

+ 111 - 6
master/src/main/java/com/ruoyi/project/training/controller/TTrainingController.java

@@ -479,11 +479,8 @@ public class TTrainingController extends BaseController {
     public void AutoReport(HttpServletRequest request, HttpServletResponse response, Long year, Long trainingId) {
         TTraining tTraining = tTrainingMapper.selectTTrainingById(trainingId);
         String tempUrl = "";
-        if (tTraining.getDeptId() == 103 || tTraining.getDeptId() == 10012) {
-            if (tTraining.getDeptId() == 10012) {
-                tempUrl = "static/word/training/signCBPS.docx"; // 模板文件
-            }
-            else if (tTraining.getTrainingType().equals("12")) {
+        if (tTraining.getDeptId() == 103 ) {
+             if (tTraining.getTrainingType().equals("12")) {
                 tempUrl = "static/word/training/signMOC.docx"; // 模板文件
             } else {
                 tempUrl = "static/word/training/sign.docx"; // 模板文件
@@ -509,6 +506,29 @@ public class TTrainingController extends BaseController {
             } catch (Exception e) {
                 e.printStackTrace();
             }
+        }else if(tTraining.getDeptId() == 10012){
+            try {
+                tempUrl = "static/word/training/signCBPS.xlsx"; // 模板文件
+                InputStream is = null;
+                is = Thread.currentThread().getContextClassLoader().getResourceAsStream(tempUrl);
+                XSSFWorkbook wb1 = new XSSFWorkbook(is);
+
+                SXSSFWorkbook wb = new SXSSFWorkbook(wb1, 1000);
+                // 替换excel模板数据
+                replaceExcelCbps(wb, trainingId);
+                response.setContentType("application/octet-stream");// 下载,默认就是下载
+                response.setCharacterEncoding("UTF-8");
+                response.setHeader("Content-Disposition",
+                        "attachment;fileName=" + URLEncoder.encode(tTraining.getCourse() + ".xlsx", "UTF-8"));
+                // 刷新缓冲
+                response.flushBuffer();
+                OutputStream ouputStream = response.getOutputStream();
+                wb.write(ouputStream);
+                ouputStream.flush();
+                ouputStream.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         } else {
             try {
                 tempUrl = "static/word/training/signBYX.xlsx"; // 模板文件
@@ -536,7 +556,91 @@ public class TTrainingController extends BaseController {
 
     }
 
-
+    //CBPS Excel 渲染
+    private void replaceExcelCbps(SXSSFWorkbook wb, Long trainingId) {
+        TTraining tTraining = tTrainingMapper.selectTTrainingById(trainingId);
+        TStaffmgr tStaffmgr = new TStaffmgr();
+        tStaffmgr.setActualposts(tTraining.getPosition());
+        tStaffmgr.setDeptId(tTraining.getDeptId());
+        List<TStaffmgr> staffmgrList = tStaffmgrMapper.selectAllTStaffmgrList(tStaffmgr);
+        List<SysDictData> dictList = iSysDictTypeService.selectDictDataByType("STAFF_UNIT");
+        try {
+            //判断离职
+            if (!org.apache.commons.lang.StringUtils.isEmpty(tTraining.getYear())) {
+                Iterator<TStaffmgr> iterator = staffmgrList.iterator();
+                while (iterator.hasNext()) {
+                    TStaffmgr t = iterator.next();
+                    if (t.getLeftDate() != null && t.getDelFlag() == 9) {
+                        if (t.getLeftDate().getTime() - tTraining.getStartDate().getTime() < 0l) {
+                            iterator.remove();
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+        }
+        List<TStaffmgr> staffmgrs = new ArrayList<TStaffmgr>();
+        if (tTraining.getDesignatedStaff() != null) { //判断指定人员
+            String[] staffIds = tTraining.getDesignatedStaff().split(",");
+            for (int i = 0; i < staffIds.length; i++) {
+                TStaffmgr staffmgr = tStaffmgrMapper.selectTStaffmgrByStaffId(staffIds[i]);
+                staffmgrs.add(staffmgr);
+            }
+            staffmgrList.addAll(staffmgrs);
+        }
+        Sheet sheet;
+        if (wb instanceof SXSSFWorkbook) {
+            SXSSFWorkbook sxssfWorkbook = (SXSSFWorkbook) wb;
+            sheet = sxssfWorkbook.getXSSFWorkbook().getSheetAt(0);
+        } else {
+            sheet = wb.getSheetAt(0);
+        }
+        //设置style
+        CellStyle cellStyle = wb.createCellStyle();
+        //设置水平对齐方式
+        cellStyle.setAlignment(HorizontalAlignment.CENTER);
+        //设置垂直对齐方式
+        cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
+        cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
+        cellStyle.setBorderTop(BorderStyle.THIN);//上边框
+        cellStyle.setBorderRight(BorderStyle.THIN);//右边框
+        //设置上边框线条颜色
+        cellStyle.setTopBorderColor(IndexedColors.BLACK.getIndex());
+        //设置右边框线条颜色
+        cellStyle.setRightBorderColor(IndexedColors.BLACK.getIndex());
+        //设置下边框线条颜色
+        cellStyle.setBottomBorderColor(IndexedColors.BLACK.getIndex());
+        //设置左边框线条颜色
+        cellStyle.setLeftBorderColor(IndexedColors.BLACK.getIndex());
+        for (int i = 0; i < staffmgrList.size(); i++) {
+            if (i < 20) {
+                Row row = sheet.getRow(6 + i);
+                Cell cell = row.createCell(1);
+                cell.setCellStyle(cellStyle);
+                cell.setCellValue(staffmgrList.get(i).getName());
+                Cell cell2 = row.createCell(2);
+                cell2.setCellStyle(cellStyle);
+                cell2.setCellValue(staffmgrList.get(i).getStaffid());
+            }else if ( 20 <= i && i < 40){
+                Row row = sheet.getRow(6 + i - 20);
+                Cell cell = row.createCell(5);
+                cell.setCellStyle(cellStyle);
+                cell.setCellValue(staffmgrList.get(i).getName());
+                Cell cell2 = row.createCell(6);
+                cell2.setCellStyle(cellStyle);
+                cell2.setCellValue(staffmgrList.get(i).getStaffid());
+            }
+        }
+        Row row = sheet.getRow(1);
+        Cell cell = row.createCell(1);
+        cell.setCellStyle(cellStyle);
+        cell.setCellValue(tTraining.getCourseid());
+
+        Cell cell2 = row.createCell(5);
+        cell2.setCellStyle(cellStyle);
+        cell2.setCellValue(tTraining.getCourse());
+    }
 
     //苯乙烯 Excel 渲染
     private void replaceExcel(SXSSFWorkbook wb, Long trainingId) {
@@ -578,6 +682,7 @@ public class TTrainingController extends BaseController {
         replaceSheet(wb,"班组",staffmgrList);
     }
 
+
     //苯乙烯 Excel 渲染
     private void replaceSheet(SXSSFWorkbook wb,String sheetName,List<TStaffmgr> staffmgrList) {
         List<SysDictData> dictList = iSysDictTypeService.selectDictDataByType("STAFF_UNIT");

+ 1 - 1
master/src/main/java/com/ruoyi/project/training/newstaff/controller/TTnNewController.java

@@ -97,9 +97,9 @@ public class TTnNewController extends BaseController
                         secNow= schoolplansNow.size();
                     }else {
                         TTnTransferplan tTnTransferplan = new TTnTransferplan();
+                        tTnTransferplan.setNewId(t.getNewId());
                         List<TTnTransferplan> transferplanAll = tTnTransferplanMapper.selectTTnTransferplanListByNewId(tTnTransferplan);
                         tTnTransferplan.setPlanStatus(1l);
-                        tTnTransferplan.setNewId(t.getNewId());
                         List<TTnTransferplan> transferplanNow = tTnTransferplanMapper.selectTTnTransferplanListByNewId(tTnTransferplan);
                         secAll = transferplanAll.size();
                         secNow= transferplanNow.size();

+ 2 - 2
master/src/main/resources/application.yml

@@ -9,9 +9,9 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /u03/cpmsfile/uploadPath)
-  profile: /u03/cpmsfile/uploadPath
+  profile: D:/ruoyi/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/cpms/index.html#,服务器:http://47.114.101.16:8080/cpms/index.html# https://cpms.basf-ypc.net.cn/cpms/index.html#)
-  requestJumpPath: http://localhost/cpms/index.html#
+  requestJumpPath: https://cpms.basf-ypc.net.cn/cpms/index.html#
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证

+ 5 - 2
master/src/main/resources/mybatis/plant/TMtdDailyMapper.xml

@@ -28,11 +28,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="split"    column="split"    />
         <result property="pgu"    column="pgu"    />
         <result property="aeu"    column="aeu"    />
-
+        <result property="wordUrl"    column="word_url"    />
     </resultMap>
 
     <sql id="selectTMtdDailyVo">
-        select d.id, d.recorder,su.nick_name as recorderName, d.meeting_no, d.meeting_date, d.venue, d.subject, d.attend_cracker, d.attend_ctm, d.attend_cta, d.attend_lab, d.safety_topic, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id , d.opt_mode, d.opt_item, d.split, d.pgu, d.aeu ,s.dept_name from t_mtd_daily d
+        select d.id, d.recorder,su.nick_name as recorderName, d.meeting_no, d.meeting_date, d.venue, d.subject, d.attend_cracker, d.attend_ctm, d.attend_cta, d.attend_lab, d.safety_topic, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id , d.opt_mode, d.opt_item, d.split, d.pgu, d.aeu,d.word_url ,s.dept_name from t_mtd_daily d
       left join sys_dept s on s.dept_id = d.dept_id
       left join sys_user su on su.staffid = d.recorder and su.del_flag = 0
     </sql>
@@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="split != null">split,</if>
             <if test="pgu != null">pgu,</if>
             <if test="aeu != null">aeu,</if>
+            <if test="wordUrl != null">word_url,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -115,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="split != null">#{split},</if>
             <if test="pgu != null">#{pgu},</if>
             <if test="aeu != null">#{aeu},</if>
+            <if test="wordUrl != null">#{wordUrl},</if>
          </trim>
     </insert>
 
@@ -142,6 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="split != null">split = #{split},</if>
             <if test="pgu != null">pgu = #{pgu},</if>
             <if test="aeu != null">aeu = #{aeu},</if>
+            <if test="wordUrl != null">word_url = #{wordUrl},</if>
         </trim>
         where id = #{id}
     </update>

+ 116 - 0
master/src/main/resources/mybatis/plant/TMtdEmailMapper.xml

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.plant.mapper.TMtdEmailMapper">
+
+    <resultMap type="TMtdEmail" id="TMtdEmailResult">
+        <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
+        <result property="plantCode"    column="plant_code"    />
+        <result property="userName"    column="user_name"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="staffid"    column="staffid"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTMtdEmailVo">
+        select d.id, d.type, d.plant_code, d.user_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.staffid ,s.dept_name from t_mtd_email d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTMtdEmailList" parameterType="TMtdEmail" resultMap="TMtdEmailResult">
+        <include refid="selectTMtdEmailVo"/>
+        <where>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
+            <if test="userName != null  and userName != ''"> and user_name like concat(concat('%', #{userName}), '%')</if>
+            <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="staffid != null  and staffid != ''"> and staffid = #{staffid}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectTMtdEmailById" parameterType="Long" resultMap="TMtdEmailResult">
+        <include refid="selectTMtdEmailVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTMtdEmail" parameterType="TMtdEmail">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_mtd_email.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_mtd_email
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="type != null">type,</if>
+            <if test="plantCode != null">plant_code,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="staffid != null">staffid,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="type != null">#{type},</if>
+            <if test="plantCode != null">#{plantCode},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="staffid != null">#{staffid},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTMtdEmail" parameterType="TMtdEmail">
+        update t_mtd_email
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
+            <if test="plantCode != null">plant_code = #{plantCode},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="staffid != null">staffid = #{staffid},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTMtdEmailById" parameterType="Long">
+        update t_mtd_email set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTMtdEmailByIds" parameterType="String">
+        update t_mtd_email set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+</mapper>

+ 1 - 0
master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml

@@ -643,6 +643,7 @@
     <select id="selectAgeData" resultType="com.ruoyi.project.common.domain.DataEntity">
         SELECT
         CASE
+        WHEN BIRTHDAY IS NULL THEN '未知'
         WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 <![CDATA[<]]> 20 THEN '20以下'
         WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 >= 60 THEN '60以上'
         ELSE TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10) || '到' || TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 + 9)

+ 0 - 1
master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml

@@ -124,7 +124,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="unitCode != null  and unitCode != ''"> and unit_code = #{unitCode}</if>
             <if test="tagno != null  and tagno != ''"> and tagno = #{tagno}</if>
             <if test="position != null  and position != ''"> and position = #{position}</if>
-            <if test="measureNo != null  and measureNo != ''"> and measure_no = #{measureNo}</if>
         </where>
 
     </select>

BIN
master/src/main/resources/static/word/plant/dailymeeting.docx


BIN
master/src/main/resources/static/word/training/signCBPS.xlsx


+ 53 - 0
ui/src/api/plant/dailyMeetingemail.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询会议邮件配置列表
+export function listEmail(query) {
+  return request({
+    url: '/plant/email/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询会议邮件配置详细
+export function getEmail(id) {
+  return request({
+    url: '/plant/email/' + id,
+    method: 'get'
+  })
+}
+
+// 新增会议邮件配置
+export function addEmail(data) {
+  return request({
+    url: '/plant/email',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改会议邮件配置
+export function updateEmail(data) {
+  return request({
+    url: '/plant/email',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除会议邮件配置
+export function delEmail(id) {
+  return request({
+    url: '/plant/email/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出会议邮件配置
+export function exportEmail(query) {
+  return request({
+    url: '/plant/email/export',
+    method: 'get',
+    params: query
+  })
+}

+ 6 - 0
ui/src/router/index.js

@@ -223,6 +223,12 @@ export const constantRoutes = [
         component: (resolve) => require(['@/views/plant/dailyMeetingConfig'], resolve),
         name: 'dailyMeetingConfig',
         meta: { title: '调度会议配置' }
+      },
+      {
+        path: 'dailyMeetingEmail',
+        component: (resolve) => require(['@/views/plant/dailyMeetingEmail'], resolve),
+        name: 'dailyMeetingEmail',
+        meta: { title: '邮件配置' }
       }
     ]
   },

+ 3 - 3
ui/src/views/monitor/job/index.vue

@@ -89,12 +89,12 @@
 
     <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column :label="$t('任务编号')" align="center" prop="jobId" />
+      <el-table-column :label="$t('任务编号')" align="center" width="70" prop="jobId" />
       <el-table-column :label="$t('任务名称')" align="center" prop="jobName" :show-overflow-tooltip="true" />
-      <el-table-column :label="$t('任务组名')" align="center" prop="jobGroup" :formatter="jobGroupFormat" />
+      <el-table-column :label="$t('任务组名')" width="70" align="center" prop="jobGroup" :formatter="jobGroupFormat" />
       <el-table-column :label="$t('调用目标字符串')" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
       <el-table-column :label="$t('cron执行表达式')" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
-      <el-table-column :label="$t('状态')" align="center">
+      <el-table-column :label="$t('状态')" width="70" align="center">
         <template slot-scope="scope">
           <el-switch
             v-model="scope.row.status"

+ 12 - 0
ui/src/views/plant/dailyMeeting/index.vue

@@ -72,6 +72,15 @@
           v-hasPermi="['plant:dailyMeeting:edit']"
         >调度会议配置</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-edit"
+          size="mini"
+          @click="handleEmail"
+          v-hasPermi="['plant:dailyMeeting:edit']"
+        >调度会议配置</el-button>
+      </el-col>
 <!--      <el-col :span="1.5">-->
 <!--        <el-button-->
 <!--          type="warning"-->
@@ -366,6 +375,9 @@ export default {
     handleConfig(){
       this.$router.push("/plant/meeting/dailyMeetingConfig");
     },
+    handleEmail(){
+      this.$router.push("/plant/meeting/dailyMeetingEmail");
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {

+ 2 - 2
ui/src/views/plant/dailyMeetingConfig/index.vue

@@ -79,7 +79,7 @@
     />
 
     <!-- 添加或修改调度会议配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="参数名称" prop="configName">
           <el-input v-model="form.configName" placeholder="请输入参数名称" />
@@ -91,7 +91,7 @@
           <el-input v-if="form.configType == 0" v-model="form.configValue" placeholder="请输入参数键值" />
           <el-select v-else
             v-model="configValueList"
-            placeholder="请选择区域负责人"
+            placeholder="请选择人"
             style="width: 100%"
             filterable
             multiple

+ 520 - 0
ui/src/views/plant/dailyMeetingEmail/index.vue

@@ -0,0 +1,520 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="类型 1-发送 2-抄送" prop="type">
+        <el-select v-model="queryParams.type" placeholder="请选择类型 1-发送 2-抄送" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="装置" prop="plantCode">
+        <el-input
+          v-model="queryParams.plantCode"
+          placeholder="请输入装置"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="负责人姓名" prop="userName">
+        <el-input
+          v-model="queryParams.userName"
+          placeholder="请输入负责人姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="???
+" prop="createrCode">
+        <el-input
+          v-model="queryParams.createrCode"
+          placeholder="请输入???
+"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="创建日期" prop="createdate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.createdate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择创建日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="更新人" prop="updaterCode">
+        <el-input
+          v-model="queryParams.updaterCode"
+          placeholder="请输入更新人"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="更新日期" prop="updatedate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.updatedate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择更新日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="部门编号" prop="deptId">
+        <el-input
+          v-model="queryParams.deptId"
+          placeholder="请输入部门编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="备注" prop="remarks">
+        <el-input
+          v-model="queryParams.remarks"
+          placeholder="请输入备注"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="员工号,userId" prop="staffid">
+        <el-input
+          v-model="queryParams.staffid"
+          placeholder="请输入员工号,userId"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['plant:email:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['plant:email:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['plant:email:remove']"
+        >删除</el-button>
+      </el-col>
+        <el-col :span="1.5">
+            <el-button
+                    type="info"
+                    icon="el-icon-upload2"
+                    size="mini"
+                    @click="handleImport"
+                    v-hasPermi="['plant:email:edit']"
+            >导入</el-button>
+        </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['plant:email:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="emailList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="唯一标识id" align="center" prop="id" :show-overflow-tooltip="true"/>
+      <el-table-column label="类型 1-发送 2-抄送" align="center" prop="type" :show-overflow-tooltip="true"/>
+      <el-table-column label="装置" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
+      <el-table-column label="负责人姓名" align="center" prop="userName" :show-overflow-tooltip="true"/>
+      <el-table-column label="???
+" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
+      <el-table-column label="创建日期" align="center" prop="createdate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="更新人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
+      <el-table-column label="更新日期" align="center" prop="updatedate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      <el-table-column label="员工号,userId" align="center" prop="staffid" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['plant:email:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['plant:email:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改会议邮件配置对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="类型 1-发送 2-抄送" prop="type">
+          <el-select v-model="form.type" placeholder="请选择类型 1-发送 2-抄送">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="装置" prop="plantCode">
+          <el-input v-model="form.plantCode" placeholder="请输入装置" />
+        </el-form-item>
+        <el-form-item label="负责人姓名" prop="userName">
+          <el-input v-model="form.userName" placeholder="请输入负责人姓名" />
+        </el-form-item>
+        <el-form-item label="删除标识" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标识" />
+        </el-form-item>
+        <el-form-item label="???
+" prop="createrCode">
+          <el-input v-model="form.createrCode" placeholder="请输入???
+" />
+        </el-form-item>
+        <el-form-item label="创建日期" prop="createdate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.createdate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择创建日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="更新人" prop="updaterCode">
+          <el-input v-model="form.updaterCode" placeholder="请输入更新人" />
+        </el-form-item>
+        <el-form-item label="更新日期" prop="updatedate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.updatedate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择更新日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="部门编号" prop="deptId">
+          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注" />
+        </el-form-item>
+        <el-form-item label="员工号,userId" prop="staffid">
+          <el-input v-model="form.staffid" placeholder="请输入员工号,userId" />
+        </el-form-item>
+          <el-form-item label="归属部门" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+          </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+      <!-- 用户导入对话框 -->
+      <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+          <el-upload
+                  ref="upload"
+                  :limit="1"
+                  accept=".xlsx, .xls"
+                  :headers="upload.headers"
+                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
+                  :disabled="upload.isUploading"
+                  :on-progress="handleFileUploadProgress"
+                  :on-success="handleFileSuccess"
+                  :auto-upload="false"
+                  drag
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                  将文件拖到此处,或
+                  <em>点击上传</em>
+              </div>
+              <div class="el-upload__tip" slot="tip">
+                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
+                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+              </div>
+              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+          </el-upload>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="submitFileForm">确 定</el-button>
+              <el-button @click="upload.open = false">取 消</el-button>
+          </div>
+      </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listEmail, getEmail, delEmail, addEmail, updateEmail, exportEmail, importTemplate} from "@/api/plant/dailyMeetingemail";
+import { treeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+export default {
+  name: "Email",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 会议邮件配置表格数据
+      emailList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+        // 用户导入参数
+        upload: {
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/plant/email/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        type: null,
+        plantCode: null,
+        userName: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null,
+        staffid: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询会议邮件配置列表 */
+    getList() {
+      this.loading = true;
+      listEmail(this.queryParams).then(response => {
+        this.emailList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        type: null,
+        plantCode: null,
+        userName: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null,
+        staffid: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加会议邮件配置";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getEmail(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改会议邮件配置";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateEmail(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addEmail(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delEmail(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有会议邮件配置数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportEmail(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = "用户导入";
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+          importTemplate().then(response => {
+              this.download(response.msg);
+          });
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+          this.upload.open = false;
+          this.upload.isUploading = false;
+          this.$refs.upload.clearFiles();
+          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      }
+  }
+};
+</script>

+ 27 - 2
ui/src/views/sems/safecheck/weekcheck/index.vue

@@ -108,7 +108,7 @@
       <u-table-column label="安全总监意见" align="center" prop="safeDirSug" :show-overflow-tooltip="true"/>
       <u-table-column label="安全总监日期" align="center" prop="safeDirDate" :show-overflow-tooltip="true"/>
 
-      <u-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <u-table-column label="操作" align="center" fixed="right" width="200" class-name="small-padding">
         <template slot-scope="scope">
           <el-button
             v-if="scope.row.status == 0"
@@ -118,6 +118,14 @@
             @click="handleUpdate(scope.row)"
             v-hasPermi="['safecheck:weekcheck:edit']"
           >修改</el-button>
+          <el-button
+            v-if="scope.row.status == 0"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="cancelHandle(scope.row)"
+            v-hasPermi="['safecheck:weekcheck:edit']"
+          >中止</el-button>
           <el-button
             v-if="scope.row.status == 1"
             size="mini"
@@ -127,7 +135,7 @@
             v-hasPermi="['safecheck:weekcheck:edit']"
           >作废</el-button>
           <el-button
-            v-if="scope.row.status == 2"
+            v-if="scope.row.status == 2 || scope.row.status == 3"
             size="mini"
             type="text"
             icon="el-icon-delete"
@@ -289,6 +297,7 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {listPostUser} from "@/api/system/user";
+import {cancelApprove} from "@/api/ehs/approvedanger";
 
 export default {
   name: "Weekcheck",
@@ -728,6 +737,22 @@ export default {
       })
 
     },
+    cancelHandle(row){
+        if (!row.plantCode) {
+          this.$alert("无法中止");
+          return
+        }
+      this.$confirm('是否确认中止流程?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return cancelApprove(row.plantCode);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("操作成功");
+      })
+    },
   }
 };
 </script>

+ 5 - 0
ui/src/views/training/newstaff/tnNew/index.vue

@@ -142,6 +142,11 @@
           <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tnNew-firstplan-score')" circle></el-button>
         </template>
       </el-table-column>
+      <el-table-column label="导师提名表" align="center" prop="agreement" width="80">
+        <template slot-scope="scope">
+          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tnNew-teacher-order')" circle></el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="带徒协议" align="center" prop="agreement" width="80">
         <template slot-scope="scope">
           <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tnNew-teacher-agreement')" circle></el-button>