瀏覽代碼

任务模板调整

lmx 1 周之前
父節點
當前提交
5d80adcd4f

+ 1 - 1
fs-service/src/main/java/com/fs/sop/domain/QwSopTemp.java

@@ -138,7 +138,7 @@ public class QwSopTemp implements Serializable
         }
         return companyUserIds;
     }
-
+    private Integer createByDept;
     /**
      * 部门类型 00 管理员 01 员工
      */

+ 3 - 0
fs-service/src/main/java/com/fs/sop/service/impl/QwSopTempServiceImpl.java

@@ -360,6 +360,9 @@ public class QwSopTempServiceImpl implements IQwSopTempService {
         String oldId = qwSopTemp.getId();
         String newId = UUID.randomUUID().toString();
         qwSopTemp.setId(newId);
+        //复制的模板改一下创建时间
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        qwSopTemp.setCreateTime(sdf.format(new Date()));
         qwSopTempMapper.insertQwSopTemp(qwSopTemp);
         List<QwSopTempDay> dayList = qwSopTempRulesService.listByTempIdAll(oldId);
         if (dayList.isEmpty()) return;

+ 12 - 0
fs-service/src/main/resources/mapper/sop/QwSopTempMapper.xml

@@ -16,6 +16,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="gap"    column="gap"    />
         <result property="sendType"    column="send_type"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="project"    column="project"    />
+        <result property="courseId"    column="course_id"    />
+        <result property="createByDept"    column="create_by_dept"    />
     </resultMap>
 
     <sql id="selectQwSopTempVo">
@@ -94,6 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="data.gap != null">gap,</if>
             <if test="data.sendType != null">send_type,</if>
             <if test="data.updateTime != null">update_time,</if>
+            <if test="data.project !=null ">project,</if>
+            <if test="data.courseId !=null ">course_id,</if>
+            <if test="data.createByDept !=null ">create_by_dept,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="data.id != null">#{data.id},</if>
@@ -107,6 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="data.gap != null">#{data.gap},</if>
             <if test="data.sendType != null">#{data.sendType},</if>
             <if test="data.updateTime != null">#{data.updateTime},</if>
+            <if test="data.project !=null ">#{data.project},</if>
+            <if test="data.courseId !=null ">#{data.courseId},</if>
+            <if test="data.createByDept !=null ">#{data.createByDept},</if>
          </trim>
     </insert>
 
@@ -123,6 +132,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="data.gap != null">gap = #{data.gap},</if>
             <if test="data.sendType != null">send_type = #{data.sendType},</if>
             <if test="data.updateTime != null">update_time = #{data.updateTime},</if>
+            <if test="data.project !=null ">project = #{data.project},</if>
+            <if test="data.courseId !=null ">course_id = #{data.courseId},</if>
+            <if test="data.createByDept !=null ">create_by_dept = #{data.createByDept},</if>
         </trim>
         where id = #{data.id}
     </update>