From 0dd23ce00979f8aa836b19e3c565094665d6fa47 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期一, 17 一月 2022 14:33:02 +0800
Subject: [PATCH] 新增点击排序功能

---
 src/main/java/zy/cloud/wms/manager/entity/Item.java |  139 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 118 insertions(+), 21 deletions(-)

diff --git a/src/main/java/zy/cloud/wms/manager/entity/Item.java b/src/main/java/zy/cloud/wms/manager/entity/Item.java
index c5fcfa6..6dd0f21 100644
--- a/src/main/java/zy/cloud/wms/manager/entity/Item.java
+++ b/src/main/java/zy/cloud/wms/manager/entity/Item.java
@@ -3,11 +3,17 @@
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
+import zy.cloud.wms.manager.service.CstmrService;
+import zy.cloud.wms.manager.service.ProjectStatusService;
+import zy.cloud.wms.manager.service.ProjectTypeService;
 import zy.cloud.wms.system.entity.Host;
 import zy.cloud.wms.system.entity.User;
 import zy.cloud.wms.system.service.HostService;
@@ -16,7 +22,9 @@
 import java.io.Serializable;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.List;
 
+@Data
 @TableName("man_item")
 public class Item implements Serializable {
 
@@ -85,7 +93,7 @@
      * 寮�濮嬫椂闂�
      */
     @ApiModelProperty(value= "寮�濮嬫椂闂�")
-    @TableField("start_time")
+    @TableField(value = "start_time", strategy = FieldStrategy.IGNORED)
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date startTime;
 
@@ -93,14 +101,14 @@
      * 缁撴潫鏃堕棿
      */
     @ApiModelProperty(value= "缁撴潫鏃堕棿")
-    @TableField("end_time")
+    @TableField(value = "end_time" ,strategy = FieldStrategy.IGNORED)
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date endTime;
 
     /**
      * 鐘舵�� 1: 姝e父  0: 绂佺敤
      */
-    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 绂佺敤  ")
+    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 瀹岀粨  ")
     private Integer status;
 
     /**
@@ -139,25 +147,37 @@
     @ApiModelProperty(value= "澶囨敞")
     private String memo;
 
+    @TableField("type")
+    private String type;
+
+
+    @TableField(value = "real_start_time", strategy = FieldStrategy.IGNORED)
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date realStartTime;
+
+
+    @TableField(value = "real_end_time", strategy = FieldStrategy.IGNORED)
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date realEndTime;
+
+    @TableField("real_month")
+    private Integer realMonth;
+
+    @TableField("duty_department")
+    private String dutyDepartment;
+
+    @TableField("duty_man")
+    private String dutyMan;
+
+    @TableField("origin_area")
+    private String originArea;
+
+    @TableField("project_status")
+    private Integer projectStatus;
+
     public Item() {}
 
-    public Item(Long hostId, String uuid,String name,String inUuid,String cstmrUuid,String cstmr,String member,String leader,Date startTime,Date endTime,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
-        this.hostId = hostId;
-        this.name = name;
-        this.inUuid = inUuid;
-        this.cstmrUuid = cstmrUuid;
-        this.cstmr = cstmr;
-        this.member = member;
-        this.leader = leader;
-        this.startTime = startTime;
-        this.endTime = endTime;
-        this.status = status;
-        this.createBy = createBy;
-        this.createTime = createTime;
-        this.updateBy = updateBy;
-        this.updateTime = updateTime;
-        this.memo = memo;
-    }
+
 
 //    Item item = new Item(
 //            null,    // 椤圭洰缂栧彿[闈炵┖]
@@ -177,6 +197,14 @@
 //            null    // 澶囨敞
 //    );
 
+    public String getProjectStatus$(){
+        ProjectStatusService bean = SpringUtils.getBean(ProjectStatusService.class);
+        ProjectStatus id = bean.selectOne(new EntityWrapper<ProjectStatus>().eq("id", this.projectStatus));
+        if (!Cools.isEmpty(this.id)) {
+            return id.getStatusName();
+        }
+        return null;
+    }
     public Long getId() {
         return id;
     }
@@ -205,6 +233,7 @@
     public String getUuid() {
         return uuid;
     }
+
 
     public void setUuid(String uuid) {
         this.uuid = uuid;
@@ -269,6 +298,13 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime);
     }
 
+    public String getStartTime0$(){
+        if (Cools.isEmpty(this.startTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd").format(this.startTime);
+    }
+
     public void setStartTime(Date startTime) {
         this.startTime = startTime;
     }
@@ -282,6 +318,12 @@
             return "";
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime);
+    }
+    public String getEndTime0$(){
+        if (Cools.isEmpty(this.endTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd").format(this.endTime);
     }
 
     public void setEndTime(Date endTime) {
@@ -297,7 +339,9 @@
         switch (this.status){
             case 1:
                 return "姝e父";
-            case 0:
+            case 3:
+                return "瀹岀粨";
+            case 2:
                 return "绂佺敤";
             default:
                 return String.valueOf(this.status);
@@ -352,6 +396,58 @@
         }
         return null;
     }
+    public String getCstmrUuid$(){
+        CstmrService bean = SpringUtils.getBean(CstmrService.class);
+        Cstmr id = bean.selectOne(new EntityWrapper<Cstmr>()
+                .eq("id", this.cstmrUuid));
+        if (!Cools.isEmpty(id)) {
+            return id.getName();
+        }
+        return null;
+    }
+
+    public String getRealStartTime$(){
+        if (!Cools.isEmpty(this.realStartTime)) {
+            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realStartTime);
+        }else {
+            return "";
+        }
+
+    }
+
+    public String getRealStartTime0$(){
+        if (!Cools.isEmpty(this.realStartTime)) {
+            return new SimpleDateFormat("yyyy-MM-dd").format(this.realStartTime);
+        }else {
+            return "";
+        }
+
+    }
+
+    public String getRealEndTime$(){
+        if (!Cools.isEmpty(this.realEndTime)) {
+            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realEndTime);
+        }else {
+            return "";
+        }
+    }
+    public String getRealEndTime0$(){
+        if (!Cools.isEmpty(this.realEndTime)) {
+            return new SimpleDateFormat("yyyy-MM-dd").format(this.realEndTime);
+        }else {
+            return "";
+        }
+    }
+
+    public String getType$(){
+        ProjectTypeService bean = SpringUtils.getBean(ProjectTypeService.class);
+        ProjectType id = bean.selectOne(new EntityWrapper<ProjectType>()
+                .eq("id", this.type));
+        if (!Cools.isEmpty(id)) {
+            return id.getTypeName();
+        }
+        return null;
+    }
 
     public void setUpdateBy(Long updateBy) {
         this.updateBy = updateBy;
@@ -381,4 +477,5 @@
     }
 
 
+
 }

--
Gitblit v1.9.1