{
	"name": "query/manager/product/product_work/actual/workpost_gig/load_with_record_id.json",
	"table": [
		{
			"record_type": ["actual"],
			"table": "product_work"
		}
	],
	"parameter": {
		"record_id_arr": [""],
		"start_date": "2016-01-01"
	},
	"field": [
		"prwo.production_lot",
		"prwo.resource_id",
		"prwo.work_phase_number",
		"prwo.json_data.start_person_id",
		"prwo.work_phase_type",
		"prwo.json_data.subtype",
		"prwo.work_hours",
		"prwo.produced_amount",
		"prwo.failed_amount",
		"prwo.json_data.start_date",
		"prwo.json_data.start_time",
		"prwo.json_data.end_date",
		"prwo.json_data.end_time",
		"prwo.info",
		"prwo.description",
		"prwo.record_id"
	],
	"database_not_in_use": "4d",
	"info_fi": "työpisteen tot. työvaihe -valinnan teko löytyneiden kuormitusten ja tot työvaiheiden yhdistelmästä",
	"query": [
		["prwo.record_id", "in", "record_id_arr"],
		"and",
		["prwo.json_data.start_date", ">", "start_date"]
	],
	"query_not_in_use open phases removed with filter": [
		["prwo.record_id", "in", "record_id_arr"],
		"and",
		"open"
	],
	"set": {
		"open": [
				["prwo.work_phase_type", "=", "AL"],
				"or",
				["prwo.json_data.subtype", "=", "KE"]
			]
	}
}