ソースを参照

新增科研平台编号

anderx 4 ヶ月 前
コミット
ef1ee06d27

+ 2 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ProjectTaskController.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.project.domain.CompanyClockBo;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.exception.ServiceException;
@@ -543,7 +544,7 @@ public class ProjectTaskController extends BaseController {
     @GetMapping("/getCompanyClock")
     public TableDataInfo getCompanyClock(Integer deptId){
         startPage();
-        List<ProjectStaffRecord> companyClock = projectStaffRecordService.getCompanyClock(deptId);
+        List<CompanyClockBo> companyClock = projectStaffRecordService.getCompanyClock(deptId);
         return getDataTable(companyClock);
     }
 }

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/project/domain/CompanyClockBo.java

@@ -0,0 +1,14 @@
+package com.ruoyi.project.domain;
+
+
+public class CompanyClockBo  extends ProjectStaffRecord {
+    private String projectName;
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+}

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/project/mapper/ProjectStaffRecordMapper.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.project.bo.MyMonthDays;
 import com.ruoyi.project.bo.ProjectStaffRecordInput;
 import com.ruoyi.project.bo.ProjectStaffRecordOut;
+import com.ruoyi.project.domain.CompanyClockBo;
 import com.ruoyi.project.domain.ProjectStaffRecord;
 import org.apache.ibatis.annotations.Param;
 
@@ -57,5 +58,5 @@ public interface ProjectStaffRecordMapper {
 
     List<ProjectStaffRecord> getMonthClock(@Param("id") Integer id, @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);
 
-    List<ProjectStaffRecord> getCompanyClock(Integer deptId);
+    List<CompanyClockBo> getCompanyClock(Integer deptId);
 }

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/project/service/ProjectStaffRecordService.java

@@ -6,6 +6,7 @@ import com.ruoyi.project.bo.ProjectStaffRecordInput;
 import com.ruoyi.project.bo.ProjectStaffRecordOut;
 import com.ruoyi.project.bo.UserClockDataBo;
 import com.ruoyi.project.bo.batchExamineRecordInput;
+import com.ruoyi.project.domain.CompanyClockBo;
 import com.ruoyi.project.domain.ProjectStaffRecord;
 import com.ruoyi.project.domain.ProjectStaffRecordLog;
 
@@ -56,5 +57,5 @@ public interface ProjectStaffRecordService {
 
     Object getNewMonthClock(Integer id, String yearMonth, String duration);
 
-    List<ProjectStaffRecord> getCompanyClock(Integer deptId);
+    List<CompanyClockBo> getCompanyClock(Integer deptId);
 }

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

@@ -15,6 +15,7 @@ import com.ruoyi.common.utils.bean.BeanValidators;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.project.bo.*;
+import com.ruoyi.project.domain.CompanyClockBo;
 import com.ruoyi.project.domain.ProjectStaffRecord;
 import com.ruoyi.project.domain.ProjectStaffRecordLog;
 import com.ruoyi.project.domain.ProjectTask;
@@ -1182,7 +1183,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
     }
 
     @Override
-    public List<ProjectStaffRecord>  getCompanyClock(Integer deptId) {
+    public List<CompanyClockBo>  getCompanyClock(Integer deptId) {
         return projectStaffRecordMapper.getCompanyClock(deptId);
     }
 

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

@@ -25,6 +25,7 @@
             <result property="checkStatus" column="check_status" jdbcType="INTEGER"/>
             <result property="tianheUrl" column="tianhe_url" jdbcType="VARCHAR"/>
             <result property="tianheType" column="tianhe_type" jdbcType="INTEGER"/>
+        <result property="projectName" column="projectName" jdbcType="INTEGER"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -349,30 +350,32 @@
         and pid = #{id}
         and record_time between #{startDate} and #{endDate}
     </select>
-    <select id="getCompanyClock" resultMap="BaseResultMap">
+    <select id="getCompanyClock" resultType="com.ruoyi.project.domain.CompanyClockBo">
         select a.id,
                a.aid,
                a.pid,
                a.name,
-               a.process_status,
+               a.process_status processStatus,
                a.content,
-               a.annex_url,
-               a.create_time,
-               a.project_status,
+               a.annex_url annexUrl,
+               a.create_time createTime,
+               a.project_status projectStatus,
                a.duration,
-               a.examine_id,
-               a.examine_time,
-               a.examine_name,
-               a.record_time,
-               a.examine_content,
-               a.init_duration,
-               a.check_duration,
-               a.check_status,
-               a.tianhe_type,
-               a.tianhe_url
+               a.examine_id examineId,
+               a.examine_time examineTime,
+               a.examine_name examineName,
+               a.record_time recordTime,
+               a.examine_content examineContent,
+               a.init_duration initDuration,
+               a.check_duration checkDuration,
+               a.check_status checkStatus,
+               a.tianhe_type tianheType,
+               a.tianhe_url tianheUrl,
+               d.name projectName
         from project_staff_record a
                  left join sys_user b on a.aid = b.user_id
                  left join sys_dept c on b.dept_id = c.dept_id
+        left join project_task d on a.pid = d.id
         where a.process_status = 2
           and a.duration >= 0
           and (c.dept_id = #{deptId} or find_in_set(#{deptId}, c.ancestors))