package cn.estsh.i3plus.ext.mes.pcn.pojo.sqlpack;

import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;

/**
 * @Description:
 * @Reference: Mes 条件封装
 * @Author: wangjie
 * @CreateDate:2019-04-22-14:58
 * @Modify:
 **/
public class MesPcnExtHqlPack {

    public static DdlPackBean getAllBaseDataByNormalPro(BaseBean baseBean, String organizeCode) {
        DdlPackBean packBean = new DdlPackBean();
        DdlPreparedPack.getStringEqualPack(organizeCode, MesPcnExtConstWords.ORGANIZE_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(baseBean.getIsValid(), MesPcnExtConstWords.IS_VALID, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesPcnExtConstWords.IS_DELETED, packBean);
        return packBean;
    }

    public static DdlPackBean getAllValidData(String organizeCode) {
        DdlPackBean packBean = new DdlPackBean();
        DdlPreparedPack.getStringEqualPack(organizeCode, MesPcnExtConstWords.ORGANIZE_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), MesPcnExtConstWords.IS_VALID, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesPcnExtConstWords.IS_DELETED, packBean);
        return packBean;
    }

}
