浏览代码

feature: 打卡添加合作伙伴联系人

liuyaqi 2 年之前
父节点
当前提交
b174fcc8e7

+ 23 - 21
opms_parent/app/model/plat/internal/plat_punch_records.go

@@ -10,25 +10,27 @@ import (
 
 // PlatPunchRecords is the golang structure for table plat_punch_records.
 type PlatPunchRecords struct {
-	Id            int         `orm:"id,primary"     json:"id"`            // 主键
-	UserId        int         `orm:"user_id"        json:"userId"`        // 关联用户
-	UserNickName  string      `orm:"user_nick_name" json:"userNickName"`  // 用户昵称
-	UserPostName  string      `orm:"user_post_name" json:"userPostName"`  // 用户岗位
-	UserAvatar    string      `orm:"user_avatar"    json:"userAvatar"`    // 用户头像
-	PunchTime     *gtime.Time `orm:"punch_time"     json:"punchTime"`     // 打卡时间
-	PunchImg      string      `orm:"punch_img"      json:"punchImg"`      // 打卡照片
-	PunchLng      string      `orm:"punch_lng"      json:"punchLng"`      // 经度
-	PunchLat      string      `orm:"punch_lat"      json:"punchLat"`      // 纬度
-	PunchLocation string      `orm:"punch_location" json:"punchLocation"` // 打卡地址
-	Remark        string      `orm:"remark"         json:"remark"`        // 备注
-	CreatedBy     int         `orm:"created_by"     json:"createdBy"`     // 创建者
-	CreatedName   string      `orm:"created_name"   json:"createdName"`   // 创建人
-	CreatedTime   *gtime.Time `orm:"created_time"   json:"createdTime"`   // 创建时间
-	UpdatedBy     int         `orm:"updated_by"     json:"updatedBy"`     // 更新者
-	UpdatedName   string      `orm:"updated_name"   json:"updatedName"`   // 更新人
-	UpdatedTime   *gtime.Time `orm:"updated_time"   json:"updatedTime"`   // 更新时间
-	DeletedTime   *gtime.Time `orm:"deleted_time"   json:"deletedTime"`   // 删除时间
-	PunchType     string      `orm:"punch_type"     json:"punchType"`     // 打卡类型(10居家20客户30经销商40代理商)
-	TargetId      int         `orm:"target_id"      json:"targetId"`      //根据打卡类型选择10居家->不需要录入20客户
-	TargetName    string      `orm:"target_name"    json:"targetName"`    // 根据打卡类型选择
+	Id                 int         `orm:"id,primary"           json:"id"`                 // 主键
+	UserId             int         `orm:"user_id"              json:"userId"`             // 关联用户
+	UserNickName       string      `orm:"user_nick_name"       json:"userNickName"`       // 用户昵称
+	UserPostName       string      `orm:"user_post_name"       json:"userPostName"`       // 用户岗位
+	UserAvatar         string      `orm:"user_avatar"          json:"userAvatar"`         // 用户头像
+	PunchTime          *gtime.Time `orm:"punch_time"           json:"punchTime"`          // 打卡时间
+	PunchImg           string      `orm:"punch_img"            json:"punchImg"`           // 打卡照片
+	PunchLng           string      `orm:"punch_lng"            json:"punchLng"`           // 经度
+	PunchLat           string      `orm:"punch_lat"            json:"punchLat"`           // 纬度
+	PunchLocation      string      `orm:"punch_location"       json:"punchLocation"`      // 打卡地址
+	Remark             string      `orm:"remark"               json:"remark"`             // 备注
+	CreatedBy          int         `orm:"created_by"           json:"createdBy"`          // 创建者
+	CreatedName        string      `orm:"created_name"         json:"createdName"`        // 创建人
+	CreatedTime        *gtime.Time `orm:"created_time"         json:"createdTime"`        // 创建时间
+	UpdatedBy          int         `orm:"updated_by"           json:"updatedBy"`          // 更新者
+	UpdatedName        string      `orm:"updated_name"         json:"updatedName"`        // 更新人
+	UpdatedTime        *gtime.Time `orm:"updated_time"         json:"updatedTime"`        // 更新时间
+	DeletedTime        *gtime.Time `orm:"deleted_time"         json:"deletedTime"`        // 删除时间
+	PunchType          string      `orm:"punch_type"           json:"punchType"`          // 打卡类型(10居家20客户30经销商40代理商)
+	TargetId           int         `orm:"target_id"            json:"targetId"`           // 根据打卡类型选择 10居家->不需要录入 20客户->客户ID 30经销商->经销商ID 40代理商->代理商ID
+	TargetName         string      `orm:"target_name"          json:"targetName"`         // 根据打卡类型选择 10居家->不需要录入 20客户->客户名称 30经销商->经销商名称 40代理商->代理商名称
+	PartnerContactId   int         `orm:"partner_contact_id"   json:"partnerContactId"`   // 合作伙伴联系人id
+	PartnerContactName string      `orm:"partner_contact_name" json:"partnerContactName"` // 合作伙伴联系人
 }

+ 12 - 10
opms_parent/app/model/plat/plat_punch_records.go

@@ -21,16 +21,18 @@ type SearchPunchRecordsReq struct {
 }
 
 type AddPunchRecordsReq struct {
-	UserPostName  string `json:"userPostName"`                           // 用户岗位
-	UserAvatar    string `json:"userAvatar"`                             // 用户头像
-	PunchImg      string `json:"punchImg"         v:"required#打卡照片不能为空"` // 打卡照片
-	PunchLng      string `json:"punchLng"         v:"required#经度不能为空"`   // 经度
-	PunchLat      string `json:"punchLat"         v:"required#纬度不能为空"`   // 纬度
-	PunchLocation string `json:"punchLocation"    v:"required#打卡地址不能为空"` // 打卡地址
-	Remark        string `json:"remark"`                                 // 备注
-	PunchType     string `json:"punchType"`                              // 打卡类型(10居家20客户30经销商40代理商)
-	TargetId      int    `json:"targetId"`                               //根据打卡类型选择10居家->不需要录入20客户
-	TargetName    string `json:"targetName"`                             //根据打卡类型选择10居家->不需要录入20客户
+	UserPostName       string `json:"userPostName"`                           // 用户岗位
+	UserAvatar         string `json:"userAvatar"`                             // 用户头像
+	PunchImg           string `json:"punchImg"         v:"required#打卡照片不能为空"` // 打卡照片
+	PunchLng           string `json:"punchLng"         v:"required#经度不能为空"`   // 经度
+	PunchLat           string `json:"punchLat"         v:"required#纬度不能为空"`   // 纬度
+	PunchLocation      string `json:"punchLocation"    v:"required#打卡地址不能为空"` // 打卡地址
+	Remark             string `json:"remark"`                                 // 备注
+	PunchType          string `json:"punchType"`                              // 打卡类型(10居家20客户30经销商40代理商)
+	TargetId           int    `json:"targetId"`                               //根据打卡类型选择10居家->不需要录入20客户
+	TargetName         string `json:"targetName"`                             //根据打卡类型选择10居家->不需要录入20客户
+	PartnerContactId   int    `json:"partnerContactId"`                       // 合作伙伴联系人id
+	PartnerContactName string `json:"partnerContactName"`                     // 合作伙伴联系人
 }
 
 // 打卡记录详情展示,按日期返回前端结果

+ 2 - 0
opms_parent/schema/tmp.sql

@@ -189,3 +189,5 @@ CREATE TABLE work_order_feedback_trial(
 ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '试用反馈';
 
 alter table work_order_dynamics modify `opn_type` varchar(90) NOT NULL COMMENT '操作类型';
+alter table plat_punch_records add `partner_contact_id` INT(11) COMMENT '合作伙伴联系人id';
+alter table plat_punch_records add `partner_contact_name` varchar(90) COMMENT '合作伙伴联系人';