Browse Source

feature(OMS销售培训申请):后端代码及字段修改

yanglingling 1 year ago
parent
commit
b554c1f1fe

+ 8 - 9
opms_parent/app/model/train/train_sale_apply_summary.go

@@ -31,18 +31,17 @@ type TraSaleApplySummaryRes struct {
 }
 }
 
 
 type TraSaleSupportReq struct {
 type TraSaleSupportReq struct {
-	ApplyId                int         `json:"applyId" v:"required|min:1#|申请ID不能为空"`           // 申请ID
-	WorkOrderId            int         `json:"workOrderId" v:"required|min:1#|关联工单ID不能为空"`     // 关联工单ID
-	FeedbackSupportContent string      `json:"feedbackSupportContent" v:"required#本次支持反馈内容为空"` // 本次支持反馈内容
-	FeedbackSupportTime    *gtime.Time `json:"feedbackSupportTime"`                            // 支持反馈-反馈时间
+	ApplyId                int    `json:"applyId" v:"required|min:1#|申请ID不能为空"`           // 申请ID
+	WorkOrderId            int    `json:"workOrderId" v:"required|min:1#|关联工单ID不能为空"`     // 关联工单ID
+	FeedbackSupportContent string `json:"feedbackSupportContent" v:"required#本次支持反馈内容为空"` // 本次支持反馈内容
+	ExplainDuration        string `json:"explainDuration" v:"required#讲解时长为空"`            // 讲解时长
 }
 }
 
 
 type TraSaleApplySummaryCreateReq struct {
 type TraSaleApplySummaryCreateReq struct {
-	ApplyId         int    `json:"applyId" v:"required|min:1#|申请ID不能为空"` // 申请ID
-	ExplainDuration string `json:"explainDuration" v:"required#讲解时长为空"`  // 讲解时长
-	QuestionRecord  string `json:"questionRecord" v:"required#提问记录为空"`   // 提问记录
-	TrainSummary    string `json:"trainSummary" v:"required#培训效果总结为空"`   // 培训效果总结
-	NextStep        string `json:"nextStep" v:"required#下一步工作计划为空"`      // 下一步工作计划
+	ApplyId        int    `json:"applyId" v:"required|min:1#|申请ID不能为空"` // 申请ID
+	QuestionRecord string `json:"questionRecord" v:"required#提问记录为空"`   // 提问记录
+	TrainSummary   string `json:"trainSummary" v:"required#培训效果总结为空"`   // 培训效果总结
+	NextStep       string `json:"nextStep" v:"required#下一步工作计划为空"`      // 下一步工作计划
 }
 }
 
 
 type TraSaleApplySummaryUpdateReq struct {
 type TraSaleApplySummaryUpdateReq struct {

+ 2 - 2
opms_parent/app/service/train/sale_apply_summary.go

@@ -74,7 +74,7 @@ func (s *SaleApplySummaryService) CreateSupport(ctx context.Context, req *model.
 		} else {
 		} else {
 			_, e = s.Dao.Ctx(ctx).TX(tx).FieldsEx(s.Dao.C.Id, s.Dao.C.CreatedName, s.Dao.C.CreatedBy, s.Dao.C.CreatedTime).
 			_, e = s.Dao.Ctx(ctx).TX(tx).FieldsEx(s.Dao.C.Id, s.Dao.C.CreatedName, s.Dao.C.CreatedBy, s.Dao.C.CreatedTime).
 				Where(s.Dao.C.ApplyId, req.ApplyId).
 				Where(s.Dao.C.ApplyId, req.ApplyId).
-				Data(g.Map{s.Dao.C.ApplyId: req.ApplyId, s.Dao.C.WorkOrderId: req.WorkOrderId, s.Dao.C.FeedbackSupportTime: req.FeedbackSupportTime, s.Dao.C.FeedbackSupportContent: req.FeedbackSupportContent}).Update()
+				Data(g.Map{s.Dao.C.ApplyId: req.ApplyId, s.Dao.C.WorkOrderId: req.WorkOrderId, s.Dao.C.ExplainDuration: req.ExplainDuration, s.Dao.C.FeedbackSupportContent: req.FeedbackSupportContent}).Update()
 			if e != nil {
 			if e != nil {
 				return e
 				return e
 			}
 			}
@@ -116,7 +116,7 @@ func (s *SaleApplySummaryService) Create(ctx context.Context, req *model.TraSale
 		} else {
 		} else {
 			_, e = s.Dao.Ctx(ctx).TX(tx).FieldsEx(s.Dao.C.Id, s.Dao.C.CreatedName, s.Dao.C.CreatedBy, s.Dao.C.CreatedTime).
 			_, e = s.Dao.Ctx(ctx).TX(tx).FieldsEx(s.Dao.C.Id, s.Dao.C.CreatedName, s.Dao.C.CreatedBy, s.Dao.C.CreatedTime).
 				Where(s.Dao.C.ApplyId, req.ApplyId).
 				Where(s.Dao.C.ApplyId, req.ApplyId).
-				Data(g.Map{s.Dao.C.ApplyId: req.ApplyId, s.Dao.C.ExplainDuration: req.ExplainDuration, s.Dao.C.QuestionRecord: req.QuestionRecord, s.Dao.C.TrainSummary: req.TrainSummary, s.Dao.C.NextStep: req.NextStep}).Update()
+				Data(g.Map{s.Dao.C.ApplyId: req.ApplyId, s.Dao.C.QuestionRecord: req.QuestionRecord, s.Dao.C.TrainSummary: req.TrainSummary, s.Dao.C.NextStep: req.NextStep}).Update()
 			if e != nil {
 			if e != nil {
 				return e
 				return e
 			}
 			}

+ 0 - 1
opms_parent/app/service/work/work_order.go

@@ -771,7 +771,6 @@ func (s *OrderService) FeedbackSupport(ctx context.Context, req *model.FeedbackS
 				ApplyId:                ent.TrainSaleApplyId,
 				ApplyId:                ent.TrainSaleApplyId,
 				WorkOrderId:            ent.Id,
 				WorkOrderId:            ent.Id,
 				FeedbackSupportContent: req.FeedbackSupportContent,
 				FeedbackSupportContent: req.FeedbackSupportContent,
-				FeedbackSupportTime:    req.FeedbackSupportTime,
 			})
 			})
 			if err != nil {
 			if err != nil {
 				return err
 				return err