Преглед изворни кода

feature: 新增项目功能优化、跟进记录提报优化

liuyaqi пре 2 година
родитељ
комит
e2611a76c9

+ 6 - 0
opms_parent/app/dao/plat/internal/plat_followup.go

@@ -35,6 +35,8 @@ type platFollowupColumns struct {
 	FollowDate    string // 跟进时间
 	FollowContent string // 跟进内容
 	FurtherPlan   string // 下一步跟进计划和目标
+	Effect        string // 达成效果
+	Issue         string // 问题或困难
 	TargetId      string // 跟进对象ID
 	TargetType    string // 跟进对象类型(10客户,20项目,30合同,40回款)
 	TargetName    string // 跟进对象
@@ -66,6 +68,8 @@ var (
 			FollowDate:    "follow_date",
 			FollowContent: "follow_content",
 			FurtherPlan:   "further_plan",
+			Effect:        "effect",
+			Issue:         "issue",
 			TargetId:      "target_id",
 			TargetType:    "target_type",
 			TargetName:    "target_name",
@@ -99,6 +103,8 @@ func NewPlatFollowupDao(tenant string) PlatFollowupDao {
 			FollowDate:    "follow_date",
 			FollowContent: "follow_content",
 			FurtherPlan:   "further_plan",
+			Effect:        "effect",
+			Issue:         "issue",
 			TargetId:      "target_id",
 			TargetType:    "target_type",
 			TargetName:    "target_name",

+ 2 - 0
opms_parent/app/model/plat/internal/plat_followup.go

@@ -15,6 +15,8 @@ type PlatFollowup struct {
 	FollowDate    *gtime.Time `orm:"follow_date"    json:"followDate"`    // 跟进时间
 	FollowContent string      `orm:"follow_content" json:"followContent"` // 跟进内容
 	FurtherPlan   string      `orm:"further_plan"   json:"furtherPlan"`   // 下一步跟进计划和目标
+	Effect        string      `orm:"effect"         json:"effect"`        // 达成效果
+	Issue         string      `orm:"issue"          json:"issue"`         // 问题或困难
 	TargetId      int         `orm:"target_id"      json:"targetId"`      // 跟进对象ID
 	TargetType    string      `orm:"target_type"    json:"targetType"`    // 跟进对象类型(10客户,20项目,30合同,40回款)
 	TargetName    string      `orm:"target_name"    json:"targetName"`    // 跟进对象

+ 2 - 0
opms_parent/app/model/plat/plat_followup.go

@@ -39,6 +39,8 @@ type AddPlatFollowupReq struct {
 	FollowDate    *gtime.Time               `orm:"follow_date"    json:"followDate"    v:"required#跟进时间不能为空"`                    // 跟进时间
 	FollowContent string                    `orm:"follow_content" json:"followContent" v:"required#跟进内容不能为空"`                    // 跟进内容
 	FurtherPlan   string                    `orm:"further_plan"   json:"furtherPlan" v:"required#下一步跟进计划和目标不能为空"`                // 下一步跟进计划和目标
+	Effect        string                    `orm:"effect"         json:"effect" v:"required#达成效果不能为空"`                           // 达成效果
+	Issue         string                    `orm:"issue"          json:"issue" v:"required#问题或困难不能为空"`                           // 问题或困难
 	TargetId      int                       `orm:"target_id"      json:"targetId"      v:"required|min:1#跟进对象ID不能为空|跟进对象ID不能为空"` // 跟进对象ID
 	TargetType    string                    `orm:"target_type"    json:"targetType"    v:"required#跟进对象类型不能为空"`                  // 跟进对象类型(10客户,20项目,30合同,40回款)
 	TargetName    string                    `orm:"target_name"    json:"targetName"    v:"required#跟进对象不能为空"`                    // 跟进对象

+ 1 - 0
opms_parent/app/model/proj/proj_business.go

@@ -51,6 +51,7 @@ type AddProjBusinessReq struct {
 	SalesModel       string `json:"salesModel"        v:"required|in:10,20,30#销售模式不能为空|销售模式不存在"`            // 销售模式(10直销20经销30代理)
 	DistributorId    int    `json:"distributorId"        v:"required-unless:salesModel,10#经销商/代理商不能为空"`     // 经销商/代理商ID
 	DistributorName  string `json:"distributorName"        v:"required-unless:salesModel,10#经销商/代理商名称不能为空"` // 经销商/代理商名称
+	NboType          string `json:"nboType"`                                                                // 项目级别(A 、B 、C 、成交、储备)
 
 	ProductLine string `json:"productLine"        v:"required#产品线不能为空"` // 产品线
 	IsBig       string `json:"isBig"        v:"required#是否大项目不能为空"`     // 是否大项目

+ 4 - 3
opms_parent/app/service/plat/plat_followup.go

@@ -2,17 +2,18 @@ package plat
 
 import (
 	"context"
+	"database/sql"
+	"strconv"
+	"strings"
+
 	distDao "dashoo.cn/micro/app/dao/base"
 	"dashoo.cn/micro/app/dao/cust"
 	projDao "dashoo.cn/micro/app/dao/proj"
 	"dashoo.cn/opms_libary/myerrors"
-	"database/sql"
 	"github.com/gogf/gf/container/garray"
 	"github.com/gogf/gf/frame/g"
 	"github.com/gogf/gf/os/gtime"
 	"github.com/gogf/gf/util/gconv"
-	"strconv"
-	"strings"
 
 	"dashoo.cn/micro/app/dao/plat"
 	model "dashoo.cn/micro/app/model/plat"

+ 8 - 4
opms_parent/app/service/proj/business.go

@@ -2,6 +2,7 @@ package proj
 
 import (
 	"context"
+
 	contractDao "dashoo.cn/micro/app/dao/contract"
 	custDao "dashoo.cn/micro/app/dao/cust"
 	projDao "dashoo.cn/micro/app/dao/proj"
@@ -11,20 +12,21 @@ import (
 	workflowService "dashoo.cn/micro/app/service/workflow"
 	"dashoo.cn/opms_libary/plugin/dingtalk"
 
+	"fmt"
+	"strconv"
+	"strings"
+
 	"dashoo.cn/micro/app/service"
 	"dashoo.cn/opms_libary/multipart"
 	"dashoo.cn/opms_libary/myerrors"
 	"dashoo.cn/opms_libary/plugin/dingtalk/message"
 	"dashoo.cn/opms_libary/plugin/dingtalk/workflow"
 	"dashoo.cn/opms_libary/utils"
-	"fmt"
 	"github.com/gogf/gf/database/gdb"
 	"github.com/gogf/gf/frame/g"
 	"github.com/gogf/gf/os/gtime"
 	"github.com/gogf/gf/util/gconv"
 	"github.com/shopspring/decimal"
-	"strconv"
-	"strings"
 )
 
 type businessService struct {
@@ -199,7 +201,9 @@ func (p *businessService) Create(req *model.AddProjBusinessReq) (err error) {
 	}
 	business.NboCode = nboCode
 	//business.NboStatus = StatusOK
-	business.NboType = StatusC
+	if business.NboType == "" {
+		business.NboType = StatusC
+	}
 	business.ApproStatus = ApprovalWaiting
 	business.EstTransPrice = totalPrice
 	business.CustProvinceId = customer.CustProvinceId

+ 2 - 0
opms_parent/schema/tmp.sql

@@ -130,3 +130,5 @@ alter table base_distributor add `appro_item` varchar(255) COMMENT '审批项名
 alter table base_distributor add `appro_data` text COMMENT '审核数据' after appro_item;
 alter table base_distributor add `appro_status` varchar(4) COMMENT '审核状态 20 待审核 30 审核已同意 40 审核已拒绝 50 审核已撤销' after appro_data;
 alter table plat_followup add `further_plan` text COMMENT '下一步跟进计划和目标' after follow_content;
+alter table plat_followup add `effect` text COMMENT '达成效果' after further_plan;
+alter table plat_followup add `issue` text COMMENT '问题或困难' after effect;