| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableId(value = "wrk_no", type = IdType.INPUT) |
| | | @TableField("wrk_no") |
| | | private Long wrkNo; |
| | | |
| | |
| | | * 任务类型 0: 未知 1: 开门 2: 关门 3: 入硫化罐 4: 入冷却槽 5: 穿梭车进冷却槽 6: 穿梭车离开冷却槽 7: 出冷却槽 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型 0: 未知 1: 开门 2: 关门 3: 入硫化罐 4: 入冷却槽 5: 穿梭车进冷却槽 6: 穿梭车离开冷却槽 7: 出冷却槽 ") |
| | | @TableId(value = "io_type", type = IdType.INPUT) |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | |
| | | this.ioType = ioType; |
| | | this.type = type; |
| | | this.rgvEndId = rgvEndId; |
| | | } |
| | | |
| | | public WrkMastExecuteLog(WrkMastExecute wrkMastExecute) { |
| | | this.wrkNo = wrkMastExecute.getWrkNo(); |
| | | this.enterStaNo = wrkMastExecute.getEnterStaNo(); |
| | | this.outStaNo = wrkMastExecute.getOutStaNo(); |
| | | this.jarEnterStaNo = wrkMastExecute.getJarEnterStaNo(); |
| | | this.jarOutStaNo = wrkMastExecute.getJarOutStaNo(); |
| | | this.jarId = wrkMastExecute.getJarId(); |
| | | this.jarRegin = wrkMastExecute.getJarRegin(); |
| | | this.status = wrkMastExecute.getStatus(); |
| | | this.steId = wrkMastExecute.getSteId(); |
| | | this.rgvId = wrkMastExecute.getRgvId(); |
| | | this.ioTime = wrkMastExecute.getIoTime(); |
| | | this.modiTime = wrkMastExecute.getModiTime(); |
| | | this.appeTime = wrkMastExecute.getAppeTime(); |
| | | this.wrkType = wrkMastExecute.getWrkType(); |
| | | this.wrkSts = wrkMastExecute.getWrkSts(); |
| | | this.ioType = wrkMastExecute.getIoType(); |
| | | this.type = wrkMastExecute.getType(); |
| | | this.rgvEndId = wrkMastExecute.getRgvEndId(); |
| | | } |
| | | |
| | | // WrkMastExecuteLog wrkMastExecuteLog = new WrkMastExecuteLog( |
| | |
| | | } |
| | | } |
| | | |
| | | // public String getWrkSts$(){ |
| | | // try{ |
| | | // if (Cools.isEmpty(this.wrkSts)){ |
| | | // return this.wrkSts+":未知"; |
| | | // } |
| | | //// BasJarMastStatusService service = SpringUtils.getBean(BasJarMastStatusService.class); |
| | | ////// BasJarMastStatus basJarMastStatus = service.selectById(this.wrkSts); |
| | | //// BasJarMastStatus basJarMastStatus = service.selectOne(new EntityWrapper<BasJarMastStatus>().eq("box_type",this.wrkSts.toString())); |
| | | //// if (!Cools.isEmpty(basJarMastStatus)){ |
| | | //// return String.valueOf(basJarMastStatus.getBoxSpecs()); |
| | | //// } |
| | | // if (true){ |
| | | // return this.wrkSts.toString(); |
| | | // } |
| | | // } catch (Exception e){ |
| | | // return this.wrkSts+":未知==>异常:"+e.getMessage(); |
| | | // } |
| | | // return this.wrkSts+":未知"; |
| | | // } |
| | | |
| | | /** |
| | | * 工作状态 |
| | | * 0:初始 wrk_sts |
| | | * 1:RGV小车避让、2:避让完成、3:开门中、4:开门完成、5:更新完成 //io_type = 1、3 |
| | | * 1:RGV小车避让、2:避让完成、3:关门中、4:关门完成、5:更新完成 //io_type = 2、4 |
| | | * 1:RGV小车移动、2:RGV小车到位、3:rgv取货、4:rgv取货完成、5:Ste穿梭版入硫化罐、6:入罐完成、7:更新完成 //io_type = 5 STE A面穿梭车 |
| | | * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版取货、4:取货完成等待下一步、5:Ste穿梭版放货至冷却池、6:放货完成、7:更新完成 //io_type = 6 STE B面穿梭车 |
| | | * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成 //io_type = 7 B=>C 、8 C=>B |
| | | * 1:Ste穿梭版取放货中、2:放货完成等待下一步、3:输送线任务下发完成、4:更新完成 //io_type = 9 STE 末端输送线 |
| | | * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成 //io_type = 10、11 |
| | | * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成 //io_type = 10、11 |
| | | */ |
| | | public String getWrkSts$(){ |
| | | BasJarMastStatusService service = SpringUtils.getBean(BasJarMastStatusService.class); |
| | | BasJarMastStatus basJarMastStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basJarMastStatus)){ |
| | | return String.valueOf(basJarMastStatus.getId()); |
| | | try{ |
| | | if (Cools.isEmpty(this.wrkSts)){ |
| | | return this.wrkSts+":未知"; |
| | | } |
| | | if (Cools.isEmpty(this.ioType)){ |
| | | return this.wrkSts.toString(); |
| | | } else if (this.ioType == 100){ |
| | | switch (this.wrkSts){ |
| | | case 0: |
| | | return this.wrkSts+"、初始"; |
| | | case 99: |
| | | return this.wrkSts+"、充电中"; |
| | | case 100: |
| | | return this.wrkSts+"、充电完成"; |
| | | } |
| | | } else { |
| | | switch (this.wrkSts){ |
| | | case 1: |
| | | switch (this.ioType){ |
| | | case 9: |
| | | return this.wrkSts+"、Ste穿梭版取放货中"; |
| | | default: |
| | | return this.wrkSts+"、RGV平衡车移动"; |
| | | } |
| | | case 2: |
| | | switch (this.ioType){ |
| | | case 9: |
| | | return this.wrkSts+"、Ste穿梭版放货完成等待下一步"; |
| | | default: |
| | | return this.wrkSts+"、RGV平衡车到位"; |
| | | } |
| | | case 3: |
| | | switch (this.ioType){ |
| | | case 1: |
| | | case 3: |
| | | return this.wrkSts+"、硫化罐开门中"; |
| | | case 2: |
| | | case 4: |
| | | return this.wrkSts+"、硫化罐关门中"; |
| | | case 5: |
| | | return this.wrkSts+"、RGV平衡车取货"; |
| | | case 6: |
| | | return this.wrkSts+"、Ste穿梭版取货"; |
| | | case 9: |
| | | return this.wrkSts+"、输送线任务下发完成"; |
| | | default: |
| | | return this.wrkSts+"、Ste穿梭版移动中"; |
| | | } |
| | | case 4: |
| | | switch (this.ioType){ |
| | | case 1: |
| | | case 3: |
| | | return this.wrkSts+"、硫化罐开门完成"; |
| | | case 2: |
| | | case 4: |
| | | return this.wrkSts+"、硫化罐关门完成"; |
| | | case 5: |
| | | return this.wrkSts+"、RGV平衡车取货完成"; |
| | | case 6: |
| | | return this.wrkSts+"、Ste穿梭版取货完成"; |
| | | case 9: |
| | | return this.wrkSts+"、更新完成"; |
| | | default: |
| | | return this.wrkSts+"、Ste穿梭版移动完成"; |
| | | } |
| | | case 5: |
| | | switch (this.ioType){ |
| | | case 5: |
| | | return this.wrkSts+"、Ste穿梭版入硫化罐"; |
| | | case 6: |
| | | return this.wrkSts+"、Ste穿梭版放货至冷却池"; |
| | | default: |
| | | return this.wrkSts+"、更新完成"; |
| | | } |
| | | case 6: |
| | | switch (this.ioType){ |
| | | case 5: |
| | | return this.wrkSts+"、Ste穿梭版入硫化罐完成"; |
| | | case 6: |
| | | return this.wrkSts+"、Ste穿梭版放货完成"; |
| | | default: |
| | | return this.wrkSts+"、更新完成"; |
| | | } |
| | | case 7: |
| | | switch (this.ioType){ |
| | | default: |
| | | return this.wrkSts+"、更新完成"; |
| | | } |
| | | default: |
| | | return this.wrkSts.toString(); |
| | | } |
| | | } |
| | | } catch (Exception e){ |
| | | return this.wrkSts+":未知==>异常:"+e.getMessage(); |
| | | } |
| | | return null; |
| | | return this.wrkSts+":未知"; |
| | | } |
| | | |
| | | //任务类型 0: 未知 1: 开进料门 2: 关进料门 3: 开出料门 4: 关出料门 5: 入硫化罐 6: 入冷却槽 7: 穿梭车进冷却槽 B=>C 8: 穿梭车离开冷却槽 C=>B 9: 出冷却槽 10:A=>B 11:B=>A |
| | | |
| | | public String getIoType$(){ |
| | | if (null == this.ioType){ return null; } |
| | | if (null == this.ioType){ return "未知"; } |
| | | switch (this.ioType){ |
| | | case 0: |
| | | return "未知"; |
| | | return "0.未知"; |
| | | case 1: |
| | | return "开门"; |
| | | return "1.开进料门"; |
| | | case 2: |
| | | return "关门"; |
| | | return "2.关进料门"; |
| | | case 3: |
| | | return "入硫化罐"; |
| | | return "3.开出料门"; |
| | | case 4: |
| | | return "入冷却槽"; |
| | | return "4.关出料门"; |
| | | case 5: |
| | | return "穿梭车进冷却槽"; |
| | | return "5.入硫化罐"; |
| | | case 6: |
| | | return "穿梭车离开冷却槽"; |
| | | return "6.入冷却槽"; |
| | | case 7: |
| | | return "出冷却槽"; |
| | | return "7.B=>C"; |
| | | case 8: |
| | | return "8.C=>B"; |
| | | case 9: |
| | | return "9.出冷却槽"; |
| | | case 10: |
| | | return "10.A=>B"; |
| | | case 11: |
| | | return "11.B=>A"; |
| | | case 100: |
| | | return "100.充电任务"; |
| | | default: |
| | | return String.valueOf(this.ioType); |
| | | } |