中扬CRM客户关系管理系统
LSH
2023-10-09 caac62f1f080ee8db3aba698f7f67ce105ad9ffe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
package com.zy.crm.manager.entity;
 
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.crm.manager.service.CstmrService;
import com.zy.crm.manager.service.PlanService;
import com.zy.crm.system.entity.User;
import com.zy.crm.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;
import java.util.Date;
 
@Data
@TableName("man_pri_online2")
public class PriOnline2 implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    /**
     * excel表标题
     */
    @ApiModelProperty(value= "excel表标题")
    private String title;
 
    /**
     * excel表数据
     */
    @ApiModelProperty(value= "excel表数据")
    @TableField("sheet_data")
    private String sheetData;
 
    /**
     * excel表标题
     */
    @ApiModelProperty(value= "excel表标题")
    @TableField("sales_title")
    private String salesTitle;
 
    /**
     * excel表数据
     */
    @ApiModelProperty(value= "excel表数据")
    @TableField("sales_sheet_data")
    private String salesSheetData;
 
    @ApiModelProperty(value= "文件保存地址")
    private String filepath;
 
    /**
     * 创建时间
     */
    @ApiModelProperty(value= "创建时间")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
 
    @ApiModelProperty(value= "规划单ID plan_id")
    @TableField("item_id")
    private Long itemId;
 
    @ApiModelProperty(value= "订单号")
    @TableField("order_num")
    private String orderNum;
 
    @ApiModelProperty(value= "模板名")
    @TableField("template_name")
    private String templateName;
 
    @ApiModelProperty(value= "创建人员用户id")
    @TableField("user_id")
    private Long userId;
 
    @ApiModelProperty(value= "创建人员用户部门")
    @TableField("dept_id")
    private Long deptId;
 
    @ApiModelProperty(value= "状态{0:未完成,1:已完成}")
    @TableField("status")
    private Integer status;
 
    @ApiModelProperty(value= "更新时间")
    @TableField("update_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
 
    @ApiModelProperty(value= "上传报价excel数据")
    @TableField("check_data")
    private String checkData;
 
    @ApiModelProperty(value= "更新人员")
    @TableField("update_user_id")
    private Long updateUserId;
 
    @ApiModelProperty(value= "业务员")
    @TableField("member_id")
    private Long memberId;
 
    @ApiModelProperty(value= "规划单ID")
    @TableField("plan_id")
    private Long planId;
 
    @ApiModelProperty(value= "上传报价excel数据的原始文件地址")
    @TableField("check_data_file")
    private String checkDataFile;
 
    /**
     * hostId
     */
    @ApiModelProperty(value= "hostId")
    @TableField("host_id")
    private Long hostId;
 
    /**
     * 进度
     */
    @ApiModelProperty(value= "进度")
    private Integer settle;
 
    /**
     * 流程进度
     */
    @ApiModelProperty(value= "流程进度")
    @TableField("settle_msg")
    private String settleMsg;
 
    @ApiModelProperty(value= "")
    private String form;
 
    public PriOnline2() {}
 
    public PriOnline2(String title, String sheetData, Date createTime, String filepath,Integer settle) {
        this.title = title;
        this.sheetData = sheetData;
        this.createTime = createTime;
        this.filepath = filepath;
        this.settle = settle;
    }
 
//    PriOnline priOnline = new PriOnline(
//            null,    // excel表标题
//            null,    // excel表数据
//            null    // 创建时间
//    );
 
    public String getSettle$(){
        if (null == this.settle){ return null; }
        switch (this.settle){
            case 0:
                return "等待提交";
            case 1:
                return "等待审批";
            case 2:
                return "等待确认";
            case 3:
                return "审批通过";
            default:
                return String.valueOf(this.settle);
        }
    }
 
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
 
    public String getUpdateTime$(){
        if (Cools.isEmpty(this.updateTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
    }
 
//    public String getItemId$() {
//        ItemService itemService = SpringUtils.getBean(ItemService.class);
//        Item item = itemService.selectById(this.itemId);
//        if (!Cools.isEmpty(item)){
//            return String.valueOf(item.getName());
//        }
//        return null;
//    }
 
    public Long getCstmrId$(){
        PlanService planService = SpringUtils.getBean(PlanService.class);
        Plan plan = planService.selectById(this.itemId);
        CstmrService cstmrService = SpringUtils.getBean(CstmrService.class);
        Cstmr cstmr = cstmrService.selectById(plan.getCstmrId());
        if (!Cools.isEmpty(cstmr)){
            return cstmr.getId();
        }
        return 0L;
    }
 
    public String getPlanId$() {
        PlanService planService = SpringUtils.getBean(PlanService.class);
        Plan plan = planService.selectById(this.itemId);
        if (!Cools.isEmpty(plan)){
            return String.valueOf(plan.getUuid());
        }
        return null;
    }
 
    public String getUser$() {
        UserService userService = SpringUtils.getBean(UserService.class);
        User user = userService.selectById(this.userId);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
 
    public String getUpdateUserId$() {
        UserService userService = SpringUtils.getBean(UserService.class);
        User user = userService.selectById(this.updateUserId);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
 
    public String getMemberId$() {
        UserService userService = SpringUtils.getBean(UserService.class);
        User user = userService.selectById(this.memberId);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
 
    public String getStatus$() {
        if (null == this.status){ return null; }
        switch (this.status){
            case 1:
                return "已完成";
            case 0:
                return "未完成";
            default:
                return String.valueOf(this.status);
        }
    }
 
    public String getCheckDataStatus$() {
        if (Cools.isEmpty(this.checkData)) {
            return "未上传";
        }
        return "已上传";
    }
 
 
}