package com.zy.asrs.entity; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; import com.baomidou.mybatisplus.annotations.TableField; import com.core.common.Cools; import com.core.common.SpringUtils; import com.zy.asrs.service.LocOwnerService; import com.zy.common.utils.Synchro; import com.zy.system.entity.User; import com.zy.system.service.UserService; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.text.SimpleDateFormat; import java.util.Date; @Data @ExcelIgnoreUnannotated public class LocDetlWarningDTO { private int pageNumber; private int pageSize; private Integer row; @ExcelProperty("库位号") private String locNo; @ExcelProperty("物料码") private String matnr; @ExcelProperty("物料名") private String maktx; @ExcelProperty("入库时间") private Date createTime; @ExcelProperty("规格") private String specs; @ExcelProperty("批次") private String batch; @ExcelProperty("货主Id") private String owner; @ExcelProperty("货主") private String ownerName; // @ExcelProperty("库存上限") private String inventoryMax; // @ExcelProperty("库存下限") private String inventoryMin; @ExcelProperty("库龄上限") private String inventoryAgeMax; // @ExcelProperty("库存总数量") private Integer countAnfme; @ExcelProperty("在库天数") private Integer diffTime; public String getcreateTime$(){ if (Cools.isEmpty(this.createTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); } public String getOwner$(){ LocOwnerService service = SpringUtils.getBean(LocOwnerService.class); LocOwner locOwner = service.selectById(this.owner); if (!Cools.isEmpty(locOwner)){ return String.valueOf(locOwner.getOwner()); } return null; } public String getOwnerName(){ LocOwnerService service = SpringUtils.getBean(LocOwnerService.class); LocOwner locOwner = service.selectById(this.owner); if (!Cools.isEmpty(locOwner)){ return String.valueOf(locOwner.getOwner()); } return null; } public void sync(Object source) { Synchro.Copy(source, this); } }