package com.zy.asrs.entity; 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 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("asr_bas_lift") public class BasLift implements Serializable { private static final long serialVersionUID = 1L; /** * 提升机号 */ @ApiModelProperty(value= "提升机号") @TableId(value = "lift_no", type = IdType.INPUT) @TableField("lift_no") private Integer liftNo; /** * 当前任务状态 */ @ApiModelProperty(value= "当前任务状态") @TableField("status") private Integer status; /** * 任务号 */ @ApiModelProperty(value= "任务号") @TableField("wrk_no") private Integer wrkNo; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @TableField("update_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date updateTime; /** * 修改人员 */ @ApiModelProperty(value= "修改人员") @TableField("update_by") private Long updateBy; /** * 备注 */ @ApiModelProperty(value= "备注") private String memo; /** * 作业标记 */ @ApiModelProperty(value= "作业标记") @TableField("pak_mk") private Boolean pakMk; /** * 提升机锁定 */ @ApiModelProperty(value= "提升机锁定") @TableField("lift_lock") private Boolean liftLock; /** * 位置到达反馈 */ @ApiModelProperty(value= "位置到达反馈") @TableField("position_arrival_feedback") private Integer positionArrivalFeedback; /** * 准备就绪 */ @ApiModelProperty(value= "准备就绪") private Boolean ready; /** * 运行中 */ @ApiModelProperty(value= "运行中") private Boolean running; /** * 联机/单机 */ @ApiModelProperty(value= "联机/单机") private Boolean mode; /** * 输送线前端光电有货 */ @ApiModelProperty(value= "输送线前端光电有货") @TableField("line_front_has_stock") private Boolean lineFrontHasStock; /** * 输送线正转反馈 */ @ApiModelProperty(value= "输送线正转反馈") @TableField("forward_rotation_feedback") private Boolean forwardRotationFeedback; /** * 输送线反转反馈 */ @ApiModelProperty(value= "输送线反转反馈") @TableField("reverse_feedback") private Boolean reverseFeedback; /** * 输送线电机过载 */ @ApiModelProperty(value= "输送线电机过载") @TableField("motor_overload") private Boolean motorOverload; /** * 输送线末端光电有货 */ @ApiModelProperty(value= "输送线末端光电有货") @TableField("line_end_has_stock") private Boolean lineEndHasStock; /** * 进输送线卡托盘报警 */ @ApiModelProperty(value= "进输送线卡托盘报警") @TableField("in_convey_line_card_tray_alarm") private Boolean inConveyLineCardTrayAlarm; /** * 出输送线卡托盘报警 */ @ApiModelProperty(value= "出输送线卡托盘报警") @TableField("out_convey_line_card_tray_alarm") private Boolean outConveyLineCardTrayAlarm; /** * 平台位置偏差报警 */ @ApiModelProperty(value= "平台位置偏差报警") @TableField("plat_position_deviation_alarm") private Boolean platPositionDeviationAlarm; /** * 平台扭矩偏差报警 */ @ApiModelProperty(value= "平台扭矩偏差报警") @TableField("plat_torque_deviation_alarm") private Boolean platTorqueDeviationAlarm; /** * 平台四向车检测 */ @ApiModelProperty(value= "平台四向车检测") @TableField("plat_shuttle_check") private Boolean platShuttleCheck; /** * 未就绪状态 */ @ApiModelProperty(value= "未就绪状态") @TableField("not_ready") private Integer notReady; /** * 伺服1错误 */ @ApiModelProperty(value= "伺服1错误") @TableField("servo_error1") private Integer servoError1; /** * 伺服2错误 */ @ApiModelProperty(value= "伺服2错误") @TableField("servo_error2") private Integer servoError2; /** * 伺服3错误 */ @ApiModelProperty(value= "伺服3错误") @TableField("servo_error3") private Integer servoError3; /** * 伺服4错误 */ @ApiModelProperty(value= "伺服4错误") @TableField("servo_error4") private Integer servoError4; /** * 提升机实际速度反馈 */ @ApiModelProperty(value= "提升机实际速度反馈") @TableField("lift_actual_speed") private Integer liftActualSpeed; public BasLift() {} public BasLift(Integer liftNo,Integer status,Integer wrkNo,Date updateTime,Long updateBy,String memo,Boolean pakMk,Boolean liftLock,Integer positionArrivalFeedback,Boolean ready,Boolean running,Boolean mode,Boolean lineFrontHasStock,Boolean forwardRotationFeedback,Boolean reverseFeedback,Boolean motorOverload,Boolean lineEndHasStock,Boolean inConveyLineCardTrayAlarm,Boolean outConveyLineCardTrayAlarm,Boolean platPositionDeviationAlarm,Boolean platTorqueDeviationAlarm,Boolean platShuttleCheck,Integer notReady,Integer servoError1,Integer servoError2,Integer servoError3,Integer servoError4,Integer liftActualSpeed) { this.liftNo = liftNo; this.status = status; this.wrkNo = wrkNo; this.updateTime = updateTime; this.updateBy = updateBy; this.memo = memo; this.pakMk = pakMk; this.liftLock = liftLock; this.positionArrivalFeedback = positionArrivalFeedback; this.ready = ready; this.running = running; this.mode = mode; this.lineFrontHasStock = lineFrontHasStock; this.forwardRotationFeedback = forwardRotationFeedback; this.reverseFeedback = reverseFeedback; this.motorOverload = motorOverload; this.lineEndHasStock = lineEndHasStock; this.inConveyLineCardTrayAlarm = inConveyLineCardTrayAlarm; this.outConveyLineCardTrayAlarm = outConveyLineCardTrayAlarm; this.platPositionDeviationAlarm = platPositionDeviationAlarm; this.platTorqueDeviationAlarm = platTorqueDeviationAlarm; this.platShuttleCheck = platShuttleCheck; this.notReady = notReady; this.servoError1 = servoError1; this.servoError2 = servoError2; this.servoError3 = servoError3; this.servoError4 = servoError4; this.liftActualSpeed = liftActualSpeed; } // BasLift basLift = new BasLift( // null, // 提升机号[非空] // null, // 当前提升机状态 // null, // 任务号 // null, // 修改时间 // null, // 修改人员 // null, // 备注 // null, // 作业标记 // null, // 提升机锁定 // null, // 位置到达反馈 // null, // 准备就绪 // null, // 运行中 // null, // 联机/单机 // null, // 输送线前端光电有货 // null, // 输送线正转反馈 // null, // 输送线反转反馈 // null, // 输送线电机过载 // null, // 输送线末端光电有货 // null, // 进输送线卡托盘报警 // null, // 出输送线卡托盘报警 // null, // 平台位置偏差报警 // null, // 平台扭矩偏差报警 // null, // 平台四向车检测 // null, // 未就绪状态 // null, // 伺服1错误 // null, // 伺服2错误 // null, // 伺服3错误 // null, // 伺服4错误 // null // 提升机实际速度反馈 // ); public String getUpdateTime$(){ if (Cools.isEmpty(this.updateTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } public String getUpdateBy$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.updateBy); if (!Cools.isEmpty(user)){ return String.valueOf(user.getUsername()); } return null; } public void setPositionArrivalFeedback(Integer lev) { switch (lev) { case 1: case 2: this.positionArrivalFeedback = 1; break; case 4: this.positionArrivalFeedback = 2; break; case 8: this.positionArrivalFeedback = 3; break; case 16: this.positionArrivalFeedback = 4; break; } } }