//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package nccloud.dto.gl.lightgl;

import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import nc.bd.accperiod.InvalidAccperiodExcetion;
import nc.bs.framework.common.InvocationInfoProxy;
import nc.bs.framework.common.NCLocator;
import nc.bs.logging.Logger;
import nc.gl.utils.GLDateUtil;
import nc.itf.gl.power.IScene;
import nc.itf.uap.busibean.SysinitAccessor;
import nc.pubitf.accperiod.AccountCalendar;
import nc.vo.gateway60.itfs.CalendarUtilGL;
import nc.vo.gl.power.VoucherPowerVO;
import nc.vo.gl.voucherquery.VoucherQueryConditionVO;
import nc.vo.gl.vouchertools.QueryElementVO;
import nc.vo.glcom.ass.AssVO;
import nc.vo.jcom.lang.StringUtil;
import nc.vo.ml.NCLangRes4VoTransl;
import nc.vo.pub.BusinessException;
import nc.vo.pub.BusinessRuntimeException;
import nc.vo.pub.lang.UFBoolean;
import nc.vo.pub.lang.UFDate;
import nccloud.pubitf.baseapp.apprbac.IAppAndOrgPermQueryPubService;

public class VoucherQueryVO {
    private String appcode;
    private String[] pk_accountingbook;
    private String[] pk_vouchertype;
    private String[] period;
    private String year_start;
    private String year_end;
    private String period_start;
    private String period_end;
    private String prepareddate_start;
    private String prepareddate_end;
    private String num_start;
    private String num_end;
    private String attachment_start;
    private String attachment_end;
    private String pk_system;
    private String[] pk_prepared;
    private String pk_casher;
    private String pk_checked;
    private String pk_manager;
    private boolean normalflag;
    private boolean discardflag;
    private boolean tempsaveflag;
    private boolean errorflag;
    private String difflag;
    private String convertState;
    private String convertSource;
    private String voucherState;
    private String[] pk_unit;
    private String[] explanation;
    private String[] accountingcode;
    private String[] oppositesubj;
    private String[] pk_currtype;
    private AmountCondition oriamount;
    private AmountCondition amount;
    private String amountType;
    private AssVO[] assvos;
    private AmountCondition quantity;
    private String[] checkstyle;
    private AmountCondition checkno;
    private AmountCondition checkdate;
    private String offervoucher = "0";
    private String busidate;
    private String[] pk_liabilitycenter;
    private String freevalue1;//¿ÍÉÌÃû³Æ

    public VoucherQueryVO() {
    }

    public VoucherQueryConditionVO getConditionVO() {
        VoucherQueryConditionVO conditionVO = new VoucherQueryConditionVO();
        if (this.period != null && this.period.length > 0) {
            if (!StringUtil.isEmptyWithTrim(this.period[0])) {
                this.year_start = this.period[0].split("-")[0];
                this.period_start = this.period[0].split("-")[1];
            }

            if (!StringUtil.isEmptyWithTrim(this.period[0])) {
                this.year_end = this.period[1].split("-")[0];
                this.period_end = this.period[1].split("-")[1];
            }
        }

        conditionVO.setNormalconditionvo(this.getNormalCondition());
        QueryElementVO[] selfConditionVOs = this.getSelfConditionVOs();
        conditionVO.setSelfdefconditionvo(selfConditionVOs);
        conditionVO.setPowerVO(this.makePowerVO());
        conditionVO.setIspreparedpower(true);
        conditionVO.setShowBusinessDate(StringUtil.isEmptyWithTrim(this.prepareddate_start) && StringUtil.isEmptyWithTrim(this.prepareddate_end));
        return conditionVO;
    }

    private QueryElementVO[] getNormalCondition() {
        List<QueryElementVO> conditions = new ArrayList();
        if (this.pk_accountingbook != null && this.pk_accountingbook.length > 0) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_accountingbook", "=", this.pk_accountingbook);
            conditions.add(tempvo);
        } else if (!StringUtil.isEmptyWithTrim(this.appcode)) {
            String cuserid = InvocationInfoProxy.getInstance().getUserId();
            String pk_group = InvocationInfoProxy.getInstance().getGroupId();

            try {
                String[] accountingbooks = ((IAppAndOrgPermQueryPubService)NCLocator.getInstance().lookup(IAppAndOrgPermQueryPubService.class)).queryUserPermOrgPksByApp(cuserid, this.appcode, pk_group);
                if (accountingbooks == null || accountingbooks.length <= 0) {
                    throw new BusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("20028201_0", "020028201-0001"));
                }

                this.pk_accountingbook = accountingbooks;
                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_accountingbook", "=", this.pk_accountingbook);
                conditions.add(tempvo);
            } catch (BusinessException e) {
                Logger.error(e.getMessage(), e);
                throw new BusinessRuntimeException(e.getMessage(), e);
            }
        }

        if (this.pk_vouchertype != null && this.pk_vouchertype.length > 0) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_vouchertype", "in", this.pk_vouchertype);
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.year_start) && !StringUtil.isEmpty(this.year_end) && !StringUtil.isEmpty(this.period_start) && !StringUtil.isEmpty(this.period_end)) {
            if (this.year_start.equals(this.year_end) && !this.period_start.equals(this.period_end)) {
                conditions.add(this.createLeft());
                conditions.add(this.createLeft());
                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.year", "=", new String[]{this.year_start});
                conditions.add(tempvo);
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.adjustperiod", ">=", new String[]{this.period_start});
                conditions.add(tempvo);
                conditions.add(this.createRight());
                conditions.add(this.createRight());
                conditions.add(this.createLeft());
                conditions.add(this.createLeft());
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.adjustperiod", "<=", new String[]{this.period_end});
                conditions.add(tempvo);
                conditions.add(this.createRight());
                conditions.add(this.createRight());
            } else if (this.year_start.equals(this.year_end) && this.period_start.equals(this.period_end)) {
                conditions.add(this.createLeft());
                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.year", "=", new String[]{this.year_start});
                conditions.add(tempvo);
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.adjustperiod", "=", new String[]{this.period_end});
                conditions.add(tempvo);
                conditions.add(this.createRight());
            } else {
                conditions.add(this.createLeft());
                conditions.add(this.createLeft());
                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.year", "=", new String[]{this.year_start});
                conditions.add(tempvo);
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.adjustperiod", ">=", new String[]{this.period_start});
                conditions.add(tempvo);
                conditions.add(this.createRight());
                tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.year", ">", new String[]{this.year_start});
                conditions.add(tempvo);
                conditions.add(this.createRight());
                conditions.add(this.createLeft());
                conditions.add(this.createLeft());
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.year", "=", new String[]{this.year_end});
                conditions.add(tempvo);
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.adjustperiod", "<=", new String[]{this.period_end});
                conditions.add(tempvo);
                conditions.add(this.createRight());
                tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.year", "<", new String[]{this.year_end});
                conditions.add(tempvo);
                conditions.add(this.createRight());
            }
        } else {
            if (!StringUtil.isEmpty(this.prepareddate_start)) {
                if (this.prepareddate_start.length() == 10) {
                    this.prepareddate_start = GLDateUtil.toStdBeginTimeString(this.prepareddate_start);
                }

                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.prepareddate", ">=", new String[]{this.prepareddate_start});
                conditions.add(tempvo);
                AccountCalendar cal = CalendarUtilGL.getAccountCalendarByAccountBook(this.pk_accountingbook[0]);

                try {
                    cal.setDate(new UFDate(this.prepareddate_start));
                    String beginYear = cal.getYearVO().getPeriodyear();
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.year", ">=", new String[]{beginYear});
                    conditions.add(tempvo);
                } catch (InvalidAccperiodExcetion var7) {
                }
            }

            if (!StringUtil.isEmpty(this.prepareddate_end)) {
                if (this.prepareddate_end.length() == 10) {
                    this.prepareddate_end = GLDateUtil.toStdEndTimeString(this.prepareddate_end);
                }

                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.prepareddate", "<=", new String[]{this.prepareddate_end});
                conditions.add(tempvo);
                AccountCalendar cal = CalendarUtilGL.getAccountCalendarByAccountBook(this.pk_accountingbook[0]);

                try {
                    cal.setDate(new UFDate(this.prepareddate_end));
                    String endYear = cal.getYearVO().getPeriodyear();
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.year", "<=", new String[]{endYear});
                    conditions.add(tempvo);
                } catch (InvalidAccperiodExcetion var6) {
                }
            }
        }

        if (!StringUtil.isEmpty(this.num_start)) {
            QueryElementVO tempvo = this.creatQueryElemVO("int", "and", "gl_voucher.num", ">=", new String[]{this.num_start});
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.num_end)) {
            QueryElementVO tempvo = this.creatQueryElemVO("int", "and", "gl_voucher.num", "<=", new String[]{this.num_end});
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.attachment_start)) {
            QueryElementVO tempvo = this.creatQueryElemVO("int", "and", "gl_voucher.attachment", ">=", new String[]{this.attachment_start});
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.attachment_end)) {
            QueryElementVO tempvo = this.creatQueryElemVO("int", "and", "gl_voucher.attachment", "<=", new String[]{this.attachment_end});
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.pk_system) && !"ALL".equals(this.pk_system)) {
            StringBuffer sqlBuff = new StringBuffer();
            sqlBuff.append("RTRIM(gl_voucher.pk_system) = '" + this.pk_system + "' ");
            sqlBuff.append(" or ");
            sqlBuff.append(" RTRIM(gl_voucher.pk_system) LIKE '" + this.pk_system + ",%' ");
            sqlBuff.append(" or ");
            sqlBuff.append(" RTRIM(gl_voucher.pk_system) LIKE '%," + this.pk_system + ",%' ");
            sqlBuff.append(" or ");
            sqlBuff.append(" RTRIM(gl_voucher.pk_system) ");
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", sqlBuff.toString(), "=", new String[]{"%," + this.pk_system});
            conditions.add(tempvo);
        }

        if (this.pk_prepared != null && this.pk_prepared.length > 0) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_prepared", "in", this.pk_prepared);
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.pk_casher)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "=", new String[]{this.pk_casher});
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.pk_checked)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "=", new String[]{this.pk_checked});
            conditions.add(tempvo);
        }

        if (!StringUtil.isEmpty(this.pk_manager)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_manager", "=", new String[]{this.pk_manager});
            conditions.add(tempvo);
        }

        if ((!this.normalflag || !this.tempsaveflag || !this.errorflag || !this.discardflag) && (this.normalflag || this.tempsaveflag || this.errorflag || this.discardflag)) {
            conditions.add(this.createLeft());
            if (this.normalflag) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.errmessage", "=", (String[])null);
                conditions.add(tempvo);
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.discardflag", "!=", new String[]{"Y"});
                conditions.add(tempvo);
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.tempsaveflag", "!=", new String[]{"Y"});
                conditions.add(tempvo);
            }

            if (this.errorflag) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.errmessage", "!=", (String[])null);
                conditions.add(tempvo);
            }

            if (this.discardflag) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.discardflag", "=", new String[]{"Y"});
                conditions.add(tempvo);
            }

            if (this.tempsaveflag) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.tempsaveflag", "=", new String[]{"Y"});
                conditions.add(tempvo);
            }

            QueryElementVO tempvo = new QueryElementVO();
            tempvo.setOperator(")");
            tempvo.setIsAnd(UFBoolean.FALSE);
            conditions.add(tempvo);
        }

        if ("1".equals(this.difflag)) {
            conditions.add(this.createLeft());
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.isdifflag", "=", new String[]{"Y"});
            conditions.add(tempvo);
            conditions.add(this.createRight());
        } else if ("2".equals(this.difflag)) {
            conditions.add(this.createLeft());
            QueryElementVO tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.isdifflag", "=", new String[]{"N"});
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.isdifflag", "=", (String[])null);
            conditions.add(tempvo);
            conditions.add(this.createRight());
        }

        if ("1".equals(this.convertState)) {
            conditions.add(this.createLeft());
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.convertflag", "=", new String[]{"Y"});
            conditions.add(tempvo);
            conditions.add(this.createRight());
        } else if ("2".equals(this.convertState)) {
            conditions.add(this.createLeft());
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.convertflag", "=", new String[]{"N"});
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.convertflag", "=", (String[])null);
            conditions.add(tempvo);
            conditions.add(this.createRight());
        }

        if ("1".equals(this.convertSource)) {
            conditions.add(this.createLeft());
            QueryElementVO tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.pk_sourcepk", "!=", (String[])null);
            conditions.add(tempvo);
            conditions.add(this.createRight());
        } else if ("2".equals(this.convertSource)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_sourcepk", "=", (String[])null);
            conditions.add(tempvo);
        }

        if ("1".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_manager", "!=", (String[])null);
            conditions.add(tempvo);
        } else if ("2".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_manager", "=", (String[])null);
            conditions.add(tempvo);
            if (this.isTallyAfterChecked(this.pk_accountingbook[0])) {
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "!=", (String[])null);
                conditions.add(tempvo);
                if (this.isRequireCasherSigned(this.pk_accountingbook[0])) {
                    if (getVoucherFlowControlModel(this.pk_accountingbook[0]) == 1) {
                        conditions.add(this.createLeft());
                        conditions.add(this.createLeft());
                        tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "!=", (String[])null);
                        conditions.add(tempvo);
                        tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "!=", (String[])null);
                        conditions.add(tempvo);
                        tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.signflag", "=", new String[]{"Y"});
                        conditions.add(tempvo);
                        conditions.add(this.createRight());
                        tempvo = new QueryElementVO();
                        tempvo.setOperator("(");
                        tempvo.setIsAnd(UFBoolean.FALSE);
                        conditions.add(tempvo);
                        tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.signflag", "!=", new String[]{"Y"});
                        conditions.add(tempvo);
                        tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "!=", (String[])null);
                        conditions.add(tempvo);
                        conditions.add(this.createRight());
                        conditions.add(this.createRight());
                    } else {
                        conditions.add(this.createLeft());
                        conditions.add(this.createLeft());
                        tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "!=", (String[])null);
                        conditions.add(tempvo);
                        tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.signflag", "=", new String[]{"Y"});
                        conditions.add(tempvo);
                        conditions.add(this.createRight());
                        tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.signflag", "!=", new String[]{"Y"});
                        conditions.add(tempvo);
                        conditions.add(this.createRight());
                    }
                }
            } else if (this.isRequireCasherSigned(this.pk_accountingbook[0])) {
                if (getVoucherFlowControlModel(this.pk_accountingbook[0]) == 1) {
                    conditions.add(this.createLeft());
                    conditions.add(this.createLeft());
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "!=", (String[])null);
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "!=", (String[])null);
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                    tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.signflag", "!=", new String[]{"Y"});
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                } else {
                    conditions.add(this.createLeft());
                    conditions.add(this.createLeft());
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "!=", (String[])null);
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.signflag", "=", new String[]{"Y"});
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                    tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.signflag", "!=", new String[]{"Y"});
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                }
            }

            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.discardflag", "!=", new String[]{"Y"});
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.errmessage", "=", (String[])null);
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.tempsaveflag", "!=", new String[]{"Y"});
            conditions.add(tempvo);
        } else if ("3".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_manager", "=", (String[])null);
            conditions.add(tempvo);
        } else if ("4".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "!=", (String[])null);
            conditions.add(tempvo);
        } else if ("5".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_manager", "=", (String[])null);
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "=", (String[])null);
            conditions.add(tempvo);
            if (getVoucherFlowControlModel(this.pk_accountingbook[0]) == 0) {
                if (this.isRequireCasherSigned(this.pk_accountingbook[0])) {
                    conditions.add(this.createLeft());
                    conditions.add(this.createLeft());
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "!=", (String[])null);
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.signflag", "=", new String[]{"Y"});
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                    tempvo = this.creatQueryElemVO("String", "or", "gl_voucher.signflag", "!=", new String[]{"Y"});
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                }
            } else if (this.isRequireCasherSigned(this.pk_accountingbook[0])) {
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "=", (String[])null);
                conditions.add(tempvo);
            }

            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.discardflag", "!=", new String[]{"Y"});
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.errmessage", "=", (String[])null);
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.tempsaveflag", "!=", new String[]{"Y"});
            conditions.add(tempvo);
        } else if ("6".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "=", (String[])null);
            conditions.add(tempvo);
        } else if ("7".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "!=", (String[])null);
            conditions.add(tempvo);
        } else if ("8".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_manager", "=", (String[])null);
            conditions.add(tempvo);
            if (getVoucherFlowControlModel(this.pk_accountingbook[0]) == 0) {
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "=", (String[])null);
                conditions.add(tempvo);
            } else if (this.isTallyAfterChecked(this.pk_accountingbook[0])) {
                tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_checked", "!=", (String[])null);
                conditions.add(tempvo);
            }

            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "=", (String[])null);
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.signflag", "=", new String[]{"Y"});
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.discardflag", "!=", new String[]{"Y"});
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.errmessage", "=", (String[])null);
            conditions.add(tempvo);
            tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.tempsaveflag", "!=", new String[]{"Y"});
            conditions.add(tempvo);
        } else if ("9".equals(this.voucherState)) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.pk_casher", "=", (String[])null);
            conditions.add(tempvo);
        }

        return (QueryElementVO[])conditions.toArray(new QueryElementVO[0]);
    }

    private QueryElementVO[] getSelfConditionVOs() {
        List<QueryElementVO> conditions = new ArrayList();
        if (this.explanation != null && this.explanation.length > 0) {
            String[] explanations = this.explanation;

            for(int i = 0; i < explanations.length; ++i) {
                if (explanations[i] != null && explanations[i].trim().length() > 0) {
                    if (explanations[i].indexOf(42) < 0) {
                        explanations[i] = "*" + explanations[i] + "*";
                    }

                    explanations[i] = explanations[i].replace('*', '%');
                }
            }

            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.explanation", "=", explanations);
            conditions.add(tempvo);
        }

        if (this.accountingcode != null && this.accountingcode.length > 0) {
            for(int i = 0; i < this.accountingcode.length; ++i) {
                String var10002 = this.accountingcode[i];
                this.accountingcode[i] = var10002 + "%";
            }

            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "bd_account.code", "=", this.accountingcode);
            conditions.add(tempvo);
        }

        if (this.oppositesubj != null && this.oppositesubj.length > 0) {
            for(int i = 0; i < this.oppositesubj.length; ++i) {
                String var46 = this.oppositesubj[i];
                this.oppositesubj[i] = var46 + "%";
            }

            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.oppositesubj", "=", this.oppositesubj);
            conditions.add(tempvo);
        }

        if (this.pk_currtype != null && this.pk_currtype.length > 0) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.pk_currtype", "=", this.pk_currtype);
            conditions.add(tempvo);
        }

        if (this.oriamount != null && (!StringUtil.isEmptyWithTrim(this.oriamount.getFirstAmount()) || !StringUtil.isEmptyWithTrim(this.oriamount.getSecondAmount()))) {
            conditions.addAll(this.getAmountConditions(this.oriamount, "0"));
        }
/*        if(this.freevalue1 == null){
            this.freevalue1 = "Ì©¿ª";
        }*/
        if(this.freevalue1 != null ){
            StringBuffer sqlBuff = new StringBuffer();
            sqlBuff.append(" RTRIM(gl_dtlfreevalue.FREEVALUE1) LIKE '%" + this.freevalue1 + "%' ");
            sqlBuff.append(" or ");
            sqlBuff.append(" RTRIM(gl_dtlfreevalue.FREEVALUE1) ");
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", sqlBuff.toString(), "=", new String[]{"%" + this.freevalue1 + "%"});
            conditions.add(tempvo);
        }

        if (this.amount != null && (!StringUtil.isEmptyWithTrim(this.amount.getFirstAmount()) || !StringUtil.isEmptyWithTrim(this.amount.getSecondAmount()))) {
            conditions.addAll(this.getAmountConditions(this.amount, this.amountType));
        }

        if (this.pk_unit != null && this.pk_unit.length > 0) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.pk_unit", "=", this.pk_unit);
            conditions.add(tempvo);
        }

        if (this.pk_liabilitycenter != null && this.pk_liabilitycenter.length > 0) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.pk_liabilitycenter", "=", this.pk_liabilitycenter);
            conditions.add(tempvo);
        }

        if (this.assvos != null && this.assvos.length > 0) {
            QueryElementVO tmpvo = this.createLeft();
            tmpvo.setRestrictfield("gl_freevalue");
            conditions.add(tmpvo);
            String[] data = new String[this.assvos.length];

            for(int i = 0; i < this.assvos.length; ++i) {
                String var47 = this.assvos[i].getPk_Checktype();
                data[i] = var47 + (this.assvos[i].getPk_Checkvalue() == null ? "" : this.assvos[i].getPk_Checkvalue());
            }

            tmpvo = this.creatQueryElemVO("String", "or", "gl_freevalue.checktype+gl_freevalue.checkvalue", "=", data);
            conditions.add(tmpvo);
            tmpvo = this.createRight();
            tmpvo.setRestrictfield("gl_freevalue");
            conditions.add(tmpvo);
        }

        if (this.quantity != null && (!StringUtil.isEmptyWithTrim(this.quantity.getFirstAmount()) || !StringUtil.isEmptyWithTrim(this.quantity.getSecondAmount()))) {
            conditions.addAll(this.getAmountConditions(this.quantity, "5"));
        }

        if (this.checkstyle != null && this.checkstyle.length > 0) {
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.checkstyle", "=", this.checkstyle);
            conditions.add(tempvo);
        }

        if (this.checkno != null) {
            boolean isChecknoEmpty = StringUtil.isEmptyWithTrim(this.checkno.getFirstAmount()) && StringUtil.isEmptyWithTrim(this.checkno.getSecondAmount());
            String isAnd = this.checkno.andOr;
            if (!"and".equals(isAnd) && !isChecknoEmpty) {
                QueryElementVO tempvo = this.createLeft();
                conditions.add(tempvo);
            }

            if (!StringUtil.isEmptyWithTrim(this.checkno.getFirstAmount()) || !StringUtil.isEmptyWithTrim(this.checkno.getSecondAmount())) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.checkno", "!=", new String[]{"~"});
                conditions.add(tempvo);
                tempvo = this.createLeft();
                conditions.add(tempvo);
            }

            String firstString = this.checkno.getFirstAmount();
            if (firstString != null && !firstString.trim().equals("")) {
                if (firstString.indexOf(",") > -1) {
                    QueryElementVO tempvo = this.creatQueryElemVO("String", "or", "gl_detail.checkno", "=", this.getDataFromString(firstString));
                    conditions.add(tempvo);
                } else {
                    QueryElementVO tempvo = this.creatQueryElemVO("String", isAnd, "gl_detail.checkno", ">=", new String[]{firstString});
                    conditions.add(tempvo);
                }
            }

            String secondString = this.checkno.getSecondAmount();
            if (secondString != null && !secondString.trim().equals("")) {
                if (secondString.indexOf(",") > -1) {
                    QueryElementVO tempvo = this.creatQueryElemVO("String", "or", "gl_detail.checkno", "=", this.getDataFromString(secondString));
                    conditions.add(tempvo);
                } else {
                    QueryElementVO tempvo = this.creatQueryElemVO("String", isAnd, "gl_detail.checkno", "<=", new String[]{secondString});
                    conditions.add(tempvo);
                }
            }

            if (!StringUtil.isEmptyWithTrim(this.checkno.getFirstAmount()) || !StringUtil.isEmptyWithTrim(this.checkno.getSecondAmount())) {
                QueryElementVO tempvo = this.createRight();
                conditions.add(tempvo);
            }

            if (!"and".equals(isAnd) && !isChecknoEmpty) {
                QueryElementVO tempvo = this.createRight();
                conditions.add(tempvo);
            }
        }

        if (this.checkdate != null) {
            boolean isCheckDateEmpty = StringUtil.isEmptyWithTrim(this.checkdate.getFirstAmount()) && StringUtil.isEmptyWithTrim(this.checkdate.getSecondAmount());
            String isAnd = this.checkdate.andOr;
            if (!"and".equals(isAnd) && !isCheckDateEmpty) {
                QueryElementVO tempvo = this.createLeft();
                conditions.add(tempvo);
            }

            String firstdate = this.checkdate.getFirstAmount();
            if (!StringUtil.isEmptyWithTrim(firstdate)) {
                firstdate = GLDateUtil.toStdBeginTimeString(new UFDate(firstdate));
            } else {
                firstdate = null;
            }

            if (!StringUtil.isEmptyWithTrim(this.checkdate.getFirstAmount()) || !StringUtil.isEmptyWithTrim(this.checkdate.getSecondAmount())) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_detail.checkdate", "!=", new String[]{"~"});
                conditions.add(tempvo);
                tempvo = this.createLeft();
                conditions.add(tempvo);
            }

            if (!StringUtil.isEmptyWithTrim(firstdate)) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", isAnd, "gl_detail.checkdate", ">=", new String[]{firstdate});
                conditions.add(tempvo);
            }

            String seconddate = this.checkdate.getSecondAmount();
            if (!StringUtil.isEmptyWithTrim(seconddate)) {
                seconddate = GLDateUtil.toStdBeginTimeString(new UFDate(seconddate));
            } else {
                seconddate = null;
            }

            if (!StringUtil.isEmptyWithTrim(seconddate)) {
                QueryElementVO tempvo = this.creatQueryElemVO("String", isAnd, "gl_detail.checkdate", "<=", new String[]{seconddate});
                conditions.add(tempvo);
            }

            if (!StringUtil.isEmptyWithTrim(this.checkdate.getFirstAmount()) || !StringUtil.isEmptyWithTrim(this.checkdate.getSecondAmount())) {
                QueryElementVO tempvo = this.createRight();
                conditions.add(tempvo);
            }

            if (!"and".equals(isAnd) && !isCheckDateEmpty) {
                QueryElementVO tempvo = this.createRight();
                conditions.add(tempvo);
            }
        }

        if ("1".equals(this.offervoucher)) {
            String[] datas = new String[]{"'~' or gl_voucher.pk_voucher in (select gl_voucher.OFFERVOUCHER from gl_voucher)"};
            QueryElementVO tempvo = this.creatQueryElemVO("String", "and", "gl_voucher.OFFERVOUCHER", "<>", datas);
            conditions.add(tempvo);
        }

        return (QueryElementVO[])conditions.toArray(new QueryElementVO[0]);
    }

    private List<QueryElementVO> getAmountConditions(AmountCondition amount, String amountType) {
        List<QueryElementVO> conditions = new ArrayList();
        String firstAmount = amount.getFirstAmount();
        String secondAmount = amount.getSecondAmount();
        String direction = amount.getDirection();
        boolean isAnd = amount.andOr.equals("and");
        if (!StringUtil.isEmptyWithTrim(secondAmount) && secondAmount.equals(firstAmount) && secondAmount.indexOf(",") == -1) {
            if ("0".equals(direction)) {
                conditions.add(this.createLeft());
                QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "=", this.getDataFromString(firstAmount));
                conditions.add(tempvo);
                tempvo = this.creatQueryElemVO("double", "or", this.getFieldByKey(amountType, false), "=", this.getDataFromString(firstAmount));
                conditions.add(tempvo);
                conditions.add(this.createRight());
            } else if ("1".equals(direction)) {
                QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "=", this.getDataFromString(firstAmount));
                conditions.add(tempvo);
            } else {
                QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "=", this.getDataFromString(firstAmount));
                conditions.add(tempvo);
            }

            return conditions;
        } else {
            if (!StringUtil.isEmptyWithTrim(firstAmount)) {
                if (firstAmount.indexOf(",") > -1) {
                    isAnd = false;
                    if ("0".equals(direction)) {
                        conditions.add(this.createLeft());
                        QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "=", this.getDataFromString(firstAmount));
                        conditions.add(tempvo);
                        tempvo = this.creatQueryElemVO("double", "or", this.getFieldByKey(amountType, false), "=", this.getDataFromString(firstAmount));
                        conditions.add(tempvo);
                        conditions.add(this.createRight());
                    } else if ("1".equals(direction)) {
                        QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "=", this.getDataFromString(firstAmount));
                        conditions.add(tempvo);
                    } else {
                        QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "=", this.getDataFromString(firstAmount));
                        conditions.add(tempvo);
                    }
                } else if ("0".equals(direction)) {
                    conditions.add(this.createLeft());
                    conditions.add(this.createLeft());
                    QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), ">=", new String[]{firstAmount});
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "!=", new String[]{"0"});
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                    tempvo = new QueryElementVO();
                    tempvo.setOperator("(");
                    tempvo.setIsAnd(UFBoolean.FALSE);
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("double", "or", this.getFieldByKey(amountType, false), ">=", new String[]{firstAmount});
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "!=", new String[]{"0"});
                    conditions.add(tempvo);
                    conditions.add(this.createRight());
                    conditions.add(this.createRight());
                } else if ("1".equals(direction)) {
                    QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), ">=", new String[]{firstAmount});
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "!=", new String[]{"0"});
                    conditions.add(tempvo);
                } else {
                    QueryElementVO tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), ">=", new String[]{firstAmount});
                    conditions.add(tempvo);
                    tempvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "!=", new String[]{"0"});
                    conditions.add(tempvo);
                }
            }

            if (!StringUtil.isEmptyWithTrim(secondAmount)) {
                if (secondAmount.indexOf(",") > -1) {
                    isAnd = false;
                    if ("0".equals(direction)) {
                        QueryElementVO tmpvo = new QueryElementVO();
                        tmpvo.setOperator("(");
                        tmpvo.setIsAnd(UFBoolean.FALSE);
                        conditions.add(tmpvo);
                        tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "=", this.getDataFromString(secondAmount));
                        conditions.add(tmpvo);
                        tmpvo = this.creatQueryElemVO("double", "or", this.getFieldByKey(amountType, false), "=", this.getDataFromString(secondAmount));
                        conditions.add(tmpvo);
                        conditions.add(this.createRight());
                    } else if ("1".equals(direction)) {
                        QueryElementVO tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "=", this.getDataFromString(secondAmount));
                        conditions.add(tmpvo);
                    } else {
                        QueryElementVO tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "=", this.getDataFromString(secondAmount));
                        conditions.add(tmpvo);
                    }
                } else if ("0".equals(direction)) {
                    QueryElementVO tmpvo = new QueryElementVO();
                    tmpvo.setOperator("(");
                    tmpvo.setIsAnd(UFBoolean.valueOf(isAnd));
                    conditions.add(tmpvo);
                    conditions.add(this.createLeft());
                    tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "<=", new String[]{secondAmount});
                    conditions.add(tmpvo);
                    tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "!=", new String[]{"0"});
                    conditions.add(tmpvo);
                    conditions.add(this.createRight());
                    tmpvo = new QueryElementVO();
                    tmpvo.setOperator("(");
                    tmpvo.setIsAnd(UFBoolean.FALSE);
                    conditions.add(tmpvo);
                    tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "<=", new String[]{secondAmount});
                    conditions.add(tmpvo);
                    tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "!=", new String[]{"0"});
                    conditions.add(tmpvo);
                    conditions.add(this.createRight());
                    conditions.add(this.createRight());
                } else if ("1".equals(direction)) {
                    QueryElementVO tmpvo = this.creatQueryElemVO("double", amount.andOr, this.getFieldByKey(amountType, true), "<=", new String[]{secondAmount});
                    conditions.add(tmpvo);
                    tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, true), "!=", new String[]{"0"});
                    conditions.add(tmpvo);
                } else {
                    QueryElementVO tmpvo = this.creatQueryElemVO("double", amount.andOr, this.getFieldByKey(amountType, false), "<=", new String[]{secondAmount});
                    conditions.add(tmpvo);
                    tmpvo = this.creatQueryElemVO("double", "and", this.getFieldByKey(amountType, false), "!=", new String[]{"0"});
                    conditions.add(tmpvo);
                }
            }

            if (!isAnd && conditions.size() > 0) {
                conditions.add(0, this.createLeft());
                conditions.add(this.createRight());
            }

            return conditions;
        }
    }

    private VoucherPowerVO makePowerVO() {
        VoucherPowerVO powerVO = new VoucherPowerVO();
        powerVO.setPk_accountingbooks(this.pk_accountingbook);
        powerVO.setPk_user(InvocationInfoProxy.getInstance().getUserId());
        powerVO.setYear(this.year_start);
        powerVO.setPeriod(this.period_start);
        powerVO.setPk_group(InvocationInfoProxy.getInstance().getGroupId());
        powerVO.setBusiDate(this.busidate);
        powerVO.setScene((IScene)null);
        return powerVO;
    }

    private QueryElementVO createRight() {
        QueryElementVO tempvo = new QueryElementVO();
        tempvo.setOperator(")");
        tempvo.setIsAnd(UFBoolean.TRUE);
        return tempvo;
    }

    private QueryElementVO createLeft() {
        QueryElementVO tempvo = new QueryElementVO();
        tempvo.setOperator("(");
        tempvo.setIsAnd(UFBoolean.TRUE);
        return tempvo;
    }

    private QueryElementVO creatQueryElemVO(String type, String andOr, String restrictfield, String operator, String[] datas) {
        QueryElementVO tempvo = new QueryElementVO();
        tempvo.setDatatype(type);
        tempvo.setOperator(operator);
        tempvo.setIsAnd(andOr.equals("and") ? UFBoolean.TRUE : UFBoolean.FALSE);
        tempvo.setRestrictfield(restrictfield);
        tempvo.setDatas(datas);
        return tempvo;
    }

    private boolean isTallyAfterChecked(String pk_accountingbook) {
        try {
            return UFBoolean.valueOf(SysinitAccessor.getInstance().getParaString(pk_accountingbook, "GL003")).booleanValue();
        } catch (BusinessException e) {
            Logger.error(e.getMessage());
            throw new BusinessRuntimeException(e.getMessage());
        }
    }

    private boolean isRequireCasherSigned(String pk_accountingbook) {
        try {
            return UFBoolean.valueOf(SysinitAccessor.getInstance().getParaString(pk_accountingbook, "GL001")).booleanValue();
        } catch (BusinessException e) {
            Logger.error(e.getMessage());
            throw new BusinessRuntimeException(e.getMessage());
        }
    }

    private static int getVoucherFlowControlModel(String pk_orgbook) {
        int intTemp = 0;

        try {
            String strTemp = SysinitAccessor.getInstance().getParaString(pk_orgbook, "GL091");
            if ("1".equals(strTemp)) {
                intTemp = 0;
            } else if ("2".equals(strTemp)) {
                intTemp = 1;
            }

            return intTemp;
        } catch (BusinessException e) {
            Logger.error(e.getMessage());
            throw new BusinessRuntimeException(e.getMessage());
        }
    }

    private String[] getDataFromString(String str) {
        int subflag = str.indexOf(",");

        Vector tmpVecR;
        for(tmpVecR = new Vector(); subflag > 0; subflag = str.indexOf(",")) {
            tmpVecR.addElement(str.substring(0, subflag));
            str = str.substring(subflag + 1, str.length());
        }

        tmpVecR.addElement(str);
        String[] datas = new String[tmpVecR.size()];
        tmpVecR.copyInto(datas);
        return datas;
    }

    private String getFieldByKey(String amountype, boolean isdebit) {
        String r = null;
        switch (amountype) {
            case "0":
                if (isdebit) {
                    r = "gl_detail.debitamount";
                } else {
                    r = "gl_detail.creditamount";
                }
                break;
            case "1":
                if (isdebit) {
                    r = "gl_detail.localdebitamount";
                } else {
                    r = "gl_detail.localcreditamount";
                }
                break;
            case "2":
                if (isdebit) {
                    r = "gl_detail.groupdebitamount";
                } else {
                    r = "gl_detail.groupcreditamount";
                }
                break;
            case "3":
                if (isdebit) {
                    r = "gl_detail.globaldebitamount";
                } else {
                    r = "gl_detail.globalcreditamount";
                }
                break;
            case "4":
                if (isdebit) {
                    r = "gl_detail.setofbookdebitamount";
                } else {
                    r = "gl_detail.setofbookcreditamount";
                }
                break;
            case "5":
                if (isdebit) {
                    r = "gl_detail.debitquantity";
                } else {
                    r = "gl_detail.creditquantity";
                }
        }

        return r;
    }

    public String[] getPk_accountingbook() {
        return this.pk_accountingbook;
    }

    public void setPk_accountingbook(String[] pk_accountingbook) {
        this.pk_accountingbook = pk_accountingbook;
    }

    public String[] getPk_vouchertype() {
        return this.pk_vouchertype;
    }

    public void setPk_vouchertype(String[] pk_vouchertype) {
        this.pk_vouchertype = pk_vouchertype;
    }

    public String[] getPeriod() {
        return this.period;
    }

    public void setPeriod(String[] period) {
        this.period = period;
    }

    public String getYear_start() {
        return this.year_start;
    }

    public void setYear_start(String year_start) {
        this.year_start = year_start;
    }

    public String getYear_end() {
        return this.year_end;
    }

    public void setYear_end(String year_end) {
        this.year_end = year_end;
    }

    public String getPeriod_start() {
        return this.period_start;
    }

    public void setPeriod_start(String period_start) {
        this.period_start = period_start;
    }

    public String getPeriod_end() {
        return this.period_end;
    }

    public void setPeriod_end(String period_end) {
        this.period_end = period_end;
    }

    public String getPrepareddate_start() {
        return this.prepareddate_start;
    }

    public void setPrepareddate_start(String prepareddate_start) {
        this.prepareddate_start = prepareddate_start;
    }

    public String getPrepareddate_end() {
        return this.prepareddate_end;
    }

    public void setPrepareddate_end(String prepareddate_end) {
        this.prepareddate_end = prepareddate_end;
    }

    public String getNum_start() {
        return this.num_start;
    }

    public void setNum_start(String num_start) {
        this.num_start = num_start;
    }

    public String getNum_end() {
        return this.num_end;
    }

    public void setNum_end(String num_end) {
        this.num_end = num_end;
    }

    public String getAttachment_start() {
        return this.attachment_start;
    }

    public void setAttachment_start(String attachment_start) {
        this.attachment_start = attachment_start;
    }

    public String getAttachment_end() {
        return this.attachment_end;
    }

    public void setAttachment_end(String attachment_end) {
        this.attachment_end = attachment_end;
    }

    public String getPk_system() {
        return this.pk_system;
    }

    public void setPk_system(String pk_system) {
        this.pk_system = pk_system;
    }

    public String[] getPk_prepared() {
        return this.pk_prepared;
    }

    public void setPk_prepared(String[] pk_prepared) {
        this.pk_prepared = pk_prepared;
    }

    public String getPk_casher() {
        return this.pk_casher;
    }

    public void setPk_casher(String pk_casher) {
        this.pk_casher = pk_casher;
    }

    public String getPk_checked() {
        return this.pk_checked;
    }

    public void setPk_checked(String pk_checked) {
        this.pk_checked = pk_checked;
    }

    public String getPk_manager() {
        return this.pk_manager;
    }

    public void setPk_manager(String pk_manager) {
        this.pk_manager = pk_manager;
    }

    public boolean isNormalflag() {
        return this.normalflag;
    }

    public void setNormalflag(boolean normalflag) {
        this.normalflag = normalflag;
    }

    public boolean isDiscardflag() {
        return this.discardflag;
    }

    public void setDiscardflag(boolean discardflag) {
        this.discardflag = discardflag;
    }

    public boolean isTempsaveflag() {
        return this.tempsaveflag;
    }

    public void setTempsaveflag(boolean tempsaveflag) {
        this.tempsaveflag = tempsaveflag;
    }

    public boolean isErrorflag() {
        return this.errorflag;
    }

    public void setErrorflag(boolean errorflag) {
        this.errorflag = errorflag;
    }

    public String getDifflag() {
        return this.difflag;
    }

    public void setDifflag(String difflag) {
        this.difflag = difflag;
    }

    public String getConvertState() {
        return this.convertState;
    }

    public void setConvertState(String convertState) {
        this.convertState = convertState;
    }

    public String getConvertSource() {
        return this.convertSource;
    }

    public void setConvertSource(String convertSource) {
        this.convertSource = convertSource;
    }

    public String getVoucherState() {
        return this.voucherState;
    }

    public void setVoucherState(String voucherState) {
        this.voucherState = voucherState;
    }

    public String[] getPk_unit() {
        return this.pk_unit;
    }

    public void setPk_unit(String[] pk_unit) {
        this.pk_unit = pk_unit;
    }

    public String[] getExplanation() {
        return this.explanation;
    }

    public void setExplanation(String[] explanation) {
        this.explanation = explanation;
    }

    public String[] getAccountingcode() {
        return this.accountingcode;
    }

    public void setAccountingcode(String[] accountingcode) {
        this.accountingcode = accountingcode;
    }

    public String[] getOppositesubj() {
        return this.oppositesubj;
    }

    public void setOppositesubj(String[] oppositesubj) {
        this.oppositesubj = oppositesubj;
    }

    public String[] getPk_currtype() {
        return this.pk_currtype;
    }

    public void setPk_currtype(String[] pk_currtype) {
        this.pk_currtype = pk_currtype;
    }

    public AmountCondition getOriamount() {
        return this.oriamount;
    }

    public void setOriamount(AmountCondition oriamount) {
        this.oriamount = oriamount;
    }

    public AmountCondition getAmount() {
        return this.amount;
    }

    public void setAmount(AmountCondition amount) {
        this.amount = amount;
    }

    public String getAmountType() {
        return this.amountType;
    }

    public void setAmountType(String amountType) {
        this.amountType = amountType;
    }

    public AssVO[] getAssvos() {
        return this.assvos;
    }

    public void setAssvos(AssVO[] assvos) {
        this.assvos = assvos;
    }

    public AmountCondition getQuantity() {
        return this.quantity;
    }

    public void setQuantity(AmountCondition quantity) {
        this.quantity = quantity;
    }

    public String[] getCheckstyle() {
        return this.checkstyle;
    }

    public void setCheckstyle(String[] checkstyle) {
        this.checkstyle = checkstyle;
    }

    public AmountCondition getCheckno() {
        return this.checkno;
    }

    public void setCheckno(AmountCondition checkno) {
        this.checkno = checkno;
    }

    public AmountCondition getCheckdate() {
        return this.checkdate;
    }

    public void setCheckdate(AmountCondition checkdate) {
        this.checkdate = checkdate;
    }

    public String getOffervoucher() {
        return this.offervoucher;
    }

    public void setOffervoucher(String offervoucher) {
        this.offervoucher = offervoucher;
    }

    public String getBusidate() {
        return this.busidate;
    }

    public void setBusidate(String busidate) {
        this.busidate = busidate;
    }

    public String[] getPk_liabilitycenter() {
        return this.pk_liabilitycenter;
    }

    public void setPk_liabilitycenter(String[] pk_liabilitycenter) {
        this.pk_liabilitycenter = pk_liabilitycenter;
    }

    public String getAppcode() {
        return this.appcode;
    }

    public void setAppcode(String appcode) {
        this.appcode = appcode;
    }
}
