zhou zhou
1 天以前 1dcfa3702505f0c431757312b5304531029f90f6
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Matnr.java
@@ -3,12 +3,17 @@
import com.baomidou.mybatisplus.annotation.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.vincent.rsf.server.manager.service.BatchRegularService;
import com.vincent.rsf.server.manager.service.CompanysService;
import com.vincent.rsf.server.manager.service.MatnrGroupService;
import com.vincent.rsf.server.manager.service.ShipperService;
import com.vincent.rsf.server.system.entity.SerialRule;
import com.vincent.rsf.server.system.service.SerialRuleService;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -23,10 +28,10 @@
import com.vincent.rsf.server.system.entity.User;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
@TableName("man_matnr")
@TableName(value = "man_matnr", autoResultMap = true)
@Accessors(chain = true)
@ApiModel(value = "Matnr", description = "物料所有基础属性")
public class Matnr implements Serializable {
@@ -42,19 +47,19 @@
    /**
     * 名称
     */
    @ApiModelProperty(value= "名称")
    @ApiModelProperty(value= "物料名称")
    private String name;
    /**
     * 编码
     */
    @ApiModelProperty(value= "编码")
    @ApiModelProperty(value= "物料编码")
    private String code;
    /**
     * 货主ID
     */
    @ApiModelProperty(value= "货主ID")
    @ApiModelProperty(value= "货主标识")
    private Long shipperId;
//    @ApiModelProperty(value = "货主编码")
@@ -63,13 +68,25 @@
    /**
     * 分组ID(*)
     */
    @ApiModelProperty(value= "分组ID(*)")
    @ApiModelProperty(value= "物料分组(*)")
    private Long groupId;
    /**
     * 字段标识
     */
    @ApiModelProperty(value = "字段标识")
    private String fieldsIndex;
    /**
     * 分组助记码
     */
    @ApiModelProperty(value = "分组助记码")
    private String groupCode;
    /**
     * 规则代码
     */
    @ApiModelProperty(value= "规则代码")
    @ApiModelProperty(value= "批次规则标识")
    private Long rglarId;
    /**
@@ -105,7 +122,7 @@
    /**
     * 长*宽*高(m)
     */
    @ApiModelProperty(value= "长*宽*高(m)")
    @ApiModelProperty(value= "尺寸(m)")
    private String size;
    /**
@@ -211,6 +228,10 @@
    @TableLogic
    private Integer deleted;
    @ApiModelProperty("动态扩展字段")
    @TableField(exist = false)
    private Map<String, String> extendFields;
    /**
     * 租户
     */
@@ -223,11 +244,15 @@
    @ApiModelProperty(value= "添加人员")
    private Long createBy;
    @TableField(exist = false)
    private String createBy$;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    /**
@@ -236,11 +261,15 @@
    @ApiModelProperty(value= "修改人员")
    private Long updateBy;
    @TableField(exist = false)
    private String updateBy$;
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    /**
@@ -249,12 +278,37 @@
    @ApiModelProperty(value= "备注")
    private String memo;
    private String baseUnit;
    private String useOrgId;
    private String useOrgName;
    private String erpClsId;
    /**
     * 仓库限制名称
     */
    @ApiModelProperty(value= "仓库限制编码")
    private String warehouseRestrictionCode;
    /**
     * 容器类型
     */
    @ApiModelProperty(value= "容器类型集合")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Integer> containerTypes;
    /**
     * 备注
     */
    @ApiModelProperty(value= "分类列表")
    @TableField(exist = false)
    private List<Matnr> children;
    @TableField(exist = false)
    private String shipperId$;
    @TableField(exist = false)
    private String groupId$;
    public Matnr() {}
@@ -331,30 +385,11 @@
//    );
    public String getShipperId$(){
        CompanysService service = SpringUtils.getBean(CompanysService.class);
        Companys companys = service.getById(this.shipperId);
        if (!Cools.isEmpty(companys)){
            return String.valueOf(companys.getName());
        }
        return null;
        return this.shipperId$;
    }
    public String getGroupId$(){
        MatnrGroupService service = SpringUtils.getBean(MatnrGroupService.class);
        MatnrGroup matnrGroup = service.getById(this.groupId);
        if (!Cools.isEmpty(matnrGroup)){
            return String.valueOf(matnrGroup.getCode());
        }
        return null;
    }
    public String getRglarId$(){
        BatchRegularService service = SpringUtils.getBean(BatchRegularService.class);
        BatchRegular batchRegular = service.getById(this.rglarId);
        if (!Cools.isEmpty(batchRegular)){
            return String.valueOf(batchRegular.getCode());
        }
        return null;
        return this.groupId$;
    }
    public String getStockLeval$(){
@@ -371,7 +406,7 @@
        }
    }
    public String getIsLabelMange$(){
    public String getFlagLabelMange$(){
        if (null == this.flagLabelMange){ return null; }
        switch (this.flagLabelMange){
            case 0:
@@ -395,29 +430,11 @@
        }
    }
    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$(){