You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
honor-dd-light-ds-java/doc/move/const/class.PurchaseOrderConst.php

359 lines
15 KiB
PHP

<?php
class PurchaseOrderConst {
const purchaseOrderTabAll = 'all';
const purchaseOrderTabWaitPurchase = 'wait_purchase';
const purchaseOrderTabWaitSend = 'wait_send';
const purchaseOrderTabHasSend = 'has_send';
const purchaseOrderTabFinished = 'finished';
const purchaseOrderTabCanceled = 'canceled';
const purchaseOrderTabIsolation = 'isolation';
const purchaseOrderTabCashOnDelivery = 'cash_on_delivery';
const purchaseOrderTabRisk = 'risk';
const purchaseOrderTabWaitPay = 'wait_pay';
const purchaseOrderStatusWaitSend = 'wait_send';
const purchaseOrderStatusTakingGoods = 'taking_goods';
const purchaseOrderStatusHasSend = 'has_send';
const purchaseOrderStatusFinished = 'finished';
const purchaseOrderStatusCancel = 'cancel';
const purchaseOrderStatusRefund = 'refund';
const purchaseOrderStatusWaitPay = 'wait_pay';
const purchaseOrderStatusWaitConfirm = 'wait_confirm';
const filterPurchaseStatusWaitPurchase = '0';
const filterPurchaseStatusPartPurchase = '1';
const filterPurchaseStatusHasPurchase = '2';
const filterPurchaseStatusManualHasPurchase = '3';
const purchase1688TypePromptGoods = 'prompt_goods';
const purchase1688TypeDistribuition = 'distribution';
const purchase1688TypeUsePurchaseUrl = 'use_purchase_url';
const purchase1688AddressTypeTemporarily = 'temporarily';
const purchase1688AddressTypeFixed = 'fixed';
const autoFillRemarkTypeNone = '0';
const autoFillRemarkTypeOnlyOrderRemark = '1';
const autoFillRemarkTypeIncludeVenderRemark = '2';
const autoFillRemarkTypeCustomRemark = '3';
const autoFillRemarkTypeSku = '4';
const autoFillRemarkTypeAddress = '5';
const autoFillRemarkTypeOnlyVenderRemark = '6';
const autoFillRemarkTypePlatformName = '11';
const autoFillRemarkTypePlatformShopName = '12';
const autoFillRemarkTypePlatformOrderId = '13';
const purchaseUrlSourceMove = 0;
const purchaseUrlSourceManual = 1;
const purchasePlatformTaobao = 'taobao';
const purchasePlatformPdd = 'yangkeduo';
const purchasePlatformTmall = 'tmall';
const purchasePlatform1688 = '1688';
const purchasePlatformJd = 'jd';
const purchasePlatformWsy = 'wsy';
const purchasePlatformSooxie = 'sooxie';
const purchasePlatformVvic = 'vvic';
const purchasePlatform17qcc = '17qcc';
const purchasePlatform17zwd = '17zwd';
const purchasePlatformHznzcn = 'hznzcn';
const purchasePlatformBao66 = 'bao66';
const purchasePlatformK3 = 'k3';
const purchasePlatformXingfujie = 'xingfujie';
const purchasePlatform2tong = '2tong';
const purchasePlatformJuyi5 = 'juyi5';
const purchasePlatform3e = '3e';
const purchasePlatform1688DS = '1688DS';
const purchasePlatform1688CG = '1688CG';
const purchasePlatformJp0663 = 'jp0663';
const purchasePlatform52dsy = '52dsy';
const purchasePlatform91fj = '91jf';
const purchasePlatformTaote = 'taote';
const purchasePlatformLtao = 'ltao';
const purchasePlatformSooxieDS = 'sooxieDS';
const purchasePlatformYiwugou = 'yiwugou';
const purchasePlatformZlycw = 'zlycw';
const purchasePlatformField = 'purchase_platform';
const purchasePlatform2Field = 'purchase_platform_2';
const purchaseOrderSnField = 'purchase_order_sn';
const purchasePaymentField = 'purchase_payment';
const purchaseOrderSellerField = 'purchase_order_seller';
const totalProfitField = 'total_profit';
const profitRatioField = 'profit_ratio';
const logisticsInfoField = 'logistics_info';
const purchaseOrderBuyer = 'purchase_order_buyer';
const purchaseOrderNumField = 'purchase_order_num';
const shopNameField = 'shop_name';
const receiverMobileField = 'receiver_mobile';
const customField = 'custom';
const autoShipmentDdApi = '2';
const autoShipmentPlugin = '1';
const actionAutoRelate = 'auto_relate';
const actionManualRelate = 'manual_relate';
const actionRsync = 'rsync';
const sameReceiveInfoTipFieldName = 'name';
const sameReceiveInfoTipFieldMobile = 'mobile';
const sameReceiveInfoTipFieldReceiverFullAddress = 'fullAddress';
const sameTypeName = 'name';
const sameTypeMobile = 'mobile';
const sameTypeFullAddress = 'fullAddress';
const sameTypeNameAndMobile = 'name_mobile';
const sameTypeNameAndFullAddress = 'name_fullAddress';
const sameTypeMobileAndFullAddress = 'mobile_fullAddress';
const sameTypeNameAndMobileAndFullAddress = 'name_mobile_fullAddress';
const autoAuditAddressOrderTypeNoPurchase = 'no_purchase';
const autoAuditAddressOrderTypeAlreadyPurchase = 'already_purchase';
const purchaseSettingDefaultAfterSalesLastShipLeftHours = 24;
const purchaseOrderConsigneeSuffixOrderId = 'orderId';
const purchaseOrderConsigneeSuffixReceiverName = 'receiverName';
const purchaseOrderConsigneeSuffixReceiverMobile = 'receiverMobile';
const purchaseOrderConsigneeSuffixShopName = 'shopName';
const purchaseOrderConsigneeSuffixCustom = 'custom';
const searchTypeSearchByTitle = 'searchByTitle';
const searchTypeSearchByImage = 'searchByImage';
const purchaseOrderCancelSourceManualCancel = 'manual_cancel';
const purchaseOrderCancelSourceManualRelate = 'manual_relate';
const purchaseOrderCancelSourceRelateCancel = 'relate_cancel';
const purchaseOrderCancelSourceDsRelateCancel = 'ds_relate_cancel';
const purchaseOrderCancelSourceDsCancel = 'ds_cancel';
const purchaseOrderCancelSourceDsCloseCancel = 'ds_close_cancel';
const purchaseOrderCancelSourceDsRelate = 'ds_relate';
const purchaseOrderCancelSourcePluginRelate = 'plugin_relate';
const purchaseOrderCancelSourceCgRelate = 'cg_relate';
const purchaseOrderCancelSourceCgCancel = 'cg_cancel';
const purchaseOrderCancelSourceCgMsgCancel = 'cg_msg_cancel';
const purchaseOrderCancelSourceCgCloseCancel = 'ds_close_cancel';
const fakeWarningRangeShopFake = 'shopFake';
const fakeWarningRangeCloudFake = 'cloudFake';
const shopFakeSourceOrderMark = 'orderMark';
const shopFakeSourceManual = 'manual';
const orderHighLightTypeTitle = 'title';
const orderHighLightTypeGoodsId = 'goodsId';
const orderHighLightTypeItemNum = 'itemNum';
const orderHighLightTypeNote = 'orderNote';
const orderHighLightTypeRemark = 'orderRemark';
const orderProcessAreaTypeIsolation = 'isolation';
const orderProcessAreaTypeWarning = 'warning';
const filterSkuName = 'skuName';
const filterProductId = 'productId';
const filterExcludeProductId = 'excludeProductId';
const filterSkuId = 'skuId';
const filterItemNum = 'itemNum';
const filterCode = 'code';
const autoFillOrderMemoShopNameAndOrderId = 'shop_name_and_order_id';
const autoFillOrderMemoTypeShopName = 'shop_name';
const autoFillOrderMemoTypeOrderId = 'order_id';
const autoFillOrderMemoTypeOrderRemark = 'order_remark';
const autoFillOrderMemoTypeSellerRemark = 'seller_remark';
const autoFillOrderMemoTypePlatformName = 'platform_name';
const platformGroup1688DS = '1688DS';
const platformGroup1688CG = '1688CG';
const platformGroupOther = 'other';
const platformGroupManual = 'manual';
const purchaseFlowGeneral = 'general';//1688批发方式
const purchaseFlowSaleProxy = 'saleproxy';//1688代发方式
const deliveryTimeTypeRightNow = 'right_now';
const deliveryTimeTypeLogisticsAccept = 'logistics_accept';
const deliveryTimeTypeDisabled = 'disabled';
const purchaseMobileTypeOrigin = 'origin';//使用原手机号
const purchaseMobileTypeFix = 'fix';//固定手机号
const purchaseMobileTypeReplaceMiddleFourNum = 'replace_middle_four_num';//修改手机号中间4位
const purchaseUrlModalSourceManual = 'manual';
const purchaseUrlModalSourceAuto = 'auto';
const actionSourcePlatformDsAutoPurchaseSetting = 'platformDsAutoPurchaseSetting';
const actionSourceInitDsPurchaseSetting = 'initDsPurchaseSetting';
const actionSourcePlatformPurchaseSetting = 'platformPurchaseSetting';
const dsEncryptOrderTypeAllSeller = 'allSeller';
const dsEncryptOrderTypeSomeSeller = 'someSeller';
const currentPurchaseSettingVersion = 2;
const autoIsolationWareTypeIsolation = 1;
const autoIsolationWareTypeNotIsolation = 2;
const autoIsolationSkuTypeIsolation = 1;
const autoIsolationSkuTypeNotIsolation = 2;
public static function getPurchasePlatformAndOrderDsTblMap() {
return [
self::purchasePlatform1688DS => TblConst::op_order_ds,
self::purchasePlatformLtao => TblConst::op_order_ltao,
self::purchasePlatformSooxieDS => TblConst::op_order_sooxie,
];
}
public static function getOrderDsTblByPurchasePlatform($purchasePlatform) {
return self::getPurchasePlatformAndOrderDsTblMap()[$purchasePlatform];
}
public static function getDsPurchasePlatforms() {
return array_keys(self::getPurchasePlatformAndOrderDsTblMap());
}
public static function getDefaultAppendVenderRemarkFields() {
return array(
self::purchasePlatform2Field,
self::purchaseOrderSnField,
self::logisticsInfoField,
self::purchaseOrderBuyer,
);
}
public static function getSupportPurchasePlatformMap() {
$supportPurchasePlatformMap = self::getPurchasePlatformMap();
$forbidPurchasePlatforms = self::getForbidPurchasePlatformList();
foreach ($forbidPurchasePlatforms as $forbidPurchasePlatform) {
unset($supportPurchasePlatformMap[$forbidPurchasePlatform]);
}
unset($supportPurchasePlatformMap[self::purchasePlatformLtao]);
return $supportPurchasePlatformMap;
}
public static function getPurchasePlatformMap() {
return array(
self::purchasePlatformTaobao => '淘宝',
self::purchasePlatformPdd => '拼多多',
self::purchasePlatformTmall => '天猫',
self::purchasePlatform1688 => '1688',
self::purchasePlatform1688DS => '1688分销',
self::purchasePlatform1688CG => '1688采购',
self::purchasePlatformTaote => '淘特',
self::purchasePlatformLtao => '淘特分销',
self::purchasePlatformJd => '京东',
self::purchasePlatformWsy => '网商园',
self::purchasePlatformSooxie => '搜鞋网',
self::purchasePlatformSooxieDS => '搜鞋网分销',
self::purchasePlatformVvic => '搜款网',
self::purchasePlatform17qcc => '青创网',
self::purchasePlatform17zwd => '一起做网店',
self::purchasePlatformHznzcn => '杭州女装网',
self::purchasePlatformBao66 => '包牛牛',
self::purchasePlatformK3 => '开山网',
self::purchasePlatformXingfujie => '新款网',
self::purchasePlatform2tong => '二童网',
self::purchasePlatformJuyi5 => '聚衣网',
self::purchasePlatform3e => '生意网',
self::purchasePlatformJp0663 => '军埔网',
self::purchasePlatform52dsy => '52电商园',
self::purchasePlatform91fj => '91家纺网',
self::purchasePlatformZlycw => '织里云仓',
);
}
public static function getHasPlatformOrderDetailIdPurchasePlatformList()
{
return [self::purchasePlatformHznzcn, self::purchasePlatformZlycw];
}
public static function getPurchasePlatformName($purchasePlatform) {
$purchasePlatformMap = self::getPurchasePlatformMap();
return $purchasePlatformMap[$purchasePlatform];
}
public static function getShortPurchasePlatformMap() {
return array(
self::purchasePlatformTaobao => 'TB',
self::purchasePlatformPdd => 'PDD',
self::purchasePlatformTmall => 'TM',
self::purchasePlatform1688 => '1688',
self::purchasePlatform1688CG => '1688CG',
self::purchasePlatform1688DS => '1688DS',
self::purchasePlatformJd => 'JD',
self::purchasePlatformWsy => 'WSY',
self::purchasePlatformSooxie => 'SX',
self::purchasePlatformSooxieDS => 'SX',
self::purchasePlatformVvic => 'VVIC',
self::purchasePlatform17qcc => '17QCC',
self::purchasePlatform17zwd => '17ZWD',
self::purchasePlatformHznzcn => 'HZNZCN',
self::purchasePlatformBao66 => 'BAO66',
self::purchasePlatformK3 => 'K3',
self::purchasePlatformXingfujie => 'XINGFUJIE',
self::purchasePlatform2tong => '2TONG',
self::purchasePlatformJuyi5 => 'JUYI5',
self::purchasePlatform3e => '3E',
self::purchasePlatformJp0663 => 'JP0663',
self::purchasePlatform52dsy => '52DSY',
self::purchasePlatformTaote => 'TAOTE',
self::purchasePlatform91fj => '91JF',
self::purchasePlatformZlycw => 'ZLYCW',
);
}
public static function getShortPurchasePlatformName($purchasePlatform) {
$purchasePlatformMap = self::getShortPurchasePlatformMap();
return $purchasePlatformMap[$purchasePlatform];
}
public static function getOrderStatusMaps() {
return [
PurchaseOrderConst::purchaseOrderStatusWaitPay => '待付款',
PurchaseOrderConst::purchaseOrderStatusWaitSend => '待发货',
PurchaseOrderConst::purchaseOrderStatusHasSend => '待收货',
PurchaseOrderConst::purchaseOrderStatusFinished => '交易成功',
PurchaseOrderConst::purchaseOrderStatusCancel => '交易关闭',
PurchaseOrderConst::purchaseOrderStatusRefund => '退款中',
];
}
public static function getPurchaseOrderStatusMap() {
return [
PurchaseOrderConst::purchaseOrderStatusWaitConfirm => '待确认',
PurchaseOrderConst::purchaseOrderStatusWaitPay => '未付款',
PurchaseOrderConst::purchaseOrderStatusTakingGoods => '拿货中',
PurchaseOrderConst::purchaseOrderStatusWaitSend => '待发货',
PurchaseOrderConst::purchaseOrderStatusHasSend => '已发货',
PurchaseOrderConst::purchaseOrderStatusFinished => '已完成',
PurchaseOrderConst::purchaseOrderStatusCancel => '已关闭',
PurchaseOrderConst::purchaseOrderStatusRefund => '退款中',
];
}
public static function getPurchaseOrderStatusArr($excludeStatus = []) {
$purchaseOrderStatusArr = array_keys(self::getOrderStatusMaps());
return array_diff($purchaseOrderStatusArr, $excludeStatus);
}
public static function getPurchaseFixedMobileColumnByPurchasePlatform($purchasePlatform) {
return 'purchase_pdd_fixed_mobile';
}
public static function getForbidPurchasePlatformList() {
return [
self::purchasePlatformJd,
self::purchasePlatformTaobao,
self::purchasePlatformTmall,
self::purchasePlatformPdd,
];
}
}