예제 #1
0
파일: schedule.go 프로젝트: ryancsq/test
func UpdateScheduleCalcResult(predict_json []byte, schedule_int_info map[string]int, schedule_string_info map[string]string) {
	exist_schedule := new(myinit.Schedule)
	exist_schedule.ScheduleAlResult = string(predict_json)

	myinit.Engine.Cols("schedule_al_result").
		Where("schedule_fenxi_id=? AND schedule_date = ? and schedule_no=? ", schedule_int_info["schedule_fenxi_id"], schedule_string_info["schedule_date"], schedule_string_info["schedule_no"]).Update(exist_schedule)

}
예제 #2
0
파일: 500kan.go 프로젝트: ryancsq/test
func calcScheduleResult(fid int, date string, schedule_no string) {
	predict1_map := getPredictResMap(1, date, schedule_no)
	predict2_map := getPredictResMap(2, date, schedule_no)

	predict_map := make(map[string]interface{})
	predict_map["predict1"] = predict1_map
	predict_map["predict2"] = predict2_map

	predict_json, _ := json.Marshal(predict_map)

	exist_schedule := new(myinit.Schedule)
	exist_schedule.ScheduleAlResult = string(predict_json)

	myinit.Engine.Cols("schedule_al_result").
		Where("schedule_fenxi_id=? AND schedule_date = ? and schedule_no=? ", fid, date, schedule_no).Update(exist_schedule)

}