package com.zy.asrs.entity;
|
|
import com.alibaba.fastjson.JSON;
|
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
|
import com.baomidou.mybatisplus.enums.IdType;
|
import com.baomidou.mybatisplus.annotations.TableField;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
|
import com.core.exception.CoolException;
|
import com.zy.asrs.domain.enums.TaskStatusType;
|
import com.zy.asrs.domain.enums.WorkNoType;
|
import com.zy.asrs.service.DeviceErrorService;
|
import org.springframework.format.annotation.DateTimeFormat;
|
import com.core.common.SpringUtils;
|
import com.zy.system.service.UserService;
|
import com.zy.system.entity.User;
|
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import com.baomidou.mybatisplus.annotations.TableName;
|
import java.io.Serializable;
|
|
@Data
|
@TableName("wcs_task_wrk")
|
public class TaskWrk implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* wms任务号
|
*/
|
@ApiModelProperty(value= "wms任务号")
|
@TableId(value = "task_no", type = IdType.INPUT)
|
@TableField("task_no")
|
private String taskNo;
|
|
/**
|
* 任务状态 1: 接收 2: 派发 3: 完结 4: 取消
|
*/
|
@ApiModelProperty(value= "任务状态 1: 接收 2: 派发 3: 完结 4: 取消 ")
|
private Integer status;
|
|
/**
|
* 任务号
|
*/
|
@ApiModelProperty(value= "任务号")
|
@TableField("wrk_no")
|
private Integer wrkNo;
|
|
/**
|
* 任务时间(接收时间)
|
*/
|
@ApiModelProperty(value= "任务时间(接收时间)")
|
@TableField("create_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/**
|
* 任务类型
|
*/
|
@ApiModelProperty(value= "任务类型")
|
@TableField("io_type")
|
private Integer ioType;
|
|
/**
|
* 起点
|
*/
|
@ApiModelProperty(value= "起点")
|
@TableField("start_point")
|
private String startPoint;
|
|
/**
|
* 终点
|
*/
|
@ApiModelProperty(value= "终点")
|
@TableField("target_point")
|
private String targetPoint;
|
|
/**
|
* 修改人员
|
*/
|
@ApiModelProperty(value= "修改人员")
|
@TableField("modi_user")
|
private Long modiUser;
|
|
/**
|
* 修改时间
|
*/
|
@ApiModelProperty(value= "修改时间")
|
@TableField("modi_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date modiTime;
|
|
/**
|
* 备注
|
*/
|
@ApiModelProperty(value= "备注")
|
private String memo;
|
|
/**
|
* 条码
|
*/
|
@ApiModelProperty(value= "条码")
|
private String barcode;
|
|
/**
|
* 派发时间
|
*/
|
@ApiModelProperty(value= "派发时间")
|
@TableField("assign_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date assignTime;
|
|
/**
|
* 执行时间
|
*/
|
@ApiModelProperty(value= "执行时间")
|
@TableField("execute_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date executeTime;
|
|
/**
|
* 完结时间
|
*/
|
@ApiModelProperty(value= "完结时间")
|
@TableField("complete_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date completeTime;
|
|
/**
|
* 取消时间
|
*/
|
@ApiModelProperty(value= "取消时间")
|
@TableField("cancel_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date cancelTime;
|
|
/**
|
* 工作状态
|
*/
|
@ApiModelProperty(value= "工作状态")
|
@TableField("wrk_sts")
|
private Integer wrkSts;
|
|
/**
|
* 堆垛机号
|
*/
|
@ApiModelProperty(value= "堆垛机号")
|
@TableField("crn_no")
|
private Integer crnNo;
|
|
/**
|
* 指令执行步序
|
*/
|
@ApiModelProperty(value= "指令执行步序")
|
@TableField("command_step")
|
private Integer commandStep;
|
|
/**
|
* 移库标记 1:需要移库 其它不需要
|
*/
|
@ApiModelProperty(value= "移库标记 1:需要移库 其它不需要")
|
@TableField("transfer_mark")
|
private Integer transferMark;
|
|
@ApiModelProperty(value= "")
|
@TableField("origin_start_point")
|
private String originStartPoint;
|
|
@ApiModelProperty(value= "")
|
@TableField("origin_target_point")
|
private String originTargetPoint;
|
|
@ApiModelProperty(value= "")
|
@TableField("io_pri")
|
private Integer ioPri;
|
|
@ApiModelProperty(value= "")
|
@TableField("sc_weight")
|
private Double scWeight;
|
|
public TaskWrk() {}
|
|
public TaskWrk(WrkMast wrkMast) {
|
Date now = new Date();
|
|
taskNo = wrkMast.getWrkNo().toString();
|
wrkNo = wrkMast.getWrkNo();
|
status = TaskStatusType.RECEIVE.id;
|
createTime = now;
|
modiTime = now;
|
assignTime = now;
|
modiUser = wrkMast.getModiUser();
|
ioPri = 1;
|
ioType = 1;
|
barcode = wrkMast.getBarcode();
|
crnNo = wrkMast.getCrnNo();
|
wrkSts = 1;
|
startPoint = wrkMast.getSourceStaNo().toString() ;//起点
|
targetPoint = wrkMast.getStaNo().toString();//终点
|
originStartPoint = wrkMast.getSourceStaNo().toString();//原始起点
|
originTargetPoint = wrkMast.getStaNo().toString();//原始终点
|
memo = wrkMast.getMemo();
|
}
|
|
public TaskWrk(String taskNo,Integer status,Integer wrkNo,Date createTime,Integer ioType,String startPoint,String targetPoint,Long modiUser,Date modiTime,String memo,String barcode,Date assignTime,Date executeTime,Date completeTime,Date cancelTime,Integer wrkSts,Integer crnNo,Integer commandStep,Integer transferMark,String originStartPoint,String originTargetPoint,Integer ioPri,Double scWeight) {
|
this.taskNo = taskNo;
|
this.status = status;
|
this.wrkNo = wrkNo;
|
this.createTime = createTime;
|
this.ioType = ioType;
|
this.startPoint = startPoint;
|
this.targetPoint = targetPoint;
|
this.modiUser = modiUser;
|
this.modiTime = modiTime;
|
this.memo = memo;
|
this.barcode = barcode;
|
this.assignTime = assignTime;
|
this.executeTime = executeTime;
|
this.completeTime = completeTime;
|
this.cancelTime = cancelTime;
|
this.wrkSts = wrkSts;
|
this.crnNo = crnNo;
|
this.commandStep = commandStep;
|
this.transferMark = transferMark;
|
this.originStartPoint = originStartPoint;
|
this.originTargetPoint = originTargetPoint;
|
this.ioPri = ioPri;
|
this.scWeight = scWeight;
|
}
|
|
// TaskWrk taskWrk = new TaskWrk(
|
// null, // wms任务号[非空]
|
// null, // 任务状态
|
// null, // 任务号
|
// null, // 任务时间(接收时间)
|
// null, // 任务类型
|
// null, // 起点
|
// null, // 终点
|
// null, // 修改人员
|
// null, // 修改时间
|
// null, // 备注
|
// null, // 条码
|
// null, // 派发时间
|
// null, // 执行时间
|
// null, // 完结时间
|
// null, // 取消时间
|
// null, // 工作状态
|
// null, // 堆垛机号
|
// null, // 指令执行步序
|
// null, // 移库标记 1:需要移库 其它不需要
|
// null, //
|
// null, //
|
// null, //
|
// null //
|
// );
|
|
public String getStatus$(){
|
if (null == this.status){ return null; }
|
switch (this.status){
|
case 1:
|
return "接收";
|
case 2:
|
return "派发";
|
case 3:
|
return "完结";
|
case 4:
|
return "取消";
|
default:
|
return String.valueOf(this.status);
|
}
|
}
|
|
public String getCreateTime$(){
|
if (Cools.isEmpty(this.createTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
|
}
|
|
public String getModiTime$(){
|
if (Cools.isEmpty(this.modiTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
|
}
|
|
public String getAssignTime$(){
|
if (Cools.isEmpty(this.assignTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.assignTime);
|
}
|
|
public String getExecuteTime$(){
|
if (Cools.isEmpty(this.executeTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.executeTime);
|
}
|
|
public String getCompleteTime$(){
|
if (Cools.isEmpty(this.completeTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.completeTime);
|
}
|
|
public String getCancelTime$(){
|
if (Cools.isEmpty(this.cancelTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.cancelTime);
|
}
|
|
|
}
|