package com.zy.asrs.common.wms.entity; 
 | 
  
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.Date; 
 | 
import org.springframework.format.annotation.DateTimeFormat; 
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.Date; 
 | 
  
 | 
import com.baomidou.mybatisplus.annotation.IdType; 
 | 
import com.baomidou.mybatisplus.annotation.TableId; 
 | 
import com.baomidou.mybatisplus.annotation.TableLogic; 
 | 
import com.baomidou.mybatisplus.annotation.TableName; 
 | 
import io.swagger.annotations.ApiModel; 
 | 
import io.swagger.annotations.ApiModelProperty; 
 | 
import lombok.Data; 
 | 
import com.zy.asrs.framework.common.Cools; 
 | 
import com.zy.asrs.framework.common.SpringUtils; 
 | 
import com.zy.asrs.common.sys.entity.User; 
 | 
import com.zy.asrs.common.sys.entity.Host; 
 | 
import com.zy.asrs.common.sys.service.UserService; 
 | 
import com.zy.asrs.common.sys.service.HostService; 
 | 
  
 | 
import java.io.Serializable; 
 | 
import java.util.Date; 
 | 
  
 | 
@Data 
 | 
@TableName("wms_order_settle") 
 | 
public class OrderSettle implements Serializable { 
 | 
  
 | 
    private static final long serialVersionUID = 1L; 
 | 
  
 | 
    /** 
 | 
     * 订单状态 
 | 
     */ 
 | 
    @ApiModelProperty(value= "订单状态") 
 | 
    @TableId(value = "order_settle", type = IdType.INPUT) 
 | 
    private Long orderSettle; 
 | 
  
 | 
    /** 
 | 
     * 状态描述 
 | 
     */ 
 | 
    @ApiModelProperty(value= "状态描述") 
 | 
    private String settleName; 
 | 
  
 | 
    /** 
 | 
     * 添加人员 
 | 
     */ 
 | 
    @ApiModelProperty(value= "添加人员") 
 | 
    private Long createBy; 
 | 
  
 | 
    /** 
 | 
     * 添加时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "添加时间") 
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    private Date createTime; 
 | 
  
 | 
    /** 
 | 
     * 修改人员 
 | 
     */ 
 | 
    @ApiModelProperty(value= "修改人员") 
 | 
    private Long updateBy; 
 | 
  
 | 
    /** 
 | 
     * 修改时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "修改时间") 
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    private Date updateTime; 
 | 
  
 | 
    /** 
 | 
     * 备注 
 | 
     */ 
 | 
    @ApiModelProperty(value= "备注") 
 | 
    private String memo; 
 | 
  
 | 
    /** 
 | 
     * 授权商户 
 | 
     */ 
 | 
    @ApiModelProperty(value= "授权商户") 
 | 
    private Long hostId; 
 | 
  
 | 
    public OrderSettle() {} 
 | 
  
 | 
    public OrderSettle(Long orderSettle,String settleName,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Long hostId) { 
 | 
        this.orderSettle = orderSettle; 
 | 
        this.settleName = settleName; 
 | 
        this.createBy = createBy; 
 | 
        this.createTime = createTime; 
 | 
        this.updateBy = updateBy; 
 | 
        this.updateTime = updateTime; 
 | 
        this.memo = memo; 
 | 
        this.hostId = hostId; 
 | 
    } 
 | 
  
 | 
//    OrderSettle orderSettle = new OrderSettle( 
 | 
//            null,    // 订单状态[非空] 
 | 
//            null,    // 状态描述 
 | 
//            null,    // 添加人员 
 | 
//            null,    // 添加时间 
 | 
//            null,    // 修改人员 
 | 
//            null,    // 修改时间 
 | 
//            null,    // 备注 
 | 
//            null    // 授权商户 
 | 
//    ); 
 | 
  
 | 
    public String getCreateBy$(){ 
 | 
        UserService service = SpringUtils.getBean(UserService.class); 
 | 
        User user = service.getById(this.createBy); 
 | 
        if (!Cools.isEmpty(user)){ 
 | 
            return String.valueOf(user.getNickname()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    public String getCreateTime$(){ 
 | 
        if (Cools.isEmpty(this.createTime)){ 
 | 
            return ""; 
 | 
        } 
 | 
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); 
 | 
    } 
 | 
  
 | 
    public String getUpdateBy$(){ 
 | 
        UserService service = SpringUtils.getBean(UserService.class); 
 | 
        User user = service.getById(this.updateBy); 
 | 
        if (!Cools.isEmpty(user)){ 
 | 
            return String.valueOf(user.getNickname()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    public String getUpdateTime$(){ 
 | 
        if (Cools.isEmpty(this.updateTime)){ 
 | 
            return ""; 
 | 
        } 
 | 
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); 
 | 
    } 
 | 
  
 | 
    public String getHostId$(){ 
 | 
        HostService service = SpringUtils.getBean(HostService.class); 
 | 
        Host host = service.getById(this.hostId); 
 | 
        if (!Cools.isEmpty(host)){ 
 | 
            return String.valueOf(host.getName()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
  
 | 
} 
 |