From 25b1530e5adf0d3e1ed5bf9a3d56cccb1e2ce94f Mon Sep 17 00:00:00 2001 From: yxFwq <1> Date: 星期六, 23 十一月 2024 16:03:01 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/entity/BasJarMast.java | 142 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 138 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/BasJarMast.java b/src/main/java/com/zy/asrs/entity/BasJarMast.java index f69f651..432037d 100644 --- a/src/main/java/com/zy/asrs/entity/BasJarMast.java +++ b/src/main/java/com/zy/asrs/entity/BasJarMast.java @@ -1,5 +1,6 @@ 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; @@ -29,13 +30,13 @@ * 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; @@ -146,9 +147,15 @@ @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; @@ -164,7 +171,49 @@ 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, // 宸ヤ綔鍙穂闈炵┖] @@ -186,12 +235,70 @@ public String getStatus$(){ BasJarMastStatusService service = SpringUtils.getBean(BasJarMastStatusService.class); - BasJarMastStatus basJarMastStatus = service.selectById(this.status); + BasJarMastStatus basJarMastStatus = service.selectOne(new EntityWrapper<BasJarMastStatus>().eq("box_type",this.status.toString())); if (!Cools.isEmpty(basJarMastStatus)){ - return String.valueOf(basJarMastStatus.getId()); + return String.valueOf(basJarMastStatus.getBoxSpecs()); } 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);//瀹屾垚 杈撻�佺嚎瀛樺湪宸ヤ綔鍙枫��===銆嬭浆鍘嗗彶妗f + 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)){ @@ -214,5 +321,32 @@ 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锛欰=>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; + } + } -- Gitblit v1.9.1