package com.reptileclient.jlifeapp.constant;

public class HemaConstant {

	public static String LOCAL_BASE_URL="http://192.168.1.173/file/";
	
	// 服务单管理的导出 时间为前一天   post  body     "beginTime\":\"2020-12-01 00:00:00\",\"endTime\":\"2020-12-01 23:59:59\"
	public static String HEMA_FWDGL_NAME="服务单导出";
	public static String HEMA_FWDGL_URL = "https://hmall.hemaos.com/bookOrderNew/exportBookOrderList";
	public static String HEMA_FWDGL_PARM = "{\"bookOrderNo\":null,\"beginTime\":\"parm_beginTime\",\"endTime\":\"parm_endTime\",\"pageIndex\":1,\"pageSize\":30000}";

	// 技师作业单  时间为前一天
	public static String HEMA_JSZYD_NAME="技师作业单导出";
	public static String HEMA_JSZYD_URL = "https://hmall.hemaos.com/bookTrade/exportBookTradeListForSupplier";
	public static String HEMA_JSZYD_PARM = "{\"bookTradeNo\":null,\"beginTime\":\"parm_beginTime\",\"endTime\":\"parm_endTime\",\"pageIndex\":1,\"pageSize\":30000}";

	// 服务付款单   导出比较久 25s
	//（如果是1号，导上个月，从2号开始导当月）始终拿前一天的月的第一天和最后一天
	// 可能数据超过3万，要分页导出
	public static String HEMA_FWFKDD_NAME="服务付款单导出";
	public static String HEMA_FWFKD_URL = "https://hmall.hemaos.com/paymentOrder/exportPaymentOrderList";
	public static String HEMA_FWFKD_PARM = "{\"createTimeBegin\":\"parm_createTimeBegin\",\"createTimeEnd\":\"parm_createTimeEnd\",\"pageSize\":30000,\"pageIndex\":parm_pageIndex}";

	
	// 联营商交易及销售  要选4个城市分次导出 北京，南京，深圳，上海 ，时间为前一天
	public static String HEMA_LYSJYJXS_NAME="联营商交易及销售单导出";
	public static String HEMA_LYSJYJXS_URL = "https://shuhe.hemaos.com/api/v1/download/metrics";
	public static String HEMA_LYSJYJXS_PARM = "{\"code\":\"public_query;i_sale_detail_zzb.query\","
			+ "\"where\":{\"wheres\":[{\"value\":\"parm_supplierNo\",\"op\":\"=\",\"key\":\"supplierNo\"},"
			+ "{\"value\":\"parm_dayst\",\"op\":\"=\",\"key\":\"startDate\"},"
			+ "{\"value\":\"parm_dayed\",\"op\":\"=\",\"key\":\"endDate\"},"
			+ "{\"op\":\"=\",\"key\":\"skuCode\"},{\"op\":\"=\",\"key\":\"storeId\"},{\"op\":\"=\",\"key\":\"bizOrderId\"}],"
			+ "\"dimensions\":[\"biz_order_id\",\"store_name\",\"supplier_name\",\"auction_title\",\"pay_time\","
			+ "\"refund_time\",\"order_channel\",\"stock_unit\",\"discount_info\"],"
			+ "\"fields\":[{\"label\":\"订单号\",\"value\":\"biz_order_id\"},{\"label\":\"门店名称\",\"value\":\"store_name\"},"
			+ "{\"label\":\"供应商名称\",\"value\":\"supplier_name\"},{\"label\":\"商品名称\",\"value\":\"auction_title\"},"
			+ "{\"label\":\"支付时间\",\"value\":\"pay_time\"},{\"label\":\"退款时间\",\"value\":\"refund_time\"},"
			+ "{\"label\":\"销售渠道\",\"value\":\"order_channel\"},{\"label\":\"库存单位\",\"value\":\"stock_unit\"},"
			+ "{\"label\":\"优惠券明细\",\"value\":\"discount_info\"},{\"label\":\"商品编码\",\"value\":\"sku_code\"},"
			+ "{\"label\":\"供应商编码\",\"value\":\"supplier_no\"},{\"label\":\"销售数量\",\"value\":\"buy_amount\"},"
			+ "{\"label\":\"含税单价\",\"value\":\"auction_price\"},{\"label\":\"含税金额\",\"value\":\"pay_fee\"},"
			+ "{\"label\":\"退款金额\",\"value\":\"refund_fee\"}],\"sorts\":[]},\"name\":\"订单明细\"}";
	
	// 北京：282136170
	// 南京：282160323
	// 深圳：282139010
	// 上海：282121208
	//parm_supplierNo  parm_startDate  parm_endDate parm_pageIndex  parm_pageSize
	public static String HEMADATA_LYSJYJXS_NAME="联营商交易及销售单";
	public static String HEMADATA_LYSJYJXS_URL = "https://shuhe.hemaos.com/api/v1/queryData/metrics?_message=true";
	public static String HEMADATA_LYSJYJXS_PARM = "{\"code\":\"public_query;i_sale_detail_zzb.query\","
			+ "\"where\":{\"pageIndex\":parm_pageIndex,\"pageSize\":parm_pageSize,\"sorts\":[],"
			+ "\"dimensions\":[\"biz_order_id\",\"store_name\","
			+ "\"supplier_name\",\"auction_title\",\"pay_time\",\"refund_time\","
			+ "\"order_channel\",\"stock_unit\",\"discount_info\"],"
			+ "\"wheres\":[{\"value\":\"parm_supplierNo\",\"op\":\"=\",\"key\":\"supplierNo\"},"
			+ "{\"value\":\"parm_startDate\",\"op\":\"=\",\"key\":\"startDate\"},"
			+ "{\"value\":\"parm_endDate\",\"op\":\"=\",\"key\":\"endDate\"},"
			+ "{\"op\":\"=\",\"key\":\"skuCode\"},"
			+ "{\"op\":\"=\",\"key\":\"storeId\"},"
			+ "{\"op\":\"=\",\"key\":\"bizOrderId\"}]}}";
	
	
	public static String test_parm="{\"code\":\"public_query;i_sale_detail_zzb.query\","
			+ "\"where\":{\"pageIndex\":1,\"pageSize\":100,\"sorts\":[],\"dimensions\":[\"biz_order_id\","
			+ "\"store_name\",\"supplier_name\",\"auction_title\",\"pay_time\",\"refund_time\",\"order_channel\","
			+ "\"stock_unit\",\"discount_info\"],\"wheres\":[{\"value\":\"282136170\",\"op\":\"=\",\"key\":"
			+ "\"supplierNo\"},{\"value\":\"2021-05-17\",\"op\":\"=\",\"key\":\"startDate\"},"
			+ "{\"value\":\"2021-05-18\",\"op\":\"=\",\"key\":\"endDate\"},{\"op\":\"=\",\"key\":\"skuCode\"},"
			+ "{\"op\":\"=\",\"key\":\"storeId\"},{\"op\":\"=\",\"key\":\"bizOrderId\"}]}}";
 }
