From 565442c3bc65d7596b624a16fcd4facf12fd6abb Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期六, 04 十一月 2023 11:14:11 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/crm/manager/entity/Order.java |  146 ++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 132 insertions(+), 14 deletions(-)

diff --git a/src/main/java/com/zy/crm/manager/entity/Order.java b/src/main/java/com/zy/crm/manager/entity/Order.java
index 90a4731..33fe0a3 100644
--- a/src/main/java/com/zy/crm/manager/entity/Order.java
+++ b/src/main/java/com/zy/crm/manager/entity/Order.java
@@ -8,10 +8,13 @@
 import com.core.common.SpringUtils;
 import com.zy.crm.manager.service.CompanyService;
 import com.zy.crm.manager.service.CstmrService;
+import com.zy.crm.manager.service.OrderProductTypeService;
 import com.zy.crm.system.entity.Dept;
+import com.zy.crm.system.entity.Dic;
 import com.zy.crm.system.entity.Host;
 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.HostService;
 import com.zy.crm.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
@@ -64,21 +67,21 @@
     private Long cstmrId;
 
     /**
-     * 瀹㈡埛浠e彿
+     * 椤圭洰浠e彿
      */
-    @ApiModelProperty(value= "瀹㈡埛浠e彿")
+    @ApiModelProperty(value= "椤圭洰浠e彿")
     private String uuid;
 
     /**
-     * 瀹㈡埛鍚嶇О
+     * 璺熻釜椤圭洰鍚嶇О
      */
-    @ApiModelProperty(value= "瀹㈡埛鍚嶇О")
+    @ApiModelProperty(value= "璺熻釜椤圭洰鍚嶇О")
     private String name;
 
     /**
-     * 鎬婚噾棰�
+     * 椤圭洰鎬婚噾棰�
      */
-    @ApiModelProperty(value= "鎬婚噾棰�")
+    @ApiModelProperty(value= "椤圭洰鎬婚噾棰�")
     private Double money;
 
     /**
@@ -136,9 +139,9 @@
     private String files;
 
     /**
-     * 鐘舵�� 1: 姝e父  0: 绂佺敤
+     * 椤圭洰鐘舵�亄0:璺熻釜涓�,1:瀹屾垚,2:鍏抽棴}
      */
-    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 绂佺敤  ")
+    @ApiModelProperty(value= "椤圭洰鐘舵�亄0:璺熻釜涓�,1:瀹屾垚,2:鍏抽棴}")
     private Integer status;
 
     /**
@@ -171,15 +174,40 @@
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
+
+    @ApiModelProperty(value= "椤圭洰杩涘害娴佺▼{1锛氶」鐩垱寤猴紝2锛氭牳浠峰鐞嗭紝3锛氫骇鍝佽垂鐢ㄦ槑缁嗭紝4锛氭姤浠烽绠楀崟锛�5锛氭姤浠峰崟}")
+    @TableField("step")
+    private int step;
+
     /**
      * 娉ㄩ噴
      */
     @ApiModelProperty(value= "娉ㄩ噴")
     private String memo;
+    /**
+     * 娉ㄩ噴
+     */
+    @ApiModelProperty(value= "蹇冨緱浣撲細")
+    @TableField("memo_experience")
+    private String memoExperience;
+
+    /**
+     * 棰勮鎴愪氦鐜�
+     */
+    @ApiModelProperty(value= "棰勮鎴愪氦鐜�")
+    private String transactionRate;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "浜у搧绫诲瀷")
+    @TableField("order_product_type_id")
+    private Long orderProductTypeId;
 
     public Order() {}
 
-    public Order(Long hostId,Long deptId,Long userId,Long cstmrId,String uuid,String name,Double money,Long company,String remarks,Long director,String province,String city,String district,String town,String addr,String files,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+    public Order(Long id, Long hostId, Long deptId, Long userId, Long cstmrId, String uuid, String name, Double money, Long company, String remarks, Long director, String province, String city, String district, String town, String addr, String files, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, int step, String memo, String transactionRate, String pcd,Long orderProductTypeId) {
+        this.id = id;
         this.hostId = hostId;
         this.deptId = deptId;
         this.userId = userId;
@@ -201,7 +229,11 @@
         this.createTime = createTime;
         this.updateBy = updateBy;
         this.updateTime = updateTime;
+        this.step = step;
         this.memo = memo;
+        this.transactionRate = transactionRate;
+        this.pcd = pcd;
+        this.orderProductTypeId = orderProductTypeId;
     }
 
 //    Order order = new Order(
@@ -234,6 +266,15 @@
         Host host = service.selectById(this.hostId);
         if (!Cools.isEmpty(host)){
             return String.valueOf(host.getName());
+        }
+        return null;
+    }
+
+    public String getOrderProductTypeId$(){
+        OrderProductTypeService orderProductTypeService = SpringUtils.getBean(OrderProductTypeService.class);
+        OrderProductType orderProductType = orderProductTypeService.selectById(this.orderProductTypeId);
+        if (!Cools.isEmpty(orderProductType)){
+            return String.valueOf(orderProductType.getName());
         }
         return null;
     }
@@ -286,10 +327,12 @@
     public String getStatus$(){
         if (null == this.status){ return null; }
         switch (this.status){
-            case 1:
-                return "姝e父";
             case 0:
-                return "绂佺敤";
+                return "璺熻釜涓�";
+            case 1:
+                return "瀹屾垚";
+            case 2:
+                return "鍏抽棴";
             default:
                 return String.valueOf(this.status);
         }
@@ -308,7 +351,7 @@
         if (Cools.isEmpty(this.createTime)){
             return "";
         }
-        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm").format(this.createTime);
     }
 
     public String getUpdateBy$(){
@@ -324,7 +367,82 @@
         if (Cools.isEmpty(this.updateTime)){
             return "";
         }
-        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm").format(this.updateTime);
+    }
+
+    @TableField(exist = false)
+    private String pcd;
+
+    public String getPcd() {
+        StringBuilder sb = new StringBuilder();
+        if (!Cools.isEmpty(province)) {
+            sb.append(province).append(",");
+        }
+        if (!Cools.isEmpty(city)) {
+            sb.append(city).append(",");
+        }
+        if (!Cools.isEmpty(district)) {
+            sb.append(district).append(",");
+        }
+        String s = sb.toString();
+        if (s.endsWith(",")) {
+            s = s.substring(0, s.length() - 1);
+        }
+        return s;
+    }
+
+    public String getPcd$() {
+        StringBuilder sb = new StringBuilder();
+        DicService service = SpringUtils.getBean(DicService.class);
+        if (!Cools.isEmpty(province)) {
+            Dic provinceDic = service.selectById(province);
+            if (!Cools.isEmpty(provinceDic)) {
+                sb.append(provinceDic.getName()).append(",");
+            }
+        }
+        if (!Cools.isEmpty(city)) {
+            Dic cityDic = service.selectById(city);
+            if (!Cools.isEmpty(cityDic)) {
+                sb.append(cityDic.getName()).append(",");
+            }
+        }
+        if (!Cools.isEmpty(district)) {
+            Dic districtDic = service.selectById(district);
+            if (!Cools.isEmpty(districtDic)) {
+                sb.append(districtDic.getName()).append(",");
+            }
+        }
+        String s = sb.toString();
+        if (s.endsWith(",")) {
+            s = s.substring(0, s.length() - 1);
+        }
+        return s;
+    }
+
+    public void setPcd(String pcd) {
+        this.pcd = pcd;
+        if (!Cools.isEmpty(pcd)) {
+            String[] split = this.pcd.split(",");
+            for (int i = 0;i< split.length; i++) {
+                switch (i) {
+                    case 0:
+                        this.province = split[0];
+                        break;
+                    case 1:
+                        this.city = split[1];
+                        break;
+                    case 2:
+                        this.district = split[2];
+                        break;
+                    default:
+                        break;
+                }
+            }
+        } else {
+            this.province = "";
+            this.city = "";
+            this.district = "";
+        }
     }
 
 

--
Gitblit v1.9.1