From 604bf600b33413dbf7c1cfb81ddf7762049fce20 Mon Sep 17 00:00:00 2001 From: mrzhssss <pro6@qq.com> Date: 星期五, 14 一月 2022 10:24:37 +0800 Subject: [PATCH] 解决layui框架bug --- src/main/java/zy/cloud/wms/manager/entity/ProjectPlan.java | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/main/java/zy/cloud/wms/manager/entity/ProjectPlan.java b/src/main/java/zy/cloud/wms/manager/entity/ProjectPlan.java index 2082bd8..d7df651 100644 --- a/src/main/java/zy/cloud/wms/manager/entity/ProjectPlan.java +++ b/src/main/java/zy/cloud/wms/manager/entity/ProjectPlan.java @@ -1,6 +1,9 @@ package zy.cloud.wms.manager.entity; -import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.core.common.Cools; +import com.core.common.SpringUtils; +import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.enums.IdType; @@ -37,6 +40,9 @@ import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotations.TableName; +import zy.cloud.wms.manager.service.FlowStatusService; +import zy.cloud.wms.manager.service.ItemService; + import java.io.Serializable; @Data @@ -199,6 +205,16 @@ // null // 鑺傜偣鍚嶇О // ); + + public String getItemId$(){ + ItemService bean = SpringUtils.getBean(ItemService.class); + Item id = bean.selectOne(new EntityWrapper<Item>() + .eq("id", this.itemId)); + if (!Cools.isEmpty(id)) { + return id.getName(); + } + return null; + } public Long getId() { return id; } @@ -239,7 +255,7 @@ if (Cools.isEmpty(this.startTime)){ return ""; } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); + return new SimpleDateFormat("yyyy-MM-dd").format(this.startTime); } public void setStartTime(Date startTime) { @@ -254,7 +270,7 @@ if (Cools.isEmpty(this.realStartTime)){ return ""; } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realStartTime); + return new SimpleDateFormat("yyyy-MM-dd").format(this.realStartTime); } public void setRealStartTime(Date realStartTime) { @@ -269,7 +285,7 @@ if (Cools.isEmpty(this.endTime)){ return ""; } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); + return new SimpleDateFormat("yyyy-MM-dd").format(this.endTime); } public void setEndTime(Date endTime) { @@ -284,7 +300,7 @@ if (Cools.isEmpty(this.realEndTime)){ return ""; } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realEndTime); + return new SimpleDateFormat("yyyy-MM-dd").format(this.realEndTime); } public void setRealEndTime(Date realEndTime) { @@ -385,5 +401,24 @@ this.flowName = flowName; } - +// public String getItemId$(){ +// ItemService itemService = SpringUtils.getBean(ItemService.class); +// Item id = itemService.selectOne(new EntityWrapper<Item>() +// .eq("id", this.getItemId())); +// if (!Cools.isEmpty(id)) { +// +// return id.getName(); +// }else { +// return null; +// } +// } + public String getFlowId$(){ + FlowStatusService bean = SpringUtils.getBean(FlowStatusService.class); + FlowStatus id = bean.selectOne(new EntityWrapper<FlowStatus>() + .eq("id", this.flowId)); + if (!Cools.isEmpty(id)) { + return id.getName(); + } + return null; + } } -- Gitblit v1.9.1