| | |
| | | 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; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasJarMastStatusService; |
| | | import com.zy.asrs.entity.BasJarMastStatus; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 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; |
| | | |
| | |
| | | @TableField("jar_loc_digit") |
| | | private Integer jarLocDigit; |
| | | |
| | | /** |
| | | * 冷却 |
| | | */ |
| | | @ApiModelProperty(value= "冷却") |
| | | private Integer burial; |
| | | |
| | | public BasJarMast() {} |
| | | |
| | | public BasJarMast(Long wrkNo,Integer enterStaNo,Integer outStaNo,Integer jarEnterStaNo,Integer jarOutStaNo,Integer jarId,Integer jarRegin,Integer status,Integer enterSteNo,Integer outSteId,Integer enterRgvId,Integer outRgvId,Date ioTime,Date modiTime,Date appeTime) { |
| | | public BasJarMast(Long wrkNo,Integer enterStaNo,Integer outStaNo,Integer jarEnterStaNo,Integer jarOutStaNo,Integer jarId,Integer jarRegin,Integer status,Integer enterSteNo,Integer outSteId,Integer enterRgvId,Integer outRgvId,Date ioTime,Date modiTime,Date appeTime,Integer jarLocDigit,Integer burial) { |
| | | this.wrkNo = wrkNo; |
| | | this.enterStaNo = enterStaNo; |
| | | this.outStaNo = outStaNo; |
| | |
| | | this.ioTime = ioTime; |
| | | this.modiTime = modiTime; |
| | | this.appeTime = appeTime; |
| | | this.jarLocDigit = jarLocDigit; |
| | | this.burial = burial; |
| | | } |
| | | |
| | | public BasJarMast(BasJar jar,WrkMast wrkMast,Integer jarLocDigit) { |
| | | Date now = new Date(); |
| | | this.wrkNo = wrkMast.getWrkNo().longValue(); |
| | | this.enterStaNo = wrkMast.getSourceStaNo(); |
| | | this.outStaNo = wrkMast.getStaNo(); |
| | | // this.jarEnterStaNo = jarEnterStaNo; |
| | | this.jarOutStaNo = jar.getStaNo(); |
| | | this.jarId = jar.getJarNo(); |
| | | this.jarRegin = jar.getRegion(); |
| | | this.status = 0; |
| | | this.enterSteNo = jar.getEnterSteNo(); |
| | | this.outSteId = jar.getOutSteNo(); |
| | | this.enterRgvId = jar.getEnterRgvNo();; |
| | | this.outRgvId = jar.getOutRgvNo();; |
| | | this.ioTime = wrkMast.getIoTime(); |
| | | this.modiTime = now; |
| | | this.appeTime = now; |
| | | this.jarLocDigit = jarLocDigit; |
| | | this.burial = jar.getBurial(); |
| | | } |
| | | |
| | | public BasJarMast(BasJar jar) { |
| | | Date now = new Date(); |
| | | // this.jarEnterStaNo = jarEnterStaNo; |
| | | this.jarOutStaNo = jar.getStaNo(); |
| | | this.jarId = jar.getJarNo(); |
| | | this.jarRegin = jar.getRegion(); |
| | | this.status = 0; |
| | | this.enterSteNo = jar.getEnterSteNo(); |
| | | this.outSteId = jar.getOutSteNo(); |
| | | this.enterRgvId = jar.getEnterRgvNo();; |
| | | this.outRgvId = jar.getOutRgvNo();; |
| | | this.ioTime = now; |
| | | this.modiTime = now; |
| | | this.appeTime = now; |
| | | this.jarLocDigit = jarLocDigit; |
| | | this.burial = jar.getBurial(); |
| | | } |
| | | |
| | | |
| | | // BasJarMast basJarMast = new BasJarMast( |
| | | // null, // 工作号[非空] |
| | |
| | | // null // 更新时间 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | BasJarMastStatusService service = SpringUtils.getBean(BasJarMastStatusService.class); |
| | | BasJarMastStatus basJarMastStatus = service.selectById(this.status); |
| | | if (!Cools.isEmpty(basJarMastStatus)){ |
| | | return String.valueOf(basJarMastStatus.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | // public String getStatus$(){ |
| | | // BasJarMastStatusService service = SpringUtils.getBean(BasJarMastStatusService.class); |
| | | // BasJarMastStatus basJarMastStatus = service.selectById(this.status); |
| | | // if (!Cools.isEmpty(basJarMastStatus)){ |
| | | // return String.valueOf(basJarMastStatus.getId()); |
| | | // } |
| | | // return null; |
| | | |
| | | /* |
| | | default: |
| | | statusList.add(17);//完成 输送线存在工作号《===》转历史档案 |
| | | case 7://出冷却槽任务 |
| | | case 6://小车移动至冷却槽任务 |
| | | case 5://开出料门任务 |
| | | statusList.add(10);//入冷却槽完成 |
| | | case 4://出硫化罐任务 |
| | | statusList.add(11);//冷却中 |
| | | |
| | | if (type!=6){ |
| | | statusList.add(12);//冷却完成 |
| | | } |
| | | statusList.add(13);//冷却完成调小车任务 |
| | | |
| | | case 3://关进料门任务 //生成初始任务 |
| | | statusList.add(4);//入硫化罐完成 |
| | | |
| | | case 2://关进料门任务 //生成初始任务 |
| | | statusList.add(0);//初始 |
| | | |
| | | case 1://开进料门任务 |
| | | statusList.add(2);//进料门打开 |
| | | |
| | | case 0://入硫化罐任务 |
| | | statusList.add(1);//开进料门中 |
| | | statusList.add(3);//入硫化罐中 |
| | | |
| | | statusList.add(5);//硫化中《===》关门完成 |
| | | |
| | | if (type!=5){ |
| | | statusList.add(6);//硫化完成 |
| | | } |
| | | |
| | | statusList.add(7);//开出料门中 |
| | | |
| | | if (type!=4){ |
| | | statusList.add(8);//出料门打开 |
| | | } |
| | | |
| | | statusList.add(9);//出硫化罐中《===》入冷却槽中 |
| | | |
| | | statusList.add(15);//出冷却槽中 |
| | | statusList.add(16);//出冷却槽完成 |
| | | if (type!=7){ |
| | | statusList.add(14);//小车到达冷却槽 |
| | | } |
| | | * */ |
| | | // } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public Integer getStatusComplete(){ |
| | | return this.status+1; |
| | | } |
| | | |
| | | /** |
| | | * ioType任务类型 |
| | | * 0: 未知 1: 开进料门 2: 关进料门 3: 开出料门 4: 关出料门 5: 入硫化罐 6: 入冷却槽 |
| | | * 7: 穿梭车进冷却槽 B=>C 8: 穿梭车离开冷却槽 C=>B 9: 出冷却槽 10:A=>B 11:B=>A |
| | | */ |
| | | public Integer getStatusComplete(Integer ioType){ |
| | | switch (ioType){ |
| | | case 1: |
| | | return 2; |
| | | case 3: |
| | | return 8; |
| | | case 2: |
| | | return 5; |
| | | case 5: |
| | | return 4; |
| | | case 6: |
| | | return 10; |
| | | case 9: |
| | | return 17; |
| | | } |
| | | return this.status+1; |
| | | } |
| | | |
| | | |
| | | } |