Browse Source

研发打卡修改

anderx 2 years ago
parent
commit
f1c6f048ef

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

@@ -102,6 +102,17 @@ public class ProjectTaskController extends BaseController {
         return projectStaffRecordService.update(in);
     }
 
+    /**
+     * 研发打卡日志详情
+     * @param id
+     * @return
+     */
+    @GetMapping("/recordDetails")
+    public AjaxResult recordDetails( Long id){
+
+        return projectStaffRecordService.recordDetails(id);
+    }
+
 
     /**
      * 审核成员打卡

+ 2 - 9
ruoyi-system/src/main/java/com/ruoyi/project/bo/ProjectStaffRecordOut.java

@@ -26,7 +26,7 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
     @JsonFormat(pattern = "MM")
     private Date createMonth;
     @Excel(name = "项目编号")
-    private Long projectId;
+    private Long pid;
     @Excel(name = "项目名称")
     private String projectName;
     @Excel(name = "创断任务")
@@ -44,7 +44,7 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
     @Excel(name = "状态", readConverterExp = "0=未发起,1=待审核,2=已审核,3=驳回")
     private Integer processStatus;
     private String adminName;
-    private Long pid;
+
     private Long aid;
 
 
@@ -119,13 +119,6 @@ public class ProjectStaffRecordOut extends ProjectStaffRecord {
         this.createMonth = createMonth;
     }
 
-    public Long getProjectId() {
-        return projectId;
-    }
-
-    public void setProjectId(Long projectId) {
-        this.projectId = projectId;
-    }
 
     public String getProjectName() {
         return projectName;

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

@@ -29,4 +29,6 @@ public interface ProjectStaffRecordMapper {
     List<ProjectStaffRecord> selectByPidAndAid(@Param("pid") Long pid, @Param("aid") Long aid);
 
     List<MyMonthDays> myDurationMonth(Long id, Long aid, String lastDayOfMonth, String s);
+
+    ProjectStaffRecordOut selectDetailsById(Long id);
 }

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

@@ -25,4 +25,6 @@ public interface ProjectStaffRecordService {
     AjaxResult updateCheckMaxDuration(ProjectStaffRecord in);
 
     AjaxResult myDurationMonth(Long id);
+
+    AjaxResult recordDetails(Long id);
 }

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

@@ -164,6 +164,11 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         return AjaxResult.success(myMonthDays);
     }
 
+    @Override
+    public AjaxResult recordDetails(Long id) {
+        return AjaxResult.success(projectStaffRecordMapper.selectDetailsById(id));
+    }
+
     /**
      *
      * @param date 当前时间

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

@@ -192,7 +192,7 @@
   </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 ,c.create_time createMonth,
-    b.id projectId,b.name projectName,b.admin_name adminName ,a.project_status projectStatus,a.content ,
+    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
@@ -241,5 +241,15 @@
               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
+    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>
 
 </mapper>