Kaynağa Gözat

LY 新员工培训

ly 2 yıl önce
ebeveyn
işleme
3b8dd3d317
18 değiştirilmiş dosya ile 281 ekleme ve 177 silme
  1. 12 1
      master/src/main/java/com/ruoyi/project/training/newstaff/controller/TTnNewController.java
  2. 11 8
      master/src/main/java/com/ruoyi/project/training/newstaff/mapper/TTnFirstplanMapper.java
  3. 11 8
      master/src/main/java/com/ruoyi/project/training/newstaff/mapper/TTnSchoolplanMapper.java
  4. 11 8
      master/src/main/java/com/ruoyi/project/training/newstaff/mapper/TTnTransferplanMapper.java
  5. 57 4
      master/src/main/java/com/ruoyi/project/training/newstaff/service/impl/TTnNewServiceImpl.java
  6. 3 1
      master/src/main/java/com/ruoyi/project/training/newstaff/service/impl/TTnTransferplanTmplServiceImpl.java
  7. 51 6
      master/src/main/resources/mybatis/training/newstaff/TTnFirstplanMapper.xml
  8. 1 1
      master/src/main/resources/mybatis/training/newstaff/TTnFirstplanTmplMapper.xml
  9. 52 6
      master/src/main/resources/mybatis/training/newstaff/TTnSchoolplanMapper.xml
  10. 7 6
      master/src/main/resources/mybatis/training/newstaff/TTnSchoolplanTmplMapper.xml
  11. 52 6
      master/src/main/resources/mybatis/training/newstaff/TTnTransferplanMapper.xml
  12. 7 6
      master/src/main/resources/mybatis/training/newstaff/TTnTransferplanTmplMapper.xml
  13. 1 0
      ui/src/views/training/newstaff/firstplan/index.vue
  14. 0 1
      ui/src/views/training/newstaff/planList/index.vue
  15. 2 0
      ui/src/views/training/newstaff/schoolplan/index.vue
  16. 0 52
      ui/src/views/training/newstaff/schoolplantmpl/index.vue
  17. 2 0
      ui/src/views/training/newstaff/transferplan/index.vue
  18. 1 63
      ui/src/views/training/newstaff/transferplantmpl/index.vue

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

@@ -5,6 +5,9 @@ import java.util.List;
 import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.service.ITStaffmgrService;
 import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.training.newstaff.domain.TTnFirstplanTmpl;
+import com.ruoyi.project.training.newstaff.mapper.TTnFirstplanMapper;
+import com.ruoyi.project.training.newstaff.service.ITTnFirstplanTmplService;
 import com.ruoyi.project.training.spec.domain.TStSuccessor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +28,8 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
 
+import javax.annotation.Resource;
+
 /**
  * 新员工培训Controller
  *
@@ -39,6 +44,10 @@ public class TTnNewController extends BaseController
     private ITTnNewService tTnNewService;
     @Autowired
     private ITStaffmgrService tStaffmgrService;
+    @Autowired
+    private ITTnFirstplanTmplService tTnFirstplanTmplService;
+
+
     /**
      * 查询新员工培训列表
      */
@@ -92,7 +101,9 @@ public class TTnNewController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody TTnNew tTnNew)
     {
-        return toAjax(tTnNewService.insertTTnNew(tTnNew));
+        tTnNewService.insertTTnNew(tTnNew);
+
+        return toAjax(1);
     }
 
     /**

+ 11 - 8
master/src/main/java/com/ruoyi/project/training/newstaff/mapper/TTnFirstplanMapper.java

@@ -3,18 +3,19 @@ package com.ruoyi.project.training.newstaff.mapper;
 import java.util.List;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.training.newstaff.domain.TTnFirstplan;
+import com.ruoyi.project.training.newstaff.domain.TTnFirstplanTmpl;
 
 /**
  * 进组培训Mapper接口
- * 
+ *
  * @author ruoyi
  * @date 2023-07-04
  */
-public interface TTnFirstplanMapper 
+public interface TTnFirstplanMapper
 {
     /**
      * 查询进组培训
-     * 
+     *
      * @param id 进组培训ID
      * @return 进组培训
      */
@@ -22,7 +23,7 @@ public interface TTnFirstplanMapper
 
     /**
      * 查询进组培训列表
-     * 
+     *
      * @param tTnFirstplan 进组培训
      * @return 进组培训集合
      */
@@ -31,7 +32,7 @@ public interface TTnFirstplanMapper
 
     /**
      * 新增进组培训
-     * 
+     *
      * @param tTnFirstplan 进组培训
      * @return 结果
      */
@@ -39,7 +40,7 @@ public interface TTnFirstplanMapper
 
     /**
      * 修改进组培训
-     * 
+     *
      * @param tTnFirstplan 进组培训
      * @return 结果
      */
@@ -47,7 +48,7 @@ public interface TTnFirstplanMapper
 
     /**
      * 删除进组培训
-     * 
+     *
      * @param id 进组培训ID
      * @return 结果
      */
@@ -55,9 +56,11 @@ public interface TTnFirstplanMapper
 
     /**
      * 批量删除进组培训
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
     public int deleteTTnFirstplanByIds(Long[] ids);
+
+    void insertTTnFirstplanTmpl(TTnFirstplanTmpl t);
 }

+ 11 - 8
master/src/main/java/com/ruoyi/project/training/newstaff/mapper/TTnSchoolplanMapper.java

@@ -3,18 +3,19 @@ package com.ruoyi.project.training.newstaff.mapper;
 import java.util.List;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.training.newstaff.domain.TTnSchoolplan;
+import com.ruoyi.project.training.newstaff.domain.TTnSchoolplanTmpl;
 
 /**
  * 校招培训Mapper接口
- * 
+ *
  * @author ruoyi
  * @date 2023-07-05
  */
-public interface TTnSchoolplanMapper 
+public interface TTnSchoolplanMapper
 {
     /**
      * 查询校招培训
-     * 
+     *
      * @param id 校招培训ID
      * @return 校招培训
      */
@@ -22,7 +23,7 @@ public interface TTnSchoolplanMapper
 
     /**
      * 查询校招培训列表
-     * 
+     *
      * @param tTnSchoolplan 校招培训
      * @return 校招培训集合
      */
@@ -31,7 +32,7 @@ public interface TTnSchoolplanMapper
 
     /**
      * 新增校招培训
-     * 
+     *
      * @param tTnSchoolplan 校招培训
      * @return 结果
      */
@@ -39,7 +40,7 @@ public interface TTnSchoolplanMapper
 
     /**
      * 修改校招培训
-     * 
+     *
      * @param tTnSchoolplan 校招培训
      * @return 结果
      */
@@ -47,7 +48,7 @@ public interface TTnSchoolplanMapper
 
     /**
      * 删除校招培训
-     * 
+     *
      * @param id 校招培训ID
      * @return 结果
      */
@@ -55,9 +56,11 @@ public interface TTnSchoolplanMapper
 
     /**
      * 批量删除校招培训
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
     public int deleteTTnSchoolplanByIds(Long[] ids);
+
+    void insertTTnSchoolplanTmpl(TTnSchoolplanTmpl t);
 }

+ 11 - 8
master/src/main/java/com/ruoyi/project/training/newstaff/mapper/TTnTransferplanMapper.java

@@ -3,18 +3,19 @@ package com.ruoyi.project.training.newstaff.mapper;
 import java.util.List;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.training.newstaff.domain.TTnTransferplan;
+import com.ruoyi.project.training.newstaff.domain.TTnTransferplanTmpl;
 
 /**
  * 转岗培训Mapper接口
- * 
+ *
  * @author ruoyi
  * @date 2023-07-05
  */
-public interface TTnTransferplanMapper 
+public interface TTnTransferplanMapper
 {
     /**
      * 查询转岗培训
-     * 
+     *
      * @param id 转岗培训ID
      * @return 转岗培训
      */
@@ -22,7 +23,7 @@ public interface TTnTransferplanMapper
 
     /**
      * 查询转岗培训列表
-     * 
+     *
      * @param tTnTransferplan 转岗培训
      * @return 转岗培训集合
      */
@@ -31,7 +32,7 @@ public interface TTnTransferplanMapper
 
     /**
      * 新增转岗培训
-     * 
+     *
      * @param tTnTransferplan 转岗培训
      * @return 结果
      */
@@ -39,7 +40,7 @@ public interface TTnTransferplanMapper
 
     /**
      * 修改转岗培训
-     * 
+     *
      * @param tTnTransferplan 转岗培训
      * @return 结果
      */
@@ -47,7 +48,7 @@ public interface TTnTransferplanMapper
 
     /**
      * 删除转岗培训
-     * 
+     *
      * @param id 转岗培训ID
      * @return 结果
      */
@@ -55,9 +56,11 @@ public interface TTnTransferplanMapper
 
     /**
      * 批量删除转岗培训
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
     public int deleteTTnTransferplanByIds(Long[] ids);
+
+    void insertTTnTransferplanTmpl(TTnTransferplanTmpl t);
 }

+ 57 - 4
master/src/main/java/com/ruoyi/project/training/newstaff/service/impl/TTnNewServiceImpl.java

@@ -1,11 +1,18 @@
 package com.ruoyi.project.training.newstaff.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.project.training.newstaff.domain.TTnFirstplanTmpl;
+import com.ruoyi.project.training.newstaff.domain.TTnSchoolplanTmpl;
+import com.ruoyi.project.training.newstaff.domain.TTnTransferplanTmpl;
+import com.ruoyi.project.training.newstaff.mapper.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.ruoyi.project.training.newstaff.mapper.TTnNewMapper;
 import com.ruoyi.project.training.newstaff.domain.TTnNew;
 import com.ruoyi.project.training.newstaff.service.ITTnNewService;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
 
 /**
  * 新员工培训Service业务层处理
@@ -16,9 +23,20 @@ import com.ruoyi.project.training.newstaff.service.ITTnNewService;
 @Service
 public class TTnNewServiceImpl implements ITTnNewService
 {
-    @Autowired
+    @Resource
     private TTnNewMapper tTnNewMapper;
-
+    @Resource
+    private TTnFirstplanMapper tTnFirstplanMapper;
+    @Resource
+    private TTnFirstplanTmplMapper tTnFirstplanTmplMapper;
+    @Resource
+    private TTnSchoolplanMapper tTnSchoolplanMapper;
+    @Resource
+    private TTnSchoolplanTmplMapper tTnSchoolplanTmplMapper;
+    @Resource
+    private TTnTransferplanMapper tTnTransferplanMapper;
+    @Resource
+    private TTnTransferplanTmplMapper tTnTransferplanTmplMapper;
     /**
      * 查询新员工培训
      *
@@ -50,9 +68,44 @@ public class TTnNewServiceImpl implements ITTnNewService
      * @return 结果
      */
     @Override
+    @Transactional
     public int insertTTnNew(TTnNew tTnNew)
     {
-        return tTnNewMapper.insertTTnNew(tTnNew);
+        tTnNewMapper.insertTTnNew(tTnNew);
+        // 进组
+        TTnFirstplanTmpl tTnFirstplanTmpl = new TTnFirstplanTmpl();
+        tTnFirstplanTmpl.setDeptId(tTnNew.getDeptId());
+        List<TTnFirstplanTmpl> firstplanTmplList = tTnFirstplanTmplMapper.selectTTnFirstplanTmplList(tTnFirstplanTmpl);
+        for (TTnFirstplanTmpl t: firstplanTmplList
+        ) {
+            t.setNewId(tTnNew.getNewId());
+            tTnFirstplanMapper.insertTTnFirstplanTmpl(t);
+        }
+        //新员工
+        if (tTnNew.getPlanType() == 1) {
+            TTnSchoolplanTmpl tTnSchoolplanTmpl = new TTnSchoolplanTmpl();
+            tTnSchoolplanTmpl.setDeptId(tTnNew.getDeptId());
+            List<TTnSchoolplanTmpl> schoolplanTmplList = tTnSchoolplanTmplMapper.selectTTnSchoolplanTmplList(tTnSchoolplanTmpl);
+            for (TTnSchoolplanTmpl t: schoolplanTmplList
+            ) {
+                t.setNewId(tTnNew.getNewId());
+                tTnSchoolplanMapper.insertTTnSchoolplanTmpl(t);
+            }
+        }
+        //转岗
+        if (tTnNew.getPlanType() == 2) {
+            TTnTransferplanTmpl tTnTransferplanTmpl = new TTnTransferplanTmpl();
+            tTnTransferplanTmpl.setDeptId(tTnNew.getDeptId());
+            List<TTnTransferplanTmpl> tTnTransferplanTmplList = tTnTransferplanTmplMapper.selectTTnTransferplanTmplList(tTnTransferplanTmpl);
+            for (TTnTransferplanTmpl t: tTnTransferplanTmplList
+            ) {
+                t.setNewId(tTnNew.getNewId());
+                tTnTransferplanMapper.insertTTnTransferplanTmpl(t);
+            }
+
+        }
+        return 1;
+
     }
 
     /**

+ 3 - 1
master/src/main/java/com/ruoyi/project/training/newstaff/service/impl/TTnTransferplanTmplServiceImpl.java

@@ -7,6 +7,8 @@ import com.ruoyi.project.training.newstaff.mapper.TTnTransferplanTmplMapper;
 import com.ruoyi.project.training.newstaff.domain.TTnTransferplanTmpl;
 import com.ruoyi.project.training.newstaff.service.ITTnTransferplanTmplService;
 
+import javax.annotation.Resource;
+
 /**
  * 转岗培训模版Service业务层处理
  *
@@ -16,7 +18,7 @@ import com.ruoyi.project.training.newstaff.service.ITTnTransferplanTmplService;
 @Service
 public class TTnTransferplanTmplServiceImpl implements ITTnTransferplanTmplService
 {
-    @Autowired
+    @Resource
     private TTnTransferplanTmplMapper tTnTransferplanTmplMapper;
 
     /**

+ 51 - 6
master/src/main/resources/mybatis/training/newstaff/TTnFirstplanMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.training.newstaff.mapper.TTnFirstplanMapper">
-    
+
     <resultMap type="TTnFirstplan" id="TTnFirstplanResult">
         <result property="id"    column="id"    />
         <result property="newId"    column="new_id"    />
@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTTnFirstplanList" parameterType="TTnFirstplan" resultMap="TTnFirstplanResult">
         <include refid="selectTTnFirstplanVo"/>
-        <where>  
+        <where>
             <if test="newId != null "> and new_id = #{newId}</if>
             <if test="courseCode != null  and courseCode != ''"> and course_code = #{courseCode}</if>
             <if test="topic != null  and topic != ''"> and topic = #{topic}</if>
@@ -48,12 +48,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTTnFirstplanById" parameterType="Long" resultMap="TTnFirstplanResult">
         <include refid="selectTTnFirstplanVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertTTnFirstplan" parameterType="TTnFirstplan">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_tn_firstplan.NEXTVAL as id FROM DUAL
@@ -101,6 +101,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
+    <insert id="insertTTnFirstplanTmpl" parameterType="TTnFirstplanTmpl">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_tn_firstplan.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_tn_firstplan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="newId != null">new_id,</if>
+            <if test="courseCode != null">course_code,</if>
+            <if test="topic != null">topic,</if>
+            <if test="content != null">content,</if>
+            <if test="courseDay != null">course_day,</if>
+            <if test="courseHour != null">course_hour,</if>
+            <if test="courseType != null">course_type,</if>
+            <if test="trainer != null">trainer,</if>
+            <if test="courseDate != null">course_date,</if>
+            <if test="assess != null">assess,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="remarks != null">remarks,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="newId != null">#{newId},</if>
+            <if test="courseCode != null">#{courseCode},</if>
+            <if test="topic != null">#{topic},</if>
+            <if test="content != null">#{content},</if>
+            <if test="courseDay != null">#{courseDay},</if>
+            <if test="courseHour != null">#{courseHour},</if>
+            <if test="courseType != null">#{courseType},</if>
+            <if test="trainer != null">#{trainer},</if>
+            <if test="courseDate != null">#{courseDate},</if>
+            <if test="assess != null">#{assess},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="remarks != null">#{remarks},</if>
+        </trim>
+    </insert>
+
     <update id="updateTTnFirstplan" parameterType="TTnFirstplan">
         update t_tn_firstplan
         <trim prefix="SET" suffixOverrides=",">
@@ -135,5 +180,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 1 - 1
master/src/main/resources/mybatis/training/newstaff/TTnFirstplanTmplMapper.xml

@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="trainer != null  and trainer != ''"> and trainer = #{trainer}</if>
             <if test="courseDate != null "> and course_date = #{courseDate}</if>
             <if test="assess != null  and assess != ''"> and assess = #{assess}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             and d.del_flag = 0
         </where>

+ 52 - 6
master/src/main/resources/mybatis/training/newstaff/TTnSchoolplanMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.training.newstaff.mapper.TTnSchoolplanMapper">
-    
+
     <resultMap type="TTnSchoolplan" id="TTnSchoolplanResult">
         <result property="id"    column="id"    />
         <result property="newId"    column="new_id"    />
@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTTnSchoolplanList" parameterType="TTnSchoolplan" resultMap="TTnSchoolplanResult">
         <include refid="selectTTnSchoolplanVo"/>
-        <where>  
+        <where>
             <if test="courseCode != null  and courseCode != ''"> and course_code = #{courseCode}</if>
             <if test="topic != null  and topic != ''"> and topic = #{topic}</if>
             <if test="detailPlan != null  and detailPlan != ''"> and detail_plan = #{detailPlan}</if>
@@ -45,12 +45,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTTnSchoolplanById" parameterType="Long" resultMap="TTnSchoolplanResult">
         <include refid="selectTTnSchoolplanVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertTTnSchoolplan" parameterType="TTnSchoolplan">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_tn_schoolplan.NEXTVAL as id FROM DUAL
@@ -98,6 +98,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
+
+    <insert id="insertTTnSchoolplanTmpl" parameterType="TTnSchoolplanTmpl">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_tn_schoolplan.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_tn_schoolplan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="newId != null">new_id,</if>
+            <if test="courseCode != null">course_code,</if>
+            <if test="topic != null">topic,</if>
+            <if test="content != null">content,</if>
+            <if test="courseDay != null">course_day,</if>
+            <if test="courseHour != null">course_hour,</if>
+            <if test="detailPlan != null">detail_plan,</if>
+            <if test="trainer != null">trainer,</if>
+            <if test="courseDate != null">course_date,</if>
+            <if test="assess != null">assess,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="remarks != null">remarks,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="newId != null">#{newId},</if>
+            <if test="courseCode != null">#{courseCode},</if>
+            <if test="topic != null">#{topic},</if>
+            <if test="content != null">#{content},</if>
+            <if test="courseDay != null">#{courseDay},</if>
+            <if test="courseHour != null">#{courseHour},</if>
+            <if test="detailPlan != null">#{detailPlan},</if>
+            <if test="trainer != null">#{trainer},</if>
+            <if test="courseDate != null">#{courseDate},</if>
+            <if test="assess != null">#{assess},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="remarks != null">#{remarks},</if>
+        </trim>
+    </insert>
+
     <update id="updateTTnSchoolplan" parameterType="TTnSchoolplan">
         update t_tn_schoolplan
         <trim prefix="SET" suffixOverrides=",">
@@ -132,5 +178,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 7 - 6
master/src/main/resources/mybatis/training/newstaff/TTnSchoolplanTmplMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.training.newstaff.mapper.TTnSchoolplanTmplMapper">
-    
+
     <resultMap type="TTnSchoolplanTmpl" id="TTnSchoolplanTmplResult">
         <result property="id"    column="id"    />
         <result property="newId"    column="new_id"    />
@@ -33,20 +33,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTTnSchoolplanTmplList" parameterType="TTnSchoolplanTmpl" resultMap="TTnSchoolplanTmplResult">
         <include refid="selectTTnSchoolplanTmplVo"/>
-        <where>  
+        <where>
             <if test="courseCode != null  and courseCode != ''"> and course_code like concat(concat('%', #{courseCode}), '%')</if>
             <if test="topic != null  and topic != ''"> and topic like concat(concat('%', #{topic}), '%')</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTTnSchoolplanTmplById" parameterType="Long" resultMap="TTnSchoolplanTmplResult">
         <include refid="selectTTnSchoolplanTmplVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertTTnSchoolplanTmpl" parameterType="TTnSchoolplanTmpl">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_tn_schoolplan_tmpl.NEXTVAL as id FROM DUAL
@@ -128,5 +129,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 52 - 6
master/src/main/resources/mybatis/training/newstaff/TTnTransferplanMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.training.newstaff.mapper.TTnTransferplanMapper">
-    
+
     <resultMap type="TTnTransferplan" id="TTnTransferplanResult">
         <result property="id"    column="id"    />
         <result property="newId"    column="new_id"    />
@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTTnTransferplanList" parameterType="TTnTransferplan" resultMap="TTnTransferplanResult">
         <include refid="selectTTnTransferplanVo"/>
-        <where>  
+        <where>
             <if test="courseCode != null  and courseCode != ''"> and course_code like concat(concat('%', #{courseCode}), '%')</if>
             <if test="topic != null  and topic != ''"> and topic like concat(concat('%', #{topic}), '%')</if>
             and d.del_flag = 0
@@ -41,12 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTTnTransferplanById" parameterType="Long" resultMap="TTnTransferplanResult">
         <include refid="selectTTnTransferplanVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertTTnTransferplan" parameterType="TTnTransferplan">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_tn_transferplan.NEXTVAL as id FROM DUAL
@@ -94,6 +94,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
+
+    <insert id="insertTTnTransferplanTmpl" parameterType="TTnTransferplanTmpl">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_tn_transferplan.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_tn_transferplan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="newId != null">new_id,</if>
+            <if test="courseCode != null">course_code,</if>
+            <if test="topic != null">topic,</if>
+            <if test="content != null">content,</if>
+            <if test="courseDay != null">course_day,</if>
+            <if test="courseHour != null">course_hour,</if>
+            <if test="detailPlan != null">detail_plan,</if>
+            <if test="trainer != null">trainer,</if>
+            <if test="courseDate != null">course_date,</if>
+            <if test="assess != null">assess,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="remarks != null">remarks,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="newId != null">#{newId},</if>
+            <if test="courseCode != null">#{courseCode},</if>
+            <if test="topic != null">#{topic},</if>
+            <if test="content != null">#{content},</if>
+            <if test="courseDay != null">#{courseDay},</if>
+            <if test="courseHour != null">#{courseHour},</if>
+            <if test="detailPlan != null">#{detailPlan},</if>
+            <if test="trainer != null">#{trainer},</if>
+            <if test="courseDate != null">#{courseDate},</if>
+            <if test="assess != null">#{assess},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="remarks != null">#{remarks},</if>
+        </trim>
+    </insert>
+
     <update id="updateTTnTransferplan" parameterType="TTnTransferplan">
         update t_tn_transferplan
         <trim prefix="SET" suffixOverrides=",">
@@ -128,5 +174,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 7 - 6
master/src/main/resources/mybatis/training/newstaff/TTnTransferplanTmplMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.training.newstaff.mapper.TTnTransferplanTmplMapper">
-    
+
     <resultMap type="TTnTransferplanTmpl" id="TTnTransferplanTmplResult">
         <result property="id"    column="id"    />
         <result property="newId"    column="new_id"    />
@@ -33,20 +33,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTTnTransferplanTmplList" parameterType="TTnTransferplanTmpl" resultMap="TTnTransferplanTmplResult">
         <include refid="selectTTnTransferplanTmplVo"/>
-        <where>  
+        <where>
             <if test="courseCode != null  and courseCode != ''"> and course_code like concat(concat('%', #{courseCode}), '%')</if>
             <if test="topic != null  and topic != ''"> and topic like concat(concat('%', #{topic}), '%')</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTTnTransferplanTmplById" parameterType="Long" resultMap="TTnTransferplanTmplResult">
         <include refid="selectTTnTransferplanTmplVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertTTnTransferplanTmpl" parameterType="TTnTransferplanTmpl">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_tn_transferplan_tmpl.NEXTVAL as id FROM DUAL
@@ -128,5 +129,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 1 - 0
ui/src/views/training/newstaff/firstplan/index.vue

@@ -367,6 +367,7 @@ export default {
       this.$nextTick(() => {
           this.clientHeight = document.body.clientHeight -250
       })
+    this.queryParams.newId = this.$route.params && this.$route.params.newId;
     this.getList();
     this.getTreeselect();
   },

+ 0 - 1
ui/src/views/training/newstaff/planList/index.vue

@@ -45,7 +45,6 @@ export default {
     const newId = this.$route.params && this.$route.params.newId;
     getTnNew(newId).then(response => {
       this.planType = response.data.planType;
-
     });
   },
   methods: {

+ 2 - 0
ui/src/views/training/newstaff/schoolplan/index.vue

@@ -331,6 +331,7 @@ export default {
         },
       // 查询参数
       queryParams: {
+        newId: null,
         pageNum: 1,
         pageSize: 20,
         courseCode: null,
@@ -358,6 +359,7 @@ export default {
       this.$nextTick(() => {
           this.clientHeight = document.body.clientHeight -250
       })
+    this.queryParams.newId = this.$route.params && this.$route.params.newId;
     this.getList();
     this.getTreeselect();
   },

+ 0 - 52
ui/src/views/training/newstaff/schoolplantmpl/index.vue

@@ -78,33 +78,12 @@
 
     <el-table v-loading="loading" :data="schoolplantmplList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
       <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true"/>
       <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true"/>
       <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true"/>
       <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true"/>
       <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true"/>
       <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true"/>
-      <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true"/>
-      <el-table-column label="培训日期" align="center" prop="courseDate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -155,9 +134,6 @@
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划" />
         </el-form-item>
-        <el-form-item label="讲师" prop="trainer">
-          <el-input v-model="form.trainer" placeholder="请输入讲师" />
-        </el-form-item>
         <el-form-item label="培训日期" prop="courseDate">
           <el-date-picker clearable size="small" style="width: 200px"
             v-model="form.courseDate"
@@ -169,34 +145,6 @@
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
-        </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>

+ 2 - 0
ui/src/views/training/newstaff/transferplan/index.vue

@@ -300,6 +300,7 @@ export default {
         pageSize: 20,
         courseCode: null,
         topic: null,
+        newId:null,
       },
       // 表单参数
       form: {},
@@ -319,6 +320,7 @@ export default {
       this.$nextTick(() => {
           this.clientHeight = document.body.clientHeight -250
       })
+    this.queryParams.newId = this.$route.params && this.$route.params.newId;
     this.getList();
     this.getTreeselect();
   },

+ 1 - 63
ui/src/views/training/newstaff/transferplantmpl/index.vue

@@ -78,33 +78,12 @@
 
     <el-table v-loading="loading" :data="transferplantmplList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
       <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true"/>
       <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true"/>
       <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true"/>
       <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true"/>
       <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true"/>
       <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true"/>
-      <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true"/>
-      <el-table-column label="培训日期" align="center" prop="courseDate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -155,48 +134,7 @@
         <el-form-item label="详细计划" prop="detailPlan">
           <el-input v-model="form.detailPlan" placeholder="请输入详细计划" />
         </el-form-item>
-        <el-form-item label="讲师" prop="trainer">
-          <el-input v-model="form.trainer" placeholder="请输入讲师" />
-        </el-form-item>
-        <el-form-item label="培训日期" prop="courseDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.courseDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择培训日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="考核情况" prop="assess">
-          <el-input v-model="form.assess" placeholder="请输入考核情况" />
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
-        </el-form-item>
+
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>