From 3e8d4b125c75539a5526eab17908b70005ea85a0 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期一, 22 五月 2023 10:55:19 +0800 Subject: [PATCH] WMS任务完成、取消功能 --- src/main/java/com/zy/asrs/entity/WrkMast.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/WrkMast.java b/src/main/java/com/zy/asrs/entity/WrkMast.java index e896efc..a7849e3 100644 --- a/src/main/java/com/zy/asrs/entity/WrkMast.java +++ b/src/main/java/com/zy/asrs/entity/WrkMast.java @@ -13,6 +13,7 @@ import com.zy.system.service.UserService; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.text.SimpleDateFormat; @@ -308,6 +309,21 @@ @TableField("full_plt") private String fullPlt; + /** + * 婊℃澘 + */ + @ApiModelProperty(value= "wms浠诲姟鍙�") + @TableField("wms_wrk_no") + private Integer wmsWrkNo; + + /** + * 缁撴潫鏃堕棿 + */ + @ApiModelProperty(value= "缁撴潫鏃堕棿") + @TableField("end_time") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date endTime; + public String getWrkSts$(){ BasWrkStatusMapper mapper = SpringUtils.getBean(BasWrkStatusMapper.class); BasWrkStatus entity = mapper.selectById(this.wrkSts); @@ -484,4 +500,36 @@ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime); } + public String getEndTime$(){ + if (Cools.isEmpty(this.endTime)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); + } + + /** + * 鑾峰彇鎸佺画鏃堕棿 + */ + public String getDurationTime() { + if (Cools.isEmpty(this.ioTime)) { + return ""; + } + + Date endDate = new Date(); + if (!Cools.isEmpty(this.endTime)) { + endDate = this.endTime; + } + + //鐢ㄦ潵鑾峰彇涓や釜鏃堕棿鐩稿樊鐨勬绉掓暟 + long l = this.ioTime.getTime() - endDate.getTime(); + + //鍒嗗埆璁$畻鐩稿樊鐨勫ぉ銆佸皬鏃躲�佸垎銆佺 + long day = l / (24 * 60 * 60 * 1000); + long hour = (l / (60 * 60 * 1000) - day * 24); + long min = ((l / (60 * 1000)) - day * 24 * 60 - hour * 60); + long s = (l / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60); + + return Math.abs(day) + "澶�" + Math.abs(hour) + "灏忔椂" + Math.abs(min) + "鍒�" + Math.abs(s) + "绉�"; + } + } -- Gitblit v1.9.1