绩效考核
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
10 KiB

3 years ago
## server项目结构
3 years ago
3 years ago
```shell
├── api
│   └── v1
├── config
├── core
├── docs
├── global
├── initialize
│   └── internal
├── middleware
├── model
│   ├── request
│   └── response
├── packfile
├── resource
│   ├── excel
│   ├── page
│   └── template
├── router
├── service
├── source
└── utils
├── timer
└── upload
```
## 文件说明
| 文件夹 | 说明 | 描述 |
| ------------ | ----------------------- | --------------------------- |
| `api` | api层 | api层 |
| `--v1` | v1版本接口 | v1版本接口 |
| `config` | 配置包 | config.yaml对应的配置结构体 |
| `core` | 核心文件 | 核心组件(zap, viper, server)的初始化 |
| `docs` | swagger文档目录 | swagger文档目录 |
| `global` | 全局对象 | 全局对象 |
| `initialize` | 初始化 | router,redis,gorm,validator, timer的初始化 |
| `--internal` | 初始化内部函数 | gorm 的 longger 自定义,在此文件夹的函数只能由 `initialize` 层进行调用 |
| `middleware` | 中间件层 | 用于存放 `gin` 中间件代码 |
| `model` | 模型层 | 模型对应数据表 |
| `--request` | 入参结构体 | 接收前端发送到后端的数据。 |
| `--response` | 出参结构体 | 返回给前端的数据结构体 |
| `packfile` | 静态文件打包 | 静态文件打包 |
| `resource` | 静态资源文件夹 | 负责存放静态文件 |
| `--excel` | excel导入导出默认路径 | excel导入导出默认路径 |
| `--page` | 表单生成器 | 表单生成器 打包后的dist |
| `--template` | 模板 | 模板文件夹,存放的是代码生成器的模板 |
| `router` | 路由层 | 路由层 |
| `service` | service层 | 存放业务逻辑问题 |
| `source` | source层 | 存放初始化数据的函数 |
| `utils` | 工具包 | 工具函数封装 |
| `--timer` | timer | 定时器接口封装 |
| `--upload` | oss | oss接口封装 |
### LOG
#### 1 修改数据库
```
detailed_target 指标细则
qualitative_evaluation 定性考核
```
### 记录要操作的对照表
assesstarget
department_dimension_weight
division_responsibilities
evaluationtarget
flow_log
plan_versio
qualitative_evaluation
qualitative_target
rectification_measures
score_flow
target_weight
### 2022.04.30纪要
1、生成部门考核方案下来添加观察标
2、定量指标添加自动与手东干预
### 2022.05.01纪要
1、编写数据表统计信息
### 2022.05.15纪要
approvalList 流程详情页面
responsible 责任划分页面
rectification 整改措施
### 2022.06.06纪要
```
1、 修改evaluation_process 结构
添加字段
ALTER TABLE `evaluation_process` ADD `ep_setup_department` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '发起部门';
ALTER TABLE `evaluation_process` ADD `ep_dimension` mediumtext COMMENT '维度';
ALTER TABLE `evaluation_process` ADD `ep_target` mediumtext COMMENT '指标';
ALTER TABLE `evaluation_process` ADD `ep_detailedtarget` mediumtext COMMENT '指标细则';
ALTER TABLE `evaluation_process` ADD `ep_accept_department` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '接受考核部门';
```
```
2、添加视图 evalprocess
select `dt`.`title` AS `class_title`,`et`.`et_title` AS `et_title`,`dgt`.`dt_title` AS `dt_title`,`ep`.`ep_id` AS `ep_id`,`ep`.`ep_order_key` AS `ep_order_key`,`ep`.`ep_step` AS `ep_step`,`ep`.`ep_cont` AS `ep_cont`,`ep`.`ep_next_cont` AS `ep_next_cont`,`ep`.`ep_time` AS `ep_time`,`ep`.`ep_state` AS `ep_state`,`ep`.`ep_role_group` AS `ep_role_group`,`ep`.`ep_type` AS `ep_type`,`ep`.`ep_participants` AS `ep_participants`,`ep`.`ep_start_time` AS `ep_start_time`,`ep`.`ep_next_step` AS `ep_next_step`,`ep`.`ep_next_executor` AS `ep_next_executor`,`ep`.`ep_setup_department` AS `ep_setup_department`,`ep`.`ep_dimension` AS `ep_dimension`,`ep`.`ep_target` AS `ep_target`,`ep`.`ep_detailedtarget` AS `ep_detailedtarget`,`ep`.`ep_accept_department` AS `ep_accept_department`,`sf`.`sf_duty_department` AS `sf_depart`,`fl`.`fl_duty_department` AS `fl_depart` from (((((`evaluation_process` `ep` left join `dutyclass` `dt` on(find_in_set(`dt`.`id`,`ep`.`ep_dimension`))) left join `evaluationtarget` `et` on(find_in_set(`et`.`et_id`,`ep`.`ep_target`))) left join `detailed_target` `dgt` on(find_in_set(`dgt`.`dt_id`,`ep`.`ep_detailedtarget`))) left join `score_flow` `sf` on((`ep`.`ep_order_key` = `sf`.`sf_key`))) left join `flow_log` `fl` on((`ep`.`ep_order_key` = `fl`.`fl_key`)))
```
```
3、修改 flow_log_data 结构
ALTER TABLE `flow_log_data` ADD `fld_target_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '指标ID';
```
```
4、修改 score_flow 结构
ALTER TABLE `score_flow` ADD `sf_target_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '指标ID';
ALTER TABLE `score_flow` ADD `sf_detailed_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '指标细则ID';
```
```
5、添加视图 flow_data_log
select `fl`.`fl_baseline` AS `baseline`,`fl`.`fl_duty_department` AS `department`,`fl`.`fl_duty_group` AS `group`,`fd`.`fld_flow_log` AS `key`,`fd`.`fld_score` AS `score`,`fd`.`fld_scoring_method` AS `method`,`fd`.`fld_scoring_score` AS `scoring_score`,`fl`.`fl_year` AS `year`,`fl`.`fl_quarter` AS `quarte`,`fl`.`fl_month` AS `month`,`fl`.`fl_week` AS `week`,`fl`.`fl_day` AS `day`,`fd`.`fld_id` AS `id`,`fd`.`fld_target_id` AS `targetid` from (`flow_log_data` `fd` left join `flow_log` `fl` on((`fd`.`fld_flow_log` = `fl`.`fl_key`)))
```
### 2022.07.28纪要
#### 岗位绩效相关
```
1、添加post_target 表 岗位指标
CREATE TABLE `post_target` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '' COMMENT '指标名称',
`type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1:定性考核;2:定量考核',
`state` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1:启用;2:禁用;3:删除)',
`time` bigint(20) unsigned NOT NULL DEFAULT '0',
`share` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1:共用;2:私用',
`rele_depart` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '相关部门',
`departments_post` text COMMENT '相关岗位',
`dimension` bigint(20) unsigned DEFAULT '0' COMMENT '维度',
`key` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'UUID',
`report` text COMMENT '上报人',
`unit` varchar(10) NOT NULL DEFAULT '' COMMENT '单位',
`cycle` tinyint(255) unsigned NOT NULL DEFAULT '4' COMMENT '1:班;2:天;3:周;4:月;5:季度;6:年',
`cycleattr` int(9) unsigned NOT NULL DEFAULT '1' COMMENT '辅助计数',
`visible_range` text COMMENT '可见范围',
`visible_group` text COMMENT '可见范围(集团)',
`scoring_method` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '计分方式(1:自动;2:手动)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb4 COMMENT='岗位指标';
```
```
2、添加 post_target_details 表 岗位指标细则
CREATE TABLE `post_target_details` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`title` text COMMENT '指标细则',
`content` text COMMENT '考核标准',
`parentid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '归属指标栏目',
`parentid_sun` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '归属指标子栏目',
`time` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '写入时间',
`state` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1:启用;2:禁用;3:删除)',
`min_score` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '最小分*100保存',
`max_score` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '最大分*100保存',
`company` varchar(20) DEFAULT NULL COMMENT '单位',
`add_reduce` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1:减少;2:增加;3:无属性,现场确认加或减',
`censor_type` text COMMENT '检查方式(1:现场检查;2:资料检查;3:事件触发)',
`censor_cont` longtext COMMENT '检查依据',
`censor_rate` int(255) unsigned NOT NULL DEFAULT '1' COMMENT '检查频次',
`cycle` tinyint(1) unsigned NOT NULL DEFAULT '4' COMMENT '1:班;2:天;3:周;4:月;5:季度;6:年;7:半年',
`cycleattr` int(9) unsigned NOT NULL DEFAULT '1' COMMENT '辅助计数',
`paretment` bigint(20) unsigned DEFAULT '0' COMMENT '接受考核的部门',
`paretment_post` longtext COMMENT '接受考核的部门岗位',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=1359 DEFAULT CHARSET=utf8mb4 COMMENT='岗位指标细则';
```
```
3、添加post_sun_target 表 岗位定性指标子栏目
CREATE TABLE `post_sun_target` (
`id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
`parent_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '归属指标',
`state` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1:启用;2:禁用;3:删除)',
`time` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '写入时间',
`depart` mediumtext COMMENT '关联部门',
`depart_post` mediumtext COMMENT '关联部门岗位',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=230 DEFAULT CHARSET=utf8mb4 COMMENT='岗位定性指标子栏目';
```
### 功能排查
1、 考核维度
2、考核指标相关d:\Program Files\Git\cmd\git.exe