|
@@ -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,
|