package com.engine.salary.formlua.func.compare;

import com.engine.salary.formlua.entity.parameter.DataType;
import com.engine.salary.formlua.util.ExcelParamUtil;
import com.engine.salary.formlua.util.IgnoreParamFilter;
import com.ql.util.express.instruction.op.OperatorIn;

import java.util.ArrayList;
import java.util.List;


public class OperatorInTest extends OperatorIn {

	@Override
	public Object executeInner(Object[] list) throws Exception {
		DataType result=new DataType();
		result.setDataType(DataType.BOOL);
		result.setContent(true);
		if(list.length<2||list[1]==null){
			Integer number= IgnoreParamFilter.getSetFuncNumber("IN");
		}
		List<Object> paramList=new ArrayList<>();
		paramList.add(list[0]);
		Object[] objectArray=(Object[])list[1];
		for (int i=0;i<objectArray.length;i++){
			paramList.add(ExcelParamUtil.getParamContent(objectArray[i],"string"));
		}
		return result;
	}

	public OperatorInTest(String aName) {
		super(aName);
	}

	public OperatorInTest(String aAliasName, String aName, String aErrorInfo) {
		super(aAliasName, aName, aErrorInfo);
	}
}
