package com.hw.common.core.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 仓储部分常量定义
 * @ClassName: WmsConstants
 * @Author : xins
 * @Date :2023-12-21  8:59
 * @Version :1.0
 */
public class WmsConstants {

    /*仓库激活标识*/
    public static final String WMS_WAREHOUSE_ACTIVE_FLAG_YES = "1";


    /*操作类型,适合原材料和成品的出入库、原材料的退库以及转库*/
    public static final String WMS_OPERATION_TYPE_AUTO = "0";//agv自动
    public static final String WMS_OPERATION_TYPE_MANUAL = "1";//人工
    public static final String WMS_OPERATION_TYPE_FORCED = "2";//强制
    public static final String MWS_OPERATION_TYPE_DISPATCHD = "3";//调度


    /*原材料入库记录入库类型*/
    public static final String RAW_INSTOCK_INSTOCK_TYPE_PURCHASE = "1";//采购入库
    public static final String RAW_INSTOCK_INSTOCK_TYPE_RETURN = "2";//返库入库
    public static final String RAW_INSTOCK_INSTOCK_TYPE_OTHER = "9";//其他入库


    /*原材料入库记录明细入库方式*/
    public static final String RWA_INSTOCK_DETAIL_INSTOCK_WAY_MOBILE = "1";//人工入库
    public static final String RWA_INSTOCK_DETAIL_INSTOCK_WAY_AGV = "2";//AGV入库

    /*原材料入库记录明细质检状态*/
    public static final String RWA_INSTOCK_DETAIL_QUALITY_STATUS_TO_INSPECT = "0";//待质检
    public static final String RWA_INSTOCK_DETAIL_QUALITY_STATUS_PASS = "1";//质检通过
    public static final String RWA_INSTOCK_DETAIL_QUALITY_STATUS_NG = "2";//NG质检不合格

    /*原材料库存库存类型*/
    public static final String RWA_STOCK_STOCK_TYPE_RAW = "1";//原材料
    public static final String RWA_STOCK_STOCK_TYPE_PRODUCT = "2";//半成品


    /*出入库退库记录明细方式*/
    public static final String WMS_STOCK_WAY_MANUAL = "1";//人工
    public static final String WMS_STOCK_WAY_AGV = "2";//AGV


    /*质检状态*/
    public static final String WMS_QUALITY_STATUS_TO_INSPECT = "0";//待质检
    public static final String WMS_QUALITY_STATUS_PASS = "1";//合格
    public static final String WMS_QUALITY_STATUS_NG = "2";//不合格


    /*审核状态*/
    public static final String WMS_AUDIT_STATUS_TOAUDIT = "0";//待审核
    public static final String WMS_AUDIT_STATUS_PASS = "1";//审核通过
    public static final String WMS_AUDIT_STATUS_FAIL = "2";//审核不通过


    /*原材料退库记录(明细)退库方式*/
    public static final String RAW_RETURN_RETURN_WAY_MANUAL = "1";//人工
    public static final String RAW_RETURN_RETURN_WAY_AGV = "2";//AGV


    /*出入库退库记录(明细)执行状态*/
    public static final String WMS_EXECUTE_STATUS_TOEXECUTE = "0";//待执行
    public static final String WMS_EXECUTE_STATUS_EXECUTING = "1";//执行中
    public static final String WMS_EXECUTE_STATUS_FINISH = "2";//完成执行

    public static final String WMS_EXECUTE_STATUS_CONFIRM = "3";//已确认(适合成品出库在一楼最终确认使用)

    public static final String WMS_EXECUTE_STATUS_NOT_FINISH = "notFinish";//未完成执行


    /*成品入库记录明细入库方式*/
    public static final String PRODUCT_INSTOCK_DETAIL_INSTOCK_WAY_MANUAL = "1";//人工入库
    public static final String PRODUCT_INSTOCK_DETAIL_INSTOCK_WAY_AGV = "2";//AGV入库


    /*成品入库记录库存类型*/
    public static final String PRODUCT_INSTOCK_STOCK_TYPE_SEMI = "2";//半成品
    public static final String PRODUCT_INSTOCK_STOCK_TYPE_PRODUCT = "3";//成品


    /*成品入库记录入库类型*/
    public static final String PRODUCT_INSTOCK_INSTOCK_TYPE_PRODUCT = "1";//生产入库
    public static final String PRODUCT_INSTOCK_INSTOCK_TYPE_OUT_SEMI = "2";//出半成品库
    public static final String PRODUCT_INSTOCK_INSTOCK_TYPE_OTHER = "9";//其他入库


    /*成品库存库存类型*/
    public static final String PRODUCT_STOCK_STOCK_TYPE_SEMI = "2";//半成品
    public static final String PRODUCT_STOCK_STOCK_TYPE_PRODUCT = "3";//成品


    /*原材料退库记录(明细)退库方式*/
    public static final String PRODUCT_INSTOCK_INSTOCK_WAY_MANUAL = "1";//人工
    public static final String PRODUCT_INSTOCK_INSTOCK_WAY_AGV = "2";//AGV


    /*仓库存放类型*/
    public static final String WMS_WAREHOUSE_INSTOCK_TYPE_RAW = "1";//原材料
    public static final String WMS_WAREHOUSE_INSTOCK_TYPE_SEMI = "2";//半成品
    public static final String WMS_WAREHOUSE_INSTOCK_TYPE_PRODUCT = "3";//成品


    /**移库类型*/
    public static final String WMS_MOVEMERGE_TYPE_MOVE = "1"; //移库
    public static final String WMS_MOVEMERGE_TYPE_MERGE = "2";//合库


    /**移库方式*/
    public static final String WMS_MOVEMERGE_WAY_MANUAL = "1"; //人工移库
    public static final String WMS_MOVEMERGE_WAY_AGV = "2";//agv移库

    public static final String WMS_MOVE_DETAIL_TYPE_OUT = "1";//出库
    public static final String WMS_MOVE_DETAIL_TYPE_IN = "2";//入库

    public static final String WMS_WAREHOUSE_TYPE_NORMAL = "1";//普通仓库
    public static final String WMS_WAREHOUSE_TYPE_AGV = "2";//AGV仓库
    public static final String WMS_WAREHOUSE_TYPE_WORKBIN_AGV = "3";//料箱AGV仓库

    public static final Map<String, String> OPERATION_TYPE_MAP = new HashMap<String, String>();

    static {
        OPERATION_TYPE_MAP.put(WMS_WAREHOUSE_TYPE_NORMAL, WMS_OPERATION_TYPE_MANUAL);
        OPERATION_TYPE_MAP.put(WMS_WAREHOUSE_TYPE_AGV, WMS_OPERATION_TYPE_AUTO);
        OPERATION_TYPE_MAP.put(WMS_WAREHOUSE_TYPE_WORKBIN_AGV, WMS_OPERATION_TYPE_AUTO);
    }

    public static final Map<String, String> OUTSTOCK_WAY_MAP = new HashMap<String, String>();

    static {
        OUTSTOCK_WAY_MAP.put(WMS_WAREHOUSE_TYPE_NORMAL, WMS_STOCK_WAY_MANUAL);
        OUTSTOCK_WAY_MAP.put(WMS_WAREHOUSE_TYPE_AGV, WMS_STOCK_WAY_AGV);
        OUTSTOCK_WAY_MAP.put(WMS_WAREHOUSE_TYPE_WORKBIN_AGV, WMS_STOCK_WAY_MANUAL);
    }


    /**
     * 库位状态
     */
    public static final String WMS_BASE_LOCATION_STATUS_NORMAL = "1";//正常
    public static final String WMS_BASE_LOCATION_STATUS_AUTO_LOCK = "2";//自动锁定
    public static final String WMS_BASE_LOCATION_STATUS_MANUAL_LOCK = "3";//人工锁定
    public static final String WMS_BASE_LOCATION_STATUS_MOVE_LOCK = "4";//移库锁定
    public static final String WMS_BASE_LOCATION_STATUS_MERGE_LOCK = "5";//合库锁定

    /**
     * 入库过度库位标识
     */
    public static final String WMS_BASE_LOCATION_INSTOCK_FLAG_YES = "1";//是
    public static final String WMS_BASE_LOCATION_INSTOCK_FLAG_NO = "0";//否

    /**
     * 出库过度库位标识
     */
    public static final String WMS_BASE_LOCATION_OUTSTOCK_FLAG_YES = "1";//是
    public static final String WMS_BASE_LOCATION_OUTSTOCK_FLAG_NO = "0";//否


    /*原材料出库任务类型*/
    public static final String WMS_RAW_OUTSTOCK_TASK_TYPE_PRODUCTION_PICKING = "1";//生产领料

    public static final String WMS_RAW_OUTSTOCK_TASK_TYPE_PRODUCTION_SPLIT = "2";//拆分出库

    public static final String WMS_RAW_OUTSTOCK_TASK_TYPE_PRODUCTION_INSTALL = "3";//组装出库

    public static final String WMS_RAW_OUTSTOCK_TASK_TYPE_OTHER = "9";//其他

    public static final String WMS_RAW_OUTSTOCK_TASK_TYPE_MOVE = "2";//移库出库,暂时不用

    /*原材料库存完整标识*/
    public static final String WMS_RAW_STOCK_COMPLETE_FLAG_YES = "1";//是
    public static final String WMS_RAW_STOCK_COMPLETE_FLAG_NO = "0";//否

    public static final String WMS_WAREHOUSE_MATERIAL_STORAGE_TYPE_MATERIAL = "1";


    /*转库类型*/
    public static final String WMS_TRANSFER_TYPE_OUT_TO_PRODUCT_STOCK = "1";//出半成品库入成品库


    /*转库明细类型*/
    public static final String WMS_TRANSFER_DETAIL_TYPE_OUTSTOCK = "1";//出库
    public static final String WMS_TRANSFER_DETAIL_TYPE_INSTOCK = "2";//入库


    /*成品出库记录成品类型*/
    public static final String WMS_PRODUCT_OUTSTOCK_PRODUCT_TYPE_SEMI = "2";//半成品
    public static final String WMS_PRODUCT_OUTSTOCK_PRODUCT_TYPE_PRODUCT = "3";//成品

    /*成品出库记录出库类型*/
    public static final String WMS_PRODUCT_OUTSTOCK_TYPE_SALE = "1";//销售出库


    /*检验规则明细目标类型*/
    public static final String QMS_CHECK_RULE_DETAIL_TARGET_TYPE_MARTERIAL = "1";//物料




    public static final String WMS_WAREHOUSE_OUT_REQUIREMENT_APPLY = "0";//申请出库
    public static final String WMS_WAREHOUSE_OUT_REQUIREMENT_APPLY_AUDIT = "1";//申请审核出库
    public static final String WMS_WAREHOUSE_OUT_REQUIREMENT_DIRECT = "2";//直接出库

    public static final String WMS_WAREHOUSE_RETURN_REQUIREMENT_APPLY = "0";//申请退库
    public static final String WMS_WAREHOUSE_RETURN_REQUIREMENT_APPLY_AUDIT = "1";//申请审核退库



    public static final String WMS_RAW_STOCK_COMPLETE_FLAY_YES = "1";//完整
    public static final String WMS_RAW_STOCK_COMPLETE_FLAY_NO = "0";//拆分后的



    /*移库记录(明细)执行状态*/
    public static final String WMS_MOVE_EXECUTE_STATUS_TOEXECUTE = "0";//待执行
    public static final String WMS_MOVE_EXECUTE_STATUS_EXECUTING = "1";//执行中

    public static final String WMS_MOVE_EXECUTE_STATUS_INSTOCK_FINISH = "2";//入库完成
    public static final String WMS_MOVE_EXECUTE_STATUS_OUTSTOCK_FINISH = "3";//出库完成



    /*盘点记录状态*/
    public static final String WMS_INVENTORY_CHECK_STATUS_INVENTORYING = "1";//盘点中
    public static final String WMS_INVENTORY_CHECK_STATUS_FINISH = "2";//盘点完成


    /*盘点记录明细状态*/
//    public static final String WMS_INVENTORY_CHECK_DETAIL_STATUS_TO_INVENTORY = "0";//待盘点
    public static final String WMS_INVENTORY_CHECK_DETAIL_STATUS_INVENTORYING = "1";//盘点中
    public static final String WMS_INVENTORY_CHECK_DETAIL_STATUS_FINISH = "2";//盘点完成
}
