Browse Source

feat:新增是否加入任务车字段

zhangxinlei1996 1 năm trước cách đây
mục cha
commit
009aa5ace1
4 tập tin đã thay đổi với 8 bổ sung7 xóa
  1. 1 0
      api/common/initconfig.go
  2. 2 2
      service/custom.go
  3. 2 2
      service/sale_chance.go
  4. 3 3
      service/sale_clue.go

+ 1 - 0
api/common/initconfig.go

@@ -14,6 +14,7 @@ import (
 	"bp.jydev.jianyu360.cn/CRM/baseCenter/rpc/basecenter"
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/core/logx"
+	"github.com/zeromicro/go-zero/zrpc"
 )
 
 var configFile = flag.String("fs", "etc/crmapplication.yaml", "the config file")

+ 2 - 2
service/custom.go

@@ -77,7 +77,7 @@ func (this *CustomService) Add(ctx context.Context) int64 {
 		//客户
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.EmployCustomId, this.CustomType, this.CustomAllName, this.CustomAbbreviation, this.Summary, qu.If(this.CustomLevel == 0, nil, this.CustomLevel), this.CustomIndustry, this.CustomDetailIndustry, qu.If(this.Province == "", nil, this.Province), qu.If(this.City == "", nil, this.City), qu.If(this.District == "", nil, this.District), qu.If(this.Address == "", nil, this.Address), qu.If(this.CompanyPhone == "", nil, this.CompanyPhone), qu.If(this.Remarks == "", nil, this.Remarks), this.CreateName, nowtime)
 		//任务
-		argsTask = append(argsTask, this.EntId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 1, nowtime, 1, 0, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 
 		customId = SaveCustom(ctx, args, argsTask, argsTaskTeam, this.EmployInfoId, this.EmployCustomId, this.PositionId, this.CreateName, transferArr)
 		if customId < 0 {
@@ -87,7 +87,7 @@ func (this *CustomService) Add(ctx context.Context) int64 {
 		//客户
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.EmployCustomId, this.CustomType, this.CustomAllName, this.CustomAbbreviation, this.Summary, qu.If(this.CustomLevel == 0, nil, this.CustomLevel), this.CustomIndustry, this.CustomDetailIndustry, qu.If(this.Province == "", nil, this.Province), qu.If(this.City == "", nil, this.City), qu.If(this.District == "", nil, this.District), qu.If(this.Address == "", nil, this.Address), qu.If(this.CompanyPhone == "", nil, this.CompanyPhone), qu.If(this.Remarks == "", nil, this.Remarks), this.CreateName, nowtime)
 		//任务
-		argsTask = append(argsTask, this.EntId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 2, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 2, nowtime, 1, 0, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 		//任务团队
 		argsTaskTeam = append(argsTaskTeam, this.PositionId, this.EntUserId, this.CreateName, 1, nowtime)
 		//存库

+ 2 - 2
service/sale_chance.go

@@ -75,7 +75,7 @@ func (this *SaleChanceService) Add(ctx context.Context) int64 {
 
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.CustomId, this.BusinessType, this.ChanceName, this.Summary, this.ChanceClassify, qu.If(this.ExpectedOrderTime == 0, nil, expect_deal_time), qu.If(this.ExpectedMoney == 0, nil, this.ExpectedMoney), qu.If(this.Remarks == "", nil, this.Remarks), nowtime, this.CreateName)
 		//任务
-		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 1, nowtime, 1, 0, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 
 		chanceId = SaveChange(ctx, args, argsTask, argsTaskTeam, this.EmployInfoId, this.CustomId, this.PositionId, this.BusinessType, this.CreateName, transferArr)
 
@@ -86,7 +86,7 @@ func (this *SaleChanceService) Add(ctx context.Context) int64 {
 		//线索机会
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.CustomId, this.BusinessType, this.ChanceName, this.Summary, this.ChanceClassify, qu.If(this.ExpectedOrderTime == 0, nil, expect_deal_time), qu.If(this.ExpectedMoney == 0, nil, this.ExpectedMoney), qu.If(this.Remarks == "", nil, this.Remarks), nowtime, this.CreateName)
 		//任务
-		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 2, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 2, nowtime, 1, 0, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 		//任务团队
 		argsTaskTeam = append(argsTaskTeam, this.PositionId, this.EntUserId, this.CreateName, 1, nowtime)
 		//存库

+ 3 - 3
service/sale_clue.go

@@ -69,7 +69,7 @@ func (this *SaleClueService) Add(ctx context.Context) int64 {
 		//线索
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.ClueName, this.CluesSource, this.Summary, this.EmployInfoId, 0, nowtime, this.CreateName)
 		//任务
-		argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, 0, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
 		clueId = Save(ctx, args, argsTask, argsTaskTeam, this.EmployInfoId, 0, this.PositionId, this.CreateName, transferArr)
 		if clueId < 0 {
 			return -1
@@ -78,7 +78,7 @@ func (this *SaleClueService) Add(ctx context.Context) int64 {
 		//线索
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.ClueName, this.CluesSource, this.Summary, this.EmployInfoId, 0, time.Now().Format(date.Date_Full_Layout), this.CreateName)
 		//任务
-		argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 2, nowtime, 1, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 2, nowtime, 1, 0, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
 		//任务团队
 		argsTaskTeam = append(argsTaskTeam, this.PositionId, this.EntUserId, this.CreateName, 1, nowtime)
 		//存库
@@ -116,7 +116,7 @@ taskTransferMap 自办的map
 transferArr 转办的用户职位id
 */
 func TaskAdd(tx *sql.Tx, args, taskTeamArgs []interface{}, transferArr []int64, positionId int64) int64 {
-	fields := []string{"ent_id", "name", "source", "create_person", "status", "create_time", "create_way", "next_follow_time", "source_id"}
+	fields := []string{"ent_id", "name", "source", "create_person", "status", "create_time", "create_way", "join_task_vehicle", "next_follow_time", "source_id"}
 	_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.TASK, fields, args)
 	teamId, transferId := int64(0), int64(0)
 	if len(taskTeamArgs) > 0 {