package com.vincent.rsf.server.manager.entity; 
 | 
  
 | 
  
 | 
import com.baomidou.mybatisplus.annotation.*; 
 | 
import com.fasterxml.jackson.annotation.JsonFormat; 
 | 
import com.vincent.rsf.server.manager.enums.TaskType; 
 | 
import io.swagger.annotations.ApiModel; 
 | 
import io.swagger.annotations.ApiModelProperty; 
 | 
import lombok.Data; 
 | 
import com.vincent.rsf.framework.common.Cools; 
 | 
import com.vincent.rsf.framework.common.SpringUtils; 
 | 
import com.vincent.rsf.server.system.service.UserService; 
 | 
import com.vincent.rsf.server.system.entity.User; 
 | 
import org.springframework.format.annotation.DateTimeFormat; 
 | 
  
 | 
import java.io.Serializable; 
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.Date; 
 | 
  
 | 
@Data 
 | 
@TableName("view_stock_statistic") 
 | 
public class StockStatistic implements Serializable { 
 | 
  
 | 
    private static final long serialVersionUID = 1L; 
 | 
  
 | 
    /** 
 | 
     * ID 
 | 
     */ 
 | 
    @ApiModelProperty(value= "ID") 
 | 
    private Long id; 
 | 
  
 | 
    @ApiModelProperty(value= "") 
 | 
    private String dayTime; 
 | 
  
 | 
    /** 
 | 
     * 任务类型 
 | 
     */ 
 | 
    @ApiModelProperty(value= "任务类型") 
 | 
    private Integer taskType; 
 | 
  
 | 
    /** 
 | 
     * 任务状态 
 | 
     */ 
 | 
    @ApiModelProperty(value= "任务状态") 
 | 
    private Integer taskStatus; 
 | 
  
 | 
    /** 
 | 
     * 物料名称 
 | 
     */ 
 | 
    @ApiModelProperty(value= "物料名称") 
 | 
    private String maktx; 
 | 
  
 | 
    /** 
 | 
     * 物料编码 
 | 
     */ 
 | 
    @ApiModelProperty(value= "物料编码") 
 | 
    private String matnrCode; 
 | 
  
 | 
    @ApiModelProperty(value= "数量") 
 | 
    private Long count; 
 | 
  
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
 | 
    private Date createTime; 
 | 
  
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
 | 
    private Date updateTime; 
 | 
  
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
 | 
    private String createBy; 
 | 
  
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
 | 
    private String updateBy; 
 | 
  
 | 
    @ApiModelProperty("托盘码") 
 | 
    private String barcode; 
 | 
  
 | 
    @ApiModelProperty("库位") 
 | 
    private String locCode; 
 | 
  
 | 
    /** 
 | 
     * 库存批次 
 | 
     */ 
 | 
    @ApiModelProperty(value= "库存批次") 
 | 
    private String batch; 
 | 
  
 | 
    @ApiModelProperty(value= "数量") 
 | 
    private Double anfme; 
 | 
  
 | 
    @ApiModelProperty("入库次数") 
 | 
    @TableField(exist = false) 
 | 
    private Integer inAnfmeCount; 
 | 
  
 | 
    @ApiModelProperty("出库次数") 
 | 
    @TableField(exist = false) 
 | 
    private Integer outAnfmeCount; 
 | 
  
 | 
    @ApiModelProperty("入库数量汇总") 
 | 
    @TableField(exist = false) 
 | 
    private Double inAnfme; 
 | 
  
 | 
    @ApiModelProperty("出库数量汇总") 
 | 
    @TableField(exist = false) 
 | 
    private Double outAnfme; 
 | 
  
 | 
    /** 
 | 
     * 库存单位 
 | 
     */ 
 | 
    @ApiModelProperty(value= "库存单位") 
 | 
    private String unit; 
 | 
  
 | 
    public StockStatistic() {} 
 | 
  
 | 
    public StockStatistic(Long id,String dayTime,Integer taskType,Integer taskStatus,String maktx,String matnrCode,Long count,String batch,Double anfme,String unit) { 
 | 
        this.id = id; 
 | 
        this.dayTime = dayTime; 
 | 
        this.taskType = taskType; 
 | 
        this.taskStatus = taskStatus; 
 | 
        this.maktx = maktx; 
 | 
        this.matnrCode = matnrCode; 
 | 
        this.count = count; 
 | 
        this.batch = batch; 
 | 
        this.anfme = anfme; 
 | 
        this.unit = unit; 
 | 
    } 
 | 
  
 | 
    public String getTaskType$() { 
 | 
        return TaskType.getTypeDesc(taskType); 
 | 
    } 
 | 
  
 | 
  
 | 
    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); 
 | 
    } 
 | 
} 
 |