瀏覽代碼

-导师带徒自动添加计划日期

jiangbiao 1 年之前
父節點
當前提交
ea45442316
共有 28 個文件被更改,包括 1866 次插入233 次删除
  1. 11 1
      master/src/main/java/com/ruoyi/project/apply/controller/TApplyOfflinevalveController.java
  2. 3 0
      master/src/main/java/com/ruoyi/project/common/CommonController.java
  3. 19 24
      master/src/main/java/com/ruoyi/project/document/controller/TPlantproglistController.java
  4. 168 0
      master/src/main/java/com/ruoyi/project/shiftmgr/controller/TShiftRosterController.java
  5. 205 0
      master/src/main/java/com/ruoyi/project/shiftmgr/domain/TShiftRoster.java
  6. 65 0
      master/src/main/java/com/ruoyi/project/shiftmgr/mapper/TShiftRosterMapper.java
  7. 61 0
      master/src/main/java/com/ruoyi/project/shiftmgr/service/ITShiftRosterService.java
  8. 93 0
      master/src/main/java/com/ruoyi/project/shiftmgr/service/impl/TShiftRosterServiceImpl.java
  9. 239 182
      master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsApproveController.java
  10. 10 0
      master/src/main/java/com/ruoyi/project/training/bccnew/domain/TTsFirstplan.java
  11. 10 0
      master/src/main/java/com/ruoyi/project/training/bccnew/domain/TTsNew.java
  12. 84 2
      master/src/main/java/com/ruoyi/project/training/bccnew/service/impl/TTsNewServiceImpl.java
  13. 127 0
      master/src/main/resources/mybatis/shiftmgr/TShiftRosterMapper.xml
  14. 6 1
      master/src/main/resources/mybatis/training/bccnew/TTsNewMapper.xml
  15. 二進制
      master/src/main/resources/static/template/training/roster.xlsx
  16. 53 0
      ui/src/api/shiftmgr/roster.js
  17. 689 0
      ui/src/views/shiftmgr/shiftchangemgr/roster/index.vue
  18. 2 2
      ui/src/views/training/bccnew/firstPlanTmpl/index.vue
  19. 3 3
      ui/src/views/training/bccnew/firstplan/index.vue
  20. 3 3
      ui/src/views/training/bccnew/firstplan/index_student.vue
  21. 2 2
      ui/src/views/training/bccnew/flPlan/index.vue
  22. 2 2
      ui/src/views/training/bccnew/ftPlan/index.vue
  23. 2 2
      ui/src/views/training/bccnew/ljPlan/index.vue
  24. 2 2
      ui/src/views/training/bccnew/tsnew/index.vue
  25. 2 2
      ui/src/views/training/bccnew/tsnew/index_s.vue
  26. 2 2
      ui/src/views/training/bccnew/tsnew/score.vue
  27. 1 1
      ui/src/views/training/bccnew/tsnew/score_student.vue
  28. 2 2
      ui/src/views/training/bccnew/ysPlan/index.vue

+ 11 - 1
master/src/main/java/com/ruoyi/project/apply/controller/TApplyOfflinevalveController.java

@@ -231,6 +231,16 @@ public class TApplyOfflinevalveController extends BaseController {
             }
         } else if ("2".equals(devTask.getCondition())) {
             devTask.setComment("驳回" + symbol + text);
+            //修改锁状态
+            if (StringUtils.isNotEmpty(tApplyOfflinevalve.getLockNo())) {
+                for (String lockNo : tApplyOfflinevalve.getLockNo().split(",")) {
+                    TApplyLock tApplyLock = tApplyLockService.selectTApplyLockByLockCode(lockNo.substring(0, lockNo.indexOf("(")));
+                    if (tApplyLock != null) {
+                        tApplyLock.setStatus(0L);//将锁状态改为挂锁
+                        tApplyLockService.updateTApplyLock(tApplyLock);
+                    }
+                }
+            }
         }
         // 根据实例名判断当前流程节点
         Map<String, Object> param = new HashMap<>();
@@ -238,7 +248,7 @@ public class TApplyOfflinevalveController extends BaseController {
             case "临时措施制定人":
                 form.setConfirmer(getUserId().toString());
                 form.setConfirmerName(getNickName());
-                if (StringUtils.isNotEmpty(form.getLockNo())) {
+                if (StringUtils.isNotEmpty(form.getLockNo())&&"1".equals(devTask.getCondition())) {
                     for (String lockNo : form.getLockNo().split(",")) {
                         TApplyLock tApplyLock = tApplyLockService.selectTApplyLockByLockCode(lockNo.substring(0, lockNo.indexOf("(")));
                         if (tApplyLock != null) {

+ 3 - 0
master/src/main/java/com/ruoyi/project/common/CommonController.java

@@ -333,6 +333,9 @@ public class CommonController extends BaseController
         }else if( type.equals("trainerTmpl") ) {
             downloadname = "导师库导入模板.xlsx";
             url = "static/template/training/bccnewDsk.xlsx";
+        }else if( type.equals("shiftRoster") ) {
+            downloadname = "排班计划导入模板.xlsx";
+            url = "static/template/training/roster.xlsx";
         }
 
         InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(url);

+ 19 - 24
master/src/main/java/com/ruoyi/project/document/controller/TPlantproglistController.java

@@ -1,44 +1,38 @@
 package com.ruoyi.project.document.controller;
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.ServletUtils;
-import com.ruoyi.common.utils.export.JxlsTemplateEnum;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.config.RuoYiConfig;
-import com.ruoyi.framework.security.LoginUser;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.common.domain.DataEntity;
+import com.ruoyi.project.document.domain.TPlantproglist;
 import com.ruoyi.project.document.mapper.TPlantproglistMapper;
+import com.ruoyi.project.document.service.ITPlantproglistService;
 import com.ruoyi.project.system.domain.SysDept;
 import com.ruoyi.project.system.domain.SysDictData;
 import com.ruoyi.project.system.service.ISysDeptService;
 import com.ruoyi.project.system.service.ISysDictTypeService;
-import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang.StringUtils;
-import org.apache.poi.ss.usermodel.*;
-import org.springframework.security.access.prepost.PreAuthorize;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
-import com.ruoyi.framework.aspectj.lang.annotation.Log;
-import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.document.domain.TPlantproglist;
-import com.ruoyi.project.document.service.ITPlantproglistService;
-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;
 import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.servlet.ModelAndView;
 
 import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * 装置程序清单Controller
@@ -134,8 +128,9 @@ public class TPlantproglistController extends BaseController
     @PreAuthorize("@ss.hasPermi('document:plantproglist:add')")
     @Log(title = "装置程序清单", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPlantproglist tPlantproglist)
-    {
+    public AjaxResult add(@RequestBody TPlantproglist tPlantproglist) {
+        tPlantproglist.setFilename(tPlantproglist.getFilename().trim());
+        tPlantproglist.setFileno(tPlantproglist.getFileno().trim());
         tPlantproglist.setCreaterCode(getUserId().toString());
         return toAjax(tPlantproglistService.insertTPlantproglist(tPlantproglist));
     }

+ 168 - 0
master/src/main/java/com/ruoyi/project/shiftmgr/controller/TShiftRosterController.java

@@ -0,0 +1,168 @@
+package com.ruoyi.project.shiftmgr.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;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.shiftmgr.domain.TShiftRoster;
+import com.ruoyi.project.shiftmgr.service.ITShiftRosterService;
+import com.ruoyi.project.training.bccnew.domain.TTsTrainer;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+
+/**
+ * 排班计划管理Controller
+ *
+ * @author ssy
+ * @date 2024-08-19
+ */
+@RestController
+@RequestMapping("/shiftmgr/roster")
+public class TShiftRosterController extends BaseController {
+    @Autowired
+    private ITShiftRosterService tShiftRosterService;
+
+    /**
+     * 查询排班计划管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('shiftmgr:roster:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TShiftRoster tShiftRoster) {
+        startPage();
+        List<TShiftRoster> list = tShiftRosterService.selectTShiftRosterList(tShiftRoster);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出排班计划管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('shiftmgr:roster:export')")
+    @Log(title = "排班计划管理", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TShiftRoster tShiftRoster) {
+        List<TShiftRoster> list = tShiftRosterService.selectTShiftRosterList(tShiftRoster);
+        ExcelUtil<TShiftRoster> util = new ExcelUtil<TShiftRoster>(TShiftRoster.class);
+        return util.exportExcel(list, "roster");
+    }
+
+    /**
+     * 获取排班计划管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('shiftmgr:roster:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(tShiftRosterService.selectTShiftRosterById(id));
+    }
+
+    /**
+     * 新增排班计划管理
+     */
+    @PreAuthorize("@ss.hasPermi('shiftmgr:roster:add')")
+    @Log(title = "排班计划管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TShiftRoster tShiftRoster) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(tShiftRoster.getShiftDate());
+        tShiftRoster.setWeek((long) calendar.get(Calendar.DAY_OF_WEEK));
+        return toAjax(tShiftRosterService.insertTShiftRoster(tShiftRoster));
+    }
+
+    /**
+     * 修改排班计划管理
+     */
+    @PreAuthorize("@ss.hasPermi('shiftmgr:roster:edit')")
+    @Log(title = "排班计划管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TShiftRoster tShiftRoster) {
+        return toAjax(tShiftRosterService.updateTShiftRoster(tShiftRoster));
+    }
+
+    /**
+     * 删除排班计划管理
+     */
+    @PreAuthorize("@ss.hasPermi('shiftmgr:roster:remove')")
+    @Log(title = "排班计划管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tShiftRosterService.deleteTShiftRosterByIds(ids));
+    }
+
+
+    @PreAuthorize("@ss.hasPermi('shiftmgr:roster:add')")
+    @Log(title = "排班计划管理导入", businessType = BusinessType.INSERT)
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException {
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TShiftRoster> list = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        //报错行数统计
+        List<Integer> failRow = new ArrayList<Integer>();
+        for (int i = 1; i < rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getPhysicalNumberOfCells();
+                TShiftRoster entity = new TShiftRoster();
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        entity.setShiftDate(DateUtils.parseDate(cellValue));
+                    } else if (j == 1) {
+                        entity.setVacation("是".equals(cellValue) ? 1L : 0L);
+                    } else if (j == 2) {
+                        entity.setDclass(cellValue);
+                    } else if (j == 3) {
+                        entity.setNclass(cellValue);
+                    }
+                }
+                entity.setCreaterCode(getUserId());
+                logger.info("entity:" + entity);
+                list.add(entity);
+            } catch (Exception e) {
+                failNumber++;
+                failRow.add(i + 1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TShiftRoster t : list
+        ) {
+            failNum++;
+            try {
+                add(t);
+                successNumber++;
+            } catch (Exception e) {
+                failNumber++;
+                failRow.add(failNum + 1);
+            }
+        }
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" + successNumber);
+        logger.info("failNumber:" + failNumber);
+        logger.info("failRow:" + failRow);
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
+    }
+}

+ 205 - 0
master/src/main/java/com/ruoyi/project/shiftmgr/domain/TShiftRoster.java

@@ -0,0 +1,205 @@
+package com.ruoyi.project.shiftmgr.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_shift_roster
+ *
+ * @author ssy
+ * @date 2024-08-19
+ */
+public class TShiftRoster extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** id
+ */
+    private Long id;
+
+    /** 排班日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "排班日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date shiftDate;
+
+    /** 白班 */
+    @Excel(name = "白班")
+    private String dclass;
+
+    /** 夜班 */
+    @Excel(name = "夜班")
+    private String nclass;
+
+    /** 周 */
+    @Excel(name = "周")
+    private Long week;
+
+    /** 状态,0:正常;2:删除 */
+    private Long delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private Long createrCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    private Long 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;
+    private String deptName;
+
+    /** 节假日 */
+    @Excel(name = "节假日")
+    private Long vacation;
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setShiftDate(Date shiftDate)
+    {
+        this.shiftDate = shiftDate;
+    }
+
+    public Date getShiftDate()
+    {
+        return shiftDate;
+    }
+    public void setDclass(String dclass)
+    {
+        this.dclass = dclass;
+    }
+
+    public String getDclass()
+    {
+        return dclass;
+    }
+    public void setNclass(String nclass)
+    {
+        this.nclass = nclass;
+    }
+
+    public String getNclass()
+    {
+        return nclass;
+    }
+    public void setWeek(Long week)
+    {
+        this.week = week;
+    }
+
+    public Long getWeek()
+    {
+        return week;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(Long createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public Long getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(Long updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public Long 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 setVacation(Long vacation)
+    {
+        this.vacation = vacation;
+    }
+
+    public Long getVacation()
+    {
+        return vacation;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("shiftDate", getShiftDate())
+            .append("dclass", getDclass())
+            .append("nclass", getNclass())
+            .append("week", getWeek())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("deptId", getDeptId())
+            .append("vacation", getVacation())
+            .toString();
+    }
+}

+ 65 - 0
master/src/main/java/com/ruoyi/project/shiftmgr/mapper/TShiftRosterMapper.java

@@ -0,0 +1,65 @@
+package com.ruoyi.project.shiftmgr.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.shiftmgr.domain.TShiftRoster;
+
+/**
+ * 排班计划管理Mapper接口
+ * 
+ * @author ssy
+ * @date 2024-08-19
+ */
+public interface TShiftRosterMapper 
+{
+    /**
+     * 查询排班计划管理
+     * 
+     * @param id 排班计划管理ID
+     * @return 排班计划管理
+     */
+    public TShiftRoster selectTShiftRosterById(Long id);
+
+    /**
+     * 查询排班计划管理列表
+     * 
+     * @param tShiftRoster 排班计划管理
+     * @return 排班计划管理集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TShiftRoster> selectTShiftRosterList(TShiftRoster tShiftRoster);
+
+    public List<TShiftRoster> selectTShiftRosterListByTrain(TShiftRoster tShiftRoster);
+
+    /**
+     * 新增排班计划管理
+     * 
+     * @param tShiftRoster 排班计划管理
+     * @return 结果
+     */
+    public int insertTShiftRoster(TShiftRoster tShiftRoster);
+
+    /**
+     * 修改排班计划管理
+     * 
+     * @param tShiftRoster 排班计划管理
+     * @return 结果
+     */
+    public int updateTShiftRoster(TShiftRoster tShiftRoster);
+
+    /**
+     * 删除排班计划管理
+     * 
+     * @param id 排班计划管理ID
+     * @return 结果
+     */
+    public int deleteTShiftRosterById(Long id);
+
+    /**
+     * 批量删除排班计划管理
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTShiftRosterByIds(Long[] ids);
+}

+ 61 - 0
master/src/main/java/com/ruoyi/project/shiftmgr/service/ITShiftRosterService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.shiftmgr.service;
+
+import java.util.List;
+import com.ruoyi.project.shiftmgr.domain.TShiftRoster;
+
+/**
+ * 排班计划管理Service接口
+ * 
+ * @author ssy
+ * @date 2024-08-19
+ */
+public interface ITShiftRosterService 
+{
+    /**
+     * 查询排班计划管理
+     * 
+     * @param id 排班计划管理ID
+     * @return 排班计划管理
+     */
+    public TShiftRoster selectTShiftRosterById(Long id);
+
+    /**
+     * 查询排班计划管理列表
+     * 
+     * @param tShiftRoster 排班计划管理
+     * @return 排班计划管理集合
+     */
+    public List<TShiftRoster> selectTShiftRosterList(TShiftRoster tShiftRoster);
+
+    /**
+     * 新增排班计划管理
+     * 
+     * @param tShiftRoster 排班计划管理
+     * @return 结果
+     */
+    public int insertTShiftRoster(TShiftRoster tShiftRoster);
+
+    /**
+     * 修改排班计划管理
+     * 
+     * @param tShiftRoster 排班计划管理
+     * @return 结果
+     */
+    public int updateTShiftRoster(TShiftRoster tShiftRoster);
+
+    /**
+     * 批量删除排班计划管理
+     * 
+     * @param ids 需要删除的排班计划管理ID
+     * @return 结果
+     */
+    public int deleteTShiftRosterByIds(Long[] ids);
+
+    /**
+     * 删除排班计划管理信息
+     * 
+     * @param id 排班计划管理ID
+     * @return 结果
+     */
+    public int deleteTShiftRosterById(Long id);
+}

+ 93 - 0
master/src/main/java/com/ruoyi/project/shiftmgr/service/impl/TShiftRosterServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.shiftmgr.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.shiftmgr.mapper.TShiftRosterMapper;
+import com.ruoyi.project.shiftmgr.domain.TShiftRoster;
+import com.ruoyi.project.shiftmgr.service.ITShiftRosterService;
+
+/**
+ * 排班计划管理Service业务层处理
+ *
+ * @author ssy
+ * @date 2024-08-19
+ */
+@Service
+public class TShiftRosterServiceImpl implements ITShiftRosterService
+{
+    @Autowired
+    private TShiftRosterMapper tShiftRosterMapper;
+
+    /**
+     * 查询排班计划管理
+     *
+     * @param id 排班计划管理ID
+     * @return 排班计划管理
+     */
+    @Override
+    public TShiftRoster selectTShiftRosterById(Long id)
+    {
+        return tShiftRosterMapper.selectTShiftRosterById(id);
+    }
+
+    /**
+     * 查询排班计划管理列表
+     *
+     * @param tShiftRoster 排班计划管理
+     * @return 排班计划管理
+     */
+    @Override
+    public List<TShiftRoster> selectTShiftRosterList(TShiftRoster tShiftRoster)
+    {
+        return tShiftRosterMapper.selectTShiftRosterList(tShiftRoster);
+    }
+
+    /**
+     * 新增排班计划管理
+     *
+     * @param tShiftRoster 排班计划管理
+     * @return 结果
+     */
+    @Override
+    public int insertTShiftRoster(TShiftRoster tShiftRoster)
+    {
+        return tShiftRosterMapper.insertTShiftRoster(tShiftRoster);
+    }
+
+    /**
+     * 修改排班计划管理
+     *
+     * @param tShiftRoster 排班计划管理
+     * @return 结果
+     */
+    @Override
+    public int updateTShiftRoster(TShiftRoster tShiftRoster)
+    {
+        return tShiftRosterMapper.updateTShiftRoster(tShiftRoster);
+    }
+
+    /**
+     * 批量删除排班计划管理
+     *
+     * @param ids 需要删除的排班计划管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTShiftRosterByIds(Long[] ids)
+    {
+        return tShiftRosterMapper.deleteTShiftRosterByIds(ids);
+    }
+
+    /**
+     * 删除排班计划管理信息
+     *
+     * @param id 排班计划管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTShiftRosterById(Long id)
+    {
+        return tShiftRosterMapper.deleteTShiftRosterById(id);
+    }
+}

+ 239 - 182
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsApproveController.java

@@ -1,6 +1,5 @@
 package com.ruoyi.project.training.bccnew.controller;
 
-import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -8,6 +7,10 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.approve.damain.DevTask;
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.plant.mapper.TStaffmgrMapper;
+import com.ruoyi.project.shiftmgr.domain.TShiftRoster;
+import com.ruoyi.project.shiftmgr.mapper.TShiftRosterMapper;
 import com.ruoyi.project.system.service.ISysUserService;
 import com.ruoyi.project.training.bccnew.domain.*;
 import com.ruoyi.project.training.bccnew.service.*;
@@ -71,6 +74,12 @@ public class TTsApproveController extends BaseController {
     @Autowired
     private TaskService taskService;
 
+    @Autowired
+    private TShiftRosterMapper tShiftRosterMapper;
+
+    @Autowired
+    private TStaffmgrMapper tStaffmgrMapper;
+
 
     /**
      * 查询导师带徒审批列表
@@ -171,10 +180,10 @@ public class TTsApproveController extends BaseController {
         //利用任务对象,获取流程实例id
         String taskName = task.getName();//实例名
         String processInstancesId = task.getProcessInstanceId();
+        String userId = getUserId().toString();
         // 判断流程
         if ("1".equals(devTask.getCondition())) {
             devTask.setComment("补考");
-            new Thread(() -> {
                 switch (tTsApprove.getPlanType()) {
                     case "1": {
                         TTsLjplan item = tTsLjplanService.selectTTsLjplanById(tTsApprove.getContentId());
@@ -201,211 +210,259 @@ public class TTsApproveController extends BaseController {
                         break;
                     }
                 }
-            }, "经理批准重考").start();
         } else if ("0".equals(devTask.getCondition())) {
             devTask.setComment("重新学习");
-            new Thread(() -> {
-                try {
-                    switch (tTsApprove.getPlanType()) {
-                        case "1": {
-                            //查询旧数据
-                            TTsLjplan item = tTsLjplanService.selectTTsLjplanById(tTsApprove.getContentId());
-                            item.setPlanStatus(1L);
-                            tTsLjplanService.updateTTsLjplan(item);
-                            TTsLjplanContent contentItem = new TTsLjplanContent();
-                            contentItem.setPid(item.getId());
-                            //                新增需要重新学习的数据
-                            item.setId(null);
-                            item.setCreatedate(new Date());
-                            item.setCreaterCode(getUserId().toString());
-                            item.setUpdatedate(null);
-                            item.setUpdaterCode(null);
-                            item.setPlanStatus(0L);
-                            item.setScorePass(null);
-                            item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
+                switch (tTsApprove.getPlanType()) {
+                    case "1": {
+                        //查询旧数据
+                        TTsLjplan item = tTsLjplanService.selectTTsLjplanById(tTsApprove.getContentId());
+                        item.setPlanStatus(1L);
+                        tTsLjplanService.updateTTsLjplan(item);
+                        TTsLjplanContent contentItem = new TTsLjplanContent();
+                        contentItem.setPid(item.getId());
+                        //                新增需要重新学习的数据
+                        item.setId(null);
+                        item.setCreatedate(new Date());
+                        item.setCreaterCode(userId);
+                        item.setUpdatedate(null);
+                        item.setUpdaterCode(null);
+                        item.setPlanStatus(0L);
+                        item.setScorePass(null);
+                        item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
 
-                            tTsLjplanService.insertTTsLjplan(item);
-                            //新增内容
-                            List<TTsLjplanContent> contents = tTsLjplanContentService.selectTTsLjplanContentList(contentItem);
-                            for (TTsLjplanContent content : contents) {
-                                content.setId(null);
-                                content.setPid(item.getId());
-                                if (content.getPlanDate() != null) {
-                                    //                        修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                    content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                }
-                                tTsLjplanContentService.insertTTsLjplanContent(content);
+                        tTsLjplanService.insertTTsLjplan(item);
+                        //新增内容
+                        List<TTsLjplanContent> contents = tTsLjplanContentService.selectTTsLjplanContentList(contentItem);
+                        List<TShiftRoster> rosters = new ArrayList<>();
+                        int i = 0;
+                        if (contents.get(contents.size() - 1).getPlanDate() != null) {
+                            TTsNew tTsNew = tTsNewService.selectTTsNewById(item.getNewId());
+                            TStaffmgr tStaffmgr = tStaffmgrMapper.selectTStaffmgrByStaffId(tTsNew.getStaffId());
+                            TShiftRoster tShiftRoster = new TShiftRoster();
+                            tShiftRoster.setShiftDate(contents.get(contents.size() - 1).getPlanDate());
+                            tShiftRoster.setDclass(tStaffmgr.getTeam());
+                            tShiftRoster.setNclass(tStaffmgr.getTeam());
+                            tShiftRoster.setVacation(null);
+                            rosters = tShiftRosterMapper.selectTShiftRosterListByTrain(tShiftRoster);
+                        }
+                        for (TTsLjplanContent content : contents) {
+                            content.setId(null);
+                            content.setPid(item.getId());
+                            if (rosters.size() > i) {
+                                //                        修改计划培训日期
+                                i++;
+                                content.setPlanDate(rosters.get(i).getShiftDate());
                             }
-                            //                查询剩余未完成的训培内容
-                            TTsLjplan query = new TTsLjplan();
-                            query.setNewId(item.getNewId());
-                            query.setPlanStatus(0L);
-                            for (TTsLjplan entity : tTsLjplanService.selectTTsLjplanListByNewId(query)) {
-                                if (Objects.equals(entity.getId(), item.getId()))
-                                    continue;
-                                contentItem.setPid(entity.getId());
-                                contents = tTsLjplanContentService.selectTTsLjplanContentList(contentItem);
-                                for (TTsLjplanContent content : contents) {
-                                    if (content.getPlanDate() != null) {
-                                        //                            修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                        content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                        tTsLjplanContentService.updateTTsLjplanContent(content);
-                                    }
+                            tTsLjplanContentService.insertTTsLjplanContent(content);
+                        }
+                        //                查询剩余未完成的训培内容
+                        TTsLjplan query = new TTsLjplan();
+                        query.setNewId(item.getNewId());
+                        query.setPlanStatus(0L);
+                        for (TTsLjplan entity : tTsLjplanService.selectTTsLjplanListByNewId(query)) {
+                            if (Objects.equals(entity.getId(), item.getId()))
+                                continue;
+                            contentItem.setPid(entity.getId());
+                            contents = tTsLjplanContentService.selectTTsLjplanContentList(contentItem);
+                            for (TTsLjplanContent content : contents) {
+                                if (rosters.size() > i) {
+                                    //                            修改计划培训日期
+                                    i++;
+                                    content.setPlanDate(rosters.get(i).getShiftDate());
                                 }
+                                tTsLjplanContentService.updateTTsLjplanContent(content);
                             }
-                            break;
                         }
-                        case "2": {
-                            //查询旧数据
-                            TTsYsplan item = tTsYsplanService.selectTTsYsplanById(tTsApprove.getContentId());
-                            item.setPlanStatus(1L);
-                            tTsYsplanService.updateTTsYsplan(item);
-                            TTsYsplanContent contentItem = new TTsYsplanContent();
-                            contentItem.setPid(item.getId());
-                            //                新增需要重新学习的数据
-                            item.setId(null);
-                            item.setCreatedate(new Date());
-                            item.setCreaterCode(getUserId().toString());
-                            item.setUpdatedate(null);
-                            item.setUpdaterCode(null);
-                            item.setPlanStatus(0L);
-                            item.setScorePass(null);
-                            item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
+                        break;
+                    }
+                    case "2": {
+                        //查询旧数据
+                        TTsYsplan item = tTsYsplanService.selectTTsYsplanById(tTsApprove.getContentId());
+                        item.setPlanStatus(1L);
+                        tTsYsplanService.updateTTsYsplan(item);
+                        TTsYsplanContent contentItem = new TTsYsplanContent();
+                        contentItem.setPid(item.getId());
+                        //                新增需要重新学习的数据
+                        item.setId(null);
+                        item.setCreatedate(new Date());
+                        item.setCreaterCode(userId);
+                        item.setUpdatedate(null);
+                        item.setUpdaterCode(null);
+                        item.setPlanStatus(0L);
+                        item.setScorePass(null);
+                        item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
 
-                            tTsYsplanService.insertTTsYsplan(item);
-                            //新增内容
-                            List<TTsYsplanContent> contents = tTsYsplanContentService.selectTTsYsplanContentList(contentItem);
-                            for (TTsYsplanContent content : contents) {
-                                content.setId(null);
-                                content.setPid(item.getId());
-                                if (content.getPlanDate() != null) {
-                                    //                        修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                    content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                }
-                                tTsYsplanContentService.insertTTsYsplanContent(content);
+                        tTsYsplanService.insertTTsYsplan(item);
+                        //新增内容
+                        List<TTsYsplanContent> contents = tTsYsplanContentService.selectTTsYsplanContentList(contentItem);
+                        List<TShiftRoster> rosters = new ArrayList<>();
+                        int i = 0;
+                        if (contents.get(contents.size() - 1).getPlanDate() != null) {
+                            TTsNew tTsNew = tTsNewService.selectTTsNewById(item.getNewId());
+                            TStaffmgr tStaffmgr = tStaffmgrMapper.selectTStaffmgrByStaffId(tTsNew.getStaffId());
+                            TShiftRoster tShiftRoster = new TShiftRoster();
+                            tShiftRoster.setShiftDate(contents.get(contents.size() - 1).getPlanDate());
+                            tShiftRoster.setDclass(tStaffmgr.getTeam());
+                            tShiftRoster.setNclass(tStaffmgr.getTeam());
+                            tShiftRoster.setVacation(null);
+                            rosters = tShiftRosterMapper.selectTShiftRosterListByTrain(tShiftRoster);
+                        }
+                        for (TTsYsplanContent content : contents) {
+                            content.setId(null);
+                            content.setPid(item.getId());
+                            if (rosters.size() > i) {
+                                //                        修改计划培训日期
+                                i++;
+                                content.setPlanDate(rosters.get(i).getShiftDate());
                             }
-                            //                查询剩余未完成的训培内容
-                            TTsYsplan query = new TTsYsplan();
-                            query.setNewId(item.getNewId());
-                            query.setPlanStatus(0L);
-                            for (TTsYsplan entity : tTsYsplanService.selectTTsYsplanListByNewId(query)) {
-                                if (Objects.equals(entity.getId(), item.getId()))
-                                    continue;
-                                contentItem.setPid(entity.getId());
-                                contents = tTsYsplanContentService.selectTTsYsplanContentList(contentItem);
-                                for (TTsYsplanContent content : contents) {
-                                    if (content.getPlanDate() != null) {
-                                        //                            修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                        content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                        tTsYsplanContentService.updateTTsYsplanContent(content);
-                                    }
+                            tTsYsplanContentService.insertTTsYsplanContent(content);
+                        }
+                        //                查询剩余未完成的训培内容
+                        TTsYsplan query = new TTsYsplan();
+                        query.setNewId(item.getNewId());
+                        query.setPlanStatus(0L);
+                        for (TTsYsplan entity : tTsYsplanService.selectTTsYsplanListByNewId(query)) {
+                            if (Objects.equals(entity.getId(), item.getId()))
+                                continue;
+                            contentItem.setPid(entity.getId());
+                            contents = tTsYsplanContentService.selectTTsYsplanContentList(contentItem);
+                            for (TTsYsplanContent content : contents) {
+                                if (rosters.size() > i) {
+                                    //                        修改计划培训日期
+                                    i++;
+                                    content.setPlanDate(rosters.get(i).getShiftDate());
                                 }
+                                tTsYsplanContentService.updateTTsYsplanContent(content);
                             }
-                            break;
                         }
-                        case "3": {
-                            //查询旧数据
-                            TTsFlplan item = tTsFlplanService.selectTTsFlplanById(tTsApprove.getContentId());
-                            item.setPlanStatus(1L);
-                            tTsFlplanService.updateTTsFlplan(item);
-                            TTsFlplanContent contentItem = new TTsFlplanContent();
-                            contentItem.setPid(item.getId());
-                            //                新增需要重新学习的数据
-                            item.setId(null);
-                            item.setCreatedate(new Date());
-                            item.setCreaterCode(getUserId().toString());
-                            item.setUpdatedate(null);
-                            item.setUpdaterCode(null);
-                            item.setPlanStatus(0L);
-                            item.setScorePass(null);
-                            item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
+                        break;
+                    }
+                    case "3": {
+                        //查询旧数据
+                        TTsFlplan item = tTsFlplanService.selectTTsFlplanById(tTsApprove.getContentId());
+                        item.setPlanStatus(1L);
+                        tTsFlplanService.updateTTsFlplan(item);
+                        TTsFlplanContent contentItem = new TTsFlplanContent();
+                        contentItem.setPid(item.getId());
+                        //                新增需要重新学习的数据
+                        item.setId(null);
+                        item.setCreatedate(new Date());
+                        item.setCreaterCode(userId);
+                        item.setUpdatedate(null);
+                        item.setUpdaterCode(null);
+                        item.setPlanStatus(0L);
+                        item.setScorePass(null);
+                        item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
 
-                            tTsFlplanService.insertTTsFlplan(item);
-                            //新增内容
-                            List<TTsFlplanContent> contents = tTsFlplanContentService.selectTTsFlplanContentList(contentItem);
-                            for (TTsFlplanContent content : contents) {
-                                content.setId(null);
-                                content.setPid(item.getId());
-                                if (content.getPlanDate() != null) {
-                                    //                        修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                    content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                }
-                                tTsFlplanContentService.insertTTsFlplanContent(content);
+                        tTsFlplanService.insertTTsFlplan(item);
+                        //新增内容
+                        List<TTsFlplanContent> contents = tTsFlplanContentService.selectTTsFlplanContentList(contentItem);
+                        List<TShiftRoster> rosters = new ArrayList<>();
+                        int i = 0;
+                        if (contents.get(contents.size() - 1).getPlanDate() != null) {
+                            TTsNew tTsNew = tTsNewService.selectTTsNewById(item.getNewId());
+                            TStaffmgr tStaffmgr = tStaffmgrMapper.selectTStaffmgrByStaffId(tTsNew.getStaffId());
+                            TShiftRoster tShiftRoster = new TShiftRoster();
+                            tShiftRoster.setShiftDate(contents.get(contents.size() - 1).getPlanDate());
+                            tShiftRoster.setDclass(tStaffmgr.getTeam());
+                            tShiftRoster.setNclass(tStaffmgr.getTeam());
+                            tShiftRoster.setVacation(null);
+                            rosters = tShiftRosterMapper.selectTShiftRosterListByTrain(tShiftRoster);
+                        }
+                        for (TTsFlplanContent content : contents) {
+                            content.setId(null);
+                            content.setPid(item.getId());
+                            if (rosters.size() > i) {
+                                //                        修改计划培训日期
+                                i++;
+                                content.setPlanDate(rosters.get(i).getShiftDate());
                             }
-                            //                查询剩余未完成的训培内容
-                            TTsFlplan query = new TTsFlplan();
-                            query.setNewId(item.getNewId());
-                            query.setPlanStatus(0L);
-                            for (TTsFlplan entity : tTsFlplanService.selectTTsFlplanListByNewId(query)) {
-                                if (Objects.equals(entity.getId(), item.getId()))
-                                    continue;
-                                contentItem.setPid(entity.getId());
-                                contents = tTsFlplanContentService.selectTTsFlplanContentList(contentItem);
-                                for (TTsFlplanContent content : contents) {
-                                    if (content.getPlanDate() != null) {
-                                        //                            修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                        content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                        tTsFlplanContentService.updateTTsFlplanContent(content);
-                                    }
+                            tTsFlplanContentService.insertTTsFlplanContent(content);
+                        }
+                        //                查询剩余未完成的训培内容
+                        TTsFlplan query = new TTsFlplan();
+                        query.setNewId(item.getNewId());
+                        query.setPlanStatus(0L);
+                        for (TTsFlplan entity : tTsFlplanService.selectTTsFlplanListByNewId(query)) {
+                            if (Objects.equals(entity.getId(), item.getId()))
+                                continue;
+                            contentItem.setPid(entity.getId());
+                            contents = tTsFlplanContentService.selectTTsFlplanContentList(contentItem);
+                            for (TTsFlplanContent content : contents) {
+                                if (rosters.size() > i) {
+                                    //                        修改计划培训日期
+                                    i++;
+                                    content.setPlanDate(rosters.get(i).getShiftDate());
                                 }
+                                tTsFlplanContentService.updateTTsFlplanContent(content);
                             }
-                            break;
                         }
-                        case "4": {
-                            //查询旧数据
-                            TTsFtplan item = tTsFtplanService.selectTTsFtplanById(tTsApprove.getContentId());
-                            item.setPlanStatus(1L);
-                            tTsFtplanService.updateTTsFtplan(item);
-                            TTsFtplanContent contentItem = new TTsFtplanContent();
-                            contentItem.setPid(item.getId());
-                            //                新增需要重新学习的数据
-                            item.setId(null);
-                            item.setCreatedate(new Date());
-                            item.setCreaterCode(getUserId().toString());
-                            item.setUpdatedate(null);
-                            item.setUpdaterCode(null);
-                            item.setPlanStatus(0L);
-                            item.setScorePass(null);
-                            item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
+                        break;
+                    }
+                    case "4": {
+                        //查询旧数据
+                        TTsFtplan item = tTsFtplanService.selectTTsFtplanById(tTsApprove.getContentId());
+                        item.setPlanStatus(1L);
+                        tTsFtplanService.updateTTsFtplan(item);
+                        TTsFtplanContent contentItem = new TTsFtplanContent();
+                        contentItem.setPid(item.getId());
+                        //                新增需要重新学习的数据
+                        item.setId(null);
+                        item.setCreatedate(new Date());
+                        item.setCreaterCode(userId);
+                        item.setUpdatedate(null);
+                        item.setUpdaterCode(null);
+                        item.setPlanStatus(0L);
+                        item.setScorePass(null);
+                        item.setSortTmpl(item.getSortTmpl() + 1);//排序往后顺延1
 
-                            tTsFtplanService.insertTTsFtplan(item);
-                            //新增内容
-                            List<TTsFtplanContent> contents = tTsFtplanContentService.selectTTsFtplanContentList(contentItem);
-                            for (TTsFtplanContent content : contents) {
-                                content.setId(null);
-                                content.setPid(item.getId());
-                                if (content.getPlanDate() != null) {
-                                    //                        修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                    content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                }
-                                tTsFtplanContentService.insertTTsFtplanContent(content);
+                        tTsFtplanService.insertTTsFtplan(item);
+                        //新增内容
+                        List<TTsFtplanContent> contents = tTsFtplanContentService.selectTTsFtplanContentList(contentItem);
+                        List<TShiftRoster> rosters = new ArrayList<>();
+                        int i = 0;
+                        if (contents.get(contents.size() - 1).getPlanDate() != null) {
+                            TTsNew tTsNew = tTsNewService.selectTTsNewById(item.getNewId());
+                            TStaffmgr tStaffmgr = tStaffmgrMapper.selectTStaffmgrByStaffId(tTsNew.getStaffId());
+                            TShiftRoster tShiftRoster = new TShiftRoster();
+                            tShiftRoster.setShiftDate(contents.get(contents.size() - 1).getPlanDate());
+                            tShiftRoster.setDclass(tStaffmgr.getTeam());
+                            tShiftRoster.setNclass(tStaffmgr.getTeam());
+                            tShiftRoster.setVacation(null);
+                            rosters = tShiftRosterMapper.selectTShiftRosterListByTrain(tShiftRoster);
+                        }
+                        for (TTsFtplanContent content : contents) {
+                            content.setId(null);
+                            content.setPid(item.getId());
+                            if (rosters.size() > i) {
+                                //                        修改计划培训日期
+                                i++;
+                                content.setPlanDate(rosters.get(i).getShiftDate());
                             }
-                            //                查询剩余未完成的训培内容
-                            TTsFtplan query = new TTsFtplan();
-                            query.setNewId(item.getNewId());
-                            query.setPlanStatus(0L);
-                            for (TTsFtplan entity : tTsFtplanService.selectTTsFtplanListByNewId(query)) {
-                                if (Objects.equals(entity.getId(), item.getId()))
-                                    continue;
-                                contentItem.setPid(entity.getId());
-                                contents = tTsFtplanContentService.selectTTsFtplanContentList(contentItem);
-                                for (TTsFtplanContent content : contents) {
-                                    if (content.getPlanDate() != null) {
-                                        //                            修改计划培训日期 TODO:应根据班组日期排班,暂时使用内容数量添加,后面改
-                                        content.setPlanDate(DateUtils.addDate(content.getPlanDate(), contents.size()));
-                                        tTsFtplanContentService.updateTTsFtplanContent(content);
-                                    }
+                            tTsFtplanContentService.insertTTsFtplanContent(content);
+                        }
+                        //                查询剩余未完成的训培内容
+                        TTsFtplan query = new TTsFtplan();
+                        query.setNewId(item.getNewId());
+                        query.setPlanStatus(0L);
+                        for (TTsFtplan entity : tTsFtplanService.selectTTsFtplanListByNewId(query)) {
+                            if (Objects.equals(entity.getId(), item.getId()))
+                                continue;
+                            contentItem.setPid(entity.getId());
+                            contents = tTsFtplanContentService.selectTTsFtplanContentList(contentItem);
+                            for (TTsFtplanContent content : contents) {
+                                if (rosters.size() > i) {
+                                    //                        修改计划培训日期
+                                    i++;
+                                    content.setPlanDate(rosters.get(i).getShiftDate());
                                 }
+                                tTsFtplanContentService.updateTTsFtplanContent(content);
                             }
-                            break;
                         }
+                        break;
                     }
-                } catch (ParseException e) {
-                    throw new RuntimeException(e);
                 }
-            }, "经理批准重新学习").start();
         }
-        String userId = getUserId().toString();
         // 处理流程节点
         Map<String, Object> param = new HashMap<>();
         if (taskName.equals("装置经理")) {

+ 10 - 0
master/src/main/java/com/ruoyi/project/training/bccnew/domain/TTsFirstplan.java

@@ -52,6 +52,8 @@ public class TTsFirstplan extends BaseEntity
     @Excel(name = "讲师")
     private String trainer;
 
+    private Long trainerId;
+
     /** 培训日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     @Excel(name = "培训日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -140,6 +142,14 @@ public class TTsFirstplan extends BaseEntity
 
     private String nickName;
 
+    public Long getTrainerId() {
+        return trainerId;
+    }
+
+    public void setTrainerId(Long trainerId) {
+        this.trainerId = trainerId;
+    }
+
     public String getNickName() {
         return nickName;
     }

+ 10 - 0
master/src/main/java/com/ruoyi/project/training/bccnew/domain/TTsNew.java

@@ -107,9 +107,19 @@ public class TTsNew extends BaseEntity
     /** 导师带徒考评表word地址 */
     private String appraisalFormWordPath;
 
+    private Long vacation;
+
     /** 导师评语 */
     private String mentorComments;
 
+    public Long getVacation() {
+        return vacation;
+    }
+
+    public void setVacation(Long vacation) {
+        this.vacation = vacation;
+    }
+
     public String getMentorComments() {
         return mentorComments;
     }

+ 84 - 2
master/src/main/java/com/ruoyi/project/training/bccnew/service/impl/TTsNewServiceImpl.java

@@ -1,5 +1,13 @@
 package com.ruoyi.project.training.bccnew.service.impl;
 
+import com.ruoyi.project.document.domain.TPlantproglist;
+import com.ruoyi.project.document.mapper.TPlantproglistMapper;
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.plant.mapper.TStaffmgrMapper;
+import com.ruoyi.project.shiftmgr.domain.TShiftRoster;
+import com.ruoyi.project.shiftmgr.mapper.TShiftRosterMapper;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.mapper.SysUserMapper;
 import com.ruoyi.project.training.bccnew.domain.*;
 import com.ruoyi.project.training.bccnew.mapper.*;
 import com.ruoyi.project.training.bccnew.service.ITTsApproveService;
@@ -79,8 +87,18 @@ public class TTsNewServiceImpl implements ITTsNewService {
     @Autowired
     private TTsFirstplanTmplMapper tTsFirstplanTmplMapper;
 
+    @Autowired
+    private TPlantproglistMapper tPlantproglistMapper;
+
     @Autowired
     private ITTsApproveService tsApproveService;
+    @Autowired
+    private SysUserMapper sysUserMapper;
+    @Autowired
+    private TShiftRosterMapper tShiftRosterMapper;
+
+    @Autowired
+    private TStaffmgrMapper tStaffmgrMapper;
 
     /**
      * 查询导师带徒
@@ -113,22 +131,71 @@ public class TTsNewServiceImpl implements ITTsNewService {
     @Override
     public int insertTTsNew(TTsNew tTsNew) {
         tTsNewMapper.insertTTsNew(tTsNew);
+        TShiftRoster tShiftRoster = new TShiftRoster();
+        tShiftRoster.setShiftDate(tTsNew.getStartdate());
+        tShiftRoster.setVacation(tTsNew.getVacation());
+        tShiftRoster.setWeek(0L);
+        List<TShiftRoster> rosters = tShiftRosterMapper.selectTShiftRosterListByTrain(tShiftRoster);
+        int i = 0;
+        double studyCount = 0;
         for (TTsFirstplanTmpl tTsFirstplanTmpl : tTsFirstplanTmplMapper.selectTTsFirstplanTmplList(new TTsFirstplanTmpl())) {
             TTsFirstplan tTsFirstplan = new TTsFirstplan();
+            TPlantproglist tpl = new TPlantproglist();
+            tpl.setFileno(tTsFirstplanTmpl.getCourseCode());
+            tpl.setFilename(tTsFirstplanTmpl.getTopic());
+            List<TPlantproglist> tPlantproglists = tPlantproglistMapper.selectTPlantproglistList(tpl);
+            if (CollectionUtils.isNotEmpty(tPlantproglists)) {
+                TPlantproglist tPlantproglist = tPlantproglists.get(0);
+                SysUser sysUser = new SysUser();
+                sysUser.setNickName(tPlantproglist.getResponsibility());
+                sysUser.setDeptId(103L);
+                List<SysUser> sysUsers = sysUserMapper.selectUserList(sysUser);
+                if (CollectionUtils.isNotEmpty(sysUsers)) {
+                    SysUser user = sysUsers.get(0);
+                    if (user.getNickName().equals("张磊")&&!user.getUserName().equals("ZHANGL49")){
+                        user = sysUsers.get(1);
+                    }
+                    tTsFirstplan.setTrainer(user.getNickName());
+                    tTsFirstplan.setTrainerId(user.getUserId());
+                }
+            }
             tTsFirstplan.setNewId(tTsNew.getNewId());
             tTsFirstplan.setCourseCode(tTsFirstplanTmpl.getCourseCode());
             tTsFirstplan.setTopic(tTsFirstplanTmpl.getTopic());
             tTsFirstplan.setContent(tTsFirstplanTmpl.getContent());
             tTsFirstplan.setCourseDay(tTsFirstplanTmpl.getCourseDay());
             tTsFirstplan.setCourseHour(tTsFirstplanTmpl.getCourseHour());
+            if (tTsFirstplan.getCourseHour() != null) {
+                tTsFirstplan.setTimerNeed(tTsFirstplan.getCourseHour() * 60);
+                if (CollectionUtils.isNotEmpty(rosters)) {
+                    studyCount += tTsFirstplan.getCourseHour();
+                    if (tTsFirstplan.getCourseHour() <= 6) {
+                        if (studyCount <= 6) {
+                            if (rosters.size() > i) {
+                                tTsFirstplan.setTrainingPlanDate(rosters.get(i).getShiftDate());
+                            }
+                        } else {
+                            i++;
+                            if (rosters.size() > i) {
+                                tTsFirstplan.setTrainingPlanDate(rosters.get(i).getShiftDate());
+                            }
+                            studyCount = 0;
+                        }
+                    }else{
+                        i++;
+                        tTsFirstplan.setTrainingPlanDate(rosters.get(i).getShiftDate());
+                        studyCount = 0;
+                    }
+                }
+            } else {
+                tTsFirstplan.setTimerNeed(tTsFirstplanTmpl.getTimerNeed());
+            }
             tTsFirstplan.setCourseType(tTsFirstplanTmpl.getCourseType());
-            tTsFirstplan.setTrainer(tTsFirstplanTmpl.getTrainer());
             tTsFirstplan.setCourseDate(tTsFirstplanTmpl.getCourseDate());
             tTsFirstplan.setAssess(tTsFirstplanTmpl.getAssess());
             tTsFirstplan.setPlanStatus(0L);
             tTsFirstplan.setFileName(tTsFirstplanTmpl.getFileName());
             tTsFirstplan.setFileUrl(tTsFirstplanTmpl.getFileUrl());
-            tTsFirstplan.setTimerNeed(tTsFirstplanTmpl.getTimerNeed());
             tTsFirstplan.setTimer(0L);
             tTsFirstplan.setSortTmpl(tTsFirstplanTmpl.getSortTmpl());
             tTsFirstplan.setMaterialVer(tTsFirstplanTmpl.getMaterialVer());
@@ -136,6 +203,13 @@ public class TTsNewServiceImpl implements ITTsNewService {
             tTsFirstplan.setExamId(tTsFirstplanTmpl.getExamId());
             tTsFirstplanMapper.insertTTsFirstplan(tTsFirstplan);
         }
+        TStaffmgr tStaffmgr = tStaffmgrMapper.selectTStaffmgrByStaffId(tTsNew.getStaffId());
+        tShiftRoster.setShiftDate(rosters.get(i+1).getShiftDate());
+        tShiftRoster.setDclass(tStaffmgr.getTeam());
+        tShiftRoster.setNclass(tStaffmgr.getTeam());
+        tShiftRoster.setVacation(null);
+        rosters = tShiftRosterMapper.selectTShiftRosterListByTrain(tShiftRoster);
+        i=0;
         if (tTsNew.getPlanType() == 1) {
             for (TTsLjplanTmpl item : tTsLjplanTmplMapper.selectLjTmplListWithoutContent(new TTsLjplanTmpl())) {
                 TTsLjplan entity = new TTsLjplan();
@@ -157,7 +231,9 @@ public class TTsNewServiceImpl implements ITTsNewService {
                     contentEntity.setContent(tmplContent.getContent());
                     contentEntity.setCourseDay(tmplContent.getCourseDay());
                     contentEntity.setSortTmpl(tmplContent.getSortTmpl());
+                    contentEntity.setPlanDate(rosters.get(i).getShiftDate());
                     tTsLjplanContentMapper.insertTTsLjplanContent(contentEntity);
+                    i++;
                 }
             }
         } else if (tTsNew.getPlanType() == 2) {
@@ -181,7 +257,9 @@ public class TTsNewServiceImpl implements ITTsNewService {
                     contentEntity.setContent(tmplContent.getContent());
                     contentEntity.setCourseDay(tmplContent.getCourseDay());
                     contentEntity.setSortTmpl(tmplContent.getSortTmpl());
+                    contentEntity.setPlanDate(rosters.get(i).getShiftDate());
                     tTsYsplanContentMapper.insertTTsYsplanContent(contentEntity);
+                    i++;
                 }
             }
         } else if (tTsNew.getPlanType() == 3) {
@@ -205,7 +283,9 @@ public class TTsNewServiceImpl implements ITTsNewService {
                     contentEntity.setContent(tmplContent.getContent());
                     contentEntity.setCourseDay(tmplContent.getCourseDay());
                     contentEntity.setSortTmpl(tmplContent.getSortTmpl());
+                    contentEntity.setPlanDate(rosters.get(i).getShiftDate());
                     tTsFlplanContentMapper.insertTTsFlplanContent(contentEntity);
+                    i++;
                 }
             }
         } else if (tTsNew.getPlanType() == 4) {
@@ -229,7 +309,9 @@ public class TTsNewServiceImpl implements ITTsNewService {
                     contentEntity.setContent(tmplContent.getContent());
                     contentEntity.setCourseDay(tmplContent.getCourseDay());
                     contentEntity.setSortTmpl(tmplContent.getSortTmpl());
+                    contentEntity.setPlanDate(rosters.get(i).getShiftDate());
                     tTsFtplanContentMapper.insertTTsFtplanContent(contentEntity);
+                    i++;
                 }
             }
         }

+ 127 - 0
master/src/main/resources/mybatis/shiftmgr/TShiftRosterMapper.xml

@@ -0,0 +1,127 @@
+<?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.shiftmgr.mapper.TShiftRosterMapper">
+    
+    <resultMap type="TShiftRoster" id="TShiftRosterResult">
+        <result property="id"    column="id"    />
+        <result property="shiftDate"    column="shift_date"    />
+        <result property="dclass"    column="dclass"    />
+        <result property="nclass"    column="nclass"    />
+        <result property="week"    column="week"    />
+        <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="vacation"    column="vacation"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTShiftRosterVo">
+        select d.id, d.shift_date, d.dclass, d.nclass, d.week, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.vacation ,s.dept_name from t_shift_roster d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTShiftRosterList" parameterType="TShiftRoster" resultMap="TShiftRosterResult">
+        <include refid="selectTShiftRosterVo"/>
+        <where>  
+            <if test="shiftDate != null "> and shift_date = #{shiftDate}</if>
+            <if test="dclass != null  and dclass != ''"> and dclass = #{dclass}</if>
+            <if test="nclass != null  and nclass != ''"> and nclass = #{nclass}</if>
+            <if test="week != null "> and week = #{week}</if>
+            <if test="createrCode != null "> and creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="vacation != null "> and vacation = #{vacation}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTShiftRosterById" parameterType="TShiftRoster" resultMap="TShiftRosterResult">
+        <include refid="selectTShiftRosterVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectTShiftRosterListByTrain" parameterType="Long" resultMap="TShiftRosterResult">
+        <include refid="selectTShiftRosterVo"/>
+        <where>
+            <if test="shiftDate != null "> and shift_date >= #{shiftDate}</if>
+            <if test="dclass != null  and dclass != '' and nclass != null  and nclass != ''"> and (dclass = #{dclass} or nclass = #{nclass})</if>
+            <if test="vacation != null "> and vacation != #{vacation}</if>
+            <if test="week != null "> and week != 0 and week != 6</if>
+            and d.del_flag = 0
+        </where>
+    </select>
+        
+    <insert id="insertTShiftRoster" parameterType="TShiftRoster">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_shift_roster.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_shift_roster
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="shiftDate != null">shift_date,</if>
+            <if test="dclass != null and dclass != ''">dclass,</if>
+            <if test="nclass != null and nclass != ''">nclass,</if>
+            <if test="week != null">week,</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="vacation != null">vacation,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="shiftDate != null">#{shiftDate},</if>
+            <if test="dclass != null and dclass != ''">#{dclass},</if>
+            <if test="nclass != null and nclass != ''">#{nclass},</if>
+            <if test="week != null">#{week},</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="vacation != null">#{vacation},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTShiftRoster" parameterType="TShiftRoster">
+        update t_shift_roster
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="shiftDate != null">shift_date = #{shiftDate},</if>
+            <if test="dclass != null and dclass != ''">dclass = #{dclass},</if>
+            <if test="nclass != null and nclass != ''">nclass = #{nclass},</if>
+            <if test="week != null">week = #{week},</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="vacation != null">vacation = #{vacation},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTShiftRosterById" parameterType="Long">
+        update t_shift_roster set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTShiftRosterByIds" parameterType="String">
+        update t_shift_roster set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

+ 6 - 1
master/src/main/resources/mybatis/training/bccnew/TTsNewMapper.xml

@@ -28,10 +28,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="targetPlanWordPath"    column="target_plan_word_path"    />
         <result property="appraisalFormWordPath"    column="appraisal_form_word_path"    />
         <result property="mentorComments"    column="mentor_comments"    />
+        <result property="vacation"    column="vacation"    />
     </resultMap>
 
     <sql id="selectTTsNewVo">
-        select d.mentor_comments,d.new_id, d.staff_id, d.name,u.name as staffName,u2.name as mentorStaffName, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.plan_status, d.plan_year, d.startdate, d.enddate, d.mentor_staff_id, d.plan_type, d.remarks ,s.dept_name,
+        select d.vacation,d.mentor_comments,d.new_id, d.staff_id, d.name,u.name as staffName,u2.name as mentorStaffName, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.plan_status, d.plan_year, d.startdate, d.enddate, d.mentor_staff_id, d.plan_type, d.remarks ,s.dept_name,
         d.mentor_agreement_word_path, d.target_plan_word_path, appraisal_form_word_path
         from t_ts_new d
       left join sys_dept s on s.dept_id = d.dept_id
@@ -56,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="mentorStaffId != null  and mentorStaffId != ''"> and mentor_staff_id = #{mentorStaffId}</if>
             <if test="planType != null "> and plan_type = #{planType}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="vacation != null "> and vacation = #{vacation}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -91,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planType != null">plan_type,</if>
             <if test="remarks != null">remarks,</if>
             <if test="mentorComments != null">mentor_comments,</if>
+            <if test="vacation != null">vacation,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="newId != null">#{newId},</if>
@@ -110,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planType != null">#{planType},</if>
             <if test="remarks != null">#{remarks},</if>
             <if test="mentorComments != null">#{mentorComments},</if>
+            <if test="vacation != null">#{vacation},</if>
          </trim>
     </insert>
 
@@ -135,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="targetPlanWordPath != null">target_plan_word_path = #{targetPlanWordPath},</if>
             <if test="appraisalFormWordPath != null">appraisal_form_word_path = #{appraisalFormWordPath},</if>
             <if test="mentorComments != null">mentor_comments = #{mentorComments},</if>
+            <if test="vacation != null">vacation = #{vacation},</if>
         </trim>
         where new_id = #{newId}
     </update>

二進制
master/src/main/resources/static/template/training/roster.xlsx


+ 53 - 0
ui/src/api/shiftmgr/roster.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询排班计划管理列表
+export function listRoster(query) {
+  return request({
+    url: '/shiftmgr/roster/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询排班计划管理详细
+export function getRoster(id) {
+  return request({
+    url: '/shiftmgr/roster/' + id,
+    method: 'get'
+  })
+}
+
+// 新增排班计划管理
+export function addRoster(data) {
+  return request({
+    url: '/shiftmgr/roster',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改排班计划管理
+export function updateRoster(data) {
+  return request({
+    url: '/shiftmgr/roster',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除排班计划管理
+export function delRoster(id) {
+  return request({
+    url: '/shiftmgr/roster/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出排班计划管理
+export function exportRoster(query) {
+  return request({
+    url: '/shiftmgr/roster/export',
+    method: 'get',
+    params: query
+  })
+}

+ 689 - 0
ui/src/views/shiftmgr/shiftchangemgr/roster/index.vue

@@ -0,0 +1,689 @@
+<template>
+  <div class="app-container ">
+    <div id="full-calendar" class="conference">
+      <div class='conference-right'>
+        <FullCalendar
+          ref="fullCalendar"
+          class='calendar-full'
+          :options='calendarOptions'>
+        </FullCalendar>
+      </div>
+
+      <div style="position: absolute; top:40px; right:300px">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['shiftmgr:roster:add']"
+        >导入
+        </el-button>
+      </div>
+
+      <!-- 添加或修改排班计划管理对话框 -->
+      <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="排班日期" prop="shiftDate">
+            <el-date-picker clearable size="small" style="width: 200px"
+                            v-model="form.shiftDate"
+                            type="date"
+                            value-format="yyyy-MM-dd HH:mm:ss"
+                            placeholder="选择排班日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="白班" prop="dclass">
+            <el-select v-model="form.dclass" clearable>
+              <el-option value="A">A</el-option>
+              <el-option value="B">B</el-option>
+              <el-option value="C">C</el-option>
+              <el-option value="D">D</el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="夜班" prop="nclass">
+            <el-select v-model="form.nclass" clearable>
+              <el-option value="A">A</el-option>
+              <el-option value="B">B</el-option>
+              <el-option value="C">C</el-option>
+              <el-option value="D">D</el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="节假日" prop="vacation">
+            <el-radio-group v-model="form.vacation">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="2">否</el-radio>
+            </el-radio-group>
+          </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 :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-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+            </div>
+            <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+              <input name="type" :value="upload.type" hidden/>
+            </form>
+            <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>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import {addRoster, delRoster, exportRoster, getRoster, listRoster, updateRoster} from "@/api/shiftmgr/roster";
+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";
+import FullCalendar from '@fullcalendar/vue'
+import dayGridPlugin from '@fullcalendar/daygrid'
+import timeGridPlugin from '@fullcalendar/timegrid'
+import interactionPlugin from '@fullcalendar/interaction'
+import momentPlugin from '@fullcalendar/moment'
+import listPlugin from '@fullcalendar/list';
+import bootstrapPlugin from '@fullcalendar/bootstrap';
+import {INITIAL_EVENTS} from '@/utils/event-utils'
+import 'bootstrap/dist/css/bootstrap.css';
+import {dateFormat} from '@/utils/date';
+
+export default {
+  name: "Roster",
+  components: {Treeselect, FullCalendar},
+  data() {
+    return {
+      calendarOptions: {
+        plugins: [
+          //resourceTimeGridPlugin,
+          bootstrapPlugin,
+          listPlugin,
+          momentPlugin,
+          dayGridPlugin,
+          timeGridPlugin,
+          interactionPlugin // needed for dateClick
+        ],
+        //schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
+        themeSystem: 'bootstrap',
+        headerToolbar: {
+          left: 'prev,next,today',
+          center: 'title',
+          right: 'listWeek,dayGridMonth,timeGridWeek,timeGridDay'
+        },
+        initialView: 'dayGridMonth',
+        resources: [
+          {id: 'a', title: 'Auditorium A'},
+          {id: 'b', title: 'Auditorium B'},
+          {id: 'c', title: 'Auditorium C'}
+        ],
+        initialEvents: INITIAL_EVENTS, // alternatively, use the `events` setting to fetch from a feed
+        editable: true,
+        dayMaxEvents: true,
+        weekends: true,
+        select: this.handleAdd,
+        eventClick: this.handleUpdate,
+        eventsSet: this.handleEvents,
+        dateClick: this.handleDateClick,
+        // dayCellDidMount: function(info) {
+        //   //this.$console.log('info===',info);
+        //   return 'test001'
+        // },
+        eventDidMount: function (info) {
+          //$(info.el).tooltip({title: '11111'});
+          //this.$console.log('info===',info);
+          // var tooltip = new Tooltip(info.el, {
+          //   title: info.event.extendedProps.description,
+          //   placement: 'top',
+          //   trigger: 'hover',
+          //   container: 'body'
+          // });
+        },
+        eventRender: function (event, element) {
+          element.attr('title', event.tip);
+        },
+        height: '100%',
+        events: [],
+        week: 'narrow',
+        buttonText: {
+          next: '>',
+          prev: '<',
+          allday: '整天',
+          today: '今天',
+          month: '月',
+          week: '周',
+          day: '天',
+          listWeek: '周列表'
+        },
+        // titleFormat: {
+        //   month: 'long',
+        //   year: 'numeric',
+        //   day: 'numeric',
+        //   weekday: 'long'
+        // },
+
+        // 整体控制月、周、天顶部的日期显示
+        dayHeaderFormat: {
+          weekday: 'short',
+          // year: 'numeric',
+          // month: 'numeric',
+          // day: 'numeric',
+          omitCommas: true
+        },
+        // 单独控制月、周、天顶部的日期显示
+        views: {
+          timeGridWeek: {
+            dayHeaderFormat: {
+              weekday: 'short',
+              // year: 'numeric',
+              month: 'numeric',
+              day: 'numeric',
+              omitCommas: true
+            },
+          },
+        },
+        selectMirror: 'true',
+        slotMinTime: '06:00:00',
+        slotMaxTime: '24:00:00',
+        selectable: 'true',
+        locale: 'zh-cn',
+        slotEventOverlap: 'false',
+        unselectAuto: 'false',
+        selectOverlap: 'false',
+        businessHours: [],
+        firstDay: 1,
+        allDaySlot: 'true',
+        slotDuration: '00:30',
+        slotLabelFormat: 'HH:mm',
+        allDayContent: '全天',
+        // 随时判断时间是否合法,通过返回true/false来判断是否能够选择
+        selectAllow: info => {
+          const currentDate = new Date()
+          const start = info.start
+          const end = info.end
+          return (start <= end && start >= currentDate) || (dateFormat(start).substring(0, 10) === dateFormat(currentDate).substring(0, 10))
+        },
+        eventMouseEnter: this.eventMouseEnter,
+        //eventDragStop: this.eventDragStop,
+        // 拖拽结束后
+        eventDrop: this.eventDragStop,
+        // 调整大小
+        eventResize: this.eventResize,
+
+        dragOpacity: {
+          agenda: .1, //对于agenda试图
+          '': 1.0 //其他视图
+        },
+
+        //dayCellContent: ''
+        /* you can update a remote database when these fire:
+        eventAdd:
+        eventChange:
+        eventRemove:
+        */
+      },
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 排班计划管理表格数据
+      rosterList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight: 300,
+      // 是否显示弹出层
+      open: false,
+      // 用户导入参数
+      upload: {
+        //下载模板请求地址
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        type: 'shiftRoster',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/shiftmgr/roster/importData"
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 5000,
+        shiftDate: null,
+        dclass: null,
+        nclass: null,
+        week: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        vacation: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        shiftDate: [
+          {required: true, message: "排班日期不能为空", trigger: "blur"}
+        ],
+        dclass: [
+          {required: true, message: "白班不能为空", trigger: "blur"}
+        ],
+        nclass: [
+          {required: true, message: "夜班不能为空", trigger: "blur"}
+        ],
+        vacation: [
+          {required: true, message: "节假日不能为空", trigger: "blur"}
+        ]
+      }
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  mounted() {
+    let _self = this;
+    this.$nextTick(() => {
+      // 监听fullcalendar的事件
+      let fullCalDom = document.querySelectorAll('.fc-header-toolbar .fc-toolbar-chunk .btn-group >button');
+      for (let button of fullCalDom) {
+        button.addEventListener('click', function () {
+          _self.changeDurationTime();
+        });
+      }
+
+      this.getList()
+    });
+
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 250
+    })
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询排班计划管理列表 */
+    getList() {
+      this.loading = true;
+      listRoster(this.queryParams).then(response => {
+        this.rosterList = response.rows;
+        let result = response.rows;
+        if (result.length > 0) {
+          this.calendarOptions.events = [];
+          result.forEach(item => {
+            let title = "";
+            let color = "";
+            let end = null;
+            if (item.shiftDate != null) {
+              end = new Date(item.shiftDate)
+            }
+            if (item.nclass != null) {
+              title = "晚班:" + item.nclass;
+              color = "rgb(0,0,0,1)";
+              this.calendarOptions.events.push({
+                id: item.id,
+                description: item.remarks,
+                title: title,
+                start: item.shiftDate,
+                end: end,
+                color: color,
+                allDay: true
+              })
+            }
+            if (item.dclass != null) {
+              title = "早班:" + item.dclass;
+              color = "rgba(0, 140, 255, 1)";
+              this.calendarOptions.events.push({
+                id: item.id,
+                description: item.remarks,
+                title: title,
+                start: item.shiftDate,
+                end: end,
+                color: color,
+                allDay: true
+              })
+            }
+          })
+        } else {
+          this.calendarOptions.events = [];
+          //改写No Event To Display;
+          var ele = document.getElementsByClassName('fc-list-empty-cushion');
+          console.log(ele)
+          if (ele.length > 0) {
+            setTimeout(() => {
+              ele[0].innerText = '没有更多数据!';
+            }, 100);
+          }
+        }
+      }, error => {
+        //this.$console.log(error);
+      });
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        shiftDate: null,
+        dclass: null,
+        nclass: null,
+        week: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        vacation: 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(selectInfo) {
+      console.log(selectInfo)
+      this.reset();
+      this.open = true;
+      this.title = "添加排班计划管理";
+      var currentTime = selectInfo.start;
+      var targetOffset = 480; // 假设目标时区为中国标准时间(UTC+8),偏移量为-480分钟
+      var targetTime = new Date(currentTime.getTime() + (targetOffset * 60 * 1000));
+      var formattedTime = targetTime.toLocaleString(); // 使用默认的本地化格式
+
+      console.log("目标时区时间:" + formattedTime);
+      this.form.shiftDate = targetTime
+    },
+    /** 修改按钮操作 */
+    handleUpdate(clickInfo) {
+      console.log(clickInfo)
+      this.reset();
+      const id = clickInfo.event.id || this.ids
+      getRoster(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) {
+            updateRoster(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addRoster(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 delRoster(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有排班计划管理数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportRoster(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.$refs['downloadFileForm'].submit()
+    },
+    // 文件上传中处理
+    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>
+
+<style lang='css' scoped>
+.conference {
+  display: flex;
+  min-height: 100%;
+  height: 800px;
+  font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
+  font-size: 14px;
+  background-color: #fff;
+}
+
+
+.conference .el-calendar__header {
+  padding: 12px 10px;
+}
+
+.conference .el-calendar__header .el-calendar__button-group {
+  width: 35%;
+  text-align: right;
+}
+
+.conference .el-calendar__header .el-calendar__button-group .el-button-group > button:nth-of-type(1) {
+  width: 20%;
+  border: 0;
+  padding: 5px 10px 5px 5px;
+  font-size: 12px;
+}
+
+.conference .el-calendar__header .el-calendar__button-group .el-button-group > button:nth-of-type(2) {
+  border: 0;
+  padding: 5px 5px 5px 5px;
+}
+
+.conference .el-calendar__header .el-calendar__button-group .el-button-group > button:nth-of-type(3) {
+  width: 20%;
+  border: 0;
+  padding: 5px 5px 5px 5px;
+}
+
+.is-selected {
+  color: #1989FA;
+}
+
+.conference-right {
+  flex-grow: 1;
+  padding: 1em;
+}
+
+.fc { /* the calendar root */
+  /* max-width: 1100px; */
+  margin: 0 auto;
+}
+
+.conference-right .fc-header-toolbar .btn {
+  line-height: 1 !important;
+}
+
+.is-selected {
+  color: #1989FA;
+}
+
+.calendar-add-icon:hover {
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  background-color: #f1f1f1;
+}
+
+.conference .el-input {
+  border-bottom: 0 !important;
+}
+
+.conference .dialogFormItem {
+  width: 450px;
+}
+
+.conference .dialogFormItem .half-input .el-input__inner {
+  width: 320px;
+}
+
+.conference .mini-dialogFormItem .mini-input .el-input__inner {
+  width: 120px;
+}
+
+.conference .full-dialogFormItem .full-input .el-input__inner {
+  width: 780px;
+}
+
+.conference .full-dialogFormItem .full-input .el-textarea__inner {
+  width: 780px;
+}
+
+.send-wechat-div {
+
+}
+
+.el-col-slotBtn {
+  width: 25% !important;
+}
+
+.el-col-slotBtn .el-form-item__content {
+  margin-left: 40px !important;
+}
+
+.fc {
+  width: 100%; /* 固定宽度 */
+  height: 600px; /* 固定高度 */
+}
+
+.fc-toolbar .fc-center h2 {
+  font-size: 20px; /* 根据需要调整字体大小 */
+}
+
+.fc-toolbar .fc-today-button, .fc-toolbar .fc-prev-button, .fc-toolbar .fc-next-button,
+.fc-toolbar .fc-listWeek-button,
+.fc-toolbar .fc-dayGridMonth-button,
+.fc-toolbar .fc-timeGridWeek-button,
+.fc-toolbar .fc-timeGridDay-button {
+  font-size: 14px !important; /* 设置按钮字体大小 */
+  padding: 8px 12px !important; /* 设置按钮内边距 */
+  height: 40px; /* 设置按钮高度 */
+  line-height: 24px; /* 设置按钮行高,使文本居中 */
+  border-radius: 3px;
+}
+
+.fc-view-container {
+  overflow: hidden; /* 禁用溢出滚动 */
+}
+
+.fc-toolbar.btn-primary:not(:disabled):not(.disabled).active:focus {
+  box-shadow: 0 0 0 0 !important;
+}
+
+</style>

+ 2 - 2
ui/src/views/training/bccnew/firstPlanTmpl/index.vue

@@ -140,7 +140,7 @@
     />
 
     <!-- 添加或修改进组培训模版对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="课程编号" prop="courseCode">
           <el-input v-model="form.courseCode" placeholder="请输入课程编号"/>
@@ -185,7 +185,7 @@
       </div>
     </el-dialog>
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"

+ 3 - 3
ui/src/views/training/bccnew/firstplan/index.vue

@@ -174,7 +174,7 @@
     />
 
     <!-- 添加或修改进组培训对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="课程编号" prop="courseCode">
           <el-input v-model="form.courseCode" placeholder="请输入课程编号"/>
@@ -261,7 +261,7 @@
       </div>
     </el-dialog>
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"
@@ -292,7 +292,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog :visible.sync="file.open" width="30%" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
       <el-descriptions class="margin-top" title="学习资料" :column="1" size="medium" border>
         <el-descriptions-item label-style="width:180px">
           <template slot="label">

+ 3 - 3
ui/src/views/training/bccnew/firstplan/index_student.vue

@@ -103,7 +103,7 @@
     />
 
     <!-- 添加或修改进组培训对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="课程编号" prop="courseCode">
           <el-input v-model="form.courseCode" placeholder="请输入课程编号"/>
@@ -158,7 +158,7 @@
       </div>
     </el-dialog>
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"
@@ -189,7 +189,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog :visible.sync="file.open" width="30%" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
       <el-descriptions class="margin-top" title="学习资料" :column="1"  size="medium"  border>
         <el-descriptions-item label-style="width:180px">
           <template slot="label">

+ 2 - 2
ui/src/views/training/bccnew/flPlan/index.vue

@@ -120,7 +120,7 @@
     />
 
     <!-- 添加或修改分离培训模版对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划"/>
@@ -144,7 +144,7 @@
       </div>
     </el-dialog>
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"

+ 2 - 2
ui/src/views/training/bccnew/ftPlan/index.vue

@@ -122,7 +122,7 @@
     />
 
     <!-- 添加或修改芳烃培训模版对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划"/>
@@ -146,7 +146,7 @@
       </div>
     </el-dialog>
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"

+ 2 - 2
ui/src/views/training/bccnew/ljPlan/index.vue

@@ -114,7 +114,7 @@
     />
 
     <!-- 添加或修改裂解培训模版对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划"/>
@@ -138,7 +138,7 @@
       </div>
     </el-dialog>
       <!-- 用户导入对话框 -->
-      <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
           <el-upload
                   ref="upload"
                   :limit="1"

+ 2 - 2
ui/src/views/training/bccnew/tsnew/index.vue

@@ -234,7 +234,7 @@
     />
 
     <!-- 添加或修改新员工培训对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :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="培训员工" prop="staffId">
           <el-select v-model="form.staffId" filterable :placeholder="$t('请选择')+$t('培训员工')" :disabled="isEdit">
@@ -310,7 +310,7 @@
       </div>
     </el-dialog>
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"

+ 2 - 2
ui/src/views/training/bccnew/tsnew/index_s.vue

@@ -234,7 +234,7 @@
     />
 
     <!-- 添加或修改新员工培训对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :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="培训员工" prop="staffId">
           <el-select v-model="form.staffId" filterable :placeholder="$t('请选择')+$t('培训员工')" :disabled="isEdit">
@@ -310,7 +310,7 @@
       </div>
     </el-dialog>
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
         ref="upload"
         :limit="1"

+ 2 - 2
ui/src/views/training/bccnew/tsnew/score.vue

@@ -153,7 +153,7 @@
     />
 
     <!-- 添加或修改转岗培训对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划"/>
@@ -227,7 +227,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog :visible.sync="file.open" width="30%" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
       <el-descriptions class="margin-top" title="学习资料" :column="1" size="medium" border>
         <el-descriptions-item label-style="width:180px">
           <template slot="label">

+ 1 - 1
ui/src/views/training/bccnew/tsnew/score_student.vue

@@ -71,7 +71,7 @@
       @pagination="getList"
     />
 
-    <el-dialog :visible.sync="file.open" width="30%" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
       <el-descriptions class="margin-top" title="学习资料" :column="1" size="medium" border>
         <el-descriptions-item label-style="width:180px">
           <template slot="label">

+ 2 - 2
ui/src/views/training/bccnew/ysPlan/index.vue

@@ -114,7 +114,7 @@
     />
 
     <!-- 添加或修改压缩培训模版对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划"/>
@@ -138,7 +138,7 @@
       </div>
     </el-dialog>
       <!-- 用户导入对话框 -->
-      <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-dialog  :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
           <el-upload
                   ref="upload"
                   :limit="1"