Bladeren bron

feature:报修反馈详情接口整合流程和处理结果

liuyaqi 3 jaren geleden
bovenliggende
commit
14b013794d

+ 3 - 0
dao/repair/internal/repair_flow.go

@@ -32,6 +32,7 @@ type repairFlowColumns struct {
 	Status        string // 处理结果 1 成功
 	ProcessById   string // 处理人 Id
 	ProcessByName string // 处理人名称
+	ProcessType   string // 处理方式,流程节点为 2 时存在处理方式
 	Note          string // 备注
 	CreatedAt     string // 创建时间
 	UpdatedAt     string // 更新时间
@@ -51,6 +52,7 @@ var (
 			Status:        "Status",
 			ProcessById:   "ProcessById",
 			ProcessByName: "ProcessByName",
+			ProcessType:   "ProcessType",
 			Note:          "Note",
 			CreatedAt:     "CreatedAt",
 			UpdatedAt:     "UpdatedAt",
@@ -72,6 +74,7 @@ func NewRepairFlowDao(tenant string) RepairFlowDao {
 			Status:        "Status",
 			ProcessById:   "ProcessById",
 			ProcessByName: "ProcessByName",
+			ProcessType:   "ProcessType",
 			Note:          "Note",
 			CreatedAt:     "CreatedAt",
 			UpdatedAt:     "UpdatedAt",

+ 2 - 1
model/feedback/internal/feedback_flow.go

@@ -11,11 +11,12 @@ import (
 // FeedbackFlow is the golang structure for table feedback_flow.
 type FeedbackFlow struct {
 	Id            int         `orm:"Id,primary"    json:"id"`            // Id
-	FeedbackId    int         `orm:"FeedbackId"     json:"feebackId"`    // 反馈Id
+	FeedbackId    int         `orm:"FeedbackId"    json:"feedbackId"`    // 反馈Id
 	Type          int         `orm:"Type"          json:"type"`          // 流程节点 1 发起 2 转交 3 处理 4 重新激活
 	Status        int         `orm:"Status"        json:"status"`        // 处理结果 1 成功
 	ProcessById   int         `orm:"ProcessById"   json:"processById"`   // 处理人 Id
 	ProcessByName string      `orm:"ProcessByName" json:"processByName"` // 处理人名称
+	ProcessType   string      `orm:"ProcessType"   json:"processType"`   // 处理方式,流程节点为 2 时存在处理方式
 	Note          string      `orm:"Note"          json:"note"`          // 备注
 	CreatedAt     *gtime.Time `orm:"CreatedAt"     json:"createdAt"`     // 创建时间
 	UpdatedAt     *gtime.Time `orm:"UpdatedAt"     json:"updatedAt"`     // 更新时间

+ 1 - 0
model/repair/internal/repair_flow.go

@@ -16,6 +16,7 @@ type RepairFlow struct {
 	Status        int         `orm:"Status"        json:"status"`        // 处理结果 1 成功
 	ProcessById   int         `orm:"ProcessById"   json:"processById"`   // 处理人 Id
 	ProcessByName string      `orm:"ProcessByName" json:"processByName"` // 处理人名称
+	ProcessType   string      `orm:"ProcessType"   json:"processType"`   // 处理方式,流程节点为 2 时存在处理方式
 	Note          string      `orm:"Note"          json:"note"`          // 备注
 	CreatedAt     *gtime.Time `orm:"CreatedAt"     json:"createdAt"`     // 创建时间
 	UpdatedAt     *gtime.Time `orm:"UpdatedAt"     json:"updatedAt"`     // 更新时间

+ 1 - 0
service/feedback/feedback.go

@@ -245,6 +245,7 @@ func (s FeedbackService) Process(ctx context.Context, req *feedback.FeedbackProc
 		Status:        1,
 		ProcessById:   int(s.userInfo.Id),
 		ProcessByName: s.userInfo.RealName,
+		ProcessType:   req.Type,
 		Note:          "",
 		CreatedAt:     gtime.New(),
 		UpdatedAt:     gtime.New(),

+ 1 - 0
service/repair/repair.go

@@ -245,6 +245,7 @@ func (s RepairService) Process(ctx context.Context, req *repair.RepairProcessReq
 		Status:        1,
 		ProcessById:   int(s.userInfo.Id),
 		ProcessByName: s.userInfo.RealName,
+		ProcessType:   req.Type,
 		Note:          "",
 		CreatedAt:     gtime.New(),
 		UpdatedAt:     gtime.New(),

+ 1 - 0
sql/feedback.sql

@@ -27,6 +27,7 @@ CREATE TABLE `feedback_flow` (
   `Status` int NOT NULL COMMENT '处理结果 1 成功',
   `ProcessById` int NOT NULL COMMENT '处理人 Id',
   `ProcessByName` varchar(255) NOT NULL COMMENT '处理人名称',
+  `ProcessType` varchar(255) COMMENT '处理方式,流程节点为 2 时存在处理方式',
   `Note` text COMMENT '备注',
   `CreatedAt` datetime COMMENT '创建时间',
   `UpdatedAt` datetime COMMENT '更新时间',

+ 1 - 0
sql/repair.sql

@@ -27,6 +27,7 @@ CREATE TABLE `repair_flow` (
   `Status` int NOT NULL COMMENT '处理结果 1 成功',
   `ProcessById` int NOT NULL COMMENT '处理人 Id',
   `ProcessByName` varchar(255) NOT NULL COMMENT '处理人名称',
+  `ProcessType` varchar(255) COMMENT '处理方式,流程节点为 2 时存在处理方式',
   `Note` text COMMENT '备注',
   `CreatedAt` datetime COMMENT '创建时间',
   `UpdatedAt` datetime COMMENT '更新时间',