From 20af882d5a8b59f4c4a5645fd2e4fd4a244609f2 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期一, 22 四月 2024 16:40:45 +0800
Subject: [PATCH] 考勤统计

---
 docs/docs.go |  768 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 764 insertions(+), 4 deletions(-)

diff --git a/docs/docs.go b/docs/docs.go
index 46adac4..c3e6e3f 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -16,6 +16,228 @@
     "host": "{{.Host}}",
     "basePath": "{{.BasePath}}",
     "paths": {
+        "/api-jl/v1/attendance/attendanceInput": {
+            "post": {
+                "produces": [
+                    "application/xlsx"
+                ],
+                "tags": [
+                    "鑰冨嫟绠$悊"
+                ],
+                "summary": "鑰冨嫟瀵煎叆",
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/attendance/deleteAttendanceInfo": {
+            "delete": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鑰冨嫟绠$悊"
+                ],
+                "summary": "鍒犻櫎鑰冨嫟淇℃伅",
+                "parameters": [
+                    {
+                        "description": "鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.DeleteAttendanceInfo"
+                        }
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/attendance/getAttendanceList": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鑰冨嫟绠$悊"
+                ],
+                "summary": "鑾峰彇鑰冨嫟鍒楄〃",
+                "parameters": [
+                    {
+                        "description": "鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.GetAttendanceList"
+                        }
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/util.ResponseList"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "type": "array",
+                                            "items": {
+                                                "$ref": "#/definitions/models.AttendanceManage"
+                                            }
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/attendance/getAttendanceRule": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鑰冨嫟绠$悊"
+                ],
+                "summary": "鑾峰彇鍔犵彮瑙勫垯",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/attendance/getAttendanceStatistic": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鑰冨嫟绠$悊"
+                ],
+                "summary": "鑾峰彇鑰冨嫟缁熻",
+                "parameters": [
+                    {
+                        "description": "鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.GetAttendanceStatistic"
+                        }
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/util.Response"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "$ref": "#/definitions/response.AttendanceList"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/attendance/saveAttendanceRule": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鑰冨嫟绠$悊"
+                ],
+                "summary": "淇濆瓨鍔犵彮瑙勫垯",
+                "parameters": [
+                    {
+                        "description": "鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/models.AttendanceRule"
+                        }
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/api-jl/v1/fineness/changeYieldRegister": {
             "post": {
                 "produces": [
@@ -678,7 +900,7 @@
                     {
                         "type": "string",
                         "description": "id",
-                        "name": "number",
+                        "name": "id",
                         "in": "path",
                         "required": true
                     },
@@ -1573,7 +1795,7 @@
                     {
                         "type": "string",
                         "description": "id",
-                        "name": "number",
+                        "name": "id",
                         "in": "path",
                         "required": true
                     },
@@ -1608,7 +1830,7 @@
                     {
                         "type": "string",
                         "description": "id",
-                        "name": "number",
+                        "name": "id",
                         "in": "path",
                         "required": true
                     },
@@ -1807,9 +2029,191 @@
                     }
                 }
             }
+        },
+        "/api-jl/v1/workerPosition/createWorkerPositionInfo": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鏈哄彴绠$悊"
+                ],
+                "summary": "鍒涘缓鏈哄彴淇℃伅",
+                "parameters": [
+                    {
+                        "description": "鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.AddWorkPositionRequest"
+                        }
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/workerPosition/deleteWorkerPositionInfo/{id}": {
+            "delete": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鏈哄彴绠$悊"
+                ],
+                "summary": "鍒犻櫎鏈哄彴淇℃伅",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "id",
+                        "name": "id",
+                        "in": "path",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/workerPosition/getWorkerPositionList": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鏈哄彴绠$悊"
+                ],
+                "summary": "鑾峰彇鏈哄彴淇℃伅鍒楄〃",
+                "parameters": [
+                    {
+                        "description": "鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.GetWorkerPositionList"
+                        }
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/util.ResponseList"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "type": "array",
+                                            "items": {
+                                                "$ref": "#/definitions/models.WorkerPosition"
+                                            }
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
+        "/api-jl/v1/workerPosition/updateWorkerPositionInfo": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鏈哄彴绠$悊"
+                ],
+                "summary": "鏇存柊鏈哄彴淇℃伅",
+                "parameters": [
+                    {
+                        "description": "鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.UpdateWorkerPositionRequest"
+                        }
+                    },
+                    {
+                        "type": "string",
+                        "description": "token",
+                        "name": "Authorization",
+                        "in": "header",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
         }
     },
     "definitions": {
+        "constvar.AttendanceStatus": {
+            "type": "integer",
+            "enum": [
+                1,
+                2,
+                3,
+                4
+            ],
+            "x-enum-comments": {
+                "Abnormal": "寮傚父",
+                "Normal": "姝e父",
+                "Overtime": "鍔犵彮",
+                "Vacation": "浼戝亣"
+            },
+            "x-enum-varnames": [
+                "Normal",
+                "Overtime",
+                "Vacation",
+                "Abnormal"
+            ]
+        },
         "constvar.CarFlag": {
             "type": "integer",
             "enum": [
@@ -1936,6 +2340,94 @@
                 "valid": {
                     "description": "Valid is true if Time is not NULL",
                     "type": "boolean"
+                }
+            }
+        },
+        "models.AttendanceManage": {
+            "type": "object",
+            "properties": {
+                "addPeople": {
+                    "type": "string"
+                },
+                "classes": {
+                    "type": "string"
+                },
+                "classesEndTime": {
+                    "type": "string"
+                },
+                "classesStartTime": {
+                    "type": "string"
+                },
+                "createTime": {
+                    "type": "string"
+                },
+                "createdAt": {
+                    "type": "string"
+                },
+                "date": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "$ref": "#/definitions/gorm.DeletedAt"
+                },
+                "endWorkTime": {
+                    "type": "string"
+                },
+                "id": {
+                    "type": "integer"
+                },
+                "overTimeDuration": {
+                    "type": "number"
+                },
+                "startWorkTime": {
+                    "type": "string"
+                },
+                "status": {
+                    "$ref": "#/definitions/constvar.AttendanceStatus"
+                },
+                "updatedAt": {
+                    "type": "string"
+                },
+                "workType": {
+                    "$ref": "#/definitions/models.WorkTypeManage"
+                },
+                "workTypeId": {
+                    "type": "integer"
+                },
+                "workerId": {
+                    "type": "string"
+                },
+                "workerName": {
+                    "type": "string"
+                }
+            }
+        },
+        "models.AttendanceRule": {
+            "type": "object",
+            "properties": {
+                "createdAt": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "$ref": "#/definitions/gorm.DeletedAt"
+                },
+                "id": {
+                    "type": "integer"
+                },
+                "overTimeStart": {
+                    "type": "number"
+                },
+                "restDayRule": {
+                    "type": "integer"
+                },
+                "restDayStart": {
+                    "type": "number"
+                },
+                "updatedAt": {
+                    "type": "string"
+                },
+                "weekdayRule": {
+                    "type": "integer"
                 }
             }
         },
@@ -2254,7 +2746,7 @@
                     "type": "string"
                 },
                 "worker": {
-                    "description": "宸ヤ汉ID",
+                    "description": "宸ヤ汉",
                     "allOf": [
                         {
                             "$ref": "#/definitions/models.Worker"
@@ -2435,6 +2927,62 @@
                     "type": "string"
                 },
                 "workTypeId": {
+                    "type": "integer"
+                }
+            }
+        },
+        "models.WorkerPosition": {
+            "type": "object",
+            "properties": {
+                "createdAt": {
+                    "type": "string"
+                },
+                "creator": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "$ref": "#/definitions/gorm.DeletedAt"
+                },
+                "endDate": {
+                    "description": "缁撴潫鏃ユ湡",
+                    "type": "string"
+                },
+                "endWorkerPosition": {
+                    "description": "缁撴潫杞﹀彿",
+                    "type": "integer"
+                },
+                "id": {
+                    "type": "integer"
+                },
+                "name": {
+                    "description": "杞﹂棿",
+                    "type": "string"
+                },
+                "startDate": {
+                    "description": "寮�濮嬫棩鏈�",
+                    "type": "string"
+                },
+                "startWorkerPosition": {
+                    "description": "寮�濮嬭溅鍙�",
+                    "type": "integer"
+                },
+                "updatedAt": {
+                    "type": "string"
+                },
+                "worker": {
+                    "description": "宸ヤ汉",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/models.Worker"
+                        }
+                    ]
+                },
+                "workerId": {
+                    "description": "宸ヤ汉ID",
+                    "type": "string"
+                },
+                "workshopGroup": {
+                    "description": "杞︾粍",
                     "type": "integer"
                 }
             }
@@ -2776,6 +3324,48 @@
                 }
             }
         },
+        "request.AddWorkPositionRequest": {
+            "type": "object",
+            "required": [
+                "endDate",
+                "endWorkerPosition",
+                "startDate",
+                "startWorkerPosition",
+                "workerId",
+                "workshop",
+                "workshopGroup"
+            ],
+            "properties": {
+                "endDate": {
+                    "description": "缁撴潫鏃ユ湡",
+                    "type": "string"
+                },
+                "endWorkerPosition": {
+                    "description": "缁撴潫杞﹀彿",
+                    "type": "integer"
+                },
+                "startDate": {
+                    "description": "寮�濮嬫棩鏈�",
+                    "type": "string"
+                },
+                "startWorkerPosition": {
+                    "description": "寮�濮嬭溅鍙�",
+                    "type": "integer"
+                },
+                "workerId": {
+                    "description": "宸ヤ汉ID",
+                    "type": "string"
+                },
+                "workshop": {
+                    "description": "杞﹂棿",
+                    "type": "string"
+                },
+                "workshopGroup": {
+                    "description": "杞︾粍",
+                    "type": "integer"
+                }
+            }
+        },
         "request.ChangeYieldRegister": {
             "type": "object",
             "properties": {
@@ -2798,6 +3388,18 @@
                 "workshopNumber": {
                     "description": "杞﹂棿缂栫爜",
                     "type": "string"
+                }
+            }
+        },
+        "request.DeleteAttendanceInfo": {
+            "type": "object",
+            "properties": {
+                "ids": {
+                    "description": "璁板綍id",
+                    "type": "array",
+                    "items": {
+                        "type": "integer"
+                    }
                 }
             }
         },
@@ -2836,6 +3438,31 @@
                 "sum": {
                     "description": "鍚堣",
                     "type": "number"
+                }
+            }
+        },
+        "request.GetAttendanceList": {
+            "type": "object",
+            "properties": {
+                "keyword": {
+                    "type": "string"
+                },
+                "page": {
+                    "description": "椤电爜",
+                    "type": "integer"
+                },
+                "pageSize": {
+                    "description": "姣忛〉澶у皬",
+                    "type": "integer"
+                }
+            }
+        },
+        "request.GetAttendanceStatistic": {
+            "type": "object",
+            "properties": {
+                "month": {
+                    "description": "鏈堜唤",
+                    "type": "string"
                 }
             }
         },
@@ -2888,6 +3515,22 @@
             }
         },
         "request.GetWorkerList": {
+            "type": "object",
+            "properties": {
+                "keyword": {
+                    "type": "string"
+                },
+                "page": {
+                    "description": "椤电爜",
+                    "type": "integer"
+                },
+                "pageSize": {
+                    "description": "姣忛〉澶у皬",
+                    "type": "integer"
+                }
+            }
+        },
+        "request.GetWorkerPositionList": {
             "type": "object",
             "properties": {
                 "keyword": {
@@ -3085,6 +3728,51 @@
                 }
             }
         },
+        "request.UpdateWorkerPositionRequest": {
+            "type": "object",
+            "required": [
+                "endDate",
+                "endWorkerPosition",
+                "startDate",
+                "startWorkerPosition",
+                "workerId",
+                "workshop",
+                "workshopGroup"
+            ],
+            "properties": {
+                "endDate": {
+                    "description": "缁撴潫鏃ユ湡",
+                    "type": "string"
+                },
+                "endWorkerPosition": {
+                    "description": "缁撴潫杞﹀彿",
+                    "type": "integer"
+                },
+                "id": {
+                    "type": "integer"
+                },
+                "startDate": {
+                    "description": "寮�濮嬫棩鏈�",
+                    "type": "string"
+                },
+                "startWorkerPosition": {
+                    "description": "寮�濮嬭溅鍙�",
+                    "type": "integer"
+                },
+                "workerId": {
+                    "description": "宸ヤ汉ID",
+                    "type": "string"
+                },
+                "workshop": {
+                    "description": "杞﹂棿",
+                    "type": "string"
+                },
+                "workshopGroup": {
+                    "description": "杞︾粍",
+                    "type": "integer"
+                }
+            }
+        },
         "request.YieldRegisterCircleInfo": {
             "type": "object",
             "properties": {
@@ -3282,6 +3970,78 @@
                 }
             }
         },
+        "response.AttendanceDetail": {
+            "type": "object",
+            "properties": {
+                "date": {
+                    "description": "鏃ユ湡",
+                    "type": "string"
+                },
+                "status": {
+                    "description": "鐘舵��",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/constvar.AttendanceStatus"
+                        }
+                    ]
+                }
+            }
+        },
+        "response.AttendanceList": {
+            "type": "object",
+            "properties": {
+                "list": {
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/response.AttendanceStatistic"
+                    }
+                }
+            }
+        },
+        "response.AttendanceStatistic": {
+            "type": "object",
+            "properties": {
+                "actualAttendanceDays": {
+                    "description": "瀹為檯鍑哄嫟澶╂暟",
+                    "type": "integer"
+                },
+                "details": {
+                    "description": "璇︽儏",
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/response.AttendanceDetail"
+                    }
+                },
+                "month": {
+                    "description": "鏈堜唤",
+                    "type": "string"
+                },
+                "requiredAttendanceDays": {
+                    "description": "搴斿嚭鍕ゅぉ鏁�",
+                    "type": "integer"
+                },
+                "restDayOverTime": {
+                    "description": "浼戞伅鏃ュ姞鐝椂闀�",
+                    "type": "number"
+                },
+                "weekdayOverTime": {
+                    "description": "宸ヤ綔鏃ュ姞鐝椂闀�",
+                    "type": "number"
+                },
+                "workType": {
+                    "description": "宸ョ",
+                    "type": "string"
+                },
+                "workerId": {
+                    "description": "浜哄憳id",
+                    "type": "string"
+                },
+                "workerName": {
+                    "description": "浜哄憳濮撳悕",
+                    "type": "string"
+                }
+            }
+        },
         "response.CarAndLevel": {
             "type": "object",
             "properties": {

--
Gitblit v1.8.0