Pārlūkot izejas kodu

项目模块修改

anderx 2 gadi atpakaļ
vecāks
revīzija
bd62b6f4be

+ 7 - 3
ruoyi-system/src/main/java/com/ruoyi/project/bo/ProjectStaffRecordOut.java

@@ -1,5 +1,6 @@
 package com.ruoyi.project.bo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.project.domain.ProjectStaffRecord;
 
@@ -17,10 +18,12 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
     @Excel(name = "部门")
     private String deptName;
     @Excel(name = "打卡时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
     @Excel(name = "工时")
     private Double duration;
     @Excel(name = "打卡月份")
+    @JsonFormat(pattern = "MM")
     private Date createMonth;
     @Excel(name = "项目编号")
     private Long projectId;
@@ -35,7 +38,8 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
     @Excel(name = "审核人员")
     private String examineName;
     @Excel(name = "审核时间")
-    private String examineTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date examineTime;
     private String annexUrl;
     @Excel(name = "状态", readConverterExp = "0=未发起,1=待审核,2=已审核,3=驳回")
     private Integer processStatus;
@@ -171,11 +175,11 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
     }
 
     @Override
-    public String getExamineTime() {
+    public Date getExamineTime() {
         return examineTime;
     }
 
-    public void setExamineTime(String examineTime) {
+    public void setExamineTime(Date examineTime) {
         this.examineTime = examineTime;
     }
 

+ 14 - 11
ruoyi-system/src/main/java/com/ruoyi/project/domain/ProjectStaffRecord.java

@@ -66,16 +66,18 @@ public class ProjectStaffRecord implements Serializable {
      */
     private Long examineId;
 
-    /**
-     * 审核名称
-     */
-    private Integer examineName;
+
 
     /**
      * 审核时间
      */
     private Date examineTime;
 
+    /**
+     * 审核名称
+     */
+    private String examineName;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -166,13 +168,6 @@ public class ProjectStaffRecord implements Serializable {
         this.examineId = examineId;
     }
 
-    public Integer getExamineName() {
-        return examineName;
-    }
-
-    public void setExamineName(Integer examineName) {
-        this.examineName = examineName;
-    }
 
     public Date getExamineTime() {
         return examineTime;
@@ -181,4 +176,12 @@ public class ProjectStaffRecord implements Serializable {
     public void setExamineTime(Date examineTime) {
         this.examineTime = examineTime;
     }
+
+    public String getExamineName() {
+        return examineName;
+    }
+
+    public void setExamineName(String examineName) {
+        this.examineName = examineName;
+    }
 }

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

@@ -13,12 +13,12 @@
     <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" />
+    <result column="examine_name" jdbcType="VARCHAR" property="examineName" />
   </resultMap>
   <sql id="Base_Column_List">
     id, pid, aid, `name`, project_status, content, annex_url, create_time, process_status,
-    duration, examine_id, examine_name, examine_time
+    duration, examine_id, examine_time, examine_name
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -34,12 +34,12 @@
     insert into project_staff_record (pid, aid, `name`,
       project_status, content, annex_url,
       create_time, process_status, duration,
-      examine_id, examine_name, examine_time
+      examine_id, examine_time, examine_name
       )
     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},
-      #{examineId,jdbcType=BIGINT}, #{examineName,jdbcType=INTEGER}, #{examineTime,jdbcType=TIMESTAMP}
+      #{examineId,jdbcType=BIGINT}, #{examineTime,jdbcType=TIMESTAMP}, #{examineName,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
@@ -75,12 +75,12 @@
       <if test="examineId != null">
         examine_id,
       </if>
-      <if test="examineName != null">
-        examine_name,
-      </if>
       <if test="examineTime != null">
         examine_time,
       </if>
+      <if test="examineName != null">
+        examine_name,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pid != null">
@@ -113,12 +113,12 @@
       <if test="examineId != null">
         #{examineId,jdbcType=BIGINT},
       </if>
-      <if test="examineName != null">
-        #{examineName,jdbcType=INTEGER},
-      </if>
       <if test="examineTime != null">
         #{examineTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="examineName != null">
+        #{examineName,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectStaffRecord">
@@ -154,12 +154,12 @@
       <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>
+      <if test="examineName != null">
+        examine_name = #{examineName,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -175,8 +175,8 @@
       process_status = #{processStatus,jdbcType=INTEGER},
       duration = #{duration,jdbcType=DOUBLE},
       examine_id = #{examineId,jdbcType=BIGINT},
-      examine_name = #{examineName,jdbcType=INTEGER},
-      examine_time = #{examineTime,jdbcType=TIMESTAMP}
+      examine_time = #{examineTime,jdbcType=TIMESTAMP},
+      examine_name = #{examineName,jdbcType=VARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">