caozixuan 1 жил өмнө
parent
commit
7f629bae98

+ 19 - 0
sop-api/src/main/java/com/qmth/sop/server/api/TBDingStatisticController.java

@@ -0,0 +1,19 @@
+package com.qmth.sop.server.api;
+
+import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.sop.common.contant.SystemConstant;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Description: 考勤统计Controller
+ * @Author: CaoZixuan
+ * @Date: 2024-05-22
+ */
+@Api(tags = "考勤统计Controller")
+@RestController
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_DING_STATISTIC)
+public class TBDingStatisticController {
+
+}

+ 225 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/TBDingStatistic.java

@@ -0,0 +1,225 @@
+package com.qmth.sop.business.entity;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.sop.common.base.BaseEntity;
+import com.qmth.sop.common.enums.SopRoleTypeEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 考勤提交统计表
+ * </p>
+ *
+ * @author CaoZixuan
+ * @since 2024-05-22
+ */
+@ApiModel(value="TBDingStatistic对象", description="考勤提交统计表")
+public class TBDingStatistic extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "服务单元id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long serviceId;
+
+    @ApiModelProperty(value = "sop单号")
+    private String sopNo;
+
+    @ApiModelProperty(value = "crm单号")
+    private String crmNo;
+
+    @ApiModelProperty(value = "人员档案id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long userArchivesId;
+
+    @ApiModelProperty(value = "扫描开始时间")
+    private Long scanStartTime;
+
+    @ApiModelProperty(value = "扫描结束时间")
+    private Long scanEndTime;
+
+    @ApiModelProperty(value = "阅卷开始时间")
+    private Long markPaperStartTime;
+
+    @ApiModelProperty(value = "阅卷开始时间")
+    private Long markPaperEndTime;
+
+    @ApiModelProperty(value = "项目角色类型")
+    private SopRoleTypeEnum roleType;
+
+    @ApiModelProperty(value = "实际出勤(天)")
+    private Integer actualDays;
+
+    @ApiModelProperty(value = "工作日(天)")
+    private Integer weekdays;
+
+    @ApiModelProperty(value = "周末(天)")
+    private Integer weekends;
+
+    @ApiModelProperty(value = "法定节假日(天)")
+    private Integer legalHolidays;
+
+    @ApiModelProperty(value = "累计工时(小时)")
+    private BigDecimal workHours;
+
+    @ApiModelProperty(value = "违规工时")
+    private BigDecimal violationDays;
+
+    @ApiModelProperty(value = "提交人id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long submitUserId;
+
+    @ApiModelProperty(value = "提交时间")
+    private Long submitTime;
+
+    @ApiModelProperty(value = "提交状态")
+    private String submitStatus;
+
+    public Long getServiceId() {
+        return serviceId;
+    }
+
+    public void setServiceId(Long serviceId) {
+        this.serviceId = serviceId;
+    }
+
+    public String getSopNo() {
+        return sopNo;
+    }
+
+    public void setSopNo(String sopNo) {
+        this.sopNo = sopNo;
+    }
+
+    public String getCrmNo() {
+        return crmNo;
+    }
+
+    public void setCrmNo(String crmNo) {
+        this.crmNo = crmNo;
+    }
+
+    public Long getUserArchivesId() {
+        return userArchivesId;
+    }
+
+    public void setUserArchivesId(Long userArchivesId) {
+        this.userArchivesId = userArchivesId;
+    }
+
+    public Long getScanStartTime() {
+        return scanStartTime;
+    }
+
+    public void setScanStartTime(Long scanStartTime) {
+        this.scanStartTime = scanStartTime;
+    }
+
+    public Long getScanEndTime() {
+        return scanEndTime;
+    }
+
+    public void setScanEndTime(Long scanEndTime) {
+        this.scanEndTime = scanEndTime;
+    }
+
+    public Long getMarkPaperStartTime() {
+        return markPaperStartTime;
+    }
+
+    public void setMarkPaperStartTime(Long markPaperStartTime) {
+        this.markPaperStartTime = markPaperStartTime;
+    }
+
+    public Long getMarkPaperEndTime() {
+        return markPaperEndTime;
+    }
+
+    public void setMarkPaperEndTime(Long markPaperEndTime) {
+        this.markPaperEndTime = markPaperEndTime;
+    }
+
+    public SopRoleTypeEnum getRoleType() {
+        return roleType;
+    }
+
+    public void setRoleType(SopRoleTypeEnum roleType) {
+        this.roleType = roleType;
+    }
+
+    public Integer getActualDays() {
+        return actualDays;
+    }
+
+    public void setActualDays(Integer actualDays) {
+        this.actualDays = actualDays;
+    }
+
+    public Integer getWeekdays() {
+        return weekdays;
+    }
+
+    public void setWeekdays(Integer weekdays) {
+        this.weekdays = weekdays;
+    }
+
+    public Integer getWeekends() {
+        return weekends;
+    }
+
+    public void setWeekends(Integer weekends) {
+        this.weekends = weekends;
+    }
+
+    public Integer getLegalHolidays() {
+        return legalHolidays;
+    }
+
+    public void setLegalHolidays(Integer legalHolidays) {
+        this.legalHolidays = legalHolidays;
+    }
+
+    public BigDecimal getWorkHours() {
+        return workHours;
+    }
+
+    public void setWorkHours(BigDecimal workHours) {
+        this.workHours = workHours;
+    }
+
+    public BigDecimal getViolationDays() {
+        return violationDays;
+    }
+
+    public void setViolationDays(BigDecimal violationDays) {
+        this.violationDays = violationDays;
+    }
+
+    public Long getSubmitUserId() {
+        return submitUserId;
+    }
+
+    public void setSubmitUserId(Long submitUserId) {
+        this.submitUserId = submitUserId;
+    }
+
+    public Long getSubmitTime() {
+        return submitTime;
+    }
+
+    public void setSubmitTime(Long submitTime) {
+        this.submitTime = submitTime;
+    }
+
+    public String getSubmitStatus() {
+        return submitStatus;
+    }
+
+    public void setSubmitStatus(String submitStatus) {
+        this.submitStatus = submitStatus;
+    }
+}

+ 16 - 0
sop-business/src/main/java/com/qmth/sop/business/mapper/TBDingStatisticMapper.java

@@ -0,0 +1,16 @@
+package com.qmth.sop.business.mapper;
+
+import com.qmth.sop.business.entity.TBDingStatistic;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 考勤提交统计表 Mapper 接口
+ * </p>
+ *
+ * @author CaoZixuan
+ * @since 2024-05-22
+ */
+public interface TBDingStatisticMapper extends BaseMapper<TBDingStatistic> {
+
+}

+ 16 - 0
sop-business/src/main/java/com/qmth/sop/business/service/TBDingStatisticService.java

@@ -0,0 +1,16 @@
+package com.qmth.sop.business.service;
+
+import com.qmth.sop.business.entity.TBDingStatistic;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 考勤提交统计表 服务类
+ * </p>
+ *
+ * @author CaoZixuan
+ * @since 2024-05-22
+ */
+public interface TBDingStatisticService extends IService<TBDingStatistic> {
+
+}

+ 2 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingServiceImpl.java

@@ -619,7 +619,8 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
 
         for (TBService tbService : tbServiceList) {
             Long serviceUnitId = tbService.getId();
-            // TODO: 2024/5/21 系统自动生成打卡记录方法修改 -czx 
+            // TODO: 2024/5/21 系统自动生成打卡记录方法修改 -czx
+
             //            List<Map<String, Object>> sopPassageMap = tbSopInfoService.findSopPassage(serviceUnitId);
             //            if (CollectionUtils.isNotEmpty(sopPassageMap)) {
             //                Map<String, Object> map = sopPassageMap.get(0);

+ 20 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingStatisticServiceImpl.java

@@ -0,0 +1,20 @@
+package com.qmth.sop.business.service.impl;
+
+import com.qmth.sop.business.entity.TBDingStatistic;
+import com.qmth.sop.business.mapper.TBDingStatisticMapper;
+import com.qmth.sop.business.service.TBDingStatisticService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 考勤提交统计表 服务实现类
+ * </p>
+ *
+ * @author CaoZixuan
+ * @since 2024-05-22
+ */
+@Service
+public class TBDingStatisticServiceImpl extends ServiceImpl<TBDingStatisticMapper, TBDingStatistic> implements TBDingStatisticService {
+
+}

+ 31 - 1
sop-business/src/main/resources/db/log/caozixuan_update_log.sql

@@ -96,4 +96,34 @@ INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, e
 INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('2062', '人员调配可选人员查询', '/api/admin/user/archives/allocation/can_choose', 'URL', '3079', '10', 'AUTH', '1', '1', '0');
 
 ALTER TABLE t_b_ding
-    ADD COLUMN ding_exception TINYINT NOT NULL DEFAULT 0 COMMENT '打卡异常,0:正常,1:异常' AFTER face_out_pass;
+    ADD COLUMN ding_exception TINYINT NOT NULL DEFAULT 0 COMMENT '打卡异常,0:正常,1:异常' AFTER face_out_pass;
+
+-- 2024-05-22
+DROP TABLE IF EXISTS `t_b_ding_statistic`;
+CREATE TABLE `t_b_ding_statistic` (
+    `id` bigint NOT NULL COMMENT '主键',
+    `service_id` bigint NOT NULL COMMENT '服务单元id',
+    `sop_no` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT 'sop单号',
+    `crm_no` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT 'crm单号',
+    `user_archives_id` bigint NOT NULL COMMENT '人员档案id',
+    `scan_start_time` bigint DEFAULT NULL COMMENT '扫描开始时间',
+    `scan_end_time` bigint DEFAULT NULL COMMENT '扫描结束时间',
+    `mark_paper_start_time` bigint DEFAULT NULL COMMENT '阅卷开始时间',
+    `mark_paper_end_time` bigint DEFAULT NULL COMMENT '阅卷开始时间',
+    `role_type` varchar(20) CHARACTER SET utf8mb4 NOT NULL COMMENT '项目角色类型',
+    `actual_days` int DEFAULT NULL COMMENT '实际出勤(天)',
+    `weekdays` int DEFAULT NULL COMMENT '工作日(天)',
+    `weekends` int DEFAULT NULL COMMENT '周末(天)',
+    `legal_holidays` int DEFAULT NULL COMMENT '法定节假日(天)',
+    `work_hours` decimal(8,2) DEFAULT NULL COMMENT '累计工时(小时)',
+    `violation_days` decimal(8,2) DEFAULT NULL COMMENT '违规工时',
+    `submit_user_id` bigint NOT NULL COMMENT '提交人id',
+    `submit_time` bigint NOT NULL COMMENT '提交时间',
+    `submit_status` varchar(20) CHARACTER SET utf8mb4 NOT NULL COMMENT '提交状态',
+    `create_id` bigint DEFAULT NULL COMMENT '创建人id',
+    `create_time` bigint DEFAULT NULL COMMENT '创建时间',
+    `update_id` bigint DEFAULT NULL COMMENT '更新人id',
+    `update_time` bigint DEFAULT NULL COMMENT '更新时间',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `t_b_ding_statistic_un` (`sop_no`,`user_archives_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考勤提交统计表';

+ 5 - 0
sop-business/src/main/resources/mapper/TBDingStatisticMapper.xml

@@ -0,0 +1,5 @@
+<?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">
+<mapper namespace="com.qmth.sop.business.mapper.TBDingStatisticMapper">
+
+</mapper>

+ 1 - 0
sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java

@@ -257,6 +257,7 @@ public class SystemConstant {
     public static final String PREFIX_URL_VIOLATION_DETAIL = "/admin/tb/violation/detail";
     public static final String PREFIX_URL_DING = "/admin/tb/ding";
     public static final String PREFIX_URL_DING_SUBMIT = "/admin/tb/ding/submit";
+    public static final String PREFIX_URL_DING_STATISTIC = "/admin/tb/ding/statistic";
     public static final String PREFIX_URL_QUALITY_PROBLEM_APPLY = "/admin/tb/quality/problem/apply";
     public static final String PREFIX_URL_CRM = "/admin/tb/crm";
     public static final String PREFIX_URL_CRM_DETAIL = "/admin/tb/crm/detail";