作者 tangxvhui

更新,默认填写模板取自评的评估模板

1 -绩效系统  
  1 +绩效系统
  2 +
  3 +
  4 +服务端地址:
  5 +test 环境 http://performance-back-test.fjmaimaimai.com/
  6 +prod 环境 http://performance-back-prd.fjmaimaimai.com/
  7 +
  8 +前端页面地址
  9 +test环境 https://enterprise-platform-dev.fjmaimaimai.com/#/login
1 -2022/11/10 09:28:21.494 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "company" ("id" bigserial, "logo" text, "name" text, "charge_user_ids" jsonb, "status" bigint, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
2 -2022/11/10 09:28:21.521 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "department" ("id" bigserial, "company_id" bigint, "level" bigint, "name" text, "parent_id" bigint, "charge_user_ids" jsonb, "path" text, "create_at" timestamptz, "update_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
3 -2022/11/10 09:28:21.548 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user" ("id" bigserial, "account" text, "avatar_url" text, "company_id" bigint, "admin_type" bigint, "name" text, "email" text, "status" bigint, "department_id" jsonb, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
4 -2022/11/10 09:28:21.575 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "received_message" ("message_id" bigserial, "message_type" text, "message_body" text, "occurred_on" timestamptz, "create_at" timestamptz, PRIMARY KEY ("message_id")) null  
5 -2022/11/10 09:28:21.602 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role" ("id" bigserial, "name" text, "type" bigint, "description" text, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
6 -2022/11/10 09:28:21.630 [D] [hook.go:130] performance COMMENT ON TABLE public."role" IS '角色'; null  
7 -2022/11/10 09:28:21.659 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".id IS 'ID'; null  
8 -2022/11/10 09:28:21.688 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".name IS '角色名称'; null  
9 -2022/11/10 09:28:21.716 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".type IS '角色类型(0角色可删、1系统预置角色不可删)'; null  
10 -2022/11/10 09:28:21.743 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".description IS '角色描述'; null  
11 -2022/11/10 09:28:21.771 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".company_id IS '公司ID'; null  
12 -2022/11/10 09:28:21.799 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".created_at IS '创建时间'; null  
13 -2022/11/10 09:28:21.828 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".updated_at IS '更新时间'; null  
14 -2022/11/10 09:28:21.856 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".deleted_at IS '删除时间'; null  
15 -2022/11/10 09:28:21.883 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role_user" ("id" bigserial, "role_id" bigint, "user_id" bigint, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
16 -2022/11/10 09:28:21.911 [D] [hook.go:130] performance COMMENT ON TABLE public."role_user" IS '角色用户关系'; null  
17 -2022/11/10 09:28:21.937 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".id IS 'ID'; null  
18 -2022/11/10 09:28:21.964 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".role_id IS '角色ID'; null  
19 -2022/11/10 09:28:21.993 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".user_id IS '用户ID'; null  
20 -2022/11/10 09:28:22.020 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".company_id IS '公司ID'; null  
21 -2022/11/10 09:28:22.047 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".created_at IS '创建时间'; null  
22 -2022/11/10 09:28:22.075 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".updated_at IS '更新时间'; null  
23 -2022/11/10 09:28:22.102 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".deleted_at IS '删除时间'; null  
24 -2022/11/10 09:28:22.116 [I] [???:0] performance http server Running on http://:8082  
25 -2022/11/10 09:28:22.860 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []  
26 -2022/11/10 09:29:54.845 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "company" ("id" bigserial, "logo" text, "name" text, "charge_user_ids" jsonb, "status" bigint, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
27 -2022/11/10 09:29:54.873 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "department" ("id" bigserial, "company_id" bigint, "level" bigint, "name" text, "parent_id" bigint, "charge_user_ids" jsonb, "path" text, "create_at" timestamptz, "update_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
28 -2022/11/10 09:29:54.899 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user" ("id" bigserial, "account" text, "avatar_url" text, "company_id" bigint, "admin_type" bigint, "name" text, "email" text, "status" bigint, "department_id" jsonb, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
29 -2022/11/10 09:29:54.926 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "received_message" ("message_id" bigserial, "message_type" text, "message_body" text, "occurred_on" timestamptz, "create_at" timestamptz, PRIMARY KEY ("message_id")) null  
30 -2022/11/10 09:29:54.953 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role" ("id" bigserial, "name" text, "type" bigint, "description" text, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
31 -2022/11/10 09:29:54.981 [D] [hook.go:130] performance COMMENT ON TABLE public."role" IS '角色'; null  
32 -2022/11/10 09:29:55.009 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".id IS 'ID'; null  
33 -2022/11/10 09:29:55.037 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".name IS '角色名称'; null  
34 -2022/11/10 09:29:55.068 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".type IS '角色类型(0角色可删、1系统预置角色不可删)'; null  
35 -2022/11/10 09:29:55.094 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".description IS '角色描述'; null  
36 -2022/11/10 09:29:55.121 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".company_id IS '公司ID'; null  
37 -2022/11/10 09:29:55.149 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".created_at IS '创建时间'; null  
38 -2022/11/10 09:29:55.183 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".updated_at IS '更新时间'; null  
39 -2022/11/10 09:29:55.212 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".deleted_at IS '删除时间'; null  
40 -2022/11/10 09:29:55.243 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role_user" ("id" bigserial, "role_id" bigint, "user_id" bigint, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
41 -2022/11/10 09:29:55.270 [D] [hook.go:130] performance COMMENT ON TABLE public."role_user" IS '角色用户关系'; null  
42 -2022/11/10 09:29:55.297 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".id IS 'ID'; null  
43 -2022/11/10 09:29:55.324 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".role_id IS '角色ID'; null  
44 -2022/11/10 09:29:55.351 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".user_id IS '用户ID'; null  
45 -2022/11/10 09:29:55.377 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".company_id IS '公司ID'; null  
46 -2022/11/10 09:29:55.403 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".created_at IS '创建时间'; null  
47 -2022/11/10 09:29:55.430 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".updated_at IS '更新时间'; null  
48 -2022/11/10 09:29:55.456 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".deleted_at IS '删除时间'; null  
49 -2022/11/10 09:29:55.466 [I] [???:0] performance http server Running on http://:8082  
50 -2022/11/10 09:29:56.217 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []  
51 -2022/11/10 09:30:15.476 [D] [router.go:977] performance | 127.0.0.1| 200 | 364.534µs| match| GET  /log r:/log  
52 -2022/11/10 09:30:15.546 [D] [router.go:977] performance | 127.0.0.1| 404 | 959.763µs| nomatch| GET  /favicon.ico  
53 -2022/11/10 15:07:19.528 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "company" ("id" bigserial, "logo" text, "name" text, "charge_user_ids" jsonb, "status" bigint, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
54 -2022/11/10 15:07:19.556 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "department" ("id" bigserial, "company_id" bigint, "level" bigint, "name" text, "parent_id" bigint, "charge_user_ids" jsonb, "path" text, "create_at" timestamptz, "update_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
55 -2022/11/10 15:07:19.583 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user" ("id" bigserial, "account" text, "avatar_url" text, "company_id" bigint, "admin_type" bigint, "name" text, "email" text, "status" bigint, "department_id" jsonb, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
56 -2022/11/10 15:07:19.611 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "received_message" ("message_id" bigserial, "message_type" text, "message_body" text, "occurred_on" timestamptz, "create_at" timestamptz, PRIMARY KEY ("message_id")) null  
57 -2022/11/10 15:07:19.638 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role" ("id" bigserial, "name" text, "type" bigint, "description" text, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
58 -2022/11/10 15:07:19.666 [D] [hook.go:130] performance COMMENT ON TABLE public."role" IS '角色'; null  
59 -2022/11/10 15:07:19.695 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".id IS 'ID'; null  
60 -2022/11/10 15:07:19.723 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".name IS '角色名称'; null  
61 -2022/11/10 15:07:19.750 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".type IS '角色类型(0角色可删、1系统预置角色不可删)'; null  
62 -2022/11/10 15:07:19.777 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".description IS '角色描述'; null  
63 -2022/11/10 15:07:19.805 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".company_id IS '公司ID'; null  
64 -2022/11/10 15:07:19.834 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".created_at IS '创建时间'; null  
65 -2022/11/10 15:07:19.861 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".updated_at IS '更新时间'; null  
66 -2022/11/10 15:07:19.889 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".deleted_at IS '删除时间'; null  
67 -2022/11/10 15:07:19.916 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role_user" ("id" bigserial, "role_id" bigint, "user_id" bigint, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
68 -2022/11/10 15:07:19.944 [D] [hook.go:130] performance COMMENT ON TABLE public."role_user" IS '角色用户关系'; null  
69 -2022/11/10 15:07:19.971 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".id IS 'ID'; null  
70 -2022/11/10 15:07:19.998 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".role_id IS '角色ID'; null  
71 -2022/11/10 15:07:20.026 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".user_id IS '用户ID'; null  
72 -2022/11/10 15:07:20.054 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".company_id IS '公司ID'; null  
73 -2022/11/10 15:07:20.081 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".created_at IS '创建时间'; null  
74 -2022/11/10 15:07:20.109 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".updated_at IS '更新时间'; null  
75 -2022/11/10 15:07:20.136 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".deleted_at IS '删除时间'; null  
76 -2022/11/10 15:07:20.221 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "positions" ("id" bigserial, "company_id" bigint, "name" text, "parent_id" bigint, "path" text, "level" bigint, "remarks" text, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
77 -2022/11/10 15:07:20.257 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user_positions" ("id" bigserial, "company_id" bigint, "position_id" bigint, "user_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
78 -2022/11/10 15:07:20.272 [I] [???:0] performance http server Running on http://:8082  
79 -2022/11/10 15:07:21.024 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []  
80 -2022/11/10 15:58:14.817 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "company" ("id" bigserial, "logo" text, "name" text, "charge_user_ids" jsonb, "status" bigint, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
81 -2022/11/10 15:58:14.843 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "department" ("id" bigserial, "company_id" bigint, "level" bigint, "name" text, "parent_id" bigint, "charge_user_ids" jsonb, "path" text, "create_at" timestamptz, "update_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
82 -2022/11/10 15:58:14.870 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user" ("id" bigserial, "account" text, "avatar_url" text, "company_id" bigint, "admin_type" bigint, "name" text, "email" text, "status" bigint, "department_id" jsonb, "position_id" jsonb, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
83 -2022/11/10 15:58:14.897 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "received_message" ("message_id" bigserial, "message_type" text, "message_body" text, "occurred_on" timestamptz, "create_at" timestamptz, PRIMARY KEY ("message_id")) null  
84 -2022/11/10 15:58:14.924 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role" ("id" bigserial, "name" text, "type" bigint, "description" text, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
85 -2022/11/10 15:58:14.952 [D] [hook.go:130] performance COMMENT ON TABLE public."role" IS '角色'; null  
86 -2022/11/10 15:58:14.979 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".id IS 'ID'; null  
87 -2022/11/10 15:58:15.006 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".name IS '角色名称'; null  
88 -2022/11/10 15:58:15.033 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".type IS '角色类型(0角色可删、1系统预置角色不可删)'; null  
89 -2022/11/10 15:58:15.060 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".description IS '角色描述'; null  
90 -2022/11/10 15:58:15.087 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".company_id IS '公司ID'; null  
91 -2022/11/10 15:58:15.114 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".created_at IS '创建时间'; null  
92 -2022/11/10 15:58:15.141 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".updated_at IS '更新时间'; null  
93 -2022/11/10 15:58:15.168 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".deleted_at IS '删除时间'; null  
94 -2022/11/10 15:58:15.194 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role_user" ("id" bigserial, "role_id" bigint, "user_id" bigint, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
95 -2022/11/10 15:58:15.222 [D] [hook.go:130] performance COMMENT ON TABLE public."role_user" IS '角色用户关系'; null  
96 -2022/11/10 15:58:15.249 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".id IS 'ID'; null  
97 -2022/11/10 15:58:15.275 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".role_id IS '角色ID'; null  
98 -2022/11/10 15:58:15.302 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".user_id IS '用户ID'; null  
99 -2022/11/10 15:58:15.329 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".company_id IS '公司ID'; null  
100 -2022/11/10 15:58:15.356 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".created_at IS '创建时间'; null  
101 -2022/11/10 15:58:15.383 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".updated_at IS '更新时间'; null  
102 -2022/11/10 15:58:15.409 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".deleted_at IS '删除时间'; null  
103 -2022/11/10 15:58:15.435 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "positions" ("id" bigserial, "company_id" bigint, "name" text, "parent_id" bigint, "path" text, "level" bigint, "remarks" text, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
104 -2022/11/10 15:58:15.450 [I] [???:0] performance http server Running on http://:8082  
105 -2022/11/10 15:58:16.194 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []  
106 -2022/11/10 16:16:09.220 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "company" ("id" bigserial, "logo" text, "name" text, "charge_user_ids" jsonb, "status" bigint, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
107 -2022/11/10 16:16:09.247 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "department" ("id" bigserial, "company_id" bigint, "level" bigint, "name" text, "parent_id" bigint, "charge_user_ids" jsonb, "path" text, "create_at" timestamptz, "update_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
108 -2022/11/10 16:16:09.274 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user" ("id" bigserial, "account" text, "avatar_url" text, "company_id" bigint, "admin_type" bigint, "name" text, "email" text, "status" bigint, "department_id" jsonb, "position_id" jsonb, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null  
109 -2022/11/10 16:16:09.302 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "received_message" ("message_id" bigserial, "message_type" text, "message_body" text, "occurred_on" timestamptz, "create_at" timestamptz, PRIMARY KEY ("message_id")) null  
110 -2022/11/10 16:16:09.330 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role" ("id" bigserial, "name" text, "type" bigint, "description" text, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
111 -2022/11/10 16:16:09.359 [D] [hook.go:130] performance COMMENT ON TABLE public."role" IS '角色'; null  
112 -2022/11/10 16:16:09.386 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".id IS 'ID'; null  
113 -2022/11/10 16:16:09.415 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".name IS '角色名称'; null  
114 -2022/11/10 16:16:09.442 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".type IS '角色类型(0角色可删、1系统预置角色不可删)'; null  
115 -2022/11/10 16:16:09.470 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".description IS '角色描述'; null  
116 -2022/11/10 16:16:09.497 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".company_id IS '公司ID'; null  
117 -2022/11/10 16:16:09.524 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".created_at IS '创建时间'; null  
118 -2022/11/10 16:16:09.553 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".updated_at IS '更新时间'; null  
119 -2022/11/10 16:16:09.580 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".deleted_at IS '删除时间'; null  
120 -2022/11/10 16:16:09.606 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role_user" ("id" bigserial, "role_id" bigint, "user_id" bigint, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
121 -2022/11/10 16:16:09.633 [D] [hook.go:130] performance COMMENT ON TABLE public."role_user" IS '角色用户关系'; null  
122 -2022/11/10 16:16:09.660 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".id IS 'ID'; null  
123 -2022/11/10 16:16:09.687 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".role_id IS '角色ID'; null  
124 -2022/11/10 16:16:09.714 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".user_id IS '用户ID'; null  
125 -2022/11/10 16:16:09.750 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".company_id IS '公司ID'; null  
126 -2022/11/10 16:16:09.776 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".created_at IS '创建时间'; null  
127 -2022/11/10 16:16:09.803 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".updated_at IS '更新时间'; null  
128 -2022/11/10 16:16:09.831 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".deleted_at IS '删除时间'; null  
129 -2022/11/10 16:16:09.857 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "positions" ("id" bigserial, "company_id" bigint, "name" text, "parent_id" bigint, "path" text, "level" bigint, "remarks" text, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null  
130 -2022/11/10 16:16:09.873 [I] [???:0] performance http server Running on http://:8082  
131 -2022/11/10 16:16:10.621 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []  
不能预览此文件类型
@@ -1003,6 +1003,9 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a @@ -1003,6 +1003,9 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a
1003 if err != nil { 1003 if err != nil {
1004 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取项目填写内容"+err.Error()) 1004 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取项目填写内容"+err.Error())
1005 } 1005 }
  1006 + if projectData.Template == nil {
  1007 + return nil, nil
  1008 + }
1006 var linkNode *domain.LinkNode 1009 var linkNode *domain.LinkNode
1007 for _, v := range projectData.Template.LinkNodes { 1010 for _, v := range projectData.Template.LinkNodes {
1008 if v.Id == int64(assess.LinkNodeId) { 1011 if v.Id == int64(assess.LinkNodeId) {
@@ -1013,11 +1016,23 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a @@ -1013,11 +1016,23 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a
1013 if linkNode == nil { 1016 if linkNode == nil {
1014 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未获得评估环节配置"+err.Error()) 1017 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未获得评估环节配置"+err.Error())
1015 } 1018 }
  1019 +
  1020 + var nodeContentList []*domain.NodeContent
  1021 + if len(linkNode.NodeContents) > 0 {
  1022 + nodeContentList = linkNode.NodeContents
  1023 + } else {
  1024 + //如果当前节点没有评估内容,就去 使用自评节点的评估内容
  1025 + for _, v := range projectData.Template.LinkNodes {
  1026 + if v.Type == domain.LinkNodeSelfAssessment {
  1027 + nodeContentList = v.NodeContents
  1028 + }
  1029 + }
  1030 + }
1016 ruleRepo := factory.CreateEvaluationRuleRepository(map[string]interface{}{ 1031 ruleRepo := factory.CreateEvaluationRuleRepository(map[string]interface{}{
1017 "transactionContext": transactionContext, 1032 "transactionContext": transactionContext,
1018 }) 1033 })
1019 ruleMap := map[int64]*domain.EvaluationRule{} 1034 ruleMap := map[int64]*domain.EvaluationRule{}
1020 - for _, v := range linkNode.NodeContents { 1035 + for _, v := range nodeContentList {
1021 if _, ok := ruleMap[v.RuleId]; ok { 1036 if _, ok := ruleMap[v.RuleId]; ok {
1022 continue 1037 continue
1023 } 1038 }
@@ -1031,7 +1046,7 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a @@ -1031,7 +1046,7 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a
1031 1046
1032 var contentList []*domain.StaffAssessContent 1047 var contentList []*domain.StaffAssessContent
1033 nowTime := time.Now() 1048 nowTime := time.Now()
1034 - for i, v := range linkNode.NodeContents { 1049 + for i, v := range nodeContentList {
1035 item := &domain.StaffAssessContent{ 1050 item := &domain.StaffAssessContent{
1036 Id: 0, 1051 Id: 0,
1037 StaffAssessId: assess.Id, 1052 StaffAssessId: assess.Id,
@@ -3,6 +3,7 @@ package service @@ -3,6 +3,7 @@ package service
3 import ( 3 import (
4 "github.com/linmadan/egglib-go/core/application" 4 "github.com/linmadan/egglib-go/core/application"
5 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory" 5 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
  6 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/adapter"
6 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/command" 7 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/command"
7 ) 8 )
8 9
@@ -28,3 +29,16 @@ func (srv StaffAssessServeice) InvokCreateStaffAssessTask(param *command.CreateS @@ -28,3 +29,16 @@ func (srv StaffAssessServeice) InvokCreateStaffAssessTask(param *command.CreateS
28 } 29 }
29 return data, nil 30 return data, nil
30 } 31 }
  32 +
  33 +//保存员工绩效评估填写过程中即写即存的内容
  34 +func (srv StaffAssessServeice) SaveAssessContentTemp(param *command.SaveAssessInfoCommand) error {
  35 +
  36 + return nil
  37 +}
  38 +
  39 +//获取员工绩效评估填写内容
  40 +//临时数据存在时就获取临时数据
  41 +//不存在就获取实际保存的数据
  42 +func (srv StaffAssessServeice) GetAssessContentTemp(param *command.SaveAssessInfoCommand) (*adapter.AssessInfoResp, error) {
  43 + return nil, nil
  44 +}
  1 +package domain
  2 +
  3 +import "time"
  4 +
  5 +//填写的评估内容,临时保存的数据
  6 +type StaffAssessContentTemp struct {
  7 + Id int `json:"id"` //id
  8 + StaffAssessId int `json:"staffAssessId"` //用户需要的评估项id
  9 + SortBy int `json:"sortBy"` //排序
  10 + Category string `json:"category"` //类别
  11 + Name string `json:"name"` //名称
  12 + Remark []AssessContemtRemark `json:"remark"` //填写的反馈
  13 + Value string `json:"value"` //评估填写的值
  14 + CreatedAt time.Time `json:"createdAt"` //数据创建时间
  15 + UpdatedAt time.Time `json:"updatedAt"` //数据更新时间
  16 + DeletedAt *time.Time `json:"deletedAt"`
  17 +}
  18 +
  19 +type StaffAssessContentTempRepository interface {
  20 + Save(param *StaffAssessContentTemp) (*StaffAssessContentTemp, error)
  21 + Remove(id int) error
  22 + FindOne(queryOptions map[string]interface{}) (*StaffAssessContentTemp, error)
  23 + Find(queryOptions map[string]interface{}) (int, []*StaffAssessContentTemp, error)
  24 +}
@@ -25,10 +25,3 @@ type StaffAssessContent struct { @@ -25,10 +25,3 @@ type StaffAssessContent struct {
25 UpdatedAt time.Time //数据更新时间 25 UpdatedAt time.Time //数据更新时间
26 DeletedAt *time.Time 26 DeletedAt *time.Time
27 } 27 }
28 -  
29 -type StaffAssessContentRepository interface {  
30 - Save(param *StaffAssessContent) (*StaffAssessContent, error)  
31 - Remove(id int) error  
32 - FindOne(queryOptions map[string]interface{}) (*StaffAssessContent, error)  
33 - Find(queryOptions map[string]interface{}) (int, []*StaffAssessContent, error)  
34 -}  
  1 +package models
  2 +
  3 +import (
  4 + "time"
  5 +
  6 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
  7 +)
  8 +
  9 +// 填写的评估内容
  10 +type StaffAssessContentTemp struct {
  11 + tableName struct{} `pg:"staff_assess_content_temp" comment:"填写的评估项"`
  12 + Id int `pg:",pk"` //id
  13 + StaffAssessId int //用户需要的评估项id
  14 + SortBy int //排序
  15 + Category string //类别
  16 + Name string //名称
  17 + PromptTitle string //问题标题
  18 + PromptText string //提示项正文
  19 + Value string //评估填写的值
  20 + ReteResult string //评估的结果
  21 + Rule domain.EvaluationRule
  22 + Remark []domain.AssessContemtRemark
  23 + Weight int //权重
  24 + CreatedAt time.Time //数据创建时间
  25 + UpdatedAt time.Time //数据更新时间
  26 + DeletedAt *time.Time
  27 +}
  1 +package repository
  2 +
  3 +import (
  4 + "errors"
  5 + "fmt"
  6 + "time"
  7 +
  8 + "github.com/go-pg/pg/v10"
  9 + pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
  10 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
  11 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/pg/models"
  12 +)
  13 +
  14 +type StaffAssessContentTempRepository struct {
  15 + transactionContext *pgTransaction.TransactionContext
  16 +}
  17 +
  18 +// var _ domain.StaffAssessContentRepository = (*StaffAssessContentTempRepository)(nil)
  19 +
  20 +func NewStaffAssessContentTempRepository(transactionContext *pgTransaction.TransactionContext) *StaffAssessContentTempRepository {
  21 + return &StaffAssessContentTempRepository{transactionContext: transactionContext}
  22 +}
  23 +
  24 +func (repo *StaffAssessContentTempRepository) TransformToDomain(d *models.StaffAssessContent) *domain.StaffAssessContent {
  25 + return &domain.StaffAssessContent{
  26 + Id: d.Id,
  27 + StaffAssessId: d.StaffAssessId,
  28 + SortBy: d.SortBy,
  29 + Category: d.Category,
  30 + Name: d.Name,
  31 + PromptTitle: d.PromptTitle,
  32 + PromptText: d.PromptText,
  33 + Remark: d.Remark,
  34 + Value: d.Value,
  35 + ReteResult: d.ReteResult,
  36 + Rule: d.Rule,
  37 + Weight: d.Weight,
  38 + CreatedAt: d.CreatedAt,
  39 + UpdatedAt: d.UpdatedAt,
  40 + DeletedAt: nil,
  41 + }
  42 +}
  43 +
  44 +func (repo *StaffAssessContentTempRepository) Save(d *domain.StaffAssessContent) (*domain.StaffAssessContent, error) {
  45 + saveModel := models.StaffAssessContent{
  46 + Id: d.Id,
  47 + StaffAssessId: d.StaffAssessId,
  48 + SortBy: d.SortBy,
  49 + Category: d.Category,
  50 + Name: d.Name,
  51 + PromptTitle: d.PromptTitle,
  52 + PromptText: d.PromptText,
  53 + Remark: d.Remark,
  54 + Value: d.Value,
  55 + ReteResult: d.ReteResult,
  56 + Rule: d.Rule,
  57 + CreatedAt: d.CreatedAt,
  58 + UpdatedAt: d.UpdatedAt,
  59 + Weight: d.Weight,
  60 + DeletedAt: nil,
  61 + }
  62 + tx := repo.transactionContext.PgTx
  63 + var err error
  64 + if saveModel.Id == 0 {
  65 + _, err = tx.Model(&saveModel).Insert()
  66 + if err != nil {
  67 + return nil, err
  68 + }
  69 + } else {
  70 + _, err = tx.Model(&saveModel).WherePK().Update()
  71 + if err != nil {
  72 + return nil, err
  73 + }
  74 + }
  75 + d.Id = saveModel.Id
  76 + return d, nil
  77 +}
  78 +
  79 +func (repo *StaffAssessContentTempRepository) Remove(id int) error {
  80 + tx := repo.transactionContext.PgTx
  81 + nowTime := time.Now()
  82 + _, err := tx.Model(&models.StaffAssessContent{}).
  83 + Where("id=?", id).
  84 + Set("deleted_at=?", nowTime).
  85 + Update()
  86 + return err
  87 +}
  88 +
  89 +func (repo *StaffAssessContentTempRepository) FindOne(queryOptions map[string]interface{}) (*domain.StaffAssessContent, error) {
  90 + tx := repo.transactionContext.PgTx
  91 + m := new(models.StaffAssessContent)
  92 + query := tx.Model(m)
  93 + query.Where("deleted_at isnull")
  94 + if id, ok := queryOptions["id"]; ok {
  95 + query.Where("id=?", id)
  96 + }
  97 + if err := query.First(); err != nil {
  98 + if errors.Is(err, pg.ErrNoRows) {
  99 + return nil, fmt.Errorf("没有此资源")
  100 + } else {
  101 + return nil, err
  102 + }
  103 + }
  104 + u := repo.TransformToDomain(m)
  105 + return u, nil
  106 +}
  107 +
  108 +func (repo *StaffAssessContentTempRepository) Find(queryOptions map[string]interface{}) (int, []*domain.StaffAssessContent, error) {
  109 + tx := repo.transactionContext.PgTx
  110 + var m []*models.StaffAssessContent
  111 + query := tx.Model(&m).
  112 + Where("deleted_at isnull")
  113 + if companyId, ok := queryOptions["companyId"]; ok {
  114 + query.Where("company_id = ?", companyId)
  115 + }
  116 + if v, ok := queryOptions["limit"].(int); ok {
  117 + query.Limit(v)
  118 + }
  119 + if v, ok := queryOptions["offset"].(int); ok {
  120 + query.Offset(v)
  121 + }
  122 + if v, ok := queryOptions["staffAssessId"]; ok {
  123 + query.Where("staff_assess_id=?", v)
  124 + }
  125 + count, err := query.SelectAndCount()
  126 + if err != nil {
  127 + return 0, nil, err
  128 + }
  129 + var arrays []*domain.StaffAssessContent
  130 + for _, v := range m {
  131 + d := repo.TransformToDomain(v)
  132 + arrays = append(arrays, d)
  133 + }
  134 + return count, arrays, nil
  135 +}