| | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.service.BasWrkStatusService; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "\"id\"", type = IdType.AUTO) |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableField("\"uuid\"") |
| | | @TableField("UUID") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("\"wrk_no\"") |
| | | @TableField("WRK_NO") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @ApiModelProperty(value= "发生时间") |
| | | @TableField("\"start_time\"") |
| | | @TableField("START_TIME") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @TableField("\"end_time\"") |
| | | @TableField("END_TIME") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("\"wrk_sts\"") |
| | | @TableField("WRK_STS") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @TableField("\"io_type\"") |
| | | @TableField("IO_TYPE") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机") |
| | | @TableField("\"crn_no\"") |
| | | @TableField("CRN_NO") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * plc |
| | | */ |
| | | @ApiModelProperty(value= "plc") |
| | | @TableField("\"plc_no\"") |
| | | @TableField("PLC_NO") |
| | | private Integer plcNo; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("\"loc_no\"") |
| | | @TableField("LOC_NO") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("\"sta_no\"") |
| | | @TableField("STA_NO") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("\"source_sta_no\"") |
| | | @TableField("SOURCE_STA_NO") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @TableField("\"source_loc_no\"") |
| | | @TableField("SOURCE_LOC_NO") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @TableField("\"barcode\"") |
| | | @TableField("BARCODE") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | @ApiModelProperty(value= "异常码") |
| | | @TableField("\"err_code\"") |
| | | @TableField("ERR_CODE") |
| | | private Integer errCode; |
| | | |
| | | /** |
| | | * 异常 |
| | | */ |
| | | @ApiModelProperty(value= "异常") |
| | | @TableField("\"error\"") |
| | | @TableField("ERROR") |
| | | private String error; |
| | | |
| | | /** |
| | | * 异常情况 1: 未处理 2: 已修复 |
| | | */ |
| | | @ApiModelProperty(value= "异常情况 1: 未处理 2: 已修复 ") |
| | | @TableField("\"status\"") |
| | | @TableField("STATUS") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("\"create_time\"") |
| | | @TableField("CREATE_TIME") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("\"create_by\"") |
| | | @TableField("CREATE_BY") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("\"update_time\"") |
| | | @TableField("UPDATE_TIME") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("\"update_by\"") |
| | | @TableField("UPDATE_BY") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @TableField("\"memo\"") |
| | | @TableField("MEMO") |
| | | private String memo; |
| | | |
| | | public BasErrLog() {} |
| | | |
| | | public BasErrLog(String uuid,Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer crnNo,Integer plcNo,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String barcode,Integer errCode,String error,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { |
| | | public BasErrLog(String uuid,Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer crnNo,Integer plcNo, |
| | | String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String barcode,Integer errCode,String error,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { |
| | | this.uuid = uuid; |
| | | this.wrkNo = wrkNo; |
| | | this.startTime = startTime; |
| | |
| | | this.createBy = createBy; |
| | | this.updateTime = updateTime; |
| | | this.updateBy = updateBy; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | |
| | | public BasErrLog(CrnCommand command,String error,String memo) { |
| | | Date now = new Date(); |
| | | this.uuid = now.toString(); |
| | | this.wrkNo = command.getTaskNo().intValue(); |
| | | this.startTime = now; |
| | | this.endTime = now; |
| | | this.wrkSts = 0L; |
| | | this.ioType = 0; |
| | | this.crnNo = command.getLaneNo(); |
| | | this.plcNo = command.getCrnNo(); |
| | | this.locNo = command.getSourcePosX()+"排"+command.getSourcePosY()+"列"+command.getSourcePosZ()+"层"; |
| | | this.staNo = 0; |
| | | this.sourceStaNo = 0; |
| | | this.sourceLocNo = command.getDestinationPosX()+"排"+command.getDestinationPosY()+"列"+command.getDestinationPosY()+"层"; |
| | | this.barcode = ""; |
| | | this.errCode = 0; |
| | | this.error = error; |
| | | this.status = 0; |
| | | this.createTime = now; |
| | | this.createBy = null; |
| | | this.updateTime = now; |
| | | this.updateBy = null; |
| | | this.memo = memo; |
| | | } |
| | | |
| | |
| | | this.wrkSts = wrkSts; |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public Integer getIoType() { |
| | | return ioType; |
| | | } |
| | |
| | | this.ioType = ioType; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public Integer getCrnNo() { |
| | | return crnNo; |
| | | } |