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

import cn.estsh.i3plus.ext.mes.pojo.bean.*;
import cn.estsh.i3plus.ext.mes.pojo.model.*;
import cn.estsh.i3plus.ext.mes.pojo.model.bu.BuBusiErrorMessageModel;
import cn.estsh.i3plus.ext.mes.pojo.model.bu.BuWorkTimeDetailModel;
import cn.estsh.i3plus.ext.mes.pojo.model.bu3.SxAssistOutAndEnterModel;
import cn.estsh.i3plus.ext.mes.pojo.model.bu3.SxOfficialLossDetailRecordModel;
import cn.estsh.i3plus.ext.mes.pojo.model.ep.EpPartDivulgeCheckRecordModel;
import cn.estsh.i3plus.ext.mes.pojo.model.jx.JxOqcCheckReportModel;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
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;
import cn.estsh.i3plus.pojo.mes.bean.*;
import org.apache.commons.beanutils.ConvertUtils;
import org.springframework.util.StringUtils;

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

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

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

    public static DdlPackBean getAllBaseDataByNormalPro(String organizeCode, Integer isValid) {
        DdlPackBean packBean = new DdlPackBean();
        DdlPreparedPack.getStringEqualPack(organizeCode, MesExtConstWords.ORGANIZE_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(isValid, MesExtConstWords.IS_VALID, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtConstWords.IS_DELETED, packBean);
        return packBean;
    }

    public static DdlPackBean getAllBaseData(String organizeCode) {
        DdlPackBean packBean = new DdlPackBean();
        DdlPreparedPack.getStringEqualPack(organizeCode, MesExtConstWords.ORGANIZE_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtConstWords.IS_DELETED, packBean);
        return packBean;
    }

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

    public static DdlPackBean getMesProcessQManage(MesProcessQManage mesProcessQManage) {
        DdlPackBean packBean = getAllBaseData(mesProcessQManage.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(mesProcessQManage.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(mesProcessQManage.getProcessCode(), MesExtConstWords.PROCESS_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(mesProcessQManage.getManageProjects(), MesExtConstWords.MANAGE_PROJECTS, packBean);
        DdlPreparedPack.getStringLikerPack(mesProcessQManage.getScrewType(), MesExtConstWords.SCREW_TYPE, packBean);
        DdlPreparedPack.getStringEqualPack(mesProcessQManage.getCheckType(), MesExtConstWords.CHECK_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(mesProcessQManage.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        return packBean;
    }

    public static DdlPackBean getEsopReadRecord(MesEsopReadRecord esopReadRecord) {
        DdlPackBean packBean = getAllValidData(esopReadRecord.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(esopReadRecord.getProcessCode(), MesExtConstWords.PROCESS_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(esopReadRecord.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(esopReadRecord.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(esopReadRecord.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        if (!StringUtils.isEmpty(esopReadRecord.getCreateDateTimeStart()) || !StringUtils.isEmpty(esopReadRecord.getCreateDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(esopReadRecord.getCreateDateTimeStart(), esopReadRecord.getCreateDateTimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getMesProcessCheck(MesProcessCheck processCheck) {
        DdlPackBean packBean = getAllBaseData(processCheck.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(processCheck.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(processCheck.getProcessCode(), MesExtConstWords.PROCESS_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(processCheck.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtConstWords.IS_DELETED, packBean);
        return packBean;
    }

    public static DdlPackBean getMesProjectConfirm(MesProjectConfirm projectConfirm) {
        DdlPackBean packBean = getAllBaseData(projectConfirm.getOrganizeCode());
        DdlPreparedPack.getNumEqualPack(projectConfirm.getProdCfgTypeClassify(), MesExtConstWords.PROD_CFG_TYPE_CLASSIFY, packBean);
        DdlPreparedPack.getNumEqualPack(projectConfirm.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtConstWords.IS_DELETED, packBean);
        return packBean;
    }

    public static DdlPackBean getMesConsistencyAffirmPart(MesConsistencyAffirmPart consistencyAffirmPart) {
        DdlPackBean packBean = getAllBaseData(consistencyAffirmPart.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(consistencyAffirmPart.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtConstWords.IS_DELETED, packBean);
        DdlPreparedPack.getNumEqualPack(consistencyAffirmPart.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        return packBean;
    }

    public static DdlPackBean getShiftExt(MesShiftExt shiftExt) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(shiftExt, shiftExt.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(shiftExt.getAreaCode(), MesExtConstWords.AREA_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(shiftExt.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(shiftExt.getShiftCode(), MesExtConstWords.SHIFT_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(shiftExt.getShiftName(), MesExtConstWords.SHIFT_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getShiftProd(ShiftProdModel shiftProd) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(shiftProd, shiftProd.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(shiftProd.getProdCode(), MesExtConstWords.PROD_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(shiftProd.getProdName(), MesExtConstWords.PROD_NAME, packBean);
        DdlPreparedPack.getNumEqualPack(shiftProd.getProdCategory(), MesExtConstWords.PROD_CATEGORY, packBean);
        DdlPreparedPack.getNumEqualPack(shiftProd.getProdType(), MesExtConstWords.PROD_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(shiftProd.getIsProdTime(), MesExtConstWords.IS_PROD_TIME, packBean);
        if (!StringUtils.isEmpty(shiftProd.getProdTypeArr())) {
            String[] prodTypeArr = shiftProd.getProdTypeArr().split(",");
            Integer[] prodTypeIntArr = (Integer[]) ConvertUtils.convert(prodTypeArr, Integer.class);
            DdlPreparedPack.getInPackArray(prodTypeIntArr, MesExtConstWords.PROD_TYPE, packBean);
        }
        return packBean;
    }

    public static DdlPackBean getMesBadCell(MesBadCell mesBadCell) {
        DdlPackBean packBean = getAllBaseData(mesBadCell.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(mesBadCell.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(mesBadCell.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(mesBadCell.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);
        if (!StringUtils.isEmpty(mesBadCell.getModifyDateTimeStart()) || !StringUtils.isEmpty(mesBadCell.getModifyDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(mesBadCell.getModifyDateTimeStart(), mesBadCell.getModifyDateTimeEnd(), MesExtConstWords.MODIFY_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getMesProjectSort(MesProjectSort mesProjectSort) {
        DdlPackBean packBean = getAllBaseData(mesProjectSort.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(mesProjectSort.getProjectSortNo(), "projectSortNo", packBean);
        DdlPreparedPack.getStringLikerPack(mesProjectSort.getProjectSortName(), "projectSortName", packBean);
        DdlPreparedPack.getNumEqualPack(mesProjectSort.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        return packBean;
    }

    public static DdlPackBean getMesProcedureProject(MesProcedureProject mesProcedureProject) {
        DdlPackBean packBean = getAllBaseData(mesProcedureProject.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(mesProcedureProject.getProjectSortNo(), "projectSortNo", packBean);
        DdlPreparedPack.getStringLikerPack(mesProcedureProject.getProjectCode(), "projectCode", packBean);
        DdlPreparedPack.getStringLikerPack(mesProcedureProject.getProjectName(), "projectName", packBean);
        DdlPreparedPack.getNumEqualPack(mesProcedureProject.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        return packBean;
    }

    public static DdlPackBean getMesPartExt(MesPartExt part, String organizeCode) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(part, organizeCode);
        if (!StringUtils.isEmpty(part.getPartNo())) {
            DdlPreparedPack.getStringLikerPack(part.getPartNo(), "partNo", packBean);
        }

        if (!StringUtils.isEmpty(part.getPartName())) {
            DdlPreparedPack.getStringLikerPack(part.getPartName(), "partName", packBean);
        }

        if (!StringUtils.isEmpty(part.getCategoryCode1())) {
            DdlPreparedPack.getStringEqualPack(part.getCategoryCode1(), "categoryCode1", packBean);
        }

        if (!StringUtils.isEmpty(part.getCategoryCode2())) {
            DdlPreparedPack.getStringEqualPack(part.getCategoryCode2(), "categoryCode2", packBean);
        }

        if (!StringUtils.isEmpty(part.getCategoryCode3())) {
            DdlPreparedPack.getStringEqualPack(part.getCategoryCode3(), "categoryCode3", packBean);
        }

        return packBean;
    }

    public static DdlPackBean getMesProdPackExt(MesProdPackExt prodPackExt, String organizeCode) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(prodPackExt, organizeCode);
        DdlPreparedPack.getStringEqualPack(prodPackExt.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(prodPackExt.getCustomerCode(), MesExtConstWords.CUSTOMER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(prodPackExt.getPackSpec(), MesExtConstWords.PACK_SPEC, packBean);
        DdlPreparedPack.getStringLikerPack(prodPackExt.getPackLabelTemplate(), MesExtConstWords.PACK_LABEL_TEMPLATE, packBean);
        DdlPreparedPack.getStringLikerPack(prodPackExt.getProcessLabelTemplate(), MesExtConstWords.PROCESS_LABEL_TEMPLATE, packBean);
        DdlPreparedPack.getStringLikerPack(prodPackExt.getQualityAssureTemplate(), MesExtConstWords.QUALITY_ASSURE_TEMPLATE, packBean);
        DdlPreparedPack.getStringLikerPack(prodPackExt.getBigProcessLabelTemplate(), MesExtConstWords.BIG_PROCESS_LABEL_TEMPLATE, packBean);
        DdlPreparedPack.getStringLikerPack(prodPackExt.getPptCode(), MesExtConstWords.PPT_CODE, packBean);
        return packBean;
    }

    public static DdlPackBean getMesNumberRuleExt(MesNumberRuleExt numberRuleExt) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(numberRuleExt, numberRuleExt.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(numberRuleExt.getRuleCode(), MesExtConstWords.RULE_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(numberRuleExt.getNumberRule(), MesExtConstWords.NUMBER_RULE, packBean);
        DdlPreparedPack.getStringLikerPack(numberRuleExt.getPrefix(), MesExtConstWords.PREFIX, packBean);
        DdlPreparedPack.getNumEqualPack(numberRuleExt.getIsCycle(), MesExtConstWords.IS_CYCLE, packBean);
        return packBean;
    }

    public static DdlPackBean getMesProcessFirstItem(MesProcessFirstItem mesProcessFirstItem) {
        DdlPackBean packBean = getAllBaseData(mesProcessFirstItem.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(mesProcessFirstItem.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(mesProcessFirstItem.getProcessCode(), MesExtConstWords.PROCESS_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(mesProcessFirstItem.getCheckMessage(), MesExtConstWords.CHECK_MESSAGE, packBean);
        DdlPreparedPack.getNumEqualPack(mesProcessFirstItem.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        return packBean;
    }

    public static DdlPackBean getProductEncodeCfg(MesProductEncodeCfg productEncodeCfg) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(productEncodeCfg, productEncodeCfg.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(productEncodeCfg.getMatchValue(), MesExtConstWords.MATCH_VALUE, packBean);
        DdlPreparedPack.getNumEqualPack(productEncodeCfg.getCodeType(), MesExtConstWords.CODE_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(productEncodeCfg.getMatchType(), MesExtConstWords.MATCH_TYPE, packBean);
        DdlPreparedPack.getStringEqualPack(productEncodeCfg.getRuleCode(), MesExtConstWords.RULE_CODE, packBean);
        return packBean;
    }

    public static DdlPackBean getMesConsistencyAffirmProject(MesConsistencyAffirmProject consistencyAffirmProject) {
        DdlPackBean packBean = getAllBaseData(consistencyAffirmProject.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(consistencyAffirmProject.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtConstWords.IS_DELETED, packBean);
        DdlPreparedPack.getNumEqualPack(consistencyAffirmProject.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        return packBean;
    }

    public static DdlPackBean getPrinterCfg(MesPrinterCfg printerCfg) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(printerCfg, printerCfg.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(printerCfg.getPrinterNo(), MesExtConstWords.PRINTER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(printerCfg.getPrinterName(), MesExtConstWords.PRINTER_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getWorkCenterContainerLocation(MesWorkCenterContainerLocation workCenterContainerLocation) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(workCenterContainerLocation, workCenterContainerLocation.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(workCenterContainerLocation.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(workCenterContainerLocation.getCtLocationNo(), MesExtConstWords.CT_LOCATION_NO, packBean);
        return packBean;
    }

    public static DdlPackBean getUnWorkTimeDetail(UnWorkTimeDetailModel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(model.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(model.getShiftCode(), MesExtConstWords.SHIFT_CODE, packBean);
        if (StringUtils.isEmpty(model.getProdType())) {
            List<Integer> prodTypeList = new ArrayList<>();
            prodTypeList.add(MesExtEnumUtil.SHIFT_PROD_TYPE.NORMAL_STOP_CENTER.getValue());
            prodTypeList.add(MesExtEnumUtil.SHIFT_PROD_TYPE.UNNORMAL_STOP_CENTER.getValue());
            DdlPreparedPack.getInPackList(prodTypeList, MesExtConstWords.PROD_TYPE, packBean);
        } else {
            DdlPreparedPack.getNumEqualPack(model.getProdType(), MesExtConstWords.PROD_TYPE, packBean);
        }
        DdlPreparedPack.getStringEqualPack(model.getProdCode(), MesExtConstWords.PROD_CODE, packBean);
        if (!StringUtils.isEmpty(model.getWorkTimeStart()) || !StringUtils.isEmpty(model.getWorkTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getWorkTimeStart(), model.getWorkTimeEnd(), MesExtConstWords.WORK_TIME, packBean, false);
        }
        return packBean;
    }

    public static DdlPackBean getModuleFileImportLot(MesModuleFileImportLot moduleFileImportLot) {
        DdlPackBean packBean = getAllValidData(moduleFileImportLot.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(moduleFileImportLot.getLotNo(), MesExtConstWords.LOT_NO, packBean);
        DdlPreparedPack.getStringEqualPack(moduleFileImportLot.getModule(), MesExtConstWords.MODULE, packBean);
        if (!StringUtils.isEmpty(moduleFileImportLot.getCreateDateTimeStart()) || !StringUtils.isEmpty(moduleFileImportLot.getCreateDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(
                    moduleFileImportLot.getCreateDateTimeStart(), moduleFileImportLot.getCreateDateTimeEnd(),
                    MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getContainerType(MesContainerType containerType) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(containerType, containerType.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(containerType.getCtCode(), MesExtConstWords.CT_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(containerType.getCtName(), MesExtConstWords.CT_NAME, packBean);
        DdlPreparedPack.getNumEqualPack(containerType.getUseLimit(), MesExtConstWords.USE_LIMIT, packBean);
        return packBean;
    }

    public static DdlPackBean getContainer(MesContainer container) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(container, container.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(container.getCtNo(), MesExtConstWords.CT_NO, packBean);
        DdlPreparedPack.getStringEqualPack(container.getCtCode(), MesExtConstWords.CT_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(container.getUseStatus(), MesExtConstWords.USE_STATUS, packBean);
        return packBean;
    }

    public static DdlPackBean getPartContainerCapacity(MesPartContainerCapacity partContainerCapacity) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(partContainerCapacity, partContainerCapacity.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(partContainerCapacity.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringEqualPack(partContainerCapacity.getCtCode(), MesExtConstWords.CT_CODE, packBean);
        return packBean;
    }

    public static DdlPackBean getDataObject(MesDataObject dataObject) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(dataObject, dataObject.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(dataObject.getObjectCode(), MesExtConstWords.OBJECT_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(dataObject.getObjectName(), MesExtConstWords.OBJECT_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getObjectCfg(MesObjectCfg objectCfg) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(objectCfg, objectCfg.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(objectCfg.getObjectCode(), MesExtConstWords.OBJECT_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(objectCfg.getFieldCode(), MesExtConstWords.FIELD_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(objectCfg.getFieldName(), MesExtConstWords.FIELD_NAME, packBean);
        DdlPreparedPack.getStringLikerPack(objectCfg.getPlcCode(), MesExtConstWords.PLC_CODE, packBean);
        return packBean;
    }

    public static DdlPackBean getOqcCheck(SxOqcManageModel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(model.getOrderNo(), MesExtConstWords.ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringEqualPack(model.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(model.getOqcType(), MesExtConstWords.OQC_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(model.getCheckResult(), MesExtConstWords.CHECK_RESULT, packBean);
        DdlPreparedPack.getStringLikerPack(model.getOqcNo(), MesExtConstWords.OQC_NO, packBean);
        if (CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue() == model.getPageType()) {
            DdlPreparedPack.getStringLikerPack(model.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);
            DdlPreparedPack.getIsNotNull(MesExtConstWords.SERIAL_NUMBER, packBean);
        } else {
            DdlPreparedPack.getIsNull(MesExtConstWords.SERIAL_NUMBER, packBean);
        }

        DdlPreparedPack.getIsNotNull(MesExtConstWords.CHECK_RESULT, packBean);
        if (!StringUtils.isEmpty(model.getCreateDatetimeStart()) || !StringUtils.isEmpty(model.getCreateDatetimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getCreateDatetimeStart(), model.getCreateDatetimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getOqcCheckDetail(MesOqcCheckDetail detail) {
        DdlPackBean packBean = getAllValidData(detail.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(detail.getOqcNo(), MesExtConstWords.OQC_NO, packBean);
        DdlPreparedPack.getStringLikerPack(detail.getCheckItem(), MesExtConstWords.CHECK_ITEM, packBean);
        return packBean;
    }

    //public static DdlPackBean getOqcProject(MesOqcProject oqcProject) {
    //    DdlPackBean packBean = getAllBaseDataByNormalPro(oqcProject, oqcProject.getOrganizeCode());
    //    DdlPreparedPack.getStringLikerPack(oqcProject.getOqcProject(), MesExtConstWords.OQC_PROJECT, packBean);
    //    DdlPreparedPack.getStringLikerPack(oqcProject.getStandard(), MesExtConstWords.STANDARD, packBean);
    //    DdlPreparedPack.getStringEqualPack(oqcProject.getPartNo(), MesExtConstWords.PART_NO, packBean);
    //    DdlPreparedPack.getNumEqualPack(oqcProject.getOqcType(), MesExtConstWords.OQC_TYPE, packBean);
    //    DdlPreparedPack.getStringEqualPack(oqcProject.getCategoryCode3(), MesExtConstWords.CATEGORY_CODE3, packBean);
    //    return packBean;
    //}

    public static DdlPackBean getOqcProject(MesOqcRuleNoteDetail oqcProject) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(oqcProject, oqcProject.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(oqcProject.getCheckItem(), MesExtConstWords.CHECK_ITEM, packBean);
        DdlPreparedPack.getStringLikerPack(oqcProject.getStandard(), MesExtConstWords.STANDARD, packBean);
        DdlPreparedPack.getStringEqualPack(oqcProject.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getNumEqualPack(oqcProject.getOqcNoType(), MesExtConstWords.OQC_NO_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(oqcProject.getCheckType(), MesExtConstWords.CHECK_TYPE, packBean);
        DdlPreparedPack.getStringEqualPack(oqcProject.getCategoryCode3(), MesExtConstWords.CATEGORY_CODE3, packBean);
        return packBean;
    }

    public static DdlPackBean getProduceSnExt(ProduceSnExtModel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(model.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringEqualPack(model.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringEqualPack(model.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);
        DdlPreparedPack.getNumEqualPack(model.getSnStatus(), MesExtConstWords.SN_STATUS, packBean);
        DdlPreparedPack.getNumEqualPack(model.getQcStatus(), MesExtConstWords.QC_STATUS, packBean);
        DdlPreparedPack.getNumEqualPack(model.getSnType(), MesExtConstWords.SN_TYPE, packBean);
        if (!StringUtils.isEmpty(model.getCreateDatetimeStart()) || !StringUtils.isEmpty(model.getCreateDatetimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getCreateDatetimeStart(), model.getCreateDatetimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        if (!StringUtils.isEmpty(model.getOutWorkCenterTimeStart()) || !StringUtils.isEmpty(model.getOutWorkCenterTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getOutWorkCenterTimeStart(), model.getOutWorkCenterTimeEnd(), MesExtConstWords.OUT_WORK_CENTER_TIME, packBean, true);
        }
        if (!StringUtils.isEmpty(model.getWorkTimeStart()) || !StringUtils.isEmpty(model.getWorkTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getWorkTimeStart(), model.getWorkTimeEnd(), MesExtConstWords.WORK_TIME, packBean, false);
        }
        return packBean;
    }

    public static DdlPackBean getErrorLineOff(ErrorOffLineModel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(model.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);
        DdlPreparedPack.getStringEqualPack(model.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringEqualPack(model.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(model.getFreStatus(), MesExtConstWords.FRE_STATUS, packBean);
        DdlPreparedPack.getNumEqualPack(model.getConfirmStatus(), MesExtConstWords.CONFIRM_STATUS, packBean);
        if (!StringUtils.isEmpty(model.getOutWcTimeStart()) || !StringUtils.isEmpty(model.getOutWcTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getOutWcTimeStart(), model.getOutWcTimeEnd(), MesExtConstWords.OUT_WC_TIME, packBean, true);
        }
        if (!StringUtils.isEmpty(model.getFreTimeStart()) || !StringUtils.isEmpty(model.getFreTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getFreTimeStart(), model.getFreTimeEnd(), MesExtConstWords.FRE_TIME, packBean, true);
        }
        if (!StringUtils.isEmpty(model.getConfirmTimeStart()) || !StringUtils.isEmpty(model.getConfirmTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getConfirmTimeStart(), model.getConfirmTimeEnd(), MesExtConstWords.CONFIRM_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getPartDivulgeCheckRecord(EpPartDivulgeCheckRecordModel partDivulgeCheckRecord) {
        DdlPackBean packBean = getAllValidData(partDivulgeCheckRecord.getOrganizeCode());
        if (!StringUtils.isEmpty(partDivulgeCheckRecord.getPartNo())) {
            DdlPreparedPack.getStringRightLikerPack(partDivulgeCheckRecord.getPartNo(), MesExtConstWords.PART_NO, packBean);
        }

        if (!StringUtils.isEmpty(partDivulgeCheckRecord.getPackageNo())) {
            DdlPreparedPack.getStringRightLikerPack(partDivulgeCheckRecord.getPackageNo(), MesExtConstWords.PACKAGENO, packBean);
        }

        if (!StringUtils.isEmpty(partDivulgeCheckRecord.getSerialNumber())) {
            DdlPreparedPack.getStringRightLikerPack(partDivulgeCheckRecord.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);
        }

        if (!StringUtils.isEmpty(partDivulgeCheckRecord.getWorkOrderNo())) {
            DdlPreparedPack.getStringRightLikerPack(partDivulgeCheckRecord.getWorkOrderNo(), MesExtConstWords.SERIAL_NUMBER, packBean);
        }

        if (!StringUtils.isEmpty(partDivulgeCheckRecord.getOperator())) {
            DdlPreparedPack.getStringRightLikerPack(partDivulgeCheckRecord.getOperator(), MesExtConstWords.SERIAL_NUMBER, packBean);
        }

        if (partDivulgeCheckRecord.getCheckResult() != null) {
            DdlPreparedPack.getNumEqualPack(partDivulgeCheckRecord.getCheckResult(), MesExtConstWords.CHECK_RESULT, packBean);
        }

        if (!StringUtils.isEmpty(partDivulgeCheckRecord.getCheckTimeStart()) || !StringUtils.isEmpty(partDivulgeCheckRecord.getCheckTimeEnd())) {
            DdlPreparedPack.timeBuilder(partDivulgeCheckRecord.getCheckTimeStart(), partDivulgeCheckRecord.getCheckTimeEnd(), MesExtConstWords.CHECK_TIME, packBean, true);
        }

        if (!StringUtils.isEmpty(partDivulgeCheckRecord.getOutWorkCenterTimeStart()) || !StringUtils.isEmpty(partDivulgeCheckRecord.getOutWorkCenterTimeEnd())) {
            DdlPreparedPack.timeBuilder(partDivulgeCheckRecord.getOutWorkCenterTimeStart(), partDivulgeCheckRecord.getOutWorkCenterTimeEnd(), MesExtConstWords.OUT_WORK_CENTER_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getPrintPartParameterExt(MesPrintPartParameterExt printPartParameterExt) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(printPartParameterExt, printPartParameterExt.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(printPartParameterExt.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(printPartParameterExt.getPartName(), MesExtConstWords.PART_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getProdUnbindRecord(MesProdUnbindRecord prodUnbindRecord) {
        DdlPackBean packBean = getAllValidData(prodUnbindRecord.getOrganizeCode());
        DdlPreparedPack.getStringRightLikerPack(prodUnbindRecord.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringRightLikerPack(prodUnbindRecord.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringRightLikerPack(prodUnbindRecord.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);
        DdlPreparedPack.getStringRightLikerPack(prodUnbindRecord.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.timeBuilder(prodUnbindRecord.getModifyDateTimeStart(), prodUnbindRecord.getModifyDateTimeEnd(), MesExtConstWords.MODIFY_DATE_TIME, packBean, true);
        return packBean;
    }

    public static DdlPackBean getEmployeeAndProcessBindSelectQuery(MesEmployeeAndProcessBind employeeAndProcessBind, String organizeCode) {
        DdlPackBean packBean = null;
        if (null == employeeAndProcessBind.getIsValid()) {
            packBean = DdlPackBean.getDdlPackBean(organizeCode);
        } else {
            packBean = DdlPackBean.getDdlPackBean(organizeCode, employeeAndProcessBind.getIsValid());
        }
        DdlPreparedPack.getStringLikerPack(employeeAndProcessBind.getWorkCenterCode(), "workCenterCode", packBean);
        DdlPreparedPack.getStringLikerPack(employeeAndProcessBind.getSkillKanbanProcessCode(), "skillKanbanProcessCode", packBean);
        DdlPreparedPack.getStringLikerPack(employeeAndProcessBind.getEmployeeCode(), "employeeCode", packBean);
        return packBean;
    }

    public static DdlPackBean getEmployeeNatureSelectQuery(MesEmployeeNature employeeNature, String organizeCode) {
        DdlPackBean packBean = null;
        if (null == employeeNature.getIsValid()) {
            packBean = DdlPackBean.getDdlPackBean(organizeCode);
        } else {
            packBean = DdlPackBean.getDdlPackBean(organizeCode, employeeNature.getIsValid());
        }
        DdlPreparedPack.getStringLikerPack(employeeNature.getEmployeeNatureCode(), "employeeNatureCode", packBean);
        return packBean;
    }

    public static DdlPackBean getEmployeeSkillsManagementSelectQuery(MesEmployeeSkillsManagement employeeSkillsManagement, String organizeCode) {
        DdlPackBean packBean = null;
        if (null == employeeSkillsManagement.getIsValid()) {
            packBean = DdlPackBean.getDdlPackBean(organizeCode);
        } else {
            packBean = DdlPackBean.getDdlPackBean(organizeCode, employeeSkillsManagement.getIsValid());
        }
        DdlPreparedPack.getStringLikerPack(employeeSkillsManagement.getEmployeeCode(), "employeeCode", packBean);
        DdlPreparedPack.getStringLikerPack(employeeSkillsManagement.getEmployeeNatureCode(), "employeeNatureCode", packBean);
        return packBean;
    }

    public static DdlPackBean getProcessLabelMarkingSelectQuery(MesProcessLabelMarking processLabelMarking, String organizeCode) {
        DdlPackBean packBean = null;
        if (null == processLabelMarking.getIsValid()) {
            packBean = DdlPackBean.getDdlPackBean(organizeCode);
        } else {
            packBean = DdlPackBean.getDdlPackBean(organizeCode, processLabelMarking.getIsValid());
        }
        DdlPreparedPack.getStringLikerPack(processLabelMarking.getProcessLabelCode(), "processLabelCode", packBean);
        DdlPreparedPack.getStringLikerPack(processLabelMarking.getLocation(), "location", packBean);
        return packBean;
    }

    public static DdlPackBean getSkillKanbanProcessInformationSelectQuery(MesSkillKanbanProcessInformation skillKanbanProcessInformation, String organizeCode) {
        DdlPackBean packBean = null;
        if (null == skillKanbanProcessInformation.getIsValid()) {
            packBean = DdlPackBean.getDdlPackBean(organizeCode);
        } else {
            packBean = DdlPackBean.getDdlPackBean(organizeCode, skillKanbanProcessInformation.getIsValid());
        }
        DdlPreparedPack.getStringLikerPack(skillKanbanProcessInformation.getWorkCenterCode(), "workCenterCode", packBean);
        DdlPreparedPack.getStringLikerPack(skillKanbanProcessInformation.getSkillKanbanProcessCode(), "skillKanbanProcessCode", packBean);
        DdlPreparedPack.getStringLikerPack(skillKanbanProcessInformation.getProcessLabelCode(), "processLabelCode", packBean);
        return packBean;
    }

    public static DdlPackBean getSkillsManagementBenchmarkSelectQuery(MesSkillsManagementBenchmark skillsManagementBenchmark, String organizeCode) {
        DdlPackBean packBean = null;
        if (null == skillsManagementBenchmark.getIsValid()) {
            packBean = DdlPackBean.getDdlPackBean(organizeCode);
        } else {
            packBean = DdlPackBean.getDdlPackBean(organizeCode, skillsManagementBenchmark.getIsValid());
        }
        DdlPreparedPack.getStringLikerPack(skillsManagementBenchmark.getSkillLevel(), "skillLevel", packBean);
        DdlPreparedPack.getStringLikerPack(skillsManagementBenchmark.getStandard(), "standard", packBean);
        return packBean;
    }

    public static DdlPackBean getTeamManagementIntroduceSelectQuery(MesTeamManagementIntroduce teamManagementIntroduce, String organizeCode) {
        DdlPackBean packBean = null;
        if (null == teamManagementIntroduce.getIsValid()) {
            packBean = DdlPackBean.getDdlPackBean(organizeCode);
        } else {
            packBean = DdlPackBean.getDdlPackBean(organizeCode, teamManagementIntroduce.getIsValid());
        }
        DdlPreparedPack.getStringLikerPack(teamManagementIntroduce.getWorkCenterCode(), "workCenterCode", packBean);
        return packBean;
    }

    public static DdlPackBean getBusiConfigSelectQuery(MesBusiConfig busiConfig) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(busiConfig, busiConfig.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(busiConfig.getCfgCode(), MesExtConstWords.CFG_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(busiConfig.getCfgName(), MesExtConstWords.CFG_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getWorkTimeDetail(BuWorkTimeDetailModel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(model.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(model.getShiftCode(), MesExtConstWords.SHIFT_CODE, packBean);
        if (model.getProdType() == null || model.getProdType() == 0) {
            DdlPreparedPack.getNumNOEqualPack(MesExtEnumUtil.SHIFT_PROD_TYPE.START_OR_END_SHIFT_TIME.getValue(), MesExtConstWords.PROD_TYPE, packBean);
        } else {
            DdlPreparedPack.getNumEqualPack(model.getProdType(), MesExtConstWords.PROD_TYPE, packBean);
        }

        DdlPreparedPack.getStringEqualPack(model.getProdCode(), MesExtConstWords.PROD_CODE, packBean);
        if (!StringUtils.isEmpty(model.getWorkTimeStart()) || !StringUtils.isEmpty(model.getWorkTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getWorkTimeStart(), model.getWorkTimeEnd(), MesExtConstWords.WORK_TIME, packBean, false);
        }
        DdlPreparedPack.getStringLikerPack(model.getAndonOrderNo(), MesExtConstWords.ANDON_ORDER_NO, packBean);
        return packBean;
    }

    public static DdlPackBean getBusiErrorMessage(BuBusiErrorMessageModel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(model.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getItemPartNo(), MesExtConstWords.ITEM_PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);
        DdlPreparedPack.getStringLikerPack(model.getProcessCode(), MesExtConstWords.PROCESS_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getPassword(), "password", packBean);
        if (!StringUtils.isEmpty(model.getCreateDatetimeStart()) || !StringUtils.isEmpty(model.getCreateDatetimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getCreateDatetimeStart(), model.getCreateDatetimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getTravelMenuFieldConfigSelectQuery(MesTravelMenuFieldConfig model) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(model, model.getOrganizeCode());
        DdlPreparedPack.getNumEqualPack(model.getMenuCode(), MesExtConstWords.MENU_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getFieldCode(), MesExtConstWords.FIELD_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getFieldName(), MesExtConstWords.FIELD_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getMesDataTravel(SxMesDataTravel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getNumEqualPack(model.getMenuCode(), MesExtConstWords.MENU_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getBeforeChange(), MesExtConstWords.BEFORE_CHANGE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getAfterChange(), MesExtConstWords.AFTER_CHANGE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getVoucher(), MesExtConstWords.VOUCHER, packBean);
        DdlPreparedPack.getStringLikerPack(model.getInitialWorkpieceNo(), MesExtConstWords.INITIAL_WORKPIECE_NO, packBean);
        DdlPreparedPack.getNumEqualPack(model.getSkillIsConfirm(), MesExtConstWords.SKILL_IS_CONFIRM, packBean);
        DdlPreparedPack.getNumEqualPack(model.getManufacturingIsConfirm(), MesExtConstWords.MANUFACTURING_IS_CONFIRM, packBean);
        if (!StringUtils.isEmpty(model.getCreateDateTimeStart()) || !StringUtils.isEmpty(model.getCreateDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getCreateDateTimeStart(), model.getCreateDateTimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getProductPrintTypeSelectQuery(MesProductPrintType model) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(model, model.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(model.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getPartName(), MesExtConstWords.PART_NAME, packBean);
        DdlPreparedPack.getNumEqualPack(model.getPrintType(), MesExtConstWords.PRINT_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(model.getPrintMode(), MesExtConstWords.PRINT_MODE, packBean);
        if (!StringUtils.isEmpty(model.getCreateDateTimeStart()) || !StringUtils.isEmpty(model.getCreateDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getCreateDateTimeStart(), model.getCreateDateTimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        return packBean;
    }


    public static DdlPackBean getAssistOutAndEnter(MesAssistOutAndEnter assistOutAndEnter) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(assistOutAndEnter, assistOutAndEnter.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(assistOutAndEnter.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(assistOutAndEnter.getAssistOutAndEnterDetail(), MesExtConstWords.ASSIST_OUT_AND_ENTER_DETAIL, packBean);
        DdlPreparedPack.getStringLikerPack(assistOutAndEnter.getWorkContent(), MesExtConstWords.WORK_CONTENT, packBean);
        DdlPreparedPack.getStringLikerPack(assistOutAndEnter.getOwnerDepartment(), MesExtConstWords.OWNER_DEPARTMENT, packBean);
        if (!StringUtils.isEmpty(assistOutAndEnter.getInfluenceDateStart()) || !StringUtils.isEmpty(assistOutAndEnter.getInfluenceDateEnd())) {
            DdlPreparedPack.timeBuilder(assistOutAndEnter.getInfluenceDateStart(), assistOutAndEnter.getInfluenceDateEnd(), MesExtConstWords.INFLUENCE_DATE, packBean, false);
        }
        return packBean;
    }

    public static DdlPackBean getAssistOutAndEnter(SxAssistOutAndEnterModel assistOutAndEnter, Boolean flag) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(assistOutAndEnter.getOrganizeCode(), assistOutAndEnter.getIsValid());
        DdlPreparedPack.getStringEqualPack(assistOutAndEnter.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(assistOutAndEnter.getCategoryCode(), MesExtConstWords.CATEGORY_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(assistOutAndEnter.getCareerCode(), MesExtConstWords.CAREER_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(assistOutAndEnter.getAssistOutAndEnterDetail(), MesExtConstWords.ASSIST_OUT_AND_ENTER_DETAIL, packBean);
        DdlPreparedPack.getStringLikerPack(assistOutAndEnter.getWorkContent(), MesExtConstWords.WORK_CONTENT, packBean);
        DdlPreparedPack.getStringLikerPack(assistOutAndEnter.getOwnerDepartment(), MesExtConstWords.OWNER_DEPARTMENT, packBean);
        if (!StringUtils.isEmpty(assistOutAndEnter.getInfluenceDateStart()) || !StringUtils.isEmpty(assistOutAndEnter.getInfluenceDateEnd())) {
            if (flag) DdlPreparedPack.timeBuilder(assistOutAndEnter.getInfluenceDateStart(), assistOutAndEnter.getInfluenceDateEnd(), MesExtConstWords.INFLUENCE_DATE, packBean, false);
            else DdlPreparedPack.timeBuilder(assistOutAndEnter.getInfluenceDateStart(), assistOutAndEnter.getInfluenceDateEnd(), MesExtConstWords.INFLUENCE_DATE, true, false, packBean);
        }
        if (assistOutAndEnter.getConfirm() != null && assistOutAndEnter.getConfirm()){
            DdlPreparedPack.getIsNotNull(MesExtConstWords.TAKE_ON_CONFIRM, packBean);
            DdlPreparedPack.getIsNotNull(MesExtConstWords.PERSON_RESPONSIBLE_CONFIRM, packBean);
        }else if (assistOutAndEnter.getConfirm() != null){
            packBean.setWhereAppend(packBean.getWhereAppend() + " and ((model.takeOnConfirm = '' or model.takeOnConfirm is null ) or (model.personResponsibleConfirm = '' or model.personResponsibleConfirm is null) ) ");
        }
        if (assistOutAndEnter.getResponsibleMinistergeConfirmBool() != null && assistOutAndEnter.getResponsibleMinistergeConfirmBool()){
            DdlPreparedPack.getIsNotNull(MesExtConstWords.RESPONSIBLE_MINISTER_CONFIRM, packBean);
        }else if (assistOutAndEnter.getResponsibleMinistergeConfirmBool() != null){
            DdlPreparedPack.getIsNull(MesExtConstWords.RESPONSIBLE_MINISTER_CONFIRM, packBean);
        }
        if (assistOutAndEnter.getTakeOnConfirmBool() != null && assistOutAndEnter.getTakeOnConfirmBool()){
            DdlPreparedPack.getIsNotNull(MesExtConstWords.TAKE_ON_CONFIRM, packBean);
        }else if (assistOutAndEnter.getTakeOnConfirmBool() != null){
            DdlPreparedPack.getIsNull(MesExtConstWords.TAKE_ON_CONFIRM, packBean);
        }
        if (assistOutAndEnter.getPersonResponsibleConfirmBool() != null && assistOutAndEnter.getPersonResponsibleConfirmBool()){
            DdlPreparedPack.getIsNotNull(MesExtConstWords.PERSON_RESPONSIBLE_CONFIRM, packBean);
        }else if (assistOutAndEnter.getPersonResponsibleConfirmBool() != null){
            DdlPreparedPack.getIsNull(MesExtConstWords.PERSON_RESPONSIBLE_CONFIRM, packBean);
        }

        if (!StringUtils.isEmpty(assistOutAndEnter.getOwnerDepartmentArr())) DdlPreparedPack.getInPackList(Arrays.asList(assistOutAndEnter.getOwnerDepartmentArr().split(",")), MesExtConstWords.OWNER_DEPARTMENT, packBean);

        DdlPreparedPack.getNumEqualPack(assistOutAndEnter.getLiabilityAttribution(), MesExtConstWords.LIABILITY_ATTRIBUTION, packBean);
        return packBean;
    }
    public static DdlPackBean getAssistOutAndEnterEam(SxAssistOutAndEnterModel assistOutAndEnter, Boolean flag) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(assistOutAndEnter.getOrganizeCode(), assistOutAndEnter.getIsValid());
//        DdlPreparedPack.getStringEqualPack(assistOutAndEnter.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);//EAM查全部产线 不要改 todo
        DdlPreparedPack.getStringEqualPack(assistOutAndEnter.getCategoryCode(), MesExtConstWords.CATEGORY_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(assistOutAndEnter.getCareerCode(), MesExtConstWords.CAREER_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(assistOutAndEnter.getAssistOutAndEnterDetail(), MesExtConstWords.ASSIST_OUT_AND_ENTER_DETAIL, packBean);
        DdlPreparedPack.getStringLikerPack(assistOutAndEnter.getWorkContent(), MesExtConstWords.WORK_CONTENT, packBean);
        DdlPreparedPack.getStringLikerPack(assistOutAndEnter.getOwnerDepartment(), MesExtConstWords.OWNER_DEPARTMENT, packBean);
        if (!StringUtils.isEmpty(assistOutAndEnter.getInfluenceDateStart()) || !StringUtils.isEmpty(assistOutAndEnter.getInfluenceDateEnd())) {
            if (flag) DdlPreparedPack.timeBuilder(assistOutAndEnter.getInfluenceDateStart(), assistOutAndEnter.getInfluenceDateEnd(), MesExtConstWords.INFLUENCE_DATE, packBean, false);
            else DdlPreparedPack.timeBuilder(assistOutAndEnter.getInfluenceDateStart(), assistOutAndEnter.getInfluenceDateEnd(), MesExtConstWords.INFLUENCE_DATE, true, false, packBean);
        }
        return packBean;
    }

    public static DdlPackBean getEsopCenterRemainCfg(MesEsopCenterRemainCfg esopCenterRemainCfg) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(esopCenterRemainCfg, esopCenterRemainCfg.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(esopCenterRemainCfg.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(esopCenterRemainCfg.getWorkCenterName(), MesExtConstWords.WORK_CENTER_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getPartCategoryPlanRate(MesPartCategoryPlanRate partCategoryPlanRate) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(partCategoryPlanRate, partCategoryPlanRate.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(partCategoryPlanRate.getCategoryCode(), MesExtConstWords.CATEGORY_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(partCategoryPlanRate.getCategoryName(), MesExtConstWords.CATEGORY_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getPartCategoryTargetCfg(MesPartCategoryTargetCfg partCategoryTargetCfg) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(partCategoryTargetCfg, partCategoryTargetCfg.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(partCategoryTargetCfg.getCategoryCode(), MesExtConstWords.CATEGORY_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(partCategoryTargetCfg.getDataKey(), MesExtConstWords.DATA_KEY, packBean);
        return packBean;
    }

    public static DdlPackBean getCareerCorrelationCfg(MesCareerCorrelationCfg careerCorrelationCfg) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(careerCorrelationCfg, careerCorrelationCfg.getOrganizeCode());
        if (MesExtEnumUtil.CAREER_CORRELATION_CFG_DATA_TYPE.COMPOSITE_RATE_TARGET.getValue().equals(careerCorrelationCfg.getDataType())) {
            DdlPreparedPack.getStringEqualPack(careerCorrelationCfg.getDataDimension(), MesExtConstWords.DATA_DIMENSION, packBean);
        }
        DdlPreparedPack.getStringLikerPack(careerCorrelationCfg.getCareerCode(), MesExtConstWords.CAREER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(careerCorrelationCfg.getCategoryCode(), MesExtConstWords.CATEGORY_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(careerCorrelationCfg.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(careerCorrelationCfg.getDataType(), MesExtConstWords.DATA_TYPE, packBean);
        DdlPreparedPack.getStringEqualPack(careerCorrelationCfg.getDataKey(), MesExtConstWords.DATA_KEY, packBean);
        return packBean;
    }

    public static DdlPackBean getOfficialLossDetailRecord(SxOfficialLossDetailRecordModel officialLossDetailRecord) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(officialLossDetailRecord.getOrganizeCode(), officialLossDetailRecord.getIsValid());
        DdlPreparedPack.getStringEqualPack(officialLossDetailRecord.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(officialLossDetailRecord.getLossType(), MesExtConstWords.LOSS_TYPE, packBean);
        DdlPreparedPack.getStringEqualPack(officialLossDetailRecord.getLossItem(), MesExtConstWords.LOSS_ITEM, packBean);
        DdlPreparedPack.getStringEqualPack(officialLossDetailRecord.getPartNo(), MesExtConstWords.PART_NO, packBean);
        if (!StringUtils.isEmpty(officialLossDetailRecord.getLossDateStart()) || !StringUtils.isEmpty(officialLossDetailRecord.getLossDateEnd())) {
            DdlPreparedPack.timeBuilder(officialLossDetailRecord.getLossDateStart(), officialLossDetailRecord.getLossDateEnd(), MesExtConstWords.LOSS_DATE, packBean, false);
        }
        return packBean;
    }

    public static DdlPackBean getWorkLicense(MesWorkLicense workLicense) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(workLicense, workLicense.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(workLicense.getWorkLicenseCode(), MesExtConstWords.WORK_LICENSE_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(workLicense.getUserName(), MesExtConstWords.USER_NAME, packBean);
        if (!StringUtils.isEmpty(workLicense.getValidityDateStart()) || !StringUtils.isEmpty(workLicense.getValidityDateEnd())) {
            DdlPreparedPack.timeBuilder(workLicense.getValidityDateStart(), workLicense.getValidityDateEnd(), MesExtConstWords.VALIDITY_DATE, packBean, false);
        }
        if (!StringUtils.isEmpty(workLicense.getModifyDateTimeStart()) || !StringUtils.isEmpty(workLicense.getModifyDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(workLicense.getModifyDateTimeStart(), workLicense.getModifyDateTimeEnd(), MesExtConstWords.MODIFY_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getWorkLicenseTravel(MesWorkLicenseTravel workLicenseTravel) {
        DdlPackBean packBean = DdlPackBean.getDdlPackBean(workLicenseTravel.getOrganizeCode(), 0);
        DdlPreparedPack.getStringEqualPack(workLicenseTravel.getWorkLicenseCode(), MesExtConstWords.WORK_LICENSE_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(workLicenseTravel.getUserName(), MesExtConstWords.USER_NAME, packBean);
        DdlPreparedPack.getStringLikerPack(workLicenseTravel.getRemark(), MesExtConstWords.REMARK, packBean);
        if (!StringUtils.isEmpty(workLicenseTravel.getValidityDateStart()) || !StringUtils.isEmpty(workLicenseTravel.getValidityDateEnd())) {
            DdlPreparedPack.timeBuilder(workLicenseTravel.getValidityDateStart(), workLicenseTravel.getValidityDateEnd(), MesExtConstWords.VALIDITY_DATE, packBean, false);
        }
        if (!StringUtils.isEmpty(workLicenseTravel.getModifyDateTimeStart()) || !StringUtils.isEmpty(workLicenseTravel.getModifyDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(workLicenseTravel.getModifyDateTimeStart(), workLicenseTravel.getModifyDateTimeEnd(), MesExtConstWords.MODIFY_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getUnbindProduceSn(MesUnbindProduceSn unbindProduceSn) {
        DdlPackBean packBean = getAllValidData(unbindProduceSn.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(unbindProduceSn.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(unbindProduceSn.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(unbindProduceSn.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(unbindProduceSn.getPartNameRdd(), MesExtConstWords.PART_NAME_RDD, packBean);
        DdlPreparedPack.getNumEqualPack(unbindProduceSn.getBindStatus(), MesExtConstWords.BIND_STATUS, packBean);
        if (!StringUtils.isEmpty(unbindProduceSn.getCreateDateTimeStart()) || !StringUtils.isEmpty(unbindProduceSn.getCreateDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(unbindProduceSn.getCreateDateTimeStart(), unbindProduceSn.getCreateDateTimeEnd(), MesExtConstWords.START_TIME, packBean, true);
        }

        return packBean;
    }

    public static DdlPackBean getUnbindProduceSnTravel(MesUnbindProduceSnTravel unbindProduceSnTravel) {
        DdlPackBean packBean = getAllValidData(unbindProduceSnTravel.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(unbindProduceSnTravel.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);
        DdlPreparedPack.getStringLikerPack(unbindProduceSnTravel.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(unbindProduceSnTravel.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(unbindProduceSnTravel.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(unbindProduceSnTravel.getPartNameRdd(), MesExtConstWords.PART_NAME_RDD, packBean);
        DdlPreparedPack.getNumEqualPack(unbindProduceSnTravel.getBindStatus(), MesExtConstWords.BIND_STATUS, packBean);
        if (!StringUtils.isEmpty(unbindProduceSnTravel.getCreateDateTimeStart()) || !StringUtils.isEmpty(unbindProduceSnTravel.getCreateDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(unbindProduceSnTravel.getCreateDateTimeStart(), unbindProduceSnTravel.getCreateDateTimeEnd(), MesExtConstWords.START_TIME, packBean, true);
        }

        return packBean;
    }

    public static DdlPackBean getMesProcessTorqueManage(MesProcessTorqueManage torqueManage) {
        DdlPackBean packBean = getAllBaseData(torqueManage.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(torqueManage.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(torqueManage.getProcessCode(), MesExtConstWords.PROCESS_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(torqueManage.getFasteningPosition(), MesExtConstWords.FASTENING_POSITION, packBean);
        DdlPreparedPack.getStringLikerPack(torqueManage.getSpecification(), MesExtConstWords.SPECIFICATION, packBean);
        DdlPreparedPack.getNumEqualPack(torqueManage.getIsValid(), MesExtConstWords.IS_VALID, packBean);
        return packBean;
    }

    public static DdlPackBean getMesProcessTorqueManageTaskDetail(MesProcessTorqueManageTaskDetail torqueManageTaskDetail) {
        DdlPackBean packBean = getAllBaseData(torqueManageTaskDetail.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(torqueManageTaskDetail.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(torqueManageTaskDetail.getProcessCode(), MesExtConstWords.PROCESS_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(torqueManageTaskDetail.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(torqueManageTaskDetail.getShiftCode(), MesExtConstWords.SHIFT_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(torqueManageTaskDetail.getSpecification(), MesExtConstWords.SPECIFICATION, packBean);
        DdlPreparedPack.getNumEqualPack(torqueManageTaskDetail.getCheckResult(), MesExtConstWords.CHECK_RESULT, packBean);
        if (!StringUtils.isEmpty(torqueManageTaskDetail.getCheckTimeStart()) || !StringUtils.isEmpty(torqueManageTaskDetail.getCheckTimeEnd())) {
            DdlPreparedPack.timeBuilder(torqueManageTaskDetail.getCheckTimeStart(), torqueManageTaskDetail.getCheckTimeEnd(), MesExtConstWords.CHECK_TIME, packBean, true);
        }
        DdlPreparedPack.getNumEqualPack(torqueManageTaskDetail.getIsTeamConfirm(), MesExtConstWords.IS_TEAM_CONFIRM, packBean);
        return packBean;
    }

    public static DdlPackBean getMesManageCode(MesManageCode manageCode) {
        DdlPackBean packBean = getAllBaseData(manageCode.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(manageCode.getManageCode(), MesExtConstWords.MANAGE_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(manageCode.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(manageCode.getWorkCenterName(), MesExtConstWords.WORK_CENTER_NAME, packBean);
        return packBean;
    }

    public static DdlPackBean getMesManualReportTravel(MesManualReportTravel manualReportTravel) {
        DdlPackBean packBean = getAllBaseData(manualReportTravel.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(manualReportTravel.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(manualReportTravel.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(manualReportTravel.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(manualReportTravel.getModifyUser(), MesExtConstWords.MODIFY_USER, packBean);
        if (!StringUtils.isEmpty(manualReportTravel.getModifyDateTimeStart()) || !StringUtils.isEmpty(manualReportTravel.getModifyDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(manualReportTravel.getModifyDateTimeStart(), manualReportTravel.getModifyDateTimeEnd(), MesExtConstWords.MODIFY_DATE_TIME, packBean, true);
        }
        if (!StringUtils.isEmpty(manualReportTravel.getStartTimeStart()) || !StringUtils.isEmpty(manualReportTravel.getStartTimeEnd())) {
            DdlPreparedPack.timeBuilder(manualReportTravel.getStartTimeStart(), manualReportTravel.getStartTimeEnd(), MesExtConstWords.START_TIME, packBean, true);
        }
        if (!StringUtils.isEmpty(manualReportTravel.getEndTimeStart()) || !StringUtils.isEmpty(manualReportTravel.getEndTimeEnd())) {
            DdlPreparedPack.timeBuilder(manualReportTravel.getEndTimeStart(), manualReportTravel.getEndTimeEnd(), MesExtConstWords.END_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getSxBadnessClassify(MesBadnessClassify badnessClassify) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(badnessClassify, badnessClassify.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(badnessClassify.getBadnessTypeName(), MesExtConstWords.BADNESS_TYPE_NAME, packBean);
        DdlPreparedPack.getStringLikerPack(badnessClassify.getBadnessTypeCode(), MesExtConstWords.BADNESS_TYPE_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(badnessClassify.getBadnessClassifyName(), MesExtConstWords.BADNESS_CLASSIFY_NAME, packBean);
        DdlPreparedPack.getStringLikerPack(badnessClassify.getBadnessClassifyCode(), MesExtConstWords.BADNESS_CLASSIFY_CODE, packBean);
        return packBean;
    }

    public static DdlPackBean getSxBadnessClassifyDetail(MesBadnessClassifyDetail badnessClassifyDetail) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(badnessClassifyDetail, badnessClassifyDetail.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(badnessClassifyDetail.getBadnessClassifyName(), MesExtConstWords.BADNESS_CLASSIFY_NAME, packBean);
        DdlPreparedPack.getStringLikerPack(badnessClassifyDetail.getBadnessClassifyDetailName(), MesExtConstWords.BADNESS_CLASSIFY_DETAIL_NAME, packBean);
        DdlPreparedPack.getStringLikerPack(badnessClassifyDetail.getBadnessClassifyCode(), MesExtConstWords.BADNESS_CLASSIFY_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(badnessClassifyDetail.getBadnessClassifyDetailCode(), MesExtConstWords.BADNESS_CLASSIFY_DETAIL_CODE, packBean);
        return packBean;
    }

    public static DdlPackBean getOqcCheck(JxOqcCheckReportModel model) {
        DdlPackBean packBean = getAllValidData(model.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(model.getWorkOrderNo(), MesExtConstWords.WORK_ORDER_NO, packBean);
        DdlPreparedPack.getStringLikerPack(model.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringEqualPack(model.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getNumEqualPack(model.getOqcType(), MesExtConstWords.OQC_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(model.getCheckResult(), MesExtConstWords.CHECK_RESULT, packBean);
        DdlPreparedPack.getStringLikerPack(model.getOqcNo(), MesExtConstWords.OQC_NO, packBean);
        DdlPreparedPack.getNumEqualPack(model.getSnType(), MesExtConstWords.SN_TYPE, packBean);
        DdlPreparedPack.getNumEqualPack(model.getOqcNoType(), MesExtConstWords.OQC_NO_TYPE, packBean);
        DdlPreparedPack.getIsNotNull(MesExtConstWords.CHECK_RESULT, packBean);
        if (!StringUtils.isEmpty(model.getCreateDatetimeStart()) || !StringUtils.isEmpty(model.getCreateDatetimeEnd())) {
            DdlPreparedPack.timeBuilder(model.getCreateDatetimeStart(), model.getCreateDatetimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);
        }
        return packBean;
    }

    public static DdlPackBean getRepairJudgeType(MesRepairJudgeType model) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(model, model.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(model.getRepairJudgeCode(), MesExtConstWords.REPAIR_JUDGE_CODE, packBean);
        DdlPreparedPack.getStringLikerPack(model.getRepairJudgeName(), MesExtConstWords.REPAIR_JUDGE_NAME, packBean);
        DdlPreparedPack.getStringEqualPack(model.getSeq(), MesExtConstWords.SEQ, packBean);
        return packBean;
    }

    public static DdlPackBean getMesProdBindRecordExt(MesProdBindRecordExt mesProdBindRecord) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(mesProdBindRecord, mesProdBindRecord.getOrganizeCode());

        DdlPreparedPack.getStringRightLikerPack(mesProdBindRecord.getItemPartNo(), MesExtConstWords.ITEM_PART_NO, packBean);

        DdlPreparedPack.getStringEqualPack(mesProdBindRecord.getSerialNumber(), MesExtConstWords.SERIAL_NUMBER, packBean);

        DdlPreparedPack.getStringEqualPack(mesProdBindRecord.getProductSn(), MesExtConstWords.PRODUCT_SN, packBean);

        DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getKpSn(), "kpSn", packBean);

        DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);

        DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);

        DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getLotNo(), MesExtConstWords.LOT_NO, packBean);

        DdlPreparedPack.getNumEqualPack(mesProdBindRecord.getIsBindKey(), MesExtConstWords.IS_BIND_KEY, packBean);

        DdlPreparedPack.getNumEqualPack(mesProdBindRecord.getActionType(), "actionType", packBean);

        DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getSupplierCode(), "supplierCode", packBean);

        DdlPreparedPack.timeBuilder(mesProdBindRecord.getCreateDateTimeStart(), mesProdBindRecord.getCreateDateTimeEnd(), MesExtConstWords.CREATE_DATE_TIME, packBean, true);

        return packBean;
    }

    public static DdlPackBean getTimeSegmentStatistics(MesTimeSegmentStatistics timeSegmentStatistics) {
        DdlPackBean packBean = getAllBaseDataByNormalPro(timeSegmentStatistics, timeSegmentStatistics.getOrganizeCode());
        DdlPreparedPack.getStringEqualPack(timeSegmentStatistics.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(timeSegmentStatistics.getShiftCode(), MesExtConstWords.SHIFT_CODE, packBean);
        DdlPreparedPack.getStringEqualPack(timeSegmentStatistics.getStartTime(), MesExtConstWords.START_TIME, packBean);
        DdlPreparedPack.getStringEqualPack(timeSegmentStatistics.getEndTime(), MesExtConstWords.END_TIME, packBean);
        return packBean;
    }

    public static DdlPackBean getBomPendingPart(MesBomPendingPart bomPendingPart) {
        DdlPackBean packBean = getAllValidData(bomPendingPart.getOrganizeCode());
        DdlPreparedPack.getStringLikerPack(bomPendingPart.getPartNo(), MesExtConstWords.PART_NO, packBean);
        DdlPreparedPack.getStringLikerPack(bomPendingPart.getItemPartNo(), MesExtConstWords.ITEM_PART_NO, packBean);
        DdlPreparedPack.getNumEqualPack(bomPendingPart.getIsReminded(), "isReminded", packBean);
        DdlPreparedPack.getNumEqualPack(bomPendingPart.getIsTookEffect(), "isTookEffect", packBean);
        if (!StringUtils.isEmpty(bomPendingPart.getModifyDateTimeStart()) || !StringUtils.isEmpty(bomPendingPart.getModifyDateTimeEnd())) {
            DdlPreparedPack.timeBuilder(bomPendingPart.getModifyDateTimeStart(), bomPendingPart.getModifyDateTimeEnd(), MesExtConstWords.MODIFY_DATE_TIME, packBean, true);
        }
        return packBean;
    }


}
