{
	"name": "form/manager/productivity_report/filter_lua.json",
	"wpa_time_period": {
		"info": "wpa_time_period",
		"info2": "shift: yv=1, av=2, iv=3, em=4",
		"info3": "iv or em shift can be within next day, but it isn't next day work shift",
		"info4": "yv shift can be within pevious day, but it is time period work shift",
		"table": "wpa",
		"rule": [
			["prwo.json_data.end_date", ">=", "param.start_prev_date"],
			["prwo.json_data.end_date", "<=", "param.end_next_date"],
			[
				[
					["prwo.json_data.end_date", "<>", "param.start_date"],
					"or",
					["prwo.json_data.end_time", ">=", "12:00:00"],
					"or",
					["prwo.json_data.work_shift", "<", 3]
				]
			],
			[
				[
					["prwo.json_data.end_date", "<>", "param.end_date"],
					"or",
					["prwo.json_data.end_time", "<=", "12:00:00"],
					"or",
					["prwo.json_data.work_shift", "<>", 1]
				]
			],
			[
				[["prwo.json_data.end_date", "<>", "param.start_prev_date"], "or", ["prwo.json_data.end_time", ">", "12:00:00"]]
			],
			[[["prwo.json_data.end_date", "<>", "param.start_prev_date"], "or", ["prwo.json_data.work_shift", "==", 1]]],
			[[["prwo.json_data.end_date", "<>", "param.end_next_date"], "or", ["prwo.json_data.end_time", "<", "12:00:00"]]],
			[[["prwo.json_data.end_date", "<>", "param.end_next_date"], "or", ["prwo.json_data.work_shift", ">=", 3]]]
		]
	},
	"wos_production_lot_phase": [
		{
			"info": "wos_production_lot_phase",
			"table": "wos",
			"rule": [
				["prwo.production_lot", "==", "param.prwo.production_lot"],
				["prwo.work_phase_number", "==", "param.prwo.work_phase_number"]
			]
		}
	],
	"wpe_work_phase": [
		{
			"info": "wpe_work_phase",
			"table": "wpe",
			"rule": [
				["prwo.json_data.work__position_num_id", "==", "param.pro.json_data.work__position_num_id"],
				["prwo.json_data.phase_number", "==", "param.prwo.work_phase_number"]
			]
		}
	],
	"wpa_previous_work_order": [
		{
			"info": "wos_production_lot_phase",
			"table": "wpa",
			"rule": [
				["prwo.json_data.measured_track_time", ">", 0],
				["prwo.json_data.work_number", "==", "param.prwo.json_data.work_number"],
				["prwo.work_phase_number", "==", "param.prwo.work_phase_number"],
				["pro.row_number", "==", "param.pro.row_number"]
			]
		}
	],
	"wpa_speed": [
		{
			"info": "type",
			"table": "wpa",
			"rule": [["prwo.work_phase_type", "<>", "OA"]]
		},
		{
			"info": "wpa_time_period",
			"info2": "shift: yv=1, av=2, iv=3, em=4",
			"info3": "iv or em shift can be within next day, but it isn't next day work shift",
			"info4": "yv shift can be within pevious day, but it is time period work shift",
			"table": "wpa",
			"rule": "wpa_time_period"
		}
	],
	"prwo.json_data.track_time": [
		{
			"info": "type",
			"table": "wpa",
			"rule": [["prwo.work_phase_type", "==", "OA"], ["res.json_data.follow_track_time", ">", 0]]
		},
		{
			"info": "time_period",
			"table": "wpa",
			"rule": [
				["prwo.json_data.end_date", ">=", "param.start_date"],
				["prwo.json_data.end_date", "<=", "param.end_date"]
			]
		}
	]
}
