package com.zy.asrs.common.wms.entity; import java.text.SimpleDateFormat; import java.util.Date; import com.zy.asrs.common.wms.service.BasWrkIotypeService; import com.zy.asrs.common.wms.service.BasWrkStatusService; import com.zy.asrs.common.wms.service.LocMastService; 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 com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; 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("wms_wrk_mast_log") public class WrkMastLog implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty(value= "") private Long id; /** * 工作号 */ @ApiModelProperty(value= "工作号") private Integer wrkNo; /** * 工作状态 */ @ApiModelProperty(value= "工作状态") private Long wrkSts; /** * 入出库类型 */ @ApiModelProperty(value= "入出库类型") private Integer ioType; /** * 堆垛机 */ @ApiModelProperty(value= "堆垛机") private Integer crnNo; /** * 优先级 */ @ApiModelProperty(value= "优先级") private Double ioPri; /** * 目标库位 */ @ApiModelProperty(value= "目标库位") private String locNo; /** * 目标站 */ @ApiModelProperty(value= "目标站") private Integer staNo; /** * 源站 */ @ApiModelProperty(value= "源站") private Integer sourceStaNo; /** * 源库位 */ @ApiModelProperty(value= "源库位") private String sourceLocNo; /** * 拣料(checkBox) */ @ApiModelProperty(value= "拣料(checkBox)") private String picking; /** * 退出(checkBox) */ @ApiModelProperty(value= "退出(checkBox)") private String exitMk; @ApiModelProperty(value= "") private Integer pltType; /** * 空板(checkBox) */ @ApiModelProperty(value= "空板(checkBox)") private String emptyMk; /** * 工作时间 */ @ApiModelProperty(value= "工作时间") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date ioTime; @ApiModelProperty(value= "") private Integer ctnType; /** * 修改人员 */ @ApiModelProperty(value= "修改人员") private String modiUser; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date modiTime; /** * 创建者 */ @ApiModelProperty(value= "创建者") private String 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 manuType; /** * 备注 */ @ApiModelProperty(value= "备注") private String memo; /** * 条码 */ @ApiModelProperty(value= "条码") private String barcode; /** * 满板(checkBox) */ @ApiModelProperty(value= "满板(checkBox)") private String fullPlt; /** * 授权商户 */ @ApiModelProperty(value= "授权商户") private Long hostId; public WrkMastLog() {} public WrkMastLog(Long id,Integer wrkNo,Long wrkSts,Integer ioType,Integer crnNo,Double ioPri,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String picking,String exitMk,Integer pltType,String emptyMk,Date ioTime,Integer ctnType,String modiUser,Date modiTime,String appeUser,Date appeTime,Date errorTime,String errorMemo,String manuType,String memo,String barcode,String fullPlt,Long hostId) { this.id = id; this.wrkNo = wrkNo; this.wrkSts = wrkSts; this.ioType = ioType; this.crnNo = crnNo; this.ioPri = ioPri; this.locNo = locNo; this.staNo = staNo; this.sourceStaNo = sourceStaNo; this.sourceLocNo = sourceLocNo; this.picking = picking; this.exitMk = exitMk; this.pltType = pltType; this.emptyMk = emptyMk; this.ioTime = ioTime; this.ctnType = ctnType; this.modiUser = modiUser; this.modiTime = modiTime; this.appeUser = appeUser; this.appeTime = appeTime; this.errorTime = errorTime; this.errorMemo = errorMemo; this.manuType = manuType; this.memo = memo; this.barcode = barcode; this.fullPlt = fullPlt; this.hostId = hostId; } // WrkMastLog wrkMastLog = new WrkMastLog( // null, // [非空] // null, // 工作号[非空] // null, // 工作状态 // null, // 入出库类型 // null, // 堆垛机 // null, // 优先级 // null, // 目标库位 // null, // 目标站 // null, // 源站 // null, // 源库位 // null, // 拣料(checkBox) // null, // 退出(checkBox) // null, // // null, // 空板(checkBox) // null, // 工作时间 // null, // // null, // 修改人员 // null, // 修改时间 // null, // 创建者 // null, // 添加时间 // null, // // null, // // null, // // null, // 备注 // null, // 条码 // null, // 满板(checkBox) // null // 授权商户 // ); public String getWrkSts$(){ BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); BasWrkStatus basWrkStatus = service.getById(this.wrkSts); if (!Cools.isEmpty(basWrkStatus)){ return String.valueOf(basWrkStatus.getWrkDesc()); } return null; } public String getIoType$(){ BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); BasWrkIotype basWrkIotype = service.getById(this.ioType); if (!Cools.isEmpty(basWrkIotype)){ return String.valueOf(basWrkIotype.getIoDesc()); } return null; } public String getLocNo$(){ LocMastService service = SpringUtils.getBean(LocMastService.class); LocMast locMast = service.getById(this.locNo); if (!Cools.isEmpty(locMast)){ return String.valueOf(locMast.getLocNo()); } return null; } public String getSourceLocNo$(){ LocMastService service = SpringUtils.getBean(LocMastService.class); LocMast locMast = service.getById(this.sourceLocNo); if (!Cools.isEmpty(locMast)){ return String.valueOf(locMast.getLocNo()); } return null; } public String getIoTime$(){ if (Cools.isEmpty(this.ioTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); } 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; } }