Bläddra i källkod

项目模块修改

anderx 2 år sedan
förälder
incheckning
378a77f323

+ 0 - 4
ruoyi-system/src/main/java/com/ruoyi/project/domain/ProjectStaffRecord.java

@@ -61,8 +61,6 @@ public class ProjectStaffRecord implements Serializable {
      */
     private Double duration;
 
-
-
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -144,6 +142,4 @@ public class ProjectStaffRecord implements Serializable {
     public void setDuration(Double duration) {
         this.duration = duration;
     }
-
-
 }

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -89,6 +89,14 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         ProjectStaffRecord newP = new ProjectStaffRecord();
         newP.setId(in.getId());
         newP.setProcessStatus(in.getProcessStatus());
+        if (in.getProcessStatus()==2){
+            ProjectStaffRecord use = projectStaffRecordMapper.selectByPrimaryKey(in.getId());
+            if (use.getProcessStatus()==1){
+                AjaxResult.error("项目流程无需审核!");
+            }
+            sysUserMapper.userAddDuration(use.getAid(),use.getDuration());
+            projectTaskMapper.projectAddDuration(use.getPid(),use.getDuration());
+        }
         projectStaffRecordMapper.updateByPrimaryKeySelective(newP);
         addRecordLog(in);
         return AjaxResult.success();

+ 6 - 28
ruoyi-system/src/main/resources/mapper/project/ProjectStaffRecordMapper.xml

@@ -12,12 +12,10 @@
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="process_status" jdbcType="INTEGER" property="processStatus" />
     <result column="duration" jdbcType="DOUBLE" property="duration" />
-    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
-    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
   </resultMap>
   <sql id="Base_Column_List">
     id, pid, aid, `name`, project_status, content, annex_url, create_time, process_status,
-    duration, start_time, end_time
+    duration
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -32,12 +30,12 @@
   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
     insert into project_staff_record (pid, aid, `name`,
       project_status, content, annex_url,
-      create_time, process_status, duration,
-      start_time, end_time)
+      create_time, process_status, duration
+      )
     values (#{pid,jdbcType=BIGINT}, #{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
       #{projectStatus,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
-      #{createTime,jdbcType=TIMESTAMP}, #{processStatus,jdbcType=INTEGER}, #{duration,jdbcType=DOUBLE},
-      #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})
+      #{createTime,jdbcType=TIMESTAMP}, #{processStatus,jdbcType=INTEGER}, #{duration,jdbcType=DOUBLE}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
     insert into project_staff_record
@@ -69,12 +67,6 @@
       <if test="duration != null">
         duration,
       </if>
-      <if test="startTime != null">
-        start_time,
-      </if>
-      <if test="endTime != null">
-        end_time,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pid != null">
@@ -104,12 +96,6 @@
       <if test="duration != null">
         #{duration,jdbcType=DOUBLE},
       </if>
-      <if test="startTime != null">
-        #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endTime != null">
-        #{endTime,jdbcType=TIMESTAMP},
-      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectStaffRecord">
@@ -142,12 +128,6 @@
       <if test="duration != null">
         duration = #{duration,jdbcType=DOUBLE},
       </if>
-      <if test="startTime != null">
-        start_time = #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endTime != null">
-        end_time = #{endTime,jdbcType=TIMESTAMP},
-      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -161,9 +141,7 @@
       annex_url = #{annexUrl,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       process_status = #{processStatus,jdbcType=INTEGER},
-      duration = #{duration,jdbcType=DOUBLE},
-      start_time = #{startTime,jdbcType=TIMESTAMP},
-      end_time = #{endTime,jdbcType=TIMESTAMP}
+      duration = #{duration,jdbcType=DOUBLE}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">