正在显示
2 个修改的文件
包含
21 行增加
和
2 行删除
@@ -17,7 +17,6 @@ type Chance struct { | @@ -17,7 +17,6 @@ type Chance struct { | ||
17 | CompanyId int64 `orm:"column(company_id)" description:"表company.id 公司编号"` | 17 | CompanyId int64 `orm:"column(company_id)" description:"表company.id 公司编号"` |
18 | AuditTemplateId int64 `orm:"column(audit_template_id)" description:"表audit_template.id 所属审批模板编号"` | 18 | AuditTemplateId int64 `orm:"column(audit_template_id)" description:"表audit_template.id 所属审批模板编号"` |
19 | AuditTemplateConfig string `orm:"column(audit_template_config);size(255);null" description:"模板配置 (存旧的配置信息,对新改动的不影响)"` | 19 | AuditTemplateConfig string `orm:"column(audit_template_config);size(255);null" description:"模板配置 (存旧的配置信息,对新改动的不影响)"` |
20 | - Content string `orm:"column(content)" description:"格式化后的文本内容"` | ||
21 | SourceContent string `orm:"column(source_content)" description:"原始表单内容 json"` | 20 | SourceContent string `orm:"column(source_content)" description:"原始表单内容 json"` |
22 | ViewTotal int `orm:"column(view_total)" description:"查看总数"` | 21 | ViewTotal int `orm:"column(view_total)" description:"查看总数"` |
23 | CommentTotal int `orm:"column(comment_total)" description:"评论总数"` | 22 | CommentTotal int `orm:"column(comment_total)" description:"评论总数"` |
@@ -39,7 +38,7 @@ type Chance struct { | @@ -39,7 +38,7 @@ type Chance struct { | ||
39 | CheckResultStatus int8 ` orm:"column(check_result_status)"` | 38 | CheckResultStatus int8 ` orm:"column(check_result_status)"` |
40 | CheckTime time.Time `orm:"column(check_time);type(timestamp);"` | 39 | CheckTime time.Time `orm:"column(check_time);type(timestamp);"` |
41 | CheckResult string `orm:"column(check_result)" description:"自查内容筛选结果"` | 40 | CheckResult string `orm:"column(check_result)" description:"自查内容筛选结果"` |
42 | - ChanceType int8 `orm:"column(type)" description:"机会类别:0:机会池 1:储备池"` | 41 | + StoreType int8 `orm:"column(type)" description:"机会类别:0:机会池 1:储备池"` |
43 | ReserveTypeId int `orm:"column(reserve_type_id)" description:"储备类型编号"` | 42 | ReserveTypeId int `orm:"column(reserve_type_id)" description:"储备类型编号"` |
44 | } | 43 | } |
45 | 44 | ||
@@ -115,6 +114,17 @@ var CheckResultStatusMap = map[int8]string{ | @@ -115,6 +114,17 @@ var CheckResultStatusMap = map[int8]string{ | ||
115 | CheckResultStatusNOPass: "未通过", | 114 | CheckResultStatusNOPass: "未通过", |
116 | } | 115 | } |
117 | 116 | ||
117 | +// StoreType int8 `orm:"column(type)" description:"机会类别:0:机会池 1:储备池"` | ||
118 | +const ( | ||
119 | + ChanceStoreTypeDefault int8 = 0 | ||
120 | + ChanceStoreTypeReserve int8 = 1 | ||
121 | +) | ||
122 | + | ||
123 | +var ChanceStoreTypeMap = map[int8]string{ | ||
124 | + ChanceStoreTypeDefault: "机会池", | ||
125 | + ChanceStoreTypeReserve: "储备池", | ||
126 | +} | ||
127 | + | ||
118 | //ChanceSelfCheck chance表中SelfChecks字段的json结构 | 128 | //ChanceSelfCheck chance表中SelfChecks字段的json结构 |
119 | type ChanceSelfCheckData struct { | 129 | type ChanceSelfCheckData struct { |
120 | CheckItem string `json:"checkItem"` | 130 | CheckItem string `json:"checkItem"` |
@@ -153,6 +153,8 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | @@ -153,6 +153,8 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | ||
153 | DiscoveryScore string `orm:"column(discovery_score)"` | 153 | DiscoveryScore string `orm:"column(discovery_score)"` |
154 | CommentTotal string `orm:"column(comment_total)"` | 154 | CommentTotal string `orm:"column(comment_total)"` |
155 | Code string `orm:"column(code)"` | 155 | Code string `orm:"column(code)"` |
156 | + StoreType int8 `orm:"column(type)"` | ||
157 | + ReserveTypeId int `orm:"column(reserve_type_id)"` | ||
156 | } | 158 | } |
157 | var ( | 159 | var ( |
158 | datasql = strings.Builder{} | 160 | datasql = strings.Builder{} |
@@ -180,6 +182,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | @@ -180,6 +182,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | ||
180 | s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id | 182 | s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id |
181 | ,a.publish_status,a.create_at,a.review_status,a.status | 183 | ,a.publish_status,a.create_at,a.review_status,a.status |
182 | ,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id | 184 | ,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id |
185 | + ,a.type,a.reserve_type_id | ||
183 | FROM chance AS a | 186 | FROM chance AS a |
184 | JOIN user_company AS c ON c.id = a.user_id | 187 | JOIN user_company AS c ON c.id = a.user_id |
185 | JOIN user AS d ON c.user_id = d.id | 188 | JOIN user AS d ON c.user_id = d.id |
@@ -298,6 +301,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | @@ -298,6 +301,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | ||
298 | CommentTotal: v.CommentTotal, | 301 | CommentTotal: v.CommentTotal, |
299 | UserName: v.NickName, | 302 | UserName: v.NickName, |
300 | CreateTime: 0, | 303 | CreateTime: 0, |
304 | + ReserveType: "", | ||
305 | + StoreType: v.StoreType, | ||
306 | + StoreTypeName: models.ChanceStoreTypeMap[v.StoreType], | ||
301 | } | 307 | } |
302 | t, err := time.ParseInLocation("2006-01-02 15:04:05", v.CreateAt, time.Local) | 308 | t, err := time.ParseInLocation("2006-01-02 15:04:05", v.CreateAt, time.Local) |
303 | if err == nil { | 309 | if err == nil { |
@@ -312,6 +318,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | @@ -312,6 +318,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 | ||
312 | if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil { | 318 | if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil { |
313 | item.TemplateName = tp.Name | 319 | item.TemplateName = tp.Name |
314 | } | 320 | } |
321 | + if rt, err := models.GetChanceReserveTypeById(v.ReserveTypeId); err == nil { | ||
322 | + item.ReserveType = rt.Name | ||
323 | + } | ||
315 | returnData.List = append(returnData.List, item) | 324 | returnData.List = append(returnData.List, item) |
316 | 325 | ||
317 | } | 326 | } |
-
请 注册 或 登录 后发表评论