WH01243 1 жил өмнө
parent
commit
0675a8b085

+ 38 - 23
api/internal/types/types.go

@@ -45,15 +45,14 @@ type SaleChanceReq struct {
 }
 
 type EmployOperateReq struct {
-	AppId      string   `header:"appId,default=10000"`
-	BaseUserId int64    `header:"newUserId"`
-	PositionId int64    `header:"positionId,optional"`
-	EntUserId  int64    `header:"entUserId,optional"`
-	EntId      int64    `header:"entId,optional"`
-	IdArr      []string `json:"idArr"`      //信息id多条信息
-	IsEmploy   bool     `json:"isEmploy"`   //是否收录true收录 false取消收录
-	SourceType int64    `json:"sourceType"` //收录方式类型;1:线索处理 2:机会挖掘 3:任务复盘
-	EmployType int64    `json:"employType"` //来源方式来源;1标采购搜索、2企业搜索、3采购单位搜索、4拟在建项目
+	AppId      string `header:"appId,default=10000"`
+	BaseUserId int64  `header:"newUserId"`
+	PositionId int64  `header:"positionId,optional"`
+	EntUserId  int64  `header:"entUserId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	IdArr      string `json:"idArr"`      //信息id多条信息
+	IsEmploy   bool   `json:"isEmploy"`   //是否收录true收录 false取消收录
+	EmployType int64  `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
 }
 
 type TransferReq struct {
@@ -67,23 +66,24 @@ type TransferReq struct {
 }
 
 type IgnoreOperateReq struct {
-	AppId       string   `header:"appId,default=10000"`
-	BaseUserId  int64    `header:"newUserId"`
-	PositionId  int64    `header:"positionId,optional"`
-	EntUserId   int64    `header:"entUserId,optional"`
-	EntId       int64    `header:"entId,optional"`
-	EmployIdArr []string `json:"employIdArr"` //收录记录集合
-	IsEmploy    bool     `json:"isEmploy"`    //是否忽略 true 忽略 false取消忽略
+	AppId      string `header:"appId,default=10000"`
+	BaseUserId int64  `header:"newUserId"`
+	PositionId int64  `header:"positionId,optional"`
+	EntUserId  int64  `header:"entUserId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	IdArr      string `json:"idArr"`      //收录记录集合
+	IsIgnore   bool   `json:"isIgnore"`   //是否忽略 true 忽略 false取消忽略
+	EmployType int64  `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
 }
 
 type InfoEmployinfoReq struct {
-	AppId      string   `header:"appId,default=10000"`
-	BaseUserId int64    `header:"newUserId"`
-	PositionId int64    `header:"positionId,optional"`
-	EntUserId  int64    `header:"entUserId,optional"`
-	EntId      int64    `header:"entId,optional"`
-	EmployType int64    `json:"employType"` //1标采购搜索、2企业搜索、3采购单位搜索、4拟在建项目
-	Id         []string `json:"id"`         //id
+	AppId      string `header:"appId,default=10000"`
+	BaseUserId int64  `header:"newUserId"`
+	PositionId int64  `header:"positionId,optional"`
+	EntUserId  int64  `header:"entUserId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	EmployType int64  `json:"employType"` //1标采购、2企业、3采购单位、4拟在建项目
+	IdArr      string `json:"idArr"`      //id
 }
 
 type CustomAddReq struct {
@@ -115,3 +115,18 @@ type CustomAddReq struct {
 
 type FileUploadReq struct {
 }
+
+type EmployDistributeReq struct {
+	AppId       string             `header:"appId,default=10000"`
+	BaseUserId  int64              `header:"newUserId"`
+	PositionId  int64              `header:"positionId,optional"`
+	EntUserId   int64              `header:"entUserId,optional"`
+	EntId       int64              `header:"entId,optional"`
+	EmployIdArr string             `json:"employIdArr"`
+	Person      []DistributePerson `json:"person"`
+}
+
+type DistributePerson struct {
+	PositionId int64 `json:"positionId"`
+	EntUserId  int64 `json:"entUserId"`
+}

+ 9 - 0
api/service/EmployService.go

@@ -219,6 +219,15 @@ func InfoFind(id string, employType int64) map[string]interface{} {
 			data["bidamount"] = obj["bidamount"]
 			data["annex"] = 0
 			//类型处理
+			toptype := common.InterfaceToStr(obj["toptype"])
+			switch toptype {
+			case "采购意向", "预告", "招标":
+				data["type"] = 2
+			case "其他", "结果":
+				data["type"] = 3
+			default:
+				data["type"] = 1
+			}
 			//data["type"] = in.SourceType
 			if obj["projectinfo"] != nil {
 				projectinfo := common.ObjToMap(obj["projectinfo"])