anderx 2 роки тому
батько
коміт
bc57343dd2

+ 13 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ProjectTaskController.java

@@ -16,6 +16,7 @@ import com.ruoyi.project.bo.ProjectStaffRecordOut;
 import com.ruoyi.project.bo.ProjectTaskListOut;
 import com.ruoyi.project.domain.ProjectStaff;
 import com.ruoyi.project.domain.ProjectStaffRecord;
+import com.ruoyi.project.domain.ProjectStaffRecordLog;
 import com.ruoyi.project.domain.ProjectTask;
 import com.ruoyi.project.service.ProjectStaffRecordService;
 import com.ruoyi.project.service.ProjectStaffService;
@@ -190,6 +191,18 @@ public class ProjectTaskController extends BaseController {
 
 
     /**
+     * 成员打卡审核日志
+     * @param in
+     * @return
+     */
+    @GetMapping("/listRecordLog")
+    @ApiOperation("成员打卡审核日志")
+    public AjaxResult listRecordLog(ProjectStaffRecordLog in){
+        return projectStaffRecordService.listRecordLog(in);
+    }
+
+
+    /**
      * 导出项目打卡列表
      * @param response
      */

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

@@ -75,6 +75,7 @@ public class ProjectStaffRecord implements Serializable {
      * 审核名称
      */
     private String examineName;
+    private String examineContent;
 
     /**
      * 打卡时间
@@ -84,6 +85,14 @@ public class ProjectStaffRecord implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
+    public String getExamineContent() {
+        return examineContent;
+    }
+
+    public void setExamineContent(String examineContent) {
+        this.examineContent = examineContent;
+    }
+
     public Long getId() {
         return id;
     }

+ 5 - 1
ruoyi-system/src/main/java/com/ruoyi/project/mapper/ProjectStaffRecordLogMapper.java

@@ -2,6 +2,8 @@ package com.ruoyi.project.mapper;
 
 import com.ruoyi.project.domain.ProjectStaffRecordLog;
 
+import java.util.List;
+
 public interface ProjectStaffRecordLogMapper {
     int deleteByPrimaryKey(Long id);
 
@@ -14,4 +16,6 @@ public interface ProjectStaffRecordLogMapper {
     int updateByPrimaryKeySelective(ProjectStaffRecordLog record);
 
     int updateByPrimaryKey(ProjectStaffRecordLog record);
-}
+
+    List<ProjectStaffRecordLog> selectByPsrId(Long psrId);
+}

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/project/service/ProjectStaffRecordService.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.project.bo.ProjectStaffRecordInput;
 import com.ruoyi.project.bo.ProjectStaffRecordOut;
 import com.ruoyi.project.domain.ProjectStaffRecord;
+import com.ruoyi.project.domain.ProjectStaffRecordLog;
 
 import java.util.List;
 
@@ -27,4 +28,6 @@ public interface ProjectStaffRecordService {
     AjaxResult myDurationMonth(Long id);
 
     AjaxResult recordDetails(Long id);
+
+    AjaxResult listRecordLog(ProjectStaffRecordLog in);
 }

+ 6 - 1
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -167,6 +167,11 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         return AjaxResult.success(projectStaffRecordMapper.selectDetailsById(id));
     }
 
+    @Override
+    public AjaxResult listRecordLog(ProjectStaffRecordLog in) {
+        return AjaxResult.success(projectStaffRecordLogMapper.selectByPsrId(in.getPsrId()));
+    }
+
     /**
      *
      * @param date 当前时间
@@ -299,7 +304,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         String username=SecurityUtils.getLoginUser().getUser().getNickName();
         ProjectStaffRecord use = projectStaffRecordMapper.selectByPrimaryKey(in.getId());
         in.setAid(use.getAid());
-        if (in.getProcessStatus()==2){
+        if (in.getProcessStatus()==2||in.getProcessStatus()==3){
             if (use.getProcessStatus()!=1){
                 AjaxResult.error("项目流程无需审核!");
             }

+ 13 - 5
ruoyi-system/src/main/resources/mapper/project/ProjectStaffRecordLogMapper.xml

@@ -14,20 +14,21 @@
     id, psr_id, aid, `name`, process_status, content, create_time
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from project_staff_record_log
     where id = #{id,jdbcType=BIGINT}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from project_staff_record_log
     where id = #{id,jdbcType=BIGINT}
   </delete>
   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecordLog" useGeneratedKeys="true">
-    insert into project_staff_record_log (psr_id, aid, `name`, 
+    insert into project_staff_record_log (psr_id, aid, `name`,
       process_status, content, create_time
       )
-    values (#{psrId,jdbcType=BIGINT}, #{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, 
+    values (#{psrId,jdbcType=BIGINT}, #{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
       #{processStatus,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
       )
   </insert>
@@ -108,4 +109,11 @@
       create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
-</mapper>
+
+  <select id="selectByPsrId" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from project_staff_record_log
+    where psr_id = #{psrId}
+  </select>
+</mapper>

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

@@ -15,11 +15,12 @@
     <result column="examine_id" jdbcType="BIGINT" property="examineId" />
     <result column="examine_time" jdbcType="TIMESTAMP" property="examineTime" />
     <result column="examine_name" jdbcType="VARCHAR" property="examineName" />
+    <result column="examine_content" jdbcType="VARCHAR" property="examineContent" />
     <result column="record_time" jdbcType="TIMESTAMP" property="recordTime" />
   </resultMap>
   <sql id="Base_Column_List">
     id, pid, aid, `name`, project_status, content, annex_url, create_time, process_status,
-    duration, examine_id, examine_time, examine_name, record_time
+    duration, examine_id, examine_time, examine_name, record_time,examine_content
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -36,12 +37,12 @@
       project_status, content, annex_url,
       create_time, process_status, duration,
       examine_id, examine_time, examine_name,
-      record_time)
+      record_time,examine_content)
     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}, #{examineTime,jdbcType=TIMESTAMP}, #{examineName,jdbcType=VARCHAR},
-      #{recordTime,jdbcType=TIMESTAMP})
+      #{recordTime,jdbcType=TIMESTAMP},#{examineContent})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
     insert into project_staff_record
@@ -85,6 +86,9 @@
       <if test="recordTime != null">
         record_time,
       </if>
+      <if test="examineContent != null">
+        examine_content,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pid != null">
@@ -126,6 +130,9 @@
       <if test="recordTime != null">
         #{recordTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="examineContent != null">
+        #{examineContent},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectStaffRecord">
@@ -170,6 +177,9 @@
       <if test="recordTime != null">
         record_time = #{recordTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="examineContent != null">
+        examine_content = #{examineContent},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -187,7 +197,8 @@
       examine_id = #{examineId,jdbcType=BIGINT},
       examine_time = #{examineTime,jdbcType=TIMESTAMP},
       examine_name = #{examineName,jdbcType=VARCHAR},
-      record_time = #{recordTime,jdbcType=TIMESTAMP}
+      record_time = #{recordTime,jdbcType=TIMESTAMP},
+      examine_content = #{examineContent}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">
@@ -253,7 +264,8 @@
     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
+           a.annex_url annexUrl,a.create_time createTime,a.process_status processStatus , a.duration,
+          a.examine_content examineContent
     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