Selaa lähdekoodia

项目模块修改

anderx 2 vuotta sitten
vanhempi
commit
5772220559

+ 4 - 1
ruoyi-common/src/main/java/com/ruoyi/common/enums/UserRolesType.java

@@ -5,7 +5,10 @@ import java.util.Map;
 
 public enum UserRolesType {
 
-    ADMIN(1l,"admin"),COMMON(2l,"common"),MANAGE(3l,"manage");
+    ADMIN(1l,"admin"),
+    COMMON(2l,"common"),
+    MANAGE(3l,"manage"),
+    CEO(4l,"ceo");
 
     private final String desc;
     private final Long code;

+ 9 - 2
ruoyi-system/src/main/java/com/ruoyi/project/bo/ProjectListInput.java

@@ -8,8 +8,15 @@ public class ProjectListInput {
     private Long rolesId,companyId;
     private Long headId;
     private Long staffId;
-    private String projectNumber,projectYear;
-    private Integer crossYear,projectStatus;
+    private String projectNumber;
+    private String projectYear;
+    private Integer crossYear;
+    private Integer projectStatus;
+
+    /**
+     * 0=我的项目
+     */
+    private Integer roleType;
 
     public Long getCompanyId() {
         return companyId;

+ 33 - 2
ruoyi-system/src/main/java/com/ruoyi/project/domain/ProjectStaffRecord.java

@@ -1,11 +1,13 @@
 package com.ruoyi.project.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+
 import java.io.Serializable;
 import java.util.Date;
 
 /**
  * project_staff_record
- * @author 
+ * @author
  */
 public class ProjectStaffRecord implements Serializable {
     /**
@@ -46,6 +48,7 @@ public class ProjectStaffRecord implements Serializable {
     /**
      * 创建时间
      */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
     /**
@@ -58,6 +61,18 @@ public class ProjectStaffRecord implements Serializable {
      */
     private Double duration;
 
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endTime;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -139,4 +154,20 @@ public class ProjectStaffRecord implements Serializable {
     public void setDuration(Double duration) {
         this.duration = duration;
     }
-}
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+}

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

@@ -12,10 +12,12 @@
     <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
+    duration, start_time, end_time
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -23,7 +25,6 @@
     from project_staff_record
     where id = #{id,jdbcType=BIGINT}
   </select>
-
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from project_staff_record
     where id = #{id,jdbcType=BIGINT}
@@ -31,12 +32,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
-      )
+      create_time, process_status, duration,
+      start_time, end_time)
     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}
-      )
+      #{createTime,jdbcType=TIMESTAMP}, #{processStatus,jdbcType=INTEGER}, #{duration,jdbcType=DOUBLE},
+      #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
     insert into project_staff_record
@@ -68,6 +69,12 @@
       <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">
@@ -97,6 +104,12 @@
       <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">
@@ -129,6 +142,12 @@
       <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>
@@ -142,7 +161,9 @@
       annex_url = #{annexUrl,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       process_status = #{processStatus,jdbcType=INTEGER},
-      duration = #{duration,jdbcType=DOUBLE}
+      duration = #{duration,jdbcType=DOUBLE},
+      start_time = #{startTime,jdbcType=TIMESTAMP},
+      end_time = #{endTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">