瀏覽代碼

新增考勤核算接口

anderx 1 年之前
父節點
當前提交
7ca5687053

+ 226 - 12
ruoyi-system/src/main/java/com/ruoyi/project/domain/ProjectStaffRecord.java

@@ -6,8 +6,8 @@ import java.io.Serializable;
 import java.util.Date;
 
 /**
- * project_staff_record
- * @author
+ * 项目人员记录表
+ * @TableName project_staff_record
  */
 public class ProjectStaffRecord implements Serializable {
     /**
@@ -48,7 +48,6 @@ public class ProjectStaffRecord implements Serializable {
     /**
      * 创建时间
      */
-
     private Date createTime;
 
     /**
@@ -75,7 +74,6 @@ public class ProjectStaffRecord implements Serializable {
      * 审核名称
      */
     private String examineName;
-    private String examineContent;
 
     /**
      * 打卡时间
@@ -83,126 +81,342 @@ public class ProjectStaffRecord implements Serializable {
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date recordTime;
 
-    private static final long serialVersionUID = 1L;
+    /**
+     * 审核备注
+     */
+    private String examineContent;
 
-    public String getExamineContent() {
-        return examineContent;
-    }
+    /**
+     * 初始打卡时长
+     */
+    private Double initDuration;
 
-    public void setExamineContent(String examineContent) {
-        this.examineContent = examineContent;
-    }
+    /**
+     * 核算打卡时长
+     */
+    private Double checkDuration;
+
+    private static final long serialVersionUID = 1L;
 
+    /**
+     * 项目编号
+     */
     public Long getId() {
         return id;
     }
 
+    /**
+     * 项目编号
+     */
     public void setId(Long id) {
         this.id = id;
     }
 
+    /**
+     * 项目编号
+     */
     public Long getPid() {
         return pid;
     }
 
+    /**
+     * 项目编号
+     */
     public void setPid(Long pid) {
         this.pid = pid;
     }
 
+    /**
+     * 成员编号
+     */
     public Long getAid() {
         return aid;
     }
 
+    /**
+     * 成员编号
+     */
     public void setAid(Long aid) {
         this.aid = aid;
     }
 
+    /**
+     * 成员名称
+     */
     public String getName() {
         return name;
     }
 
+    /**
+     * 成员名称
+     */
     public void setName(String name) {
         this.name = name;
     }
 
+    /**
+     * 项目状态
+     */
     public Integer getProjectStatus() {
         return projectStatus;
     }
 
+    /**
+     * 项目状态
+     */
     public void setProjectStatus(Integer projectStatus) {
         this.projectStatus = projectStatus;
     }
 
+    /**
+     * 内容
+     */
     public String getContent() {
         return content;
     }
 
+    /**
+     * 内容
+     */
     public void setContent(String content) {
         this.content = content;
     }
 
+    /**
+     * 附件地址
+     */
     public String getAnnexUrl() {
         return annexUrl;
     }
 
+    /**
+     * 附件地址
+     */
     public void setAnnexUrl(String annexUrl) {
         this.annexUrl = annexUrl;
     }
 
+    /**
+     * 创建时间
+     */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     public Date getCreateTime() {
         return createTime;
     }
 
+    /**
+     * 创建时间
+     */
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
 
+    /**
+     * 审核状态 0=未发起,1=待审核,2=已审核,3=驳回
+     */
     public Integer getProcessStatus() {
         return processStatus;
     }
 
+    /**
+     * 审核状态 0=未发起,1=待审核,2=已审核,3=驳回
+     */
     public void setProcessStatus(Integer processStatus) {
         this.processStatus = processStatus;
     }
 
+    /**
+     * 时长
+     */
     public Double getDuration() {
         return duration;
     }
 
+    /**
+     * 时长
+     */
     public void setDuration(Double duration) {
         this.duration = duration;
     }
 
+    /**
+     * 审核人编号
+     */
     public Long getExamineId() {
         return examineId;
     }
 
+    /**
+     * 审核人编号
+     */
     public void setExamineId(Long examineId) {
         this.examineId = examineId;
     }
 
+    /**
+     * 审核时间
+     */
     public Date getExamineTime() {
         return examineTime;
     }
 
+    /**
+     * 审核时间
+     */
     public void setExamineTime(Date examineTime) {
         this.examineTime = examineTime;
     }
 
+    /**
+     * 审核名称
+     */
     public String getExamineName() {
         return examineName;
     }
 
+    /**
+     * 审核名称
+     */
     public void setExamineName(String examineName) {
         this.examineName = examineName;
     }
 
+    /**
+     * 打卡时间
+     */
     public Date getRecordTime() {
         return recordTime;
     }
 
+    /**
+     * 打卡时间
+     */
     public void setRecordTime(Date recordTime) {
         this.recordTime = recordTime;
     }
-}
+
+    /**
+     * 审核备注
+     */
+    public String getExamineContent() {
+        return examineContent;
+    }
+
+    /**
+     * 审核备注
+     */
+    public void setExamineContent(String examineContent) {
+        this.examineContent = examineContent;
+    }
+
+    /**
+     * 初始打卡时长
+     */
+    public Double getInitDuration() {
+        return initDuration;
+    }
+
+    /**
+     * 初始打卡时长
+     */
+    public void setInitDuration(Double initDuration) {
+        this.initDuration = initDuration;
+    }
+
+    /**
+     * 核算打卡时长
+     */
+    public Double getCheckDuration() {
+        return checkDuration;
+    }
+
+    /**
+     * 核算打卡时长
+     */
+    public void setCheckDuration(Double checkDuration) {
+        this.checkDuration = checkDuration;
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        ProjectStaffRecord other = (ProjectStaffRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
+            && (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()))
+            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+            && (this.getProjectStatus() == null ? other.getProjectStatus() == null : this.getProjectStatus().equals(other.getProjectStatus()))
+            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
+            && (this.getAnnexUrl() == null ? other.getAnnexUrl() == null : this.getAnnexUrl().equals(other.getAnnexUrl()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getProcessStatus() == null ? other.getProcessStatus() == null : this.getProcessStatus().equals(other.getProcessStatus()))
+            && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration()))
+            && (this.getExamineId() == null ? other.getExamineId() == null : this.getExamineId().equals(other.getExamineId()))
+            && (this.getExamineTime() == null ? other.getExamineTime() == null : this.getExamineTime().equals(other.getExamineTime()))
+            && (this.getExamineName() == null ? other.getExamineName() == null : this.getExamineName().equals(other.getExamineName()))
+            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
+            && (this.getExamineContent() == null ? other.getExamineContent() == null : this.getExamineContent().equals(other.getExamineContent()))
+            && (this.getInitDuration() == null ? other.getInitDuration() == null : this.getInitDuration().equals(other.getInitDuration()))
+            && (this.getCheckDuration() == null ? other.getCheckDuration() == null : this.getCheckDuration().equals(other.getCheckDuration()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
+        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
+        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+        result = prime * result + ((getProjectStatus() == null) ? 0 : getProjectStatus().hashCode());
+        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
+        result = prime * result + ((getAnnexUrl() == null) ? 0 : getAnnexUrl().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getProcessStatus() == null) ? 0 : getProcessStatus().hashCode());
+        result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode());
+        result = prime * result + ((getExamineId() == null) ? 0 : getExamineId().hashCode());
+        result = prime * result + ((getExamineTime() == null) ? 0 : getExamineTime().hashCode());
+        result = prime * result + ((getExamineName() == null) ? 0 : getExamineName().hashCode());
+        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
+        result = prime * result + ((getExamineContent() == null) ? 0 : getExamineContent().hashCode());
+        result = prime * result + ((getInitDuration() == null) ? 0 : getInitDuration().hashCode());
+        result = prime * result + ((getCheckDuration() == null) ? 0 : getCheckDuration().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", pid=").append(pid);
+        sb.append(", aid=").append(aid);
+        sb.append(", name=").append(name);
+        sb.append(", projectStatus=").append(projectStatus);
+        sb.append(", content=").append(content);
+        sb.append(", annexUrl=").append(annexUrl);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", processStatus=").append(processStatus);
+        sb.append(", duration=").append(duration);
+        sb.append(", examineId=").append(examineId);
+        sb.append(", examineTime=").append(examineTime);
+        sb.append(", examineName=").append(examineName);
+        sb.append(", recordTime=").append(recordTime);
+        sb.append(", examineContent=").append(examineContent);
+        sb.append(", initDuration=").append(initDuration);
+        sb.append(", checkDuration=").append(checkDuration);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/project/mapper/ProjectStaffRecordMapper.java

@@ -10,7 +10,14 @@ import org.apache.ibatis.annotations.Param;
 import java.time.LocalDate;
 import java.util.List;
 
+/**
+* @author Administrator
+* @description 针对表【project_staff_record(项目人员记录表)】的数据库操作Mapper
+* @createDate 2024-03-19 15:15:46
+* @Entity com.ruoyi.project.domain.ProjectStaffRecord
+*/
 public interface ProjectStaffRecordMapper {
+
     int deleteByPrimaryKey(Long id);
 
     int insert(ProjectStaffRecord record);

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

@@ -96,6 +96,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         }else {
             flag=true;
         }
+        in.setInitDuration(in.getDuration());
         projectStaffRecordMapper.insertSelective(in);
         addRecordLog(in,flag,new Date());
         if (flag){

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

@@ -1,319 +1,293 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.mapper.ProjectStaffRecordMapper">
-  <resultMap id="BaseResultMap" type="com.ruoyi.project.domain.ProjectStaffRecord">
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="pid" jdbcType="BIGINT" property="pid" />
-    <result column="aid" jdbcType="BIGINT" property="aid" />
-    <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="project_status" jdbcType="INTEGER" property="projectStatus" />
-    <result column="content" jdbcType="VARCHAR" property="content" />
-    <result column="annex_url" jdbcType="VARCHAR" property="annexUrl" />
-    <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_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,examine_content
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select
-    <include refid="Base_Column_List" />
-    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}
-  </delete>
-  <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,
-      examine_id, examine_time, examine_name,
-      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},#{examineContent})
-  </insert>
-  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
-    insert into project_staff_record
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="pid != null">
-        pid,
-      </if>
-      <if test="aid != null">
-        aid,
-      </if>
-      <if test="name != null">
-        `name`,
-      </if>
-      <if test="projectStatus != null">
-        project_status,
-      </if>
-      <if test="content != null">
-        content,
-      </if>
-      <if test="annexUrl != null">
-        annex_url,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="processStatus != null">
-        process_status,
-      </if>
-      <if test="duration != null">
-        duration,
-      </if>
-      <if test="examineId != null">
-        examine_id,
-      </if>
-      <if test="examineTime != null">
-        examine_time,
-      </if>
-      <if test="examineName != null">
-        examine_name,
-      </if>
-      <if test="recordTime != null">
-        record_time,
-      </if>
-      <if test="examineContent != null">
-        examine_content,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="pid != null">
-        #{pid,jdbcType=BIGINT},
-      </if>
-      <if test="aid != null">
-        #{aid,jdbcType=BIGINT},
-      </if>
-      <if test="name != null">
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="projectStatus != null">
-        #{projectStatus,jdbcType=INTEGER},
-      </if>
-      <if test="content != null">
-        #{content,jdbcType=VARCHAR},
-      </if>
-      <if test="annexUrl != null">
-        #{annexUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="processStatus != null">
-        #{processStatus,jdbcType=INTEGER},
-      </if>
-      <if test="duration != null">
-        #{duration,jdbcType=DOUBLE},
-      </if>
-      <if test="examineId != null">
-        #{examineId,jdbcType=BIGINT},
-      </if>
-      <if test="examineTime != null">
-        #{examineTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="examineName != null">
-        #{examineName,jdbcType=VARCHAR},
-      </if>
-      <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">
-    update project_staff_record
-    <set>
-      <if test="pid != null">
-        pid = #{pid,jdbcType=BIGINT},
-      </if>
-      <if test="aid != null">
-        aid = #{aid,jdbcType=BIGINT},
-      </if>
-      <if test="name != null">
-        `name` = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="projectStatus != null">
-        project_status = #{projectStatus,jdbcType=INTEGER},
-      </if>
-      <if test="content != null">
-        content = #{content,jdbcType=VARCHAR},
-      </if>
-      <if test="annexUrl != null">
-        annex_url = #{annexUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null">
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="processStatus != null">
-        process_status = #{processStatus,jdbcType=INTEGER},
-      </if>
-      <if test="duration != null">
-        duration = #{duration,jdbcType=DOUBLE},
-      </if>
-      <if test="examineId != null">
-        examine_id = #{examineId,jdbcType=BIGINT},
-      </if>
-      <if test="examineTime != null">
-        examine_time = #{examineTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="examineName != null">
-        examine_name = #{examineName,jdbcType=VARCHAR},
-      </if>
-      <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>
-  <update id="updateByPrimaryKey" parameterType="com.ruoyi.project.domain.ProjectStaffRecord">
-    update project_staff_record
-    set pid = #{pid,jdbcType=BIGINT},
-      aid = #{aid,jdbcType=BIGINT},
-      `name` = #{name,jdbcType=VARCHAR},
-      project_status = #{projectStatus,jdbcType=INTEGER},
-      content = #{content,jdbcType=VARCHAR},
-      annex_url = #{annexUrl,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      process_status = #{processStatus,jdbcType=INTEGER},
-      duration = #{duration,jdbcType=DOUBLE},
-      examine_id = #{examineId,jdbcType=BIGINT},
-      examine_time = #{examineTime,jdbcType=TIMESTAMP},
-      examine_name = #{examineName,jdbcType=VARCHAR},
-      record_time = #{recordTime,jdbcType=TIMESTAMP},
-      examine_content = #{examineContent}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
 
-  <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">
-    select a.id,c.job_number jobNumber,a.name   ,d.dept_id deptId ,d.dept_name deptName ,a.record_time createMonth,
-    b.name projectName,b.admin_name adminName ,a.project_status projectStatus,a.content ,b.project_number projectNumber,
-    a.pid ,a.aid ,a.examine_id examineId ,a.examine_name examineName ,a.examine_time examineTime,a.record_time recordTime,
-    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}
-    </if>
-    <if test="roleType==1">
-      and c.superior_id= #{aid}
-    </if>
-    <if test="processStatus  !=null">
-      and a.process_status= #{processStatus}
-    </if>
-    <if test="companyId !=null">
-      and (d.dept_id= #{companyId} or find_in_set(#{companyId},d.ancestors))
-    </if>
-      <if test="adminName != null"> and a.name  like concat ('%',#{adminName},'%')</if>
-    <if test="projectStatus != null"> and a.project_status =#{projectStatus}</if>
-    <if test="projectNumber != null"> and b.project_number like concat ('%',#{projectNumber},'%')</if>
-    <if test="projectName != null"> and b.name like concat ('%',#{projectName},'%')</if>
-    <if test="researchStart != null and researchEnd != null">
-      and( #{researchStart} between b.start_time and b.end_time or  #{researchEnd} between b.start_time and b.end_time)
-    </if>
-    <if test="startTime != null and endTime != null">
-      and a.record_time between #{startTime} and #{endTime}
-    </if>
-    <if test="fullJob != null">and c.full_job= #{fullJob}</if>
-    <if test="deptId != null">and (d.dept_id= #{deptId} or find_in_set(#{deptId},d.ancestors)) </if>
-    order by a.record_time desc
-  </select>
+    <resultMap id="BaseResultMap" type="com.ruoyi.project.domain.ProjectStaffRecord">
+            <id property="id" column="id" jdbcType="BIGINT"/>
+            <result property="pid" column="pid" jdbcType="BIGINT"/>
+            <result property="aid" column="aid" jdbcType="BIGINT"/>
+            <result property="name" column="name" jdbcType="VARCHAR"/>
+            <result property="projectStatus" column="project_status" jdbcType="INTEGER"/>
+            <result property="content" column="content" jdbcType="VARCHAR"/>
+            <result property="annexUrl" column="annex_url" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="processStatus" column="process_status" jdbcType="INTEGER"/>
+            <result property="duration" column="duration" jdbcType="DOUBLE"/>
+            <result property="examineId" column="examine_id" jdbcType="BIGINT"/>
+            <result property="examineTime" column="examine_time" jdbcType="TIMESTAMP"/>
+            <result property="examineName" column="examine_name" jdbcType="VARCHAR"/>
+            <result property="recordTime" column="record_time" jdbcType="TIMESTAMP"/>
+            <result property="examineContent" column="examine_content" jdbcType="VARCHAR"/>
+            <result property="initDuration" column="init_duration" jdbcType="DOUBLE"/>
+            <result property="checkDuration" column="check_duration" jdbcType="DOUBLE"/>
+    </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,examine_content,
+        init_duration,check_duration
+    </sql>
+
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        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} 
+    </delete>
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
+        insert into project_staff_record
+        ( id,pid,aid
+        ,name,project_status,content
+        ,annex_url,create_time,process_status
+        ,duration,examine_id,examine_time
+        ,examine_name,record_time,examine_content
+        ,init_duration,check_duration)
+        values (#{id,jdbcType=BIGINT},#{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},#{examineContent,jdbcType=VARCHAR}
+        ,#{initDuration,jdbcType=DOUBLE},#{checkDuration,jdbcType=DOUBLE})
+    </insert>
+    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectStaffRecord" useGeneratedKeys="true">
+        insert into project_staff_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="pid != null">pid,</if>
+                <if test="aid != null">aid,</if>
+                <if test="name != null">name,</if>
+                <if test="projectStatus != null">project_status,</if>
+                <if test="content != null">content,</if>
+                <if test="annexUrl != null">annex_url,</if>
+                <if test="createTime != null">create_time,</if>
+                <if test="processStatus != null">process_status,</if>
+                <if test="duration != null">duration,</if>
+                <if test="examineId != null">examine_id,</if>
+                <if test="examineTime != null">examine_time,</if>
+                <if test="examineName != null">examine_name,</if>
+                <if test="recordTime != null">record_time,</if>
+                <if test="examineContent != null">examine_content,</if>
+                <if test="initDuration != null">init_duration,</if>
+                <if test="checkDuration != null">check_duration,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id,jdbcType=BIGINT},</if>
+                <if test="pid != null">#{pid,jdbcType=BIGINT},</if>
+                <if test="aid != null">#{aid,jdbcType=BIGINT},</if>
+                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
+                <if test="projectStatus != null">#{projectStatus,jdbcType=INTEGER},</if>
+                <if test="content != null">#{content,jdbcType=VARCHAR},</if>
+                <if test="annexUrl != null">#{annexUrl,jdbcType=VARCHAR},</if>
+                <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
+                <if test="processStatus != null">#{processStatus,jdbcType=INTEGER},</if>
+                <if test="duration != null">#{duration,jdbcType=DOUBLE},</if>
+                <if test="examineId != null">#{examineId,jdbcType=BIGINT},</if>
+                <if test="examineTime != null">#{examineTime,jdbcType=TIMESTAMP},</if>
+                <if test="examineName != null">#{examineName,jdbcType=VARCHAR},</if>
+                <if test="recordTime != null">#{recordTime,jdbcType=TIMESTAMP},</if>
+                <if test="examineContent != null">#{examineContent,jdbcType=VARCHAR},</if>
+                <if test="initDuration != null">#{initDuration,jdbcType=DOUBLE},</if>
+                <if test="checkDuration != null">#{checkDuration,jdbcType=DOUBLE},</if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectStaffRecord">
+        update project_staff_record
+        <set>
+                <if test="pid != null">
+                    pid = #{pid,jdbcType=BIGINT},
+                </if>
+                <if test="aid != null">
+                    aid = #{aid,jdbcType=BIGINT},
+                </if>
+                <if test="name != null">
+                    name = #{name,jdbcType=VARCHAR},
+                </if>
+                <if test="projectStatus != null">
+                    project_status = #{projectStatus,jdbcType=INTEGER},
+                </if>
+                <if test="content != null">
+                    content = #{content,jdbcType=VARCHAR},
+                </if>
+                <if test="annexUrl != null">
+                    annex_url = #{annexUrl,jdbcType=VARCHAR},
+                </if>
+                <if test="createTime != null">
+                    create_time = #{createTime,jdbcType=TIMESTAMP},
+                </if>
+                <if test="processStatus != null">
+                    process_status = #{processStatus,jdbcType=INTEGER},
+                </if>
+                <if test="duration != null">
+                    duration = #{duration,jdbcType=DOUBLE},
+                </if>
+                <if test="examineId != null">
+                    examine_id = #{examineId,jdbcType=BIGINT},
+                </if>
+                <if test="examineTime != null">
+                    examine_time = #{examineTime,jdbcType=TIMESTAMP},
+                </if>
+                <if test="examineName != null">
+                    examine_name = #{examineName,jdbcType=VARCHAR},
+                </if>
+                <if test="recordTime != null">
+                    record_time = #{recordTime,jdbcType=TIMESTAMP},
+                </if>
+                <if test="examineContent != null">
+                    examine_content = #{examineContent,jdbcType=VARCHAR},
+                </if>
+                <if test="initDuration != null">
+                    init_duration = #{initDuration,jdbcType=DOUBLE},
+                </if>
+                <if test="checkDuration != null">
+                    check_duration = #{checkDuration,jdbcType=DOUBLE},
+                </if>
+        </set>
+        where   id = #{id,jdbcType=BIGINT} 
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.ruoyi.project.domain.ProjectStaffRecord">
+        update project_staff_record
+        set 
+            pid =  #{pid,jdbcType=BIGINT},
+            aid =  #{aid,jdbcType=BIGINT},
+            name =  #{name,jdbcType=VARCHAR},
+            project_status =  #{projectStatus,jdbcType=INTEGER},
+            content =  #{content,jdbcType=VARCHAR},
+            annex_url =  #{annexUrl,jdbcType=VARCHAR},
+            create_time =  #{createTime,jdbcType=TIMESTAMP},
+            process_status =  #{processStatus,jdbcType=INTEGER},
+            duration =  #{duration,jdbcType=DOUBLE},
+            examine_id =  #{examineId,jdbcType=BIGINT},
+            examine_time =  #{examineTime,jdbcType=TIMESTAMP},
+            examine_name =  #{examineName,jdbcType=VARCHAR},
+            record_time =  #{recordTime,jdbcType=TIMESTAMP},
+            examine_content =  #{examineContent,jdbcType=VARCHAR},
+            init_duration =  #{initDuration,jdbcType=DOUBLE},
+            check_duration =  #{checkDuration,jdbcType=DOUBLE}
+        where   id = #{id,jdbcType=BIGINT} 
+    </update>
+    <select id="selectList" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">
+        select a.id,c.job_number jobNumber,a.name   ,d.dept_id deptId ,d.dept_name deptName ,a.record_time createMonth,
+        b.name projectName,b.admin_name adminName ,a.project_status projectStatus,a.content ,b.project_number projectNumber,
+        a.pid ,a.aid ,a.examine_id examineId ,a.examine_name examineName ,a.examine_time examineTime,a.record_time recordTime,
+        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}
+        </if>
+        <if test="roleType==1">
+            and c.superior_id= #{aid}
+        </if>
+        <if test="processStatus  !=null">
+            and a.process_status= #{processStatus}
+        </if>
+        <if test="companyId !=null">
+            and (d.dept_id= #{companyId} or find_in_set(#{companyId},d.ancestors))
+        </if>
+        <if test="adminName != null"> and a.name  like concat ('%',#{adminName},'%')</if>
+        <if test="projectStatus != null"> and a.project_status =#{projectStatus}</if>
+        <if test="projectNumber != null"> and b.project_number like concat ('%',#{projectNumber},'%')</if>
+        <if test="projectName != null"> and b.name like concat ('%',#{projectName},'%')</if>
+        <if test="researchStart != null and researchEnd != null">
+            and( #{researchStart} between b.start_time and b.end_time or  #{researchEnd} between b.start_time and b.end_time)
+        </if>
+        <if test="startTime != null and endTime != null">
+            and a.record_time between #{startTime} and #{endTime}
+        </if>
+        <if test="fullJob != null">and c.full_job= #{fullJob}</if>
+        <if test="deptId != null">and (d.dept_id= #{deptId} or find_in_set(#{deptId},d.ancestors)) </if>
+        order by a.record_time desc
+    </select>
 
 
 
     <select id="selectById" resultType="java.lang.Integer">
-      select count(*)
-      from project_staff_record a left join project_staff ps on a.aid = ps.aid
-      where a.pid=ps.pid
-      and ps.id = #{id}
+        select count(*)
+        from project_staff_record a left join project_staff ps on a.aid = ps.aid
+        where a.pid=ps.pid
+          and ps.id = #{id}
     </select>
-  <select id="selectByPidAndAid"  resultMap="BaseResultMap">
-    select
-    <include refid="Base_Column_List" />
-    from project_staff_record
-    where 1=1
-    <if test="pid !=null">
-      and pid= #{pid}
-    </if>
-    <if test="aid != null">
-      and aid = #{aid}
-    </if>
+    <select id="selectByPidAndAid"  resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from project_staff_record
+        where 1=1
+        <if test="pid !=null">
+            and pid= #{pid}
+        </if>
+        <if test="aid != null">
+            and aid = #{aid}
+        </if>
 
-  </select>
+    </select>
     <select id="myDurationMonth" resultType="com.ruoyi.project.bo.MyMonthDays">
-      select  x.dates dates,sum(x.duration)duration
-      from (select a.duration ,date_format(a.record_time,'%Y-%m-%d')dates
-            from project_staff_record a
-            where a.pid = #{param1} and a.aid =#{param2}
-              and a.record_time between #{param3} and #{param4}
-           )x group by x.dates
+        select  x.dates dates,sum(x.duration)duration
+        from (select a.duration ,date_format(a.record_time,'%Y-%m-%d')dates
+              from project_staff_record a
+              where a.pid = #{param1} and a.aid =#{param2}
+                and a.record_time between #{param3} and #{param4}
+             )x group by x.dates
+    </select>
+    <select id="selectDetailsById" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">
+        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.examine_content examineContent,a.record_time recordTime
+        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
+          and a.id =#{id}
     </select>
-  <select id="selectDetailsById" resultType="com.ruoyi.project.bo.ProjectStaffRecordOut">
-    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.examine_content examineContent,a.record_time recordTime
-    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
-    and a.id =#{id}
-  </select>
-  <select id="selectByAidAndTime" resultMap="BaseResultMap">
-    select
-    <include refid="Base_Column_List" />
-    from project_staff_record
-    where  aid = #{uid}
-    and record_time between #{startTime} and #{endTime}
+    <select id="selectByAidAndTime" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from project_staff_record
+        where  aid = #{uid}
+        and record_time between #{startTime} and #{endTime}
 
 
-  </select>
+    </select>
 
 
 
-  <update id="updateNameByAid" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
-    update project_staff_record
-    set name= #{nickName}
-    where aid= #{userId}
-  </update>
-  <update id="updateSumDurationProject">
-    update  project_task x,(select pid  ,sum(duration)duration
-      from project_staff_record  where pid =#{pid} group by pid )y
-    set x.duration =y.duration
-    where x.id =y.pid
-  </update>
-  <update id="updateSumDurationStaff">
-    update sys_user x,(select aid ,sum(duration)duration
-      from project_staff_record  where pid = #{pid} group by aid)y
-    set x.duration=y.duration
-    where x.user_id =y.aid
-  </update>
-  <select id="selectByDDUidAndTime" resultType="com.ruoyi.project.domain.ProjectStaffRecord">
-    select
-    b.id,b.duration,b.aid,b.pid,
-    date_format(b.record_time,'%Y-%m-%d')recordTime
-    from sys_user a left join  project_staff_record b on a.user_id=b.aid
-    where a.dd_user_id= #{ddUserId}
-    and b.record_time = #{clockDate}
-  </select>
+    <update id="updateNameByAid" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
+        update project_staff_record
+        set name= #{nickName}
+        where aid= #{userId}
+    </update>
+    <update id="updateSumDurationProject">
+        update  project_task x,(select pid  ,sum(duration)duration
+                                from project_staff_record  where pid =#{pid} group by pid )y
+        set x.duration =y.duration
+        where x.id =y.pid
+    </update>
+    <update id="updateSumDurationStaff">
+        update sys_user x,(select aid ,sum(duration)duration
+                           from project_staff_record  where pid = #{pid} group by aid)y
+        set x.duration=y.duration
+        where x.user_id =y.aid
+    </update>
+    <select id="selectByDDUidAndTime" resultType="com.ruoyi.project.domain.ProjectStaffRecord">
+        select
+            b.id,b.duration,b.aid,b.pid,
+            date_format(b.record_time,'%Y-%m-%d')recordTime
+        from sys_user a left join  project_staff_record b on a.user_id=b.aid
+        where a.dd_user_id= #{ddUserId}
+          and b.record_time = #{clockDate}
+    </select>
 
 
 </mapper>
+