SubOrderServiceInterface.php 3.53 KB
Newer Older
1 2 3 4 5 6 7
<?php
/**
 * Created by PhpStorm.
 * User: zhaopeng
 * Date: 2020/9/1
 * Time: 10:09
 */
fuyunnan's avatar
fuyunnan committed
8

9 10 11 12 13 14 15
namespace Meibuyu\Micro\Service\Interfaces\Order;

interface SubOrderServiceInterface
{

    /**
     * @param int $id
fuyunnan's avatar
fuyunnan committed
16
     * @param array $column 需要查询的字段
17 18 19
     * @param array $relation 需要的子订单关联关系可传入['order','order_product']
     * @return array | null
     */
fuyunnan's avatar
fuyunnan committed
20
    public function getById(int $id, array $column = ['*'], array $relation = []): array;
21 22 23 24 25 26 27 28

    /**
     *
     * @param array $idList 子订单的ID  数组[1,2,3]
     * @param array $column 需要查询字段
     * @param array $relation 需要的关联关系可传入['order','order_product']
     * @return array | null
     */
fuyunnan's avatar
fuyunnan committed
29
    public function getByIdList(array $idList, array $column = ['*'], array $relation = []): array;
30 31 32 33 34 35

    /**
     * @param array $idList 需要改变发货状态的子订单ID数组
     * @param int $status 需要改变的发货状态ID 1 待发货 2 已发货 3 已签收 4 已取消
     * @return bool
     */
fuyunnan's avatar
fuyunnan committed
36
    public function updateSubOrderShipStatus(array $idList, int $status): bool;
37

38 39 40 41 42
    /**
     * 需要改变的子订单id
     * @param int $id
     * @return bool
     */
fuyunnan's avatar
fuyunnan committed
43 44 45 46 47 48 49 50 51 52 53
    public function StockIntoUpdateSubOrderStatus(int $id): bool;

    /**
     * description:通过来源单号获取生产工厂
     * author: fuyunnan
     * @param
     * @return array
     * @throws
     * Date: 2020/10/29
     */
    public function getBySourcesFactory($sources): array;
54

fuyunnan's avatar
fuyunnan committed
55 56 57
    /**
     *
     * @param array $source 来源单号数组
fuyunnan's avatar
fuyunnan committed
58
     * @return array
fuyunnan's avatar
fuyunnan committed
59 60
     */

fuyunnan's avatar
fuyunnan committed
61
    public function getBySourceSite($source): array;
fuyunnan's avatar
fuyunnan committed
62

zhaopeng343's avatar
zhaopeng343 committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
    /**
     * 订单采购完成 修改子订单信息  ---1688采购系统使用
     * @param $data //修改参数数组(二维数组)
     *     参数字段:$data = [
     *        [
     *          'sub_order_no'=>oa子订单编号
     *          'supplier_name'=>供应商,
     *          'purchase_price'=>采购总价,
     *          'platform_order'=>'采购平台订单号',
     *          'domestic_logistics_no'=>物流单号,
     *          'domestic_logistics_price'=>物流价格
     *        ],
     *        [
     *           'sub_order_no'=>oa子订单编号
     *           'supplier_name'=>供应商,
     * 'purchase_price'=>采购总价,
     * 'platform_order'=>'采购平台订单号',
     * 'domestic_logistics_no'=>物流单号,
     * 'domestic_logistics_price'=>物流价格
     * ]
     *      ]
     * @return bool
     */
zhaopeng343's avatar
zhaopeng343 committed
86
    public function purchaseCompleted($data,$type): bool;
zhaopeng343's avatar
zhaopeng343 committed
87

zhaopeng343's avatar
zhaopeng343 committed
88 89 90 91 92 93 94
    /**
     * 1688采购异常订单 修改OA子订单状态
     * @param $orderId //oa子订单id
     * @param $errorCode //异常信息 1 取消 2其他
     * @return array
     */
    public function purchaseError($orderId,$errorCode):array ;
zhaopeng343's avatar
zhaopeng343 committed
95

zhaopeng343's avatar
zhaopeng343 committed
96 97 98 99 100 101 102 103
    /**
     * 1688采购取消
     * @param $orderNo
     * @param $editData
     * @return bool
     */
    public function purchaseCancel($orderNo,$editData = []):bool;

zhaopeng343's avatar
zhaopeng343 committed
104 105 106 107
    /**
     * 1688采购 修改oa子订单
     * @param $editData
     * $editData = [
zhaopeng343's avatar
zhaopeng343 committed
108 109
     *           'logistic_no'=>'需要修改的物流单号'
     *           'logistic_no_new'=>'修改后的物流单号',
zhaopeng343's avatar
zhaopeng343 committed
110
     *           'logistic_price'=>'物流费用',
zhaopeng343's avatar
zhaopeng343 committed
111 112 113
     *       ]
     * @return array
     */
zhaopeng343's avatar
zhaopeng343 committed
114
    public function purchaseEdit($editData):bool ;
115

zhaopeng343's avatar
zhaopeng343 committed
116 117 118 119 120 121 122 123 124 125
    /**
     * 删除物流信息
     * @param $data =>[
     *          'sub_order_no'=>'子订单号',
     *          'logistic_no'=>'物流单号'
     *       ]
     * @return bool
     */
    public function purchaseDelete($data):bool;

126
}