| | |
| | | package v1
|
| | |
|
| | | import (
|
| | | "aps_crm/model"
|
| | | "aps_crm/model/request"
|
| | | "aps_crm/model/response"
|
| | | "aps_crm/pkg/contextx"
|
| | | "aps_crm/pkg/ecode"
|
| | | "github.com/gin-gonic/gin"
|
| | | )
|
| | |
|
| | | type ServiceFollowupApi struct{}
|
| | |
|
| | | // Add
|
| | | //
|
| | | // @Tags ServiceFollowup
|
| | | // @Summary 添加服务跟进
|
| | | // @Produce application/json
|
| | | // @Param object body request.AddServiceFollowup true "查询参数"
|
| | | // @Success 200 {object} contextx.Response{}
|
| | | // @Router /api/serviceFollowup/add [post]
|
| | | func (s *ServiceFollowupApi) Add(c *gin.Context) {
|
| | | var params request.AddServiceFollowup
|
| | | ctx, ok := contextx.NewContext(c, ¶ms)
|
| | | if !ok {
|
| | | return
|
| | | }
|
| | |
|
| | | errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup)
|
| | | if errCode != ecode.OK {
|
| | | ctx.Fail(errCode)
|
| | | return
|
| | | }
|
| | |
|
| | | errCode = serviceFollowupService.AddServiceFollowup(&serviceFollowup)
|
| | | if errCode != ecode.OK {
|
| | | ctx.Fail(errCode)
|
| | | return
|
| | | }
|
| | |
|
| | | ctx.Ok()
|
| | | }
|
| | |
|
| | | // Delete
|
| | | //
|
| | | // @Tags ServiceFollowup
|
| | | // @Summary 删除服务跟进
|
| | | // @Produce application/json
|
| | | // @Param object body request.DeleteServiceFollowup true "查询参数"
|
| | | // @Success 200 {object} contextx.Response{}
|
| | | // @Router /api/serviceFollowup/delete [delete]
|
| | | func (s *ServiceFollowupApi) Delete(c *gin.Context) {
|
| | | var params request.DeleteServiceFollowup
|
| | | ctx, ok := contextx.NewContext(c, ¶ms)
|
| | | if !ok {
|
| | | return
|
| | | }
|
| | |
|
| | | errCode := serviceFollowupService.DeleteServiceFollowup(params.Ids)
|
| | | if errCode != ecode.OK {
|
| | | ctx.Fail(errCode)
|
| | | return
|
| | | }
|
| | |
|
| | | ctx.Ok()
|
| | | }
|
| | |
|
| | | // Update
|
| | | //
|
| | | // @Tags ServiceFollowup
|
| | | // @Summary 更新服务跟进
|
| | | // @Produce application/json
|
| | | // @Param object body request.UpdateServiceFollowup true "查询参数"
|
| | | // @Success 200 {object} contextx.Response{}
|
| | | // @Router /api/serviceFollowup/update [put]
|
| | | func (s *ServiceFollowupApi) Update(c *gin.Context) {
|
| | | var params request.UpdateServiceFollowup
|
| | | ctx, ok := contextx.NewContext(c, ¶ms)
|
| | | if !ok {
|
| | | return
|
| | | }
|
| | |
|
| | | errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup)
|
| | | if errCode != ecode.OK {
|
| | | ctx.Fail(errCode)
|
| | | return
|
| | | }
|
| | |
|
| | | serviceFollowup.Id = params.Id
|
| | |
|
| | | errCode = serviceFollowupService.UpdateServiceFollowup(&serviceFollowup)
|
| | | if errCode != ecode.OK {
|
| | | ctx.Fail(errCode)
|
| | | return
|
| | | }
|
| | |
|
| | | ctx.Ok()
|
| | | }
|
| | |
|
| | | // checkServiceFollowupParams
|
| | | func checkServiceFollowupParams(serviceFollowup request.ServiceFollowup) (errCode int, serviceFollowupModel model.ServiceFollowup) {
|
| | | //if serviceFollowup.Number == "" {
|
| | | // return ecode.InvalidParams, serviceFollowupModel
|
| | | //}
|
| | | //
|
| | | //if serviceFollowup.MemberId == 0 {
|
| | | // return ecode.InvalidParams, serviceFollowupModel
|
| | | //}
|
| | |
|
| | | serviceFollowupModel = model.ServiceFollowup{
|
| | | ClientId: serviceFollowup.ClientId,
|
| | | Number: serviceFollowup.Number,
|
| | | ContactId: serviceFollowup.ContactId,
|
| | | ServiceId: serviceFollowup.ServiceId,
|
| | | MemberId: serviceFollowup.MemberId,
|
| | | PlanId: serviceFollowup.PlanId,
|
| | | SatisfactionId: serviceFollowup.Satisfaction,
|
| | | TimelyRateId: serviceFollowup.TimelyRate,
|
| | | SolveRateId: serviceFollowup.SolveRate,
|
| | | IsVisitId: serviceFollowup.IsVisit,
|
| | | OldMemberId: serviceFollowup.OldMemberId,
|
| | | Remark: serviceFollowup.Remark,
|
| | | File: serviceFollowup.File,
|
| | | }
|
| | |
|
| | | return ecode.OK, serviceFollowupModel
|
| | | }
|
| | |
|
| | | // List
|
| | | //
|
| | | // @Tags ServiceFollowup
|
| | | // @Summary 回访单管理列表
|
| | | // @Produce application/json
|
| | | // @Param object body request.GetServiceFollowupList true "参数"
|
| | | // @Success 200 {object} contextx.Response{data=response.ServiceFollowupResponse}
|
| | | // @Router /api/serviceFollowup/list [post]
|
| | | func (con *ServiceFollowupApi) List(c *gin.Context) {
|
| | | var params request.GetServiceFollowupList
|
| | | ctx, ok := contextx.NewContext(c, ¶ms)
|
| | | if !ok {
|
| | | return
|
| | | }
|
| | |
|
| | | serviceFollowups, total, errCode := serviceFollowupService.GetServiceFollowupList(params.Page, params.PageSize, params.KeywordType, params.Keyword, params.ServiceOrderId)
|
| | | if errCode != ecode.OK {
|
| | | ctx.Fail(errCode)
|
| | | return
|
| | | }
|
| | |
|
| | | ctx.OkWithDetailed(response.ServiceFollowupResponse{
|
| | | List: serviceFollowups,
|
| | | Count: int(total),
|
| | | })
|
| | | }
|
| | | package v1 |
| | | |
| | | import ( |
| | | "aps_crm/model" |
| | | "aps_crm/model/request" |
| | | "aps_crm/model/response" |
| | | "aps_crm/pkg/contextx" |
| | | "aps_crm/pkg/ecode" |
| | | "github.com/gin-gonic/gin" |
| | | ) |
| | | |
| | | type ServiceFollowupApi struct{} |
| | | |
| | | // Add |
| | | // |
| | | // @Tags ServiceFollowup |
| | | // @Summary 添加服务跟进 |
| | | // @Produce application/json |
| | | // @Param object body request.AddServiceFollowup true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Router /api/serviceFollowup/add [post] |
| | | func (s *ServiceFollowupApi) Add(c *gin.Context) { |
| | | var params request.AddServiceFollowup |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | errCode = serviceFollowupService.AddServiceFollowup(&serviceFollowup) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | ctx.Ok() |
| | | } |
| | | |
| | | // Delete |
| | | // |
| | | // @Tags ServiceFollowup |
| | | // @Summary 删除服务跟进 |
| | | // @Produce application/json |
| | | // @Param object body request.DeleteServiceFollowup true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Router /api/serviceFollowup/delete [delete] |
| | | func (s *ServiceFollowupApi) Delete(c *gin.Context) { |
| | | var params request.DeleteServiceFollowup |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | errCode := serviceFollowupService.DeleteServiceFollowup(params.Ids) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | ctx.Ok() |
| | | } |
| | | |
| | | // Update |
| | | // |
| | | // @Tags ServiceFollowup |
| | | // @Summary 更新服务跟进 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateServiceFollowup true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Router /api/serviceFollowup/update [put] |
| | | func (s *ServiceFollowupApi) Update(c *gin.Context) { |
| | | var params request.UpdateServiceFollowup |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | serviceFollowup.Id = params.Id |
| | | |
| | | errCode = serviceFollowupService.UpdateServiceFollowup(&serviceFollowup) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | ctx.Ok() |
| | | } |
| | | |
| | | // checkServiceFollowupParams |
| | | func checkServiceFollowupParams(serviceFollowup request.ServiceFollowup) (errCode int, serviceFollowupModel model.ServiceFollowup) { |
| | | //if serviceFollowup.Number == "" { |
| | | // return ecode.InvalidParams, serviceFollowupModel |
| | | //} |
| | | // |
| | | //if serviceFollowup.MemberId == 0 { |
| | | // return ecode.InvalidParams, serviceFollowupModel |
| | | //} |
| | | |
| | | serviceFollowupModel = model.ServiceFollowup{ |
| | | ClientId: serviceFollowup.ClientId, |
| | | Number: serviceFollowup.Number, |
| | | ContactId: serviceFollowup.ContactId, |
| | | ServiceOrderId: serviceFollowup.ServiceOrderId, |
| | | MemberId: serviceFollowup.MemberId, |
| | | PlanId: serviceFollowup.PlanId, |
| | | SatisfactionId: serviceFollowup.Satisfaction, |
| | | TimelyRateId: serviceFollowup.TimelyRate, |
| | | SolveRateId: serviceFollowup.SolveRate, |
| | | IsVisitId: serviceFollowup.IsVisit, |
| | | OldMemberId: serviceFollowup.OldMemberId, |
| | | Remark: serviceFollowup.Remark, |
| | | File: serviceFollowup.File, |
| | | } |
| | | |
| | | return ecode.OK, serviceFollowupModel |
| | | } |
| | | |
| | | // List |
| | | // |
| | | // @Tags ServiceFollowup |
| | | // @Summary 回访单管理列表 |
| | | // @Produce application/json |
| | | // @Param object body request.GetServiceFollowupList true "参数" |
| | | // @Success 200 {object} contextx.Response{data=response.ServiceFollowupResponse} |
| | | // @Router /api/serviceFollowup/list [post] |
| | | func (con *ServiceFollowupApi) List(c *gin.Context) { |
| | | var params request.GetServiceFollowupList |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | serviceFollowups, total, errCode := serviceFollowupService.GetServiceFollowupList(params.Page, params.PageSize, params.KeywordType, params.Keyword, params.ServiceOrderId) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | ctx.OkWithDetailed(response.ServiceFollowupResponse{ |
| | | List: serviceFollowups, |
| | | Count: int(total), |
| | | }) |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "model.CustomerServiceSheet": { |
| | | "type": "object", |
| | | "properties": { |
| | | "handleStatus": { |
| | | "type": "integer" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "memberId": { |
| | | "type": "integer" |
| | | }, |
| | | "number": { |
| | | "type": "string" |
| | | }, |
| | | "priority": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceFollowupId": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceMode": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "model.Department": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | "contactId": { |
| | | "type": "integer" |
| | | }, |
| | | "customerServiceSheet": { |
| | | "$ref": "#/definitions/model.CustomerServiceSheet" |
| | | }, |
| | | "file": { |
| | | "type": "string" |
| | | }, |
| | |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "orderManage": { |
| | | "$ref": "#/definitions/model.OrderManage" |
| | | }, |
| | | "priorityLevel": { |
| | | "$ref": "#/definitions/model.PriorityLevel" |
| | |
| | | "satisfaction": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceId": { |
| | | "serviceOrderId": { |
| | | "type": "integer" |
| | | }, |
| | | "solveRate": { |
| | |
| | | "description": "联系人id", |
| | | "type": "integer" |
| | | }, |
| | | "contractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "expectTime": { |
| | | "description": "希望处理时间", |
| | | "type": "string" |
| | |
| | | }, |
| | | "faultTypeId": { |
| | | "description": "故障类别id", |
| | | "type": "integer" |
| | | }, |
| | | "orderId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "priorityLevelId": { |
| | |
| | | }, |
| | | "saleChanceId": { |
| | | "description": "销售机会id", |
| | | "type": "integer" |
| | | }, |
| | | "salesDetailsId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceContractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceManId": { |
| | |
| | | "satisfaction": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceId": { |
| | | "serviceOrderId": { |
| | | "type": "integer" |
| | | }, |
| | | "solveRate": { |
| | |
| | | "description": "联系人id", |
| | | "type": "integer" |
| | | }, |
| | | "contractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "expectTime": { |
| | | "description": "希望处理时间", |
| | | "type": "string" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "orderId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "priorityLevelId": { |
| | |
| | | "description": "销售机会id", |
| | | "type": "integer" |
| | | }, |
| | | "salesDetailsId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceContractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceManId": { |
| | | "description": "服务人员", |
| | | "type": "integer" |
| | |
| | | } |
| | | } |
| | | }, |
| | | "model.CustomerServiceSheet": { |
| | | "type": "object", |
| | | "properties": { |
| | | "handleStatus": { |
| | | "type": "integer" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "memberId": { |
| | | "type": "integer" |
| | | }, |
| | | "number": { |
| | | "type": "string" |
| | | }, |
| | | "priority": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceFollowupId": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceMode": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "model.Department": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | "contactId": { |
| | | "type": "integer" |
| | | }, |
| | | "customerServiceSheet": { |
| | | "$ref": "#/definitions/model.CustomerServiceSheet" |
| | | }, |
| | | "file": { |
| | | "type": "string" |
| | | }, |
| | |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "orderManage": { |
| | | "$ref": "#/definitions/model.OrderManage" |
| | | }, |
| | | "priorityLevel": { |
| | | "$ref": "#/definitions/model.PriorityLevel" |
| | |
| | | "satisfaction": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceId": { |
| | | "serviceOrderId": { |
| | | "type": "integer" |
| | | }, |
| | | "solveRate": { |
| | |
| | | "description": "联系人id", |
| | | "type": "integer" |
| | | }, |
| | | "contractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "expectTime": { |
| | | "description": "希望处理时间", |
| | | "type": "string" |
| | |
| | | }, |
| | | "faultTypeId": { |
| | | "description": "故障类别id", |
| | | "type": "integer" |
| | | }, |
| | | "orderId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "priorityLevelId": { |
| | |
| | | }, |
| | | "saleChanceId": { |
| | | "description": "销售机会id", |
| | | "type": "integer" |
| | | }, |
| | | "salesDetailsId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceContractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceManId": { |
| | |
| | | "satisfaction": { |
| | | "type": "integer" |
| | | }, |
| | | "serviceId": { |
| | | "serviceOrderId": { |
| | | "type": "integer" |
| | | }, |
| | | "solveRate": { |
| | |
| | | "description": "联系人id", |
| | | "type": "integer" |
| | | }, |
| | | "contractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "expectTime": { |
| | | "description": "希望处理时间", |
| | | "type": "string" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "orderId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "priorityLevelId": { |
| | |
| | | "description": "销售机会id", |
| | | "type": "integer" |
| | | }, |
| | | "salesDetailsId": { |
| | | "description": "销售订单id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceContractId": { |
| | | "description": "合同id", |
| | | "type": "integer" |
| | | }, |
| | | "serviceManId": { |
| | | "description": "服务人员", |
| | | "type": "integer" |
| | |
| | | name: |
| | | type: string |
| | | type: object |
| | | model.CustomerServiceSheet: |
| | | properties: |
| | | handleStatus: |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | memberId: |
| | | type: integer |
| | | number: |
| | | type: string |
| | | priority: |
| | | type: integer |
| | | serviceFollowupId: |
| | | type: integer |
| | | serviceMode: |
| | | type: integer |
| | | type: object |
| | | model.Department: |
| | | properties: |
| | | id: |
| | |
| | | $ref: '#/definitions/model.Contact' |
| | | contactId: |
| | | type: integer |
| | | customerServiceSheet: |
| | | $ref: '#/definitions/model.CustomerServiceSheet' |
| | | file: |
| | | type: string |
| | | id: |
| | |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | orderManage: |
| | | $ref: '#/definitions/model.OrderManage' |
| | | priorityLevel: |
| | | $ref: '#/definitions/model.PriorityLevel' |
| | | priorityLevelId: |
| | |
| | | type: string |
| | | satisfaction: |
| | | type: integer |
| | | serviceId: |
| | | serviceOrderId: |
| | | type: integer |
| | | solveRate: |
| | | type: integer |
| | |
| | | contactId: |
| | | description: 联系人id |
| | | type: integer |
| | | contractId: |
| | | description: 合同id |
| | | type: integer |
| | | expectTime: |
| | | description: 希望处理时间 |
| | | type: string |
| | |
| | | type: integer |
| | | faultTypeId: |
| | | description: 故障类别id |
| | | type: integer |
| | | orderId: |
| | | description: 销售订单id |
| | | type: integer |
| | | priorityLevelId: |
| | | description: 优先级别id |
| | |
| | | type: string |
| | | saleChanceId: |
| | | description: 销售机会id |
| | | type: integer |
| | | salesDetailsId: |
| | | description: 销售订单id |
| | | type: integer |
| | | serviceContractId: |
| | | description: 合同id |
| | | type: integer |
| | | serviceManId: |
| | | description: 服务人员 |
| | |
| | | type: string |
| | | satisfaction: |
| | | type: integer |
| | | serviceId: |
| | | serviceOrderId: |
| | | type: integer |
| | | solveRate: |
| | | type: integer |
| | |
| | | contactId: |
| | | description: 联系人id |
| | | type: integer |
| | | contractId: |
| | | description: 合同id |
| | | type: integer |
| | | expectTime: |
| | | description: 希望处理时间 |
| | | type: string |
| | |
| | | description: 故障类别id |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | orderId: |
| | | description: 销售订单id |
| | | type: integer |
| | | priorityLevelId: |
| | | description: 优先级别id |
| | |
| | | saleChanceId: |
| | | description: 销售机会id |
| | | type: integer |
| | | salesDetailsId: |
| | | description: 销售订单id |
| | | type: integer |
| | | serviceContractId: |
| | | description: 合同id |
| | | type: integer |
| | | serviceManId: |
| | | description: 服务人员 |
| | | type: integer |
| | |
| | | package request
|
| | |
|
| | | import "aps_crm/constvar"
|
| | |
|
| | | type AddServiceFollowup struct {
|
| | | ServiceFollowup
|
| | | }
|
| | |
|
| | | type ServiceFollowup struct {
|
| | | ClientId int `json:"clientId"`
|
| | | Number string `json:"number"`
|
| | | ContactId int `json:"contactId"`
|
| | | ServiceId int `json:"serviceId"`
|
| | | MemberId int `json:"memberId"`
|
| | | PlanId int `json:"planId"`
|
| | | Satisfaction int `json:"satisfaction"`
|
| | | TimelyRate int `json:"timelyRate"`
|
| | | SolveRate int `json:"solveRate"`
|
| | | IsVisit int `json:"isVisit"`
|
| | | OldMemberId int `json:"oldMemberId"`
|
| | | Remark string `json:"remark"`
|
| | | File string `json:"file"`
|
| | | }
|
| | |
|
| | | type UpdateServiceFollowup struct {
|
| | | Id int `json:"id"`
|
| | | ServiceFollowup
|
| | | }
|
| | |
|
| | | type GetServiceFollowupList struct {
|
| | | PageInfo
|
| | | KeywordType constvar.ServiceFollowupKeywordType `json:"keywordType"`
|
| | | Keyword string `json:"keyword"`
|
| | | ServiceOrderId int `json:"serviceOrderId"` //服务回访单id
|
| | | }
|
| | |
|
| | | type DeleteServiceFollowup struct {
|
| | | Ids []int `json:"ids"`
|
| | | }
|
| | | package request |
| | | |
| | | import "aps_crm/constvar" |
| | | |
| | | type AddServiceFollowup struct { |
| | | ServiceFollowup |
| | | } |
| | | |
| | | type ServiceFollowup struct { |
| | | ClientId int `json:"clientId"` |
| | | Number string `json:"number"` |
| | | ContactId int `json:"contactId"` |
| | | ServiceOrderId int `json:"serviceOrderId"` |
| | | MemberId int `json:"memberId"` |
| | | PlanId int `json:"planId"` |
| | | Satisfaction int `json:"satisfaction"` |
| | | TimelyRate int `json:"timelyRate"` |
| | | SolveRate int `json:"solveRate"` |
| | | IsVisit int `json:"isVisit"` |
| | | OldMemberId int `json:"oldMemberId"` |
| | | Remark string `json:"remark"` |
| | | File string `json:"file"` |
| | | } |
| | | |
| | | type UpdateServiceFollowup struct { |
| | | Id int `json:"id"` |
| | | ServiceFollowup |
| | | } |
| | | |
| | | type GetServiceFollowupList struct { |
| | | PageInfo |
| | | KeywordType constvar.ServiceFollowupKeywordType `json:"keywordType"` |
| | | Keyword string `json:"keyword"` |
| | | ServiceOrderId int `json:"serviceOrderId"` //服务回访单id |
| | | } |
| | | |
| | | type DeleteServiceFollowup struct { |
| | | Ids []int `json:"ids"` |
| | | } |
| | |
| | | type AddServiceOrder struct { |
| | | ServiceNumber string `gorm:"service_number" json:"serviceNumber"` // 服务单编号 |
| | | ClientId int `gorm:"client_id" json:"clientId"` // 客户id |
| | | ContractId int `gorm:"contract_id" json:"contractId"` // 合同id |
| | | OrderId int `gorm:"order_id" json:"orderId"` // 销售订单id |
| | | ServiceContractId int `gorm:"service_contract_id" json:"serviceContractId"` // 合同id |
| | | SalesDetailsId int `gorm:"sales_details_id" json:"salesDetailsId"` // 销售订单id |
| | | Subject string `gorm:"subject" json:"subject"` // 主题 |
| | | ProductId int `gorm:"product_id" json:"productId"` // 产品id |
| | | ServiceTypeId int `gorm:"service_type_id" json:"serviceTypeId"` // 服务方式id |
| | |
| | | |
| | | type ( |
| | | ServiceFollowup struct { |
| | | Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` |
| | | ClientId int `json:"clientId" gorm:"column:client_id;type:int;comment:客户id"` |
| | | Client Client `json:"client" gorm:"foreignKey:ClientId"` |
| | | Number string `json:"number" gorm:"column:number;type:varchar(255);comment:合同编号"` |
| | | ContactId int `json:"contactId" gorm:"column:contact_id;type:int;comment:联系人id"` |
| | | Contact Contact `json:"contact" gorm:"foreignKey:ContactId"` |
| | | ServiceOrderId int `json:"serviceOrderId" gorm:"column:service_order_id;type:int;comment:客户服务单id"` |
| | | ServiceOrder ServiceOrder `gorm:"foreignKey:ServiceId"` |
| | | CustomerServiceSheet CustomerServiceSheet `json:"customerServiceSheet" gorm:"foreignKey:ServiceId"` |
| | | MemberId int `json:"memberId" gorm:"column:member_id;type:int;comment:服务人员id"` |
| | | Member User `json:"Member" gorm:"foreignKey:MemberId"` |
| | | PlanId int `json:"planId" gorm:"column:plan_id;type:int;comment:服务计划id"` |
| | | SatisfactionId int `json:"satisfactionId" gorm:"column:satisfaction_id;type:int;comment:满意度id"` |
| | | Satisfaction Satisfaction `json:"satisfaction" gorm:"foreignKey:SatisfactionId"` |
| | | TimelyRateId int `json:"timelyRateId" gorm:"column:timely_rate_id;type:int;comment:及时率id"` |
| | | TimelyRate TimelyRate `json:"timelyRate" gorm:"foreignKey:TimelyRateId"` |
| | | SolveRateId int `json:"solveRateId" gorm:"column:solve_rate_id;type:int;comment:解决率id"` |
| | | SolveRate SolveRate `json:"solveRate" gorm:"foreignKey:SolveRateId"` |
| | | IsVisitId int `json:"isVisitId" gorm:"column:is_visit_id;type:int;comment:服务人员是否来过id"` |
| | | IsVisit IsVisit `json:"isVisit" gorm:"foreignKey:IsVisitId"` |
| | | OldMemberId int `json:"oldMemberId" gorm:"column:old_member_id;type:int;comment:原服务人员"` |
| | | OldMember User `json:"oldMember" gorm:"foreignKey:OldMemberId"` |
| | | Remark string `json:"remark" gorm:"column:remark;type:text;comment:备注"` |
| | | File string `json:"file" gorm:"column:file;type:varchar(255);comment:附件"` |
| | | Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` |
| | | ClientId int `json:"clientId" gorm:"column:client_id;type:int;comment:客户id"` |
| | | Client Client `json:"client" gorm:"foreignKey:ClientId"` |
| | | Number string `json:"number" gorm:"column:number;type:varchar(255);comment:合同编号"` |
| | | ContactId int `json:"contactId" gorm:"column:contact_id;type:int;comment:联系人id"` |
| | | Contact Contact `json:"contact" gorm:"foreignKey:ContactId"` |
| | | ServiceOrderId int `json:"serviceOrderId" gorm:"column:service_order_id;type:int;comment:客户服务单id"` |
| | | ServiceOrder ServiceOrder `gorm:"foreignKey:ServiceOrderId"` |
| | | MemberId int `json:"memberId" gorm:"column:member_id;type:int;comment:服务人员id"` |
| | | Member User `json:"Member" gorm:"foreignKey:MemberId"` |
| | | PlanId int `json:"planId" gorm:"column:plan_id;type:int;comment:服务计划id"` |
| | | SatisfactionId int `json:"satisfactionId" gorm:"column:satisfaction_id;type:int;comment:满意度id"` |
| | | Satisfaction Satisfaction `json:"satisfaction" gorm:"foreignKey:SatisfactionId"` |
| | | TimelyRateId int `json:"timelyRateId" gorm:"column:timely_rate_id;type:int;comment:及时率id"` |
| | | TimelyRate TimelyRate `json:"timelyRate" gorm:"foreignKey:TimelyRateId"` |
| | | SolveRateId int `json:"solveRateId" gorm:"column:solve_rate_id;type:int;comment:解决率id"` |
| | | SolveRate SolveRate `json:"solveRate" gorm:"foreignKey:SolveRateId"` |
| | | IsVisitId int `json:"isVisitId" gorm:"column:is_visit_id;type:int;comment:服务人员是否来过id"` |
| | | IsVisit IsVisit `json:"isVisit" gorm:"foreignKey:IsVisitId"` |
| | | OldMemberId int `json:"oldMemberId" gorm:"column:old_member_id;type:int;comment:原服务人员"` |
| | | OldMember User `json:"oldMember" gorm:"foreignKey:OldMemberId"` |
| | | Remark string `json:"remark" gorm:"column:remark;type:text;comment:备注"` |
| | | File string `json:"file" gorm:"column:file;type:varchar(255);comment:附件"` |
| | | |
| | | gorm.Model `json:"-"` |
| | | } |
| | |
| | | ServiceContract ServiceContract `gorm:"foreignKey:ServiceContractId"` |
| | | SalesDetailsId int `gorm:"column:order_id;type:int;not null;default:0;comment:销售订单id" json:"salesDetailsId"` // 销售明细id |
| | | SalesDetails SalesDetails `gorm:"foreignKey:SalesDetailsId"` |
| | | OrderManage OrderManage `gorm:"foreignKey:OrderId"` |
| | | Subject string `gorm:"column:subject;type:varchar(255);not null;default:'';comment:主题" json:"subject"` // 主题 |
| | | ProductId int `gorm:"column:product_id;type:int;not null;default:0;comment:产品id" json:"productId"` // 产品id |
| | | Product Product `gorm:"foreignKey:ProductId"` |