{
	"name": "query/manager/product/product_work/order/workpost_gig/load_with_production_lot.json",
	"table": [
		{
			"record_type": ["schedule"],
			"table": "product_work"
		}
	],
	"parameter": {
		"production_lot_phase_arr": [""]
	},
	"field": [
		"prwo.production_lot",
		"prwo.work_phase_number",
		"prwo.json_data.production_lot__work_ph",
		"prwo.resource_id",
		"prwo.work_phase_state",
		"prwo.description",
		"prwo.produced_amount",
		"prwo.remaining_amount",
		"prwo.record_id"
	],
	"database_not_in_use": "4d",
	"info_fi": "työpisteen kuormituksien valinnan teko valmistuserätaulukon avulla",
	"order": [
		"prwo.production_lot",
		">",
		"prwo.work_phase_number",
		">"
	],
	"query": [
		["prwo.work_phase_number", ">", 0],
		"and",
		["prwo.json_data.production_lot__work_ph", "in", "production_lot_phase_arr"],
		"and",
		"open"
	],
	"set": {
		"open": [
				["prwo.work_phase_state", "in", ["EK", "KU", "AL"]],
				"and",
				["pro.production_order_state", "in", ["EK", "KU", "AL"]]
			]
	}
}