skyouc
7 天以前 5f13213af588444a59d0b3725f3d028cbdaffca4
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java
@@ -1,8 +1,13 @@
package com.vincent.rsf.server.manager.entity;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.vincent.rsf.server.system.constant.DictTypeCode;
import com.vincent.rsf.server.system.entity.DictData;
import com.vincent.rsf.server.system.service.DictDataService;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
@@ -84,7 +89,6 @@
     * 是否删除 1: 是  0: 否  
     */
    @ApiModelProperty(value= "是否删除 1: 是  0: 否  ")
    @TableLogic
    private Integer deleted;
    /**
@@ -104,6 +108,7 @@
     */
    @ApiModelProperty(value= "添加时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    /**
@@ -117,6 +122,7 @@
     */
    @ApiModelProperty(value= "修改时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    /**
@@ -144,25 +150,6 @@
        this.memo = memo;
    }
//    Stock stock = new Stock(
//            null,    // ASN单据, 带出PO单[非空]
//            null,    // ERP凭证
//            null,    // ERP单号
//            null,    // ERP库存地址
//            null,    // 合同标识
//            null,    // 锁定原因
//            null,    // 锁定状态[非空]
//            null,    // 锁定人
//            null,    // 锁定时间
//            null,    // 状态[非空]
//            null,    // 是否删除[非空]
//            null,    // 租户
//            null,    // 添加人员
//            null,    // 添加时间[非空]
//            null,    // 修改人员
//            null,    // 修改时间[非空]
//            null    // 备注
//    );
//    public String getLockedTime$(){
//        if (Cools.isEmpty(this.lockedTime)){
@@ -171,6 +158,30 @@
//        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.lockedTime);
//    }
    public String getType$(){
        if (Cools.isEmpty(this.type)){
            return "";
        }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE).eq(DictData::getValue, this.type));
        if (Objects.isNull(dictData)) {
            return null;
        }
        return dictData.getLabel();
    }
    public String getWkType$(){
        if (Cools.isEmpty(this.wkType)){
            return "";
        }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_BUSINESS_TYPE).eq(DictData::getValue, this.wkType));
        if (Objects.isNull(dictData)) {
            return null;
        }
        return dictData.getLabel();
    }
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){