skyouc
1 天以前 4b0cf5de549ebfb56a85b8e3e4f69331e90f1411
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/StockStatistic.java
@@ -5,6 +5,8 @@
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
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;
@@ -12,7 +14,10 @@
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
@@ -54,8 +59,30 @@
    @ApiModelProperty(value= "物料编码")
    private String matnrCode;
    @ApiModelProperty(value= "")
    @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;
    /**
     * 库存批次
@@ -63,7 +90,7 @@
    @ApiModelProperty(value= "库存批次")
    private String batch;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value= "数量")
    private Double anfme;
    /**
@@ -87,31 +114,40 @@
        this.unit = unit;
    }
//    StockStatistic stockStatistic = new StockStatistic(
//            null,    // ID[非空]
//            null,    //
//            null,    // 任务类型
//            null,    // 任务状态
//            null,    // 物料名称
//            null,    // 物料编码
//            null,    // [非空]
//            null,    // 库存批次
//            null,    //
//            null    // 库存单位
//    );
    public String getTaskType$() {
        return TaskType.getTypeDesc(taskType);
    }
    public Boolean getStatusBool(){
        if (null == this.status){ return null; }
        switch (this.status){
            case 1:
                return true;
            case 0:
                return false;
            default:
    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);
    }
}