package com.bohuikeji.delivery.backstage.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.bohuikeji.frame.module.admin.annotation.TableKeyField;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.bohuikeji.frame.module.admin.constant.RegEx;
import com.bohuikeji.frame.module.admin.entity.TFranchiseeInformation;
import com.bohuikeji.frame.module.admin.entity.vo.AddressVo;
import com.bohuikeji.frame.module.admin.entity.web.block.FileBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.TextBlock;
import com.bohuikeji.frame.module.admin.enums.ColumnTypeEnum;
import com.bohuikeji.frame.module.admin.enums.ColumnWayEnum;
import com.bohuikeji.frame.module.admin.utils.StringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单记录表
 * </p>
 *
 * @author 10552
 * @since 2019-12-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TOrder对象", description="订单记录表")
public class TOrder extends EntityBase<TOrder> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单id")
    @TableId(value = "order_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false,required = false)
    private Integer orderId;

    @ApiModelProperty(value = "订单编号")
    @TableField("order_num")
    @TableShowField("订单编号")
    @TableQueryField(show = false)
    @TableNewField(required = false,show = true,edit = false,add = false,way = ColumnWayEnum.NUM_UTIL,pix = "A")
    private String orderNum;

    @ApiModelProperty(value = "批量下单号")
    @TableField("order_batch_num")
    private String orderBatchNum;

    @ApiModelProperty(value = "麦芽田订单编号")
    @TableField("malt_field_num")
    @TableShowField("麦芽田订单编号")
    @TableQueryField(show = false)
    @TableNewField(required = false,show = true,edit = false,add = false)
    private String maltFieldNum;

    @ApiModelProperty(value = "批量下单客户ID")
    @TableField("order_batch_player_id")
    private Integer orderBatchPlayerId;

    @ApiModelProperty(value = "下单人id")
    @TableField("player_id")
    @TableShowField(value = "下单人用户")
    @TableKeyField(table = "t_customer",keyShowFields = "customer_name",keyLikeFields = "customer_name",key = TCustomer.class)
    @TableQueryField(show = false)
    @TableNewField(block = SelectBlock.class,edit = false)
    private Integer playerId;

    @ApiModelProperty(value = "寄件人姓名")
    @TableField("mailing_name")
    @TableShowField("寄件人姓名")
    @TableQueryField(show = false)
    @TableNewField()
    private String mailingName;

    @ApiModelProperty(value = "寄件人手机号")
    @TableField("mailing_phone")
    @TableShowField("寄件人手机号")
    @TableQueryField(show = false)
    @TableNewField(limit = RegEx.INTEGER)
    private String mailingPhone;

    @ApiModelProperty(value = "寄件地址")
    @TableField("mailing_address")
    @TableShowField("寄件地址")
    @TableNewField
    private AddressVo mailingAddress;

    @ApiModelProperty(value = "收件人姓名")
    @TableField("receipt_name")
    @TableShowField("收件人姓名")
    @TableQueryField(show = false,like = true)
    @TableNewField
    private String receiptName;

    @ApiModelProperty(value = "收件人手机号")
    @TableField("receipt_phone")
    @TableShowField("收件人手机号")
    @TableQueryField(show = false,like = true)
    @TableNewField(limit = RegEx.INTEGER)
    private String receiptPhone;

    @ApiModelProperty(value = "收件地址")
    @TableField("receipt_address")
    @TableShowField("收件地址")
    @TableNewField
    private AddressVo receiptAddress;

    @ApiModelProperty(value = "地址距离(公里),用于计算金额")
    @TableField("order_distance")
    @TableShowField(value = "地址距离(公里)",show = false)
    @TableNewField(edit = false,required = false,show = false)
    private Integer orderDistance=1;

    @ApiModelProperty(value = "地址距离")
    @TableField("order_distance_dec")
    @TableShowField("地址距离(公里)")
    @TableNewField(edit = false,required = false)
    private BigDecimal orderDistanceDec=new BigDecimal("0.1").setScale(1, BigDecimal.ROUND_DOWN);;

    @ApiModelProperty(value = "联系人手机号")
    @TableField("contact_phone")
    @TableShowField("联系人手机号")
    @TableQueryField(show = false,like = true)
    @TableNewField(limit = RegEx.INTEGER)
    private String contactPhone;

    @ApiModelProperty(value = "车辆类型(名称)")
    @TableField("vehicle_name")
    @TableShowField(show = false,value = "车辆类型")
    @TableNewField(edit = false)
    private String vehicleName;

    @ApiModelProperty(value = "车辆id(sys_config表id)用于计算价格")
    @TableField("vehicle_config_id")
    /*@TableShowField(value = "车辆类型",show = false)
    @TableQueryField(like = false)
    @TableKeyField(table = "sys_config",keyShowFields = {"config_name"},where = "config_group in ('car_type_xshc','car_type_pkc','car_type_mbc','car_type_ddc')")
    @TableNewField(block = SelectBlock.class)*/
    private Integer vehicleConfigId;

    @ApiModelProperty(value = "货物类型(鲜花,家电等等..)")
    @TableField("cargo_name")
    @TableShowField(show = false,value = "货物类型")
    @TableNewField(edit = false)
    private String cargoName;

    @ApiModelProperty(value = "类型id(sys_config)用于计算价格")
    @TableField("cargo_config_id")
    /*@TableShowField(value = "货物类型",show = false)
    @TableQueryField(like = false)
    @TableKeyField(table = "sys_config",keyShowFields = {"config_name"},where = "config_group = 'cargo_type'")
    @TableNewField(block = SelectBlock.class)*/
    private Integer cargoConfigId;

    @ApiModelProperty(value = "物品价值名称")
    @TableField("worth_name")
    @TableShowField(value = "物品价值",show = false)
    @TableNewField(edit = false,required = false)
    private String worthName;

    @ApiModelProperty(value = "价值配置id(sys_config)用于计算价格")
    @TableField("worth_config_id")
    /*@TableShowField(value = "物品价值(￥)",show = false)
    @TableKeyField(table = "sys_config",keyShowFields = {"config_name"},where = "config_group = 'cargo_value'")
    @TableNewField(block = SelectBlock.class)
    @TableQueryField(like = false)*/
    private Integer worthConfigId;

    @ApiModelProperty(value = "运输方式名称")
    @TableField("way_name")
    @TableShowField(value = "运输方式",show = false)
    @TableNewField(edit = false)
    private String wayName;

    @ApiModelProperty(value = "运输方式id(sys_config)用于计算金额")
    @TableField("way_config_id")
    /*@TableShowField(value = "运输方式",show = false)
    @TableKeyField(table = "sys_config",keyShowFields = {"config_name"},where = "config_group = 'service_type'")
    @TableNewField(block = SelectBlock.class)
    @TableQueryField(like = false)*/
    private Integer wayConfigId;

    @ApiModelProperty(value = "结算方式(寄付,到付)")
    @TableField("payment_type")
    @TableShowField(value = "结算方式",show = false)
    @TableNewField(edit = false,add = false,show = false)
    private String paymentType;

    @ApiModelProperty(value = "结算方式配置id(sys_config)用于计算金额")
    @TableField("payment_config_id")
    /*@TableShowField(value = "结算方式",show = false)
    @TableKeyField(table = "sys_config",keyShowFields = {"config_name"},where = "config_group = 'payment_method'")
    @TableNewField(block = SelectBlock.class)
    @TableQueryField(like = false)*/
    private Integer paymentConfigId;

    @ApiModelProperty(value = "货物重量,用于计算金额")
    @TableField("cargo_weight")
    @TableShowField(value = "货物重量(KG)",show = false)
    @TableNewField(limit = RegEx.INTEGER,edit = false)
    private Integer cargoWeight=1;

    @ApiModelProperty(value = "货物照片")
    @TableField("cargo_photos")
    @TableShowField(value = "货物照片",type = ColumnTypeEnum.IMAGE,show = false)
    @TableNewField(block = FileBlock.class,required = false)
    private String cargoPhotos;


    @ApiModelProperty(value = "订单是否保价")
    @TableField("is_insured")
    @TableShowField(value = "订单是否保价",show = false)
    @TableNewField(edit = false)
    private Boolean insured=false;

    @ApiModelProperty(value = "取件时间")
    @TableField("pick_time")
    @TableQueryField(show = false)
    @TableShowField(value = "取件时间",show = false)
    @TableNewField(edit = false,add = false,required = false)
    private String pickTime="今天/一小时内";

    @ApiModelProperty(value = "下单备注")
    @TableField("order_remarks")
    @TableShowField(value = "下单备注",show = false)
    @TableNewField(block = TextBlock.class,required = false)
    private String orderRemarks="";

    @ApiModelProperty(value = "订单总额(￥)")
    @TableField("total_order_amount")
    @TableShowField(value = "订单总额",show = false)
    @TableNewField(edit = false,add = false)
    private BigDecimal totalOrderAmount=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "订单小费(￥)")
    @TableField("order_tip")
    @TableShowField(value = "订单小费",show = false)
    @TableNewField(edit = false,add = false)
    private BigDecimal ordertTip=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "订单打赏(￥)")
    @TableField("order_reward")
    @TableShowField(value = "订单打赏",show = false)
    @TableNewField(edit = false,add = false)
    private BigDecimal orderReward=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "订单预估金额(￥)")
    @TableField("order_expect_price")
    @TableShowField("订单预估金额")
    @TableNewField(edit = false,add = false)
    private BigDecimal orderExpectPrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "订单实际支付金额")
    @TableField("order_fact_price")
    @TableShowField(value = "订单实际支付金额(￥)",show = true)
    @TableNewField(edit = false,add = false)
    private BigDecimal orderFactPrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "订单实际收入")
    @TableField("order_actual_price")
    @TableShowField(value = "订单实际收入(￥)",show = true)
    @TableNewField(edit = false,add = false)
    private BigDecimal orderActualPrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "远距离服务费")
    @TableField("supple_price")
    @TableShowField(value = "远距离服务费(￥)",show = true)
    @TableNewField(edit = false,add = false)
    private BigDecimal supplePrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "后置订单小费")
    @TableField("tip_amount")
    @TableShowField(value = "后置订单小费",show = true)
    @TableNewField(edit = false)
    private BigDecimal tipAmount = new BigDecimal("0.00").setScale(2, RoundingMode.DOWN);

    @ApiModelProperty(value = "保价费用")
    @TableField("insured_price")
    @TableShowField(value = "保价金额",show = true)
    @TableNewField(edit = false)
    private BigDecimal insuredPrice = new BigDecimal("0.00").setScale(2, RoundingMode.DOWN);

    @ApiModelProperty(value = "已优惠金额")
    @TableField("pref_amount")
    @TableShowField(value = "已优惠金额",show = true)
    @TableNewField(edit = false,add = false)
    private BigDecimal prefAmount=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "费用明细")
    @TableField("expense_details")
    @TableShowField(value = "费用明细",show = false)
    @TableNewField(edit = false,add = false,show = false)
    private JSONObject expenseDetails;

    /*@ApiModelProperty(value = "搬运id")
    @TableField("carry_id")
    @TableShowField(value = "搬运id",show = false)
    private Integer carryId;*/

    /*@ApiModelProperty(value = "支付id")
    @TableField("pay_id")
    private Integer payId;*/

    @ApiModelProperty(value = "取消类型(0、超时取消；1、客户取消；2、骑手取消；3、平台取消；4、加盟商取消；5、第三方配送员取消；6、第三方系统取消；7、第三方系统超时)")
    @TableField("cancel_type")
    @TableShowField(value = "取消类型",show = false)
    @TableQueryField(show = false,like = true)
    @TableNewField(edit = false,add = false,required = false)
    private Integer cancelType=1;

    @ApiModelProperty(value = "加盟商id")
    @TableField("fran_id")
    @TableShowField(value = "所属区域",show = false)
    @TableKeyField(table = "t_franchisee_information",keyShowFields = "fran_name",where = "fran_id in(##FRAN_IDS##)",key = TFranchiseeInformation.class)
    @TableQueryField(like = false)
    @TableNewField(block = SelectBlock.class,edit = false,add = false)
    private Integer franId;

    @ApiModelProperty(value = "派送员id")
    @TableField("courier_id")
    @TableShowField(value = "接单派送员",show = true)
    @TableKeyField(table = "t_courier",keyShowFields = {"courier_name"},keyLikeFields = {"courier_name"},where = "courier_auth='认证成功'  and fran_id in(##FRAN_IDS##)",key = TCourier.class)
    @TableNewField(edit = false,add = false,required = false)
    private Integer courierId;

    @ApiModelProperty(value = "派送员电话")
    @TableField("courier_phone")
    @TableShowField(value = "派送员电话",show = true)
    @TableNewField(edit = false,add = false,required = false)
    private String courierPhone;

    @ApiModelProperty(value = "下单时间")
    @TableField("order_create_time")
    @TableShowField("下单时间")
    @TableQueryField(sort = 0.1,like = false)
    @TableNewField(way = ColumnWayEnum.DATETIME,edit = false,add = false)
    private LocalDateTime orderCreateTime=LocalDateTime.now();

    @ApiModelProperty(value = "接单时间")
    @TableField("acceptance_time")
    @TableShowField(value = "接单时间",show = false)
    @TableNewField(edit = false,add = false,required = false)
    @TableQueryField(like = false,sort = 0.1)
    private LocalDateTime acceptanceTime;

    @ApiModelProperty(value = "预计到达时间")
    @TableField("order_expect_time")
    @TableNewField(edit = false,add = false,required = false)
    @TableShowField(value = "预计到达时间",show = false)
    private LocalDateTime orderExpectTime=LocalDateTime.now().plusHours(8);

    @ApiModelProperty(value = "剩余取件时间")
    @TableField("surplus_pick_time")
    @TableNewField(edit = false,add = false,required = false)
    @TableShowField(value = "剩余取件时间",show = false)
    private LocalDateTime surplusPickTime;

    @ApiModelProperty(value = "确认取件时间")
    @TableField("confirm_pick_time")
    @TableNewField(edit = false,add = false,required = false)
    @TableShowField(value = "确认取件时间",show = false)
    private LocalDateTime confirmPickTime;

    @ApiModelProperty(value = "订单结束时间")
    @TableField("order_end_time")
    @TableShowField(value = "订单结束时间",show = false)
    @TableNewField(edit = false,add = false,required = false)
    @TableQueryField(like = false,sort = 0.2)
    private LocalDateTime orderEndTime;

    @ApiModelProperty(value = "订单状态(待接单,待支付,待取件,取件中,待派送,派送中,已完成,已取消,已退款,异常)")
    @TableField("order_status")
    @TableShowField("订单状态")
    @TableQueryField(like = false)
    @TableNewField(edit = false,block = SelectBlock.class,add = false)
    private String orderStatus="待支付";

    @ApiModelProperty(value = "订单标识(特惠,急送)")
    @TableField("order_flag")
    @TableShowField("订单标识")
    @TableQueryField(like = false)
    @TableNewField(edit = false,add = false)
    private String orderFlag="急送";

    @ApiModelProperty(value = "评价状态(待评价,已评价)")
    @TableField("evaluate_status")
    @TableShowField(value = "评价状态",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false,block = SelectBlock.class,add = false)
    private String evaluateStatus="待评价";

    @ApiModelProperty(value = "订单第三方结算方式(月结,即时结)")
    @TableField("sett_way")
    @TableShowField(value = "订单第三方结算方式",show = false)
    @TableQueryField(like = false,show = false)
    private String settWay="即时结";

    @ApiModelProperty(value = "平台结算状态")
    @TableField("plat_sett_status")
    @TableShowField(value = "平台结算状态",show = false)
    @TableQueryField(like = false,show = false)
    private String platSettStatus="未结算";

    @ApiModelProperty(value = "加盟商结算状态")
    @TableField("fran_sett_status")
    @TableShowField(value = "加盟商结算状态",show = false)
    @TableQueryField(like = false,show = false)
    private String franSettStatus="未结算";

    @ApiModelProperty(value = "派送员结算状态")
    @TableField("courier_sett_status")
    @TableShowField(value = "派送员结算状态",show = false)
    @TableQueryField(like = false,show = false)
    private String courierSettStatus="未结算";

    @ApiModelProperty(value = "订单规格")
    @TableField("order_norms")
    @TableShowField(value = "订单规格",show = false)
    @TableNewField(add = false,edit = false)
    @TableQueryField(show = false)
    private String orderNorms="小件";

    @ApiModelProperty(value = "客户信息")
    @TableField("player_info")
    @TableShowField(value = "客户信息",show = false)
    @TableNewField(add = false,required = false,show = false)
    private String playerInfo;

    @ApiModelProperty(value = "包裹数量")
    @TableField("package_count")
    @TableShowField(value = "包裹数量",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false,add = false,required = false)
    private Integer packageCount=1;

    @ApiModelProperty(value = "派送员抽成(￥)")
    @TableField("order_courier_money")
    @TableShowField(value = "派送员抽成")
    @TableQueryField(like = false,show = false)
    @TableNewField(edit = false,add = false,required = false)
    private BigDecimal orderCourierMoney=new BigDecimal("0.00").setScale(2, RoundingMode.DOWN);

    @ApiModelProperty(value = "加盟商抽成(￥)")
    @TableField("order_fran_money")
    @TableShowField(value = "加盟商抽成")
    @TableQueryField(like = false,show = false)
    @TableNewField(edit = false,add = false,required = false)
    private BigDecimal orderFranMoney=new BigDecimal("0.00").setScale(2, RoundingMode.DOWN);

    @ApiModelProperty(value = "平台抽成(￥)")
    @TableField("order_sys_money")
    @TableShowField(value = "平台抽成")
    @TableQueryField(like = false,show = false)
    @TableNewField(edit = false,add = false,required = false)
    private BigDecimal orderSysMoney=new BigDecimal("0.00").setScale(2, RoundingMode.DOWN);

    @ApiModelProperty(value = "下单渠道")
    @TableField("order_channel")
    @TableShowField(value = "下单渠道")
    @TableQueryField(like = false)
    @TableNewField(edit = false,add = false,required = false)
    private String orderChannel;

    @ApiModelProperty(value = "派送员类型")
    @TableField("courier_type")
    @TableQueryField(show = false)
    @TableShowField(value = "派送员类型",show = false)
    @TableNewField(options = {"全职","兼职","营销"},edit = false)
    private String courierType;

    @ApiModelProperty(value = "超时时间（分）")
    @TableField("time_out")
    @TableQueryField(show  = false)
    @TableShowField(value = "超时时间（分）",show = false)
    @TableNewField(edit = false,add = false,required = false)
    private Integer timeOut=0;

    @ApiModelProperty(value = "超时扣款")
    @TableField("over_deduction")
    @TableQueryField(show = false)
    @TableShowField(value = "超时扣款",show = false)
    @TableNewField(edit = false,add = false,required = false)
    private BigDecimal overDeduction=new BigDecimal("0.00").setScale(2, RoundingMode.DOWN);

    @ApiModelProperty(value = "优惠卷使用记录id")
    @TableField("dis_id")
    @TableShowField(value = "优惠卷使用记录id",show = false)
    @TableNewField(edit = false)
    private Integer disId=0;

    @ApiModelProperty(value = "搬运名称")
    @TableField("carry_name")
    @TableQueryField(like = false)
    @TableShowField(value = "搬运名称",show = false)
    @TableNewField(edit = false)
    private String carryName;

    @ApiModelProperty(value = "支付码")
    @TableField(exist = false) //不为数据库字段
    private String payWay;

    @ApiModelProperty(value = "支付码")
    @TableField(exist = false) //不为数据库字段
    private String refundReason;

    @ApiModelProperty(value = "派送员信息")
    @TableField(exist = false) //不为数据库字段
    private TCourier courier;

    @ApiModelProperty(value = "最近距离")
    @TableField(exist = false) //不为数据库字段
    private BigDecimal dist = new BigDecimal("0.1").setScale(1, BigDecimal.ROUND_DOWN);

    @ApiModelProperty(value = "营销专属")
    @TableField(exist = false) //不为数据库字段
    private String expert;

    @ApiModelProperty(value = "请求标识")
    @TableField(exist = false) //不为数据库字段
    private String type;

    @ApiModelProperty(value = "服务类型")
    @TableField(exist = false) //不为数据库字段
    private String serviceType;

    @ApiModelProperty(value = "欠费标识")
    @TableField(exist = false) //不为数据库字段
    private String arrearsType;

    @ApiModelProperty(value = "分享标识")
    @TableField(exist = false) //不为数据库字段
    private Integer shareId;

    @ApiModelProperty(value = "授权code")
    @TableField(exist = false) //不为数据库字段
    private String code;
    /*@ApiModelProperty(value = "优惠明细")
    @TableField(exist = false)
    private JSONObject jsonObject;*/

    @ApiModelProperty(value = "优惠券id")
    @TableField(exist = false) //不为数据库字段
    private Integer releaseId=0;

    @ApiModelProperty(value = "优惠券id")
    @TableField(exist = false) //不为数据库字段
    private Integer MemberDisId=0;

    @ApiModelProperty(value = "商户优惠设置名称")
    @TableField(exist = false) //不为数据库字段
    private String preName;

   /* @ApiModelProperty(value = "补充金额")
    @TableField(exist = false) //不为数据库字段
    private BigDecimal amount;*/

   @ApiModelProperty(value = "第三方配送")
   @TableField("is_third")
   @TableShowField(value = "第三方配送")
    private Boolean third=false;

    @ApiModelProperty(value = "第三方配送名称")
    @TableField("third_name")
    @TableQueryField(like = false)
    @TableShowField(value = "第三方配送名称",show = false)
    @TableNewField(edit = false)
    private String thirdName;

    @ApiModelProperty(value = "第三方订单号")
    @TableField("third_num")
    @TableShowField(value = "第三方配送单号",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private String thirdNum;

    @ApiModelProperty(value = "第三方配送金额")
    @TableField("third_price")
    @TableShowField(value = "第三方配送金额",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private BigDecimal thirdPrice=new BigDecimal("0");

    @ApiModelProperty(value = "第三方订单状态")
    @TableField("third_status")
    @TableShowField(value = "第三方订单状态",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private String thirdStatus;

    @ApiModelProperty(value = "京东产品类型")
    @TableField(exist = false) //不为数据库字段
    private String promiseTimeType="普通配送";

    @ApiModelProperty(value = "货拉拉城市id")
    @TableField("city_id")
    @TableShowField(value = "货拉拉城市id",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private Integer cityId;

    @ApiModelProperty(value = "下单门店id")
    @TableField("shop_id")
    @TableShowField(value = "下单门店id",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private Integer shopId;

    @ApiModelProperty(value = "订单类型")
    @TableField("order_type")
    @TableShowField(value = "订单类型",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private String orderType;

    @ApiModelProperty(value = "订单票据路径")
    @TableField("order_bill_url")
    @TableShowField(value = "订单票据路径",type = ColumnTypeEnum.IMAGE)
    @TableNewField(block = FileBlock.class,edit = false)
    private String orderBillUrl;

    @ApiModelProperty(value = "快递100数据")
    @TableField("kd_json")
    @TableShowField(value = "快递100数据",show = false)
    @TableNewField(edit = false,add = false,show = false)
    private JSONObject kdJson;

    @ApiModelProperty(value = "系统溢价")
    @TableField(exist = false) //不为数据库字段
    private BigDecimal sysPrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);

    //货拉拉下单字段
    @ApiModelProperty(value = "城市版本号")
    @TableField(exist = false) //不为数据库字段
    private String location;

    //货拉拉下单字段banyu
    @ApiModelProperty(value = "城市ID")
    @TableField(exist = false) //不为数据库字段
    private String huoToken;

    //货拉拉下单字段
    @ApiModelProperty(value = "货拉拉补付金额字段")
    @TableField(exist = false) //不为数据库字段
    private BigDecimal allPrice=new BigDecimal("0");

    //闪送可指定的交通工具方式  对应travelWay字段，指定交通方式会产生额外费用，默认为0：未指定；  非汽车时默认
    @ApiModelProperty(value = "指定交通方式")
    @TableField(exist = false) //不为数据库字段
    private Integer travelWay=0;

    @ApiModelProperty(value = "指定交通方式")
    @TableField(exist = false) //不为数据库字段
    private String travelType;

    /**
     * 经纬度
     */
    @ApiModelProperty(value="经度",name="url")
    @TableField(exist = false)
    private String longitude;
    /**
     * 经纬度
     */
    @ApiModelProperty(value="纬度",name="url")
    @TableField(exist = false)
    private String latitude;

    //可指定的交通工具方式
   /* @ApiModelProperty(value = "城市ID")
    @TableField(exist = false) //不为数据库字段
    private BigDecimal totalPriceFen = new BigDecimal("0.00").setScale(2, RoundingMode.DOWN);*/


    /**
     * 是否测试订单
     */
    @TableField("is_test")
    private Boolean test;

    public void setOrderNum(String orderNum) {
        //如果订单号已存在，避免重复修改
        if (StringUtils.isNotBlank(this.orderNum)){
            return;
        }
        this.orderNum = orderNum;
    }
}
