소스 검색

选人处理

WH01243 1 년 전
부모
커밋
687a877100
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      clueSync/jobutil.go

+ 4 - 3
clueSync/jobutil.go

@@ -16,8 +16,8 @@ import (
 
 // 电销工单生成
 func rderAcceptance() {
-	sql := fmt.Sprintf(`select * from order_acceptance where is_clue=2 and  is_delete=1 order by propose_time  `)
-	//sql := fmt.Sprintf(`select * from order_acceptance where is_clue=2 and  is_delete=1 and  id  = 255  order by propose_time  `)
+	//sql := fmt.Sprintf(`select * from order_acceptance where is_clue=2 and  is_delete=1 order by propose_time  `)
+	sql := fmt.Sprintf(`select * from order_acceptance where is_clue=2 and  is_delete=1 and  id  = 279  order by propose_time  `)
 	data := WorkOrder.SelectBySql(sql)
 	if data != nil && len(*data) > 0 {
 		for _, v := range *data {
@@ -197,6 +197,7 @@ func AddOrderWork(acceptanceData map[string]interface{}, userData map[string]int
 		approvalRecordMap := map[string]interface{}{
 			"work_order_no":       work_order_no,
 			"status":              common.If(gconv.Int64(userData["orderStatus"]) == 0, 3, 1),
+			"new_status":          common.If(gconv.Int64(userData["orderStatus"]) == 0, 2, nil),
 			"handle_name":         userData["name"],
 			"handle_position_id":  userData["position_id"],
 			"handle_dept_id":      gconv.String(personMap["deptId"]),
@@ -205,7 +206,7 @@ func AddOrderWork(acceptanceData map[string]interface{}, userData map[string]int
 			"creator_position_id": gconv.String(acceptanceData["initiator_position_id"]),
 			"is_delete":           1,
 			"creator_time":        nowTime,
-			"handle_time":         common.If(gconv.Int64(userData["orderStatus"]) == 0, nowTime, ""),
+			"handle_time":         common.If(gconv.Int64(userData["orderStatus"]) == 0, nowTime, nil),
 		}
 		WorkOrder.Insert("approval_record", approvalRecordMap)
 		WorkMail(personMap,