skyouc
2 天以前 27b40d8451a39191dfbe4576415419ce2ed9cb2f
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Purchase.java
@@ -1,8 +1,12 @@
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.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 java.text.SimpleDateFormat;
@@ -55,6 +59,10 @@
    @ApiModelProperty(value= "单据类型")
    private String type;
    @ApiModelProperty(value = "erp主单标识")
    private String platId;
    /**
     * 单据来源
     */
@@ -96,7 +104,7 @@
     * erp单号
     */
    @ApiModelProperty(value= "erp单号")
    private String erpCode;
    private String platCode;
    /**
     * 计划收货时间
@@ -171,16 +179,17 @@
    public Purchase() {}
    public Purchase(String code,String type,String source,Date preArr,Double anfme,Double qty,Double workQty,String channel,String erpCode,Date startTime,Date endTime,String project,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
    public Purchase(String code,String type,String source,String platId ,Date preArr,Double anfme,Double qty,Double workQty,String channel,String platCode,Date startTime,Date endTime,String project,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
        this.code = code;
        this.type = type;
        this.source = source;
        this.platId = platId;
        this.preArr = preArr;
        this.anfme = anfme;
        this.qty = qty;
        this.workQty = workQty;
        this.channel = channel;
        this.erpCode = erpCode;
        this.platCode = platCode;
        this.startTime = startTime;
        this.endTime = endTime;
        this.project = project;
@@ -217,6 +226,20 @@
//            null    // 备注
//    );
    public String getType$() {
        if (Cools.isEmpty(this.type)) {
            return "";
        }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE)
                .eq(DictData::getValue, this.type));
        if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) {
            return null;
        }
        return dictDatas.getLabel();
    }
    public String getPreArr$(){
        if (Cools.isEmpty(this.preArr)){
            return "";