package com.palmnest.application;

/**
 * 通用码
 *
 * @author wangxz
 * <p>
 * 2018年4月24日
 */
public class CodeConstants {

	//维修单状态(1,待审核;2,可抢单;3,进行中;4,挂单中;5,转单中;8,已完成;10,审核未通过; 11,已取消) //22-待派单 add status dz 1029
	public static Integer TO_AUDIT    = 1;
	public static Integer IS_SINGLE   = 2;
	public static Integer IN_PROGRESS = 3;
	public static Integer IN          = 4;
	public static Integer TRANSFERED  = 5;
	public static Integer COMPLETED   = 8;
	public static Integer UNAUDIT     = 10;
	public static Integer CANCEL     = 11;
	//add dz 派单模式
	public static Integer TO_SEND     = 22;

	//维修区域
	public static String PUBLIC      = "public";//公共
	public static String INDOOR      = "indoor";//室内
	public static String VACANCYRATE = "vacancyRate";//空置房

	public static String CLIENT_WECHAT = "weChat";
	public static String CLIENT_APP    = "app";
	public static String CLIENT_PC     = "pc";


	//操作类型(1.报修；2，抢单；3，转单；4，挂单；5，派单；6，完成;7,接受或拒绝转单;8,取消挂单;10,审核; 11取消订单)
	public static Integer REPAIR           = 1;
	public static Integer GRAB             = 2;
	public static Integer TRANSFER         = 3;
	public static Integer PENDING          = 4;
	public static Integer SEND             = 5;
	public static Integer COMPLETE         = 6;
	public static Integer TRANSFER_OPERATE = 7;
	public static Integer CANCLE_PENDING   = 8;
	public static Integer AUDIT            = 10;
    public static Integer CANCEL_ORDER     = 11;


	//下单来源  下单源(1，PC；2，微信；3，Android；4，iOS)
	public static Integer PC      = 1;
	public static Integer WECHAT  = 2;
	public static Integer ANDROID = 3;
	public static Integer iOS     = 4;

	//报修方式
	public static String WECHATREPAIR   = "wechatRepair";
	public static String INTERNALREPAIR = "internalRepair";
	public static String CUSTOMERCALLS  = "customerCalls";
	
	public static String LINGLING_DEVELPER  = "lingLingDeveloper";

	//工程维修推送 以1000开头
	/**
	 * 审核
	 */
	public static String AUDIT_PUSH_CODE  = "1000";
	/**
	 * 普通单
	 */
	public static String COMMON_PUSH_CODE = "1001";


	//企业入驻推送以2000开头
	/**
	 * 企业入驻详情
	 */
	public static String ENTER_PUSH_CODE = "2000";
	//企业迁出推送以3000开头
	/**
	 * 企业迁出详情
	 */
	public static String EMIG_PUSH_CODE  = "3000";

	//会议室
	/**
	 * 会议室
	 */
	public static String MEETING_PUSH_CODE    = "6000";
	//公告通知以5000开头
	/**
	 * 公告通知
	 */
	public static String APP_NOTICE_PUSH_CODE = "5000";

	/**
	 * 微信消息
	 */
	public static String WEIXIN_PUSH_CODE  = "5001";
	/**
	 * 短信消息
	 */
	public static String MESSAGE_PUSH_CODE = "5002";
	/**
	 * 邮件消息
	 */
	public static String EMAIL_PUSH_CODE   = "5003";


	//权限 systemcode
	/**
	 * 工程维修审核权限
	 */
	public static String AUDIT_PERMISSION = "1000";

	/**
	 * 报修审核权限
	 */
	public static String AUDIT_REPAIRSERVICE = "20001";
	/**
	 * 工程维修管理权限
	 */
	public static String MANAGE_PERMISSION   = "2000";
	/**
	 * 工程维修抢单权限
	 */
	public static String GRAB_PERMISSION     = "1005";


	public static String ENTERCUSMANAGE_PERMISSION = "2001";//企业迁入客服主管权限
	public static String ENTERCUS_PERMISSION       = "2002";//企业入驻跟进客服权限
	public static String ENTERENG_PERMISSION       = "2003";//企业入驻跟进工程权限
	public static String ENTERAPPROVE_PERMISSION   = "2004";//企业入驻审批权限
	public static String EMIGAPPROVE_PERMISSION    = "2005";//企业迁出审批权限

	public static String EMIGNEW_PERMISSION       = "3000";//企业迁出发起的权限
	public static String EMIGCUSMANAGE_PERMISSION = "3001";//企业迁出客服抓管权限
	public static String EMIGCUS_PERMISSION       = "3002";//企业迁出跟进客服权限
	public static String EMIGENG_PERMISSION       = "3003";//企业迁出跟进工程权限


	public static String RELEASEAD_PERMISSION = "4000";//物品放行（客服审批权限
	public static String RELEASE_PERMISSION   = "4001";//物品放行（安保 权限

	public static String AIRSWITCH_PERMISSION = "4101";//空调开关

	public static String CSP21_PERMISSION = "4121";//待客服专员审核
	public static String CSP22_PERMISSION = "4122";//待客服主管审核
	public static String CSP23_PERMISSION = "4123";//待工程主管审核
	
	public static String AIR_SEND_MEG_CODE = "5010";//空调加时退送网页code
	

	public static String TSBYAUDIT_PERMISSION = "4100";//投诉表扬审批权限
	//4101投诉表扬 为app推送查看code

	public static String RENOVATION_PERMISSION = "4200";//装修权限
	public static String RENOVATION_PUSH_CODE  = "4201";//装修app推送查看code
	public static String REPAIR_PUSH_CODE      = "4202";//报修


	public static String CARWASH_MANAGER = "6000";//洗车管理权限
	public static String CARWASH_SERVICE = "6001";//洗车权限

	public static String DORM_MANAGER = "7000";//宿管审核权限

	public static String MEETING_MANAGER = "8000";//会议室管理权限

	public static String MEETING_AUDIT = "8010";//会议室审批权限

	public static String DINNER_MANAGER = "9000";//餐品管理权限

	/**
	 * 审核APP公告权限code
	 */
	public static String AUDIT_APP_NOTICE_PERMISSION = "5000";
	public static String AUDIT_NOTICE_PERMISSION     = "5001";


	public static Integer ENTER = 1;//企业入驻
	public static Integer EMIG  = 2;//企业迁出

	public static Integer START         = 1;//发起
	public static Integer SUBMIT_CUS    = 2;//选择客服
	public static Integer SUBMIT_ENG    = 3;//选择工程人员
	public static Integer SUBMIT_WATER  = 4;//提交水电表
	public static Integer SUBMIT_SETTLE = 5;//提交结算表
	public static Integer SUBMIT_REPIAR = 6;//提交维修单
	public static Integer PASS          = 7;//通过
	public static Integer BREAK         = 8;//拒绝


	/**
	 * 已有用户操作过
	 */
	public static String USEED_CODE = "500";


	// -----meun code ----
	/**
	 * 公告审核
	 */
	public static final String APP_MENU_NOTICE = "APP_MENU_NOTICE";

	/**
	 * 企业入驻
	 */
	public static final String APP_MENU_ENTERPRISES     = "APP_MENU_ENTERPRISES";
	/**
	 * 企业迁出
	 */
	public static final String APP_MENU_ENTERPRISES_OUT = "APP_MENU_ENTERPRISES_OUT";
	/**
	 * 物品放行
	 */
	public static final String APP_MENU_OBJECT_RELEASE  = "APP_MENU_OBJECT_RELEASE";
	/**
	 * 工程维修
	 */
	public static final String APP_MENU_REPAIR          = "APP_MENU_REPAIR";
	/**
	 * 退宿
	 */
	public static final String APP_MENU_DORM_MANAGE     = "APP_MENU_DORM_MANAGE";
	/**
	 * 退宿
	 */
	public static final String APP_MENU_CARWASH         = "APP_MENU_CARWASH";

	/**
	 * 投诉表扬
	 */
	public static final String APP_MENU_TSBY = "APP_MENU_TSBY";


	//----会议室start----
	/**
	 * 根据客户编码查询项目信息不存在
	 */
	public static final String MEETING_CLIENT_NO_EXSITS = "8001";

	/**
	 * 根据客户编码查询对应项目公众号信息不存在
	 */
	public static final String MEETING_WX_NO_EXSITS = "8002";
	//----会议室end-----

	/**
	 * redis键值存放 首页服务列表
	 */
	public static final String ORG_SERVICE_LIST_KEY     = "orgServiceList_";
	/**
	 * redis键值存放 首页服务列表
	 */
	public static final String ABOUT_ORG_LIST_KEY       = "aboutOrgList_";
	/**
	 * redis键值存放 服务页服务列表
	 */
	public static final String ORG_SERVICE_CATEGORY_KEY = "orgServiceCategory_";
	/**
	 * redis键值存放 发现页商品列表
	 */
	public static final String GOODS_CATEGORY_KEY       = "goodsCategory";
	/**
	 * redis键值存放 餐品列表
	 */
	public static final String ORG_MEAL_LIST_KEY        = "orgMealList_";

	/**
	 * redis键值存放 餐品列表
	 */
	public static final String ORG_MEAL_RANK = "orgMealRank_";


	/**
	 * redis键值存放 会议室排行版数据
	 */
	public static final String ORG_MEETINGRANKING = "orgMeetingRanking_";
	
	
    //保存项目koala信息
    public static String RSA_REDIS_ORGKOALA_KEY    = "old_org_koala_key";
    
    public static String RSA_REDIS_CURSOR_KEY    = "org_cursor_key";

	/**
	 * 短信验证码类型
	 */
	public static final Integer SMS_CODE_TYPE    = 1;
	/**
	 * 短信订餐模块类型
	 */
	public static final Integer SMS_DINNER_TYPE  = 2;
	/**
	 * 短信访客模块类型
	 */
	public static final Integer SMS_VISITOR_TYPE = 3;
	/**
	 * 短信空调加时类型
	 */
	public static final Integer SMS_AIR_TYPE     = 4;
	/**
	 * 消息推送(群发)类型
	 */
	public static final Integer SMS_MESSAGE_TYPE = 5;
	/**
	 * 短信会议室类型
	 */
	public static final Integer SMS_MEETING_TYPE = 6;
	/**
	 * 统一公共短信接口发送的短信
	 */
	public static final Integer SMS_PUBLIC_TYPE  = -1;
	
	
	/**
	 * 开关空调开启或关闭
	 */
	public static final String CODE_SWITCH_AIR     = "code_switch_air";
	
	/**
	 * 空调延时
	 */
	public static final String CODE_AIR_DO     = "code_air_do";

	
	/**
	 * 空调取消
	 */
	public static final String CODE_AIR_CANCEL     = "code_air_cancel";

	
	public static final String BUNS = "mantou";

	public static final String ROLLS = "huajuan";
	
	public static final String HTTPS="https:";
	public static final String HTTP="http:";
	
	public static final Integer APPROVAL_TYPE_NOTICE=1;//审核类型为公告审核
	
	public static final Integer ENABLED_ONE=1;//有效
	public static final Integer ENABLED_ZERO=0;//无效
	
	public static final Integer OPERATION_NEW=1;//新增操作
	public static final Integer OPERATION_UPDATE=2;//修改操作
	public static final Integer OPERATION_DELETE=3;//删除操作
	
	public static final Integer ORDER_TYPE_NOTICE=1;//订单类型为公告消息
	public static final Integer ORDER_TYPE_TEMPLE=2;//订单类型为模板消息
	public static final Integer ORDER_TYPE_MESSAGE=3;//订单类型为短信消息
	public static final Integer ORDER_TYPE_EMAIL=4;//订单类型为邮件消息

	
	public static final String NOTICE_REDIS_ORDERID="notice_redis_";
	
	public static final String NOTICE_REDIS_TYPE_ORDERID="notice_redis_";

	public static final int PASS_LINGLINGID = 1;//新的通行以linglingId获取
	public static final int PASS_QRCODE = 2;//旧的通行以二维码获取


	public static enum BusinessState {

		NOTICE(1,"notice","公告咨询"),
		RELEASE(2,"release","物品放行条"),
		REPAIR(3,"repair","工程维修"),
		QUESTION(4,"question","问卷调查"),
		COMPLAINT(5,"complaint","投诉建议"),
		LOSTFOUND(6,"lostfound","失物招领"),
		AIR(7,"air","空调加时"),
		MEETING(8,"meeting","会议室预订"),
		VISITOR(9,"visitor","访客预约"),
		ACTIVITY(10,"activity","活动预约");

		public final Integer type;
		public  final  String businessType;
		public final String businessTypeDesc;

		private BusinessState(Integer type,String businessType,String businessTypeDesc) {
			this.type = type;
			this.businessType = businessType;
			this.businessTypeDesc = businessTypeDesc;
		}
	}


	public static final String BOOK_DINNER_TASK     = "bookdinnertask";
	
}
