| package com.zy.asrs.common.wms.entity; | 
|   | 
| import java.text.SimpleDateFormat; | 
| import java.util.Date; | 
|   | 
| import com.baomidou.mybatisplus.annotation.*; | 
| import com.zy.asrs.common.wms.service.BasLocStsService; | 
| import com.zy.asrs.common.wms.service.BasWhsService; | 
| import org.springframework.format.annotation.DateTimeFormat; | 
| import java.text.SimpleDateFormat; | 
| import java.util.Date; | 
| import java.text.SimpleDateFormat; | 
| import java.util.Date; | 
| import java.text.SimpleDateFormat; | 
| import java.util.Date; | 
| import java.text.SimpleDateFormat; | 
| import java.util.Date; | 
|   | 
| import io.swagger.annotations.ApiModel; | 
| import io.swagger.annotations.ApiModelProperty; | 
| import lombok.Data; | 
| import com.zy.asrs.framework.common.Cools; | 
| import com.zy.asrs.framework.common.SpringUtils; | 
| import com.zy.asrs.common.sys.entity.User; | 
| import com.zy.asrs.common.sys.entity.Host; | 
| import com.zy.asrs.common.sys.service.UserService; | 
| import com.zy.asrs.common.sys.service.HostService; | 
|   | 
| import java.io.Serializable; | 
| import java.util.Date; | 
|   | 
| @Data | 
| @TableName("common_loc_mast") | 
| public class LocMast implements Serializable { | 
|   | 
|     private static final long serialVersionUID = 1L; | 
|   | 
|     /** | 
|      * ID | 
|      */ | 
|     @ApiModelProperty(value= "ID") | 
|     @TableId(value = "id", type = IdType.AUTO) | 
|     private Long id; | 
|   | 
|     /** | 
|      * 库位号 | 
|      */ | 
|     @ApiModelProperty(value= "库位号") | 
|     private String locNo; | 
|   | 
|     /** | 
|      * 库位类型 | 
|      */ | 
|     @ApiModelProperty(value= "库位类型") | 
|     private Long whsType; | 
|   | 
|     /** | 
|      * 库位状态 | 
|      */ | 
|     @ApiModelProperty(value= "库位状态") | 
|     private String locSts; | 
|   | 
|     /** | 
|      * 堆垛机号 | 
|      */ | 
|     @ApiModelProperty(value= "堆垛机号") | 
|     private Integer crnNo; | 
|   | 
|     /** | 
|      * 排 | 
|      */ | 
|     @ApiModelProperty(value= "排") | 
|     private Integer row1; | 
|   | 
|     /** | 
|      * 列 | 
|      */ | 
|     @ApiModelProperty(value= "列") | 
|     private Integer bay1; | 
|   | 
|     /** | 
|      * 层 | 
|      */ | 
|     @ApiModelProperty(value= "层") | 
|     private Integer lev1; | 
|   | 
|     /** | 
|      * 满板(checkBox) | 
|      */ | 
|     @ApiModelProperty(value= "满板(checkBox)") | 
|     private String fullPlt; | 
|   | 
|     /** | 
|      * 高低类型 0: 未知  1: 低库位  2: 高库位   | 
|      */ | 
|     @ApiModelProperty(value= "高低类型 0: 未知  1: 低库位  2: 高库位  ") | 
|     private Short locType1; | 
|   | 
|     /** | 
|      * 宽窄类型 0: 未知  1: 窄库位  2: 宽库位   | 
|      */ | 
|     @ApiModelProperty(value= "宽窄类型 0: 未知  1: 窄库位  2: 宽库位  ") | 
|     private Short locType2; | 
|   | 
|     /** | 
|      * 轻重类型 0: 未知  1: 轻库位  2: 重库位   | 
|      */ | 
|     @ApiModelProperty(value= "轻重类型 0: 未知  1: 轻库位  2: 重库位  ") | 
|     private Short locType3; | 
|   | 
|     @ApiModelProperty(value= "") | 
|     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|     private Date ioTime; | 
|   | 
|     @ApiModelProperty(value= "") | 
|     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|     private Date firstTime; | 
|   | 
|     /** | 
|      * 修改人员 | 
|      */ | 
|     @ApiModelProperty(value= "修改人员") | 
|     private Long modiUser; | 
|   | 
|     /** | 
|      * 修改时间 | 
|      */ | 
|     @ApiModelProperty(value= "修改时间") | 
|     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|     private Date modiTime; | 
|   | 
|     /** | 
|      * 创建者 | 
|      */ | 
|     @ApiModelProperty(value= "创建者") | 
|     private Long appeUser; | 
|   | 
|     /** | 
|      * 添加时间 | 
|      */ | 
|     @ApiModelProperty(value= "添加时间") | 
|     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|     private Date appeTime; | 
|   | 
|     @ApiModelProperty(value= "") | 
|     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|     private Date errorTime; | 
|   | 
|     @ApiModelProperty(value= "") | 
|     private String errorMemo; | 
|   | 
|     @ApiModelProperty(value= "") | 
|     private String mk; | 
|   | 
|     @ApiModelProperty(value= "") | 
|     private String barcode; | 
|   | 
|     @ApiModelProperty(value= "") | 
|     private String memo; | 
|   | 
|     /** | 
|      * 授权商户 | 
|      */ | 
|     @ApiModelProperty(value= "授权商户") | 
|     private Long hostId; | 
|   | 
|     @ApiModelProperty(value= "拍照图片") | 
|     private String pic; | 
|   | 
|     @ApiModelProperty(value= "货主") | 
|     private String owner; | 
|   | 
|     public LocMast() {} | 
|   | 
|     public LocMast(String locNo,Long whsType,String locSts,Integer crnNo,Integer row1,Integer bay1,Integer lev1,String fullPlt,Short locType1,Short locType2,Short locType3,Date ioTime,Date firstTime,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Date errorTime,String errorMemo,String mk,String barcode,String memo,Long hostId, String owner) { | 
|         this.locNo = locNo; | 
|         this.whsType = whsType; | 
|         this.locSts = locSts; | 
|         this.crnNo = crnNo; | 
|         this.row1 = row1; | 
|         this.bay1 = bay1; | 
|         this.lev1 = lev1; | 
|         this.fullPlt = fullPlt; | 
|         this.locType1 = locType1; | 
|         this.locType2 = locType2; | 
|         this.locType3 = locType3; | 
|         this.ioTime = ioTime; | 
|         this.firstTime = firstTime; | 
|         this.modiUser = modiUser; | 
|         this.modiTime = modiTime; | 
|         this.appeUser = appeUser; | 
|         this.appeTime = appeTime; | 
|         this.errorTime = errorTime; | 
|         this.errorMemo = errorMemo; | 
|         this.mk = mk; | 
|         this.barcode = barcode; | 
|         this.memo = memo; | 
|         this.hostId = hostId; | 
|         this.owner = owner; | 
|     } | 
|   | 
| //    LocMast locMast = new LocMast( | 
| //            null,    // 库位号[非空] | 
| //            null,    // 库位类型 | 
| //            null,    // 库位状态[非空] | 
| //            null,    // 堆垛机号 | 
| //            null,    // 排 | 
| //            null,    // 列 | 
| //            null,    // 层 | 
| //            null,    // 满板(checkBox) | 
| //            null,    // 高低类型 | 
| //            null,    // 宽窄类型 | 
| //            null,    // 轻重类型 | 
| //            null,    //  | 
| //            null,    //  | 
| //            null,    // 修改人员 | 
| //            null,    // 修改时间 | 
| //            null,    // 创建者 | 
| //            null,    // 添加时间 | 
| //            null,    //  | 
| //            null,    //  | 
| //            null,    //  | 
| //            null,    //  | 
| //            null,    //  | 
| //            null    // 授权商户 | 
| //    ); | 
|   | 
|     public String getWhsType$(){ | 
|         if (Cools.isEmpty(this.whsType)) return "未知"; | 
|         switch (this.whsType.intValue()){ | 
|             case 0: | 
|                 return "立体仓库"; | 
|             case 1: | 
|                 return "平面仓库"; | 
|         } | 
|         return "未知"; | 
|     } | 
|   | 
|   | 
|     public String getLocSts$(){ | 
|         BasLocStsService service = SpringUtils.getBean(BasLocStsService.class); | 
|         BasLocSts basLocSts = service.getById(this.locSts); | 
|         if (!Cools.isEmpty(basLocSts)){ | 
|             return String.valueOf(basLocSts.getLocDesc()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getLocType1$(){ | 
|         if (null == this.locType1){ return null; } | 
|         switch (this.locType1){ | 
|             case 0: | 
|                 return "未知"; | 
|             case 1: | 
|                 return "低库位"; | 
|             case 2: | 
|                 return "高库位"; | 
|             default: | 
|                 return String.valueOf(this.locType1); | 
|         } | 
|     } | 
|   | 
|     public String getLocType2$(){ | 
|         if (null == this.locType2){ return null; } | 
|         switch (this.locType2){ | 
|             case 0: | 
|                 return "未知"; | 
|             case 1: | 
|                 return "窄库位"; | 
|             case 2: | 
|                 return "宽库位"; | 
|             default: | 
|                 return String.valueOf(this.locType2); | 
|         } | 
|     } | 
|   | 
|     public String getLocType3$(){ | 
|         if (null == this.locType3){ return null; } | 
|         switch (this.locType3){ | 
|             case 0: | 
|                 return "未知"; | 
|             case 1: | 
|                 return "轻库位"; | 
|             case 2: | 
|                 return "重库位"; | 
|             default: | 
|                 return String.valueOf(this.locType3); | 
|         } | 
|     } | 
|   | 
|     public String getIoTime$(){ | 
|         if (Cools.isEmpty(this.ioTime)){ | 
|             return ""; | 
|         } | 
|         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); | 
|     } | 
|   | 
|     public String getFirstTime$(){ | 
|         if (Cools.isEmpty(this.firstTime)){ | 
|             return ""; | 
|         } | 
|         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.firstTime); | 
|     } | 
|   | 
|     public String getModiUser$(){ | 
|         UserService service = SpringUtils.getBean(UserService.class); | 
|         User user = service.getById(this.modiUser); | 
|         if (!Cools.isEmpty(user)){ | 
|             return String.valueOf(user.getNickname()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getModiTime$(){ | 
|         if (Cools.isEmpty(this.modiTime)){ | 
|             return ""; | 
|         } | 
|         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); | 
|     } | 
|   | 
|     public String getAppeUser$(){ | 
|         UserService service = SpringUtils.getBean(UserService.class); | 
|         User user = service.getById(this.appeUser); | 
|         if (!Cools.isEmpty(user)){ | 
|             return String.valueOf(user.getNickname()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getAppeTime$(){ | 
|         if (Cools.isEmpty(this.appeTime)){ | 
|             return ""; | 
|         } | 
|         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); | 
|     } | 
|   | 
|     public String getErrorTime$(){ | 
|         if (Cools.isEmpty(this.errorTime)){ | 
|             return ""; | 
|         } | 
|         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime); | 
|     } | 
|   | 
|     public String getHostId$(){ | 
|         HostService service = SpringUtils.getBean(HostService.class); | 
|         Host host = service.getById(this.hostId); | 
|         if (!Cools.isEmpty(host)){ | 
|             return String.valueOf(host.getName()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|   | 
| } |