From 3481efebb5033dd35ce6066d030873a892d1db76 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期二, 28 十一月 2023 14:42:43 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/crm/manager/entity/BusinessTrip.java |   81 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 74 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/crm/manager/entity/BusinessTrip.java b/src/main/java/com/zy/crm/manager/entity/BusinessTrip.java
index 6ff5444..3d3eac8 100644
--- a/src/main/java/com/zy/crm/manager/entity/BusinessTrip.java
+++ b/src/main/java/com/zy/crm/manager/entity/BusinessTrip.java
@@ -6,9 +6,14 @@
 import com.baomidou.mybatisplus.enums.IdType;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zy.crm.manager.utils.TimeCalculatorUtils;
+import com.zy.crm.system.entity.Dept;
 import com.zy.crm.system.entity.Dic;
+import com.zy.crm.system.entity.User;
+import com.zy.crm.system.service.DeptService;
 import com.zy.crm.system.service.DicService;
+import com.zy.crm.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -127,6 +132,7 @@
     @ApiModelProperty(value= "鍑哄彂鏃ユ湡")
     @TableField("business_start_time")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date businessStartTime;
 
     /**
@@ -135,6 +141,7 @@
     @ApiModelProperty(value= "缁撴潫鏃ユ湡")
     @TableField("business_end_time")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date businessEndTime;
 
     /**
@@ -142,7 +149,7 @@
      */
     @ApiModelProperty(value= "鍑哄樊鏃堕暱")
     @TableField("business_duration")
-    private Long businessDuration;
+    private Double businessDuration;
 
     /**
      * 鍑哄樊澶╂暟
@@ -205,6 +212,13 @@
     @ApiModelProperty(value= "hostId")
     @TableField("host_id")
     private Long hostId;
+
+    /**
+     * 璺熻釜椤圭洰ID
+     */
+    @ApiModelProperty(value= "璺熻釜椤圭洰ID")
+    @TableField("order_id")
+    private Long orderId;
 
     /**
      * 鍒涘缓鏃堕棿
@@ -272,6 +286,10 @@
     @TableField("business_end_time_day")
     private Integer businessEndTimeDay;
 
+    @ApiModelProperty(value= "涓氬姟鍛�")
+    @TableField("member_id")
+    private Long memberId;
+
     @TableField(exist = false)
     private String pcdStart;
 
@@ -280,7 +298,7 @@
 
     public BusinessTrip() {}
 
-    public BusinessTrip(String businessTripReasons, Integer businessTransportation, Integer businessReturn, String businessStartProvince, String businessStartCity, String businessStartDistrict, String businessStartTown, String businessStartAddr, String businessEndProvince, String businessEndCity, String businessEndDistrict, String businessEndTown, String businessEndAddr, Date businessStartTime, Date businessEndTime, Long businessDuration, Integer businessTripDays, String businessNotes, String businessPeers, Long businessPeersId, String carNumber, String kilometers, Long userId, Long deptId, Long hostId, Date createTime, Date updateTime, Long updateId, String form, Integer settle, String settleMsg, Integer status, Integer businessTripType, Integer businessStartTimeDay, Integer businessEndTimeDay) {
+    public BusinessTrip(String businessTripReasons, Integer businessTransportation, Integer businessReturn, String businessStartProvince, String businessStartCity, String businessStartDistrict, String businessStartTown, String businessStartAddr, String businessEndProvince, String businessEndCity, String businessEndDistrict, String businessEndTown, String businessEndAddr, Date businessStartTime, Date businessEndTime, Double businessDuration, Integer businessTripDays, String businessNotes, String businessPeers, Long businessPeersId, String carNumber, String kilometers, Long userId, Long deptId, Long hostId, Date createTime, Date updateTime, Long updateId, String form, Integer settle, String settleMsg, Integer status, Integer businessTripType, Integer businessStartTimeDay, Integer businessEndTimeDay) {
         this.businessTripReasons = businessTripReasons;
         this.businessTransportation = businessTransportation;
         this.businessReturn = businessReturn;
@@ -382,6 +400,47 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
     }
 
+    public String getUpdateId$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.selectById(this.updateId);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getUserId$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.selectById(this.userId);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getDeptId$(){
+        DeptService service = SpringUtils.getBean(DeptService.class);
+        Dept dept = service.selectById(this.deptId);
+        if (!Cools.isEmpty(dept)){
+            return String.valueOf(dept.getName());
+        }
+        return null;
+    }
+
+    public String getSettle$(){
+        if (null == this.settle){ return null; }
+        switch (this.settle){
+            case 1:
+                return "绛夊緟鎵瑰噯";
+            case 2:
+                return "鐢宠閫氳繃";
+            default:
+                return String.valueOf(this.settle);
+        }
+    }
+
+
+
     public String getStatus$(){
         if (null == this.status){ return null; }
         switch (this.status){
@@ -432,9 +491,9 @@
         if (null == this.businessStartTimeDay){ return null; }
         switch (this.businessStartTimeDay){
             case 1:
-                return TimeCalculatorUtils.getYestMonthDay(this.businessStartTime)+ "涓婂崍";
+                return TimeCalculatorUtils.timeYestMonthDay(this.businessStartTime)+ "涓婂崍";
             case 2:
-                return TimeCalculatorUtils.getYestMonthDay(this.businessStartTime)+ "涓嬪崍";
+                return TimeCalculatorUtils.timeYestMonthDay(this.businessStartTime)+ "涓嬪崍";
             default:
 //                return String.valueOf(this.status);
                 return "鏈煡";
@@ -443,18 +502,26 @@
 
     public String getBusinessEndTimeDay$(){
         if (null == this.businessEndTimeDay){ return null; }
-        switch (this.businessTransportation){
+        switch (this.businessEndTimeDay){
             case 1:
-                return TimeCalculatorUtils.getYestMonthDay(this.businessEndTime)+ "涓婂崍";
+                return TimeCalculatorUtils.timeYestMonthDay(this.businessEndTime)+ "涓婂崍";
             case 2:
-                return TimeCalculatorUtils.getYestMonthDay(this.businessEndTime)+ "涓嬪崍";
+                return TimeCalculatorUtils.timeYestMonthDay(this.businessEndTime)+ "涓嬪崍";
             default:
 //                return String.valueOf(this.status);
                 return "鏈煡";
         }
     }
 
+    public String getBusinessDuration$(){
+        if (null == this.businessDuration) return null;
+        return this.businessDuration+"\t澶�";
+    }
 
+    public String getBusinessTripDays$(){
+        if (null == this.businessTripDays) return null;
+        return this.businessTripDays+"\t澶�";
+    }
 
     public String getPcdStart() {
         StringBuilder sb = new StringBuilder();

--
Gitblit v1.9.1