WH01243 11 сар өмнө
parent
commit
84c754b3cb

+ 0 - 1
clueSync/job.go

@@ -269,7 +269,6 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 			if batch_import != "" && item == "users" { //有导入批次号还是新用户,不执行
 				return true, true
 			}
-			//oks = UpdateClue(*uCount, saleData, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, level, position_id, source, sourceCode, remark, keyword, belong_to, isGroup, isCommerce, pIsOk, "")
 			oks = UpdateClue(*uCount, saleData, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, level, position_id, source, sourceCode, remark, keyword, belong_to, isGroup, isCommerce, pIsOk)
 		} else { //不存在走新增
 			oks = SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, position_id, source, sourceCode, remark, keyword, belong_to, isGroup, isCommerce, isFreeze, "")

+ 3 - 1
clueSync/jobutil.go

@@ -1159,10 +1159,12 @@ func autoDraw(mode, cluename, phone string, isGroup, isCommerce int) (positionId
 					positionId = common.Int64All((*cdata)[0]["position_id"])
 					noticePositionId = positionId
 					seatNumber = common.ObjToString((*cdata)[0]["seatNumber"])
+					assign_type := common.IntAll(v["assign_type"])
+					role_id := common.IntAll(v["role_id"])
 					for _, v := range *pdata {
 						resign := common.IntAll(v["resign"])
 						if positionId == common.Int64All(v["position_id"]) {
-							if resign == 0 {
+							if resign == 0 && (assign_type == 1 || role_id == 8) {
 								if FindUpperLimit(gconv.String(positionId), mode, true) {
 									isFreeze = true
 									positionId = 0