@@ -536,4 +536,15 @@ public class ProjectTaskController extends BaseController {
throw new ServiceException("下载文件失败", HttpStatus.SC_BAD_REQUEST);
}
+
+ /**
+ * 获取公司打卡数据
+ */
+ @GetMapping("/getCompanyClock")
+ public AjaxResult getCompanyClock(Integer deptId){
+ if (deptId==null){
+ return AjaxResult.error("部门不能为空");
+ }
+ return AjaxResult.success(projectStaffRecordService.getCompanyClock(deptId));
@@ -56,4 +56,6 @@ public interface ProjectStaffRecordMapper {
void updateTianheType(@Param("collect")List<ProjectStaffRecord> newList);
List<ProjectStaffRecord> getMonthClock(@Param("id") Integer id, @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);
+ List<ProjectStaffRecord> getCompanyClock(Integer deptId);
@@ -55,4 +55,6 @@ public interface ProjectStaffRecordService {
Object importClockData(List<Map<Integer,String >> list);
Object getNewMonthClock(Integer id, String yearMonth, String duration);
+ Object getCompanyClock(Integer deptId);
@@ -1102,6 +1102,8 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
return out;
private void pushDate(ProjectStaffRecord e, List<Map<String, Object>> daysMap, LocalDate recordTime, List<Map<String, Object>> listData, String duration) {
{
Map<String,Object> map = new LinkedHashMap<>();
@@ -1179,7 +1181,10 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
return listData;
-
+ @Override
+ public Object getCompanyClock(Integer deptId) {
+ return projectStaffRecordMapper.getCompanyClock(deptId);
@@ -349,4 +349,32 @@
and pid = #{id}
and record_time between #{startDate} and #{endDate}
</select>
+ <select id="getCompanyClock" resultMap="BaseResultMap">
+ select a.id,
+ a.aid,
+ a.pid,
+ a.name,
+ a.process_status,
+ a.content,
+ a.annex_url,
+ a.create_time,
+ a.project_status,
+ 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
+ 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
+ where a.process_status = 2
+ and a.duration >= 0
+ and (c.dept_id = #{deptId} or find_in_set(#{deptId}, c.ancestors))
+ </select>
</mapper>