Kaynağa Gözat

项目模块修改

anderx 2 yıl önce
ebeveyn
işleme
a9f5cf190b

+ 205 - 1
ruoyi-system/src/main/java/com/ruoyi/project/bo/ProjectStaffRecordOut.java

@@ -1,11 +1,127 @@
 package com.ruoyi.project.bo;
 
+import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.project.domain.ProjectStaffRecord;
 
+import java.util.Date;
+
 public class ProjectStaffRecordOut extends ProjectStaffRecord {
 
-    private  String projectName;
+    private Long id;
+    @Excel(name = "员工工号")
+    private String jobNumber;
+    @Excel(name = "员工名称")
+    private String name;
+    @Excel(name = "部门编号")
+    private Long deptId;
+    @Excel(name = "部门")
+    private String deptName;
+    @Excel(name = "打卡时间")
+    private Date createTime;
+    @Excel(name = "工时")
+    private Double duration;
+    @Excel(name = "打卡月份")
+    private Date createMonth;
+    @Excel(name = "项目编号")
+    private Long projectId;
+    @Excel(name = "项目名称")
+    private String projectName;
+    @Excel(name = "创断任务")
+    private Integer projectStatus;
+    @Excel(name = "研发内容")
+    private String content;
+
+    private Long examineId;
+    @Excel(name = "审核人员")
+    private String examineName;
+    @Excel(name = "审核时间")
+    private String examineTime;
+    private String annexUrl;
+    @Excel(name = "状态", readConverterExp = "0=未发起,1=待审核,2=已审核,3=驳回")
+    private Integer processStatus;
     private String adminName;
+    private Long pid;
+    private Long aid;
+
+
+    @Override
+    public Long getId() {
+        return id;
+    }
+
+    @Override
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getJobNumber() {
+        return jobNumber;
+    }
+
+    public void setJobNumber(String jobNumber) {
+        this.jobNumber = jobNumber;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    @Override
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public Double getDuration() {
+        return duration;
+    }
+
+    @Override
+    public void setDuration(Double duration) {
+        this.duration = duration;
+    }
+
+    public Date getCreateMonth() {
+        return createMonth;
+    }
+
+    public void setCreateMonth(Date createMonth) {
+        this.createMonth = createMonth;
+    }
+
+    public Long getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(Long projectId) {
+        this.projectId = projectId;
+    }
 
     public String getProjectName() {
         return projectName;
@@ -15,6 +131,74 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
         this.projectName = projectName;
     }
 
+    @Override
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+
+    @Override
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+
+    @Override
+    public String getContent() {
+        return content;
+    }
+
+    @Override
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public Long getExamineId() {
+        return examineId;
+    }
+
+    @Override
+    public void setExamineId(Long examineId) {
+        this.examineId = examineId;
+    }
+
+    @Override
+    public String getExamineName() {
+        return examineName;
+    }
+
+    public void setExamineName(String examineName) {
+        this.examineName = examineName;
+    }
+
+    @Override
+    public String getExamineTime() {
+        return examineTime;
+    }
+
+    public void setExamineTime(String examineTime) {
+        this.examineTime = examineTime;
+    }
+
+    @Override
+    public String getAnnexUrl() {
+        return annexUrl;
+    }
+
+    @Override
+    public void setAnnexUrl(String annexUrl) {
+        this.annexUrl = annexUrl;
+    }
+
+    @Override
+    public Integer getProcessStatus() {
+        return processStatus;
+    }
+
+    @Override
+    public void setProcessStatus(Integer processStatus) {
+        this.processStatus = processStatus;
+    }
+
     public String getAdminName() {
         return adminName;
     }
@@ -22,4 +206,24 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
     public void setAdminName(String adminName) {
         this.adminName = adminName;
     }
+
+    @Override
+    public Long getPid() {
+        return pid;
+    }
+
+    @Override
+    public void setPid(Long pid) {
+        this.pid = pid;
+    }
+
+    @Override
+    public Long getAid() {
+        return aid;
+    }
+
+    @Override
+    public void setAid(Long aid) {
+        this.aid = aid;
+    }
 }

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

@@ -61,6 +61,21 @@ public class ProjectStaffRecord implements Serializable {
      */
     private Double duration;
 
+    /**
+     * 审核人编号
+     */
+    private Long examineId;
+
+    /**
+     * 审核名称
+     */
+    private Integer examineName;
+
+    /**
+     * 审核时间
+     */
+    private Date examineTime;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -142,4 +157,28 @@ public class ProjectStaffRecord implements Serializable {
     public void setDuration(Double duration) {
         this.duration = duration;
     }
+
+    public Long getExamineId() {
+        return examineId;
+    }
+
+    public void setExamineId(Long examineId) {
+        this.examineId = examineId;
+    }
+
+    public Integer getExamineName() {
+        return examineName;
+    }
+
+    public void setExamineName(Integer examineName) {
+        this.examineName = examineName;
+    }
+
+    public Date getExamineTime() {
+        return examineTime;
+    }
+
+    public void setExamineTime(Date examineTime) {
+        this.examineTime = examineTime;
+    }
 }

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

@@ -12,10 +12,13 @@
     <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="examine_id" jdbcType="BIGINT" property="examineId" />
+    <result column="examine_name" jdbcType="INTEGER" property="examineName" />
+    <result column="examine_time" jdbcType="TIMESTAMP" property="examineTime" />
   </resultMap>
   <sql id="Base_Column_List">
     id, pid, aid, `name`, project_status, content, annex_url, create_time, process_status,
-    duration
+    duration, examine_id, examine_name, examine_time
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -30,11 +33,13 @@
   <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,
+      examine_id, examine_name, examine_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},
+      #{examineId,jdbcType=BIGINT}, #{examineName,jdbcType=INTEGER}, #{examineTime,jdbcType=TIMESTAMP}
       )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
@@ -67,6 +72,15 @@
       <if test="duration != null">
         duration,
       </if>
+      <if test="examineId != null">
+        examine_id,
+      </if>
+      <if test="examineName != null">
+        examine_name,
+      </if>
+      <if test="examineTime != null">
+        examine_time,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pid != null">
@@ -96,6 +110,15 @@
       <if test="duration != null">
         #{duration,jdbcType=DOUBLE},
       </if>
+      <if test="examineId != null">
+        #{examineId,jdbcType=BIGINT},
+      </if>
+      <if test="examineName != null">
+        #{examineName,jdbcType=INTEGER},
+      </if>
+      <if test="examineTime != null">
+        #{examineTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectStaffRecord">
@@ -128,6 +151,15 @@
       <if test="duration != null">
         duration = #{duration,jdbcType=DOUBLE},
       </if>
+      <if test="examineId != null">
+        examine_id = #{examineId,jdbcType=BIGINT},
+      </if>
+      <if test="examineName != null">
+        examine_name = #{examineName,jdbcType=INTEGER},
+      </if>
+      <if test="examineTime != null">
+        examine_time = #{examineTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -141,14 +173,19 @@
       annex_url = #{annexUrl,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       process_status = #{processStatus,jdbcType=INTEGER},
-      duration = #{duration,jdbcType=DOUBLE}
+      duration = #{duration,jdbcType=DOUBLE},
+      examine_id = #{examineId,jdbcType=BIGINT},
+      examine_name = #{examineName,jdbcType=INTEGER},
+      examine_time = #{examineTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">
-    select a.id,a.pid ,a.aid ,a.name ,a.project_status projectStatus,a.content ,
-           a.annex_url annexUrl,a.create_time createTime,a.process_status processStatus ,
-           a.duration,b.name projectName,b.admin_name adminName
+    select a.id,c.job_number jobNumber,a.name   ,d.dept_id deptId ,d.dept_name deptName ,c.create_time createMonth,
+    b.id projectId,b.name projectName,b.admin_name adminName ,a.project_status projectStatus,a.content ,
+    a.pid ,a.aid ,a.examine_id examineId ,a.examine_name examineName ,a.examine_time examineTime,
+    a.annex_url annexUrl,a.create_time createTime,a.process_status processStatus , a.duration
     from project_staff_record a left join project_task b on a.pid=b.id
+    left join sys_user c on a.aid=c.user_id left join sys_dept d on c.dept_id =d.dept_id
     where 1=1
     <if test="roleType==0">
       and a.aid =#{aid}