{
	"name": "query/manager/product/production_order/workpost_gig/load_with_production_lot.json",
	"table": [
		{
			"record_type": [""],
			"table": "production_order"
		}
	],
	"parameter": {
		"production_lot_arr": [""]
	},
	"field": [
		"pro.record_id",
		"pro.production_lot",
		"pro.production_order_id",
		"pro.drawing_number",
		"pro.company_id",
		"pro.production_order_state",
		"pro.json_data.critical_end_date",
		"pr.name",
		"co.name"
	],
	"database_not_in_use": "4d",
	"info_fi": "työpisteen avoimien työmääräinten valinnan teko valmistuserätaulukon avulla",
	"order": ["pro.production_lot", ">"],
	"query": [
		["pro.production_order_state", "in", ["EK", "KU", "AL"]],
		"and",
		"production_lot_find"
	],
	"set": {
		"production_lot_find": [
				["pro.production_lot", "in", "production_lot_arr"],
				"or",
				["pro.production_order_id", "in", "production_lot_arr"]
			],
		"production_lot_find_X": [
				["pro.production_order_id", "in", "production_lot_arr"]
			],
		"production_lot_find_Z": [
				["pro.production_lot", "in", "production_lot_arr"]
			]
	}
}