Forráskód Böngészése

项目模块修改

anderx 2 éve%!(EXTRA string=óta)
szülő
commit
a097ba95a3

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/project/domain/ProjectTask.java

@@ -73,6 +73,11 @@ public class ProjectTask implements Serializable {
      */
     private Integer crossYear;
 
+    /**
+     * 时长
+     */
+    private Double duration;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -170,4 +175,12 @@ public class ProjectTask implements Serializable {
     public void setCrossYear(Integer crossYear) {
         this.crossYear = crossYear;
     }
+
+    public Double getDuration() {
+        return duration;
+    }
+
+    public void setDuration(Double duration) {
+        this.duration = duration;
+    }
 }

+ 17 - 4
ruoyi-system/src/main/resources/mapper/project/ProjectTaskMapper.xml

@@ -14,10 +14,11 @@
     <result column="project_year" jdbcType="OTHER" property="projectYear" />
     <result column="create_year" jdbcType="OTHER" property="createYear" />
     <result column="cross_year" jdbcType="INTEGER" property="crossYear" />
+    <result column="duration" jdbcType="DOUBLE" property="duration" />
   </resultMap>
   <sql id="Base_Column_List">
     id, aid, `name`, project_status, create_time, remark, admin_name, staff_name, project_number,
-    project_year, create_year, cross_year
+    project_year, create_year, cross_year, duration
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -33,11 +34,13 @@
     insert into project_task (aid, `name`, project_status,
       create_time, remark, admin_name,
       staff_name, project_number, project_year,
-      create_year, cross_year)
+      create_year, cross_year, duration
+      )
     values (#{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
       #{createTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{adminName,jdbcType=VARCHAR},
       #{staffName,jdbcType=VARCHAR}, #{projectNumber,jdbcType=VARCHAR}, #{projectYear,jdbcType=OTHER},
-      #{createYear,jdbcType=OTHER}, #{crossYear,jdbcType=INTEGER})
+      #{createYear,jdbcType=OTHER}, #{crossYear,jdbcType=INTEGER}, #{duration,jdbcType=DOUBLE}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectTask" useGeneratedKeys="true">
     insert into project_task
@@ -75,6 +78,9 @@
       <if test="crossYear != null">
         cross_year,
       </if>
+      <if test="duration != null">
+        duration,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="aid != null">
@@ -110,6 +116,9 @@
       <if test="crossYear != null">
         #{crossYear,jdbcType=INTEGER},
       </if>
+      <if test="duration != null">
+        #{duration,jdbcType=DOUBLE},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectTask">
@@ -148,6 +157,9 @@
       <if test="crossYear != null">
         cross_year = #{crossYear,jdbcType=INTEGER},
       </if>
+      <if test="duration != null">
+        duration = #{duration,jdbcType=DOUBLE},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -163,7 +175,8 @@
       project_number = #{projectNumber,jdbcType=VARCHAR},
       project_year = #{projectYear,jdbcType=OTHER},
       create_year = #{createYear,jdbcType=OTHER},
-      cross_year = #{crossYear,jdbcType=INTEGER}
+      cross_year = #{crossYear,jdbcType=INTEGER},
+      duration = #{duration,jdbcType=DOUBLE}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateStaffName">