jiangping
2025-07-16 5ae8418d22dd7ba374ff7277181aceec1d509324
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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
package com.doumee.core.constants;
 
import lombok.AllArgsConstructor;
import lombok.Getter;
 
import java.math.BigDecimal;
import java.util.*;
 
/**
 * 框架级常量
 * @author  dm
 * @since 2025/03/31 16:44
 */
public class Constants {
 
    public static final String HWY_OBS ="HWY_OBS" ;
    public static final String HWY_OBS_ACCESSID ="HWY_OBS_ACCESSID" ;
    public static final String HWY_OBS_ACCESSKEY ="HWY_OBS_ACCESSKEY" ;
    public static final String HWY_OBS_ENDPOINT ="HWY_OBS_ENDPOINT" ;
    public static final String HWY_OBS_BUCKET ="HWY_OBS_BUCKET" ;
    public static final String RESOURCE_PATH ="RESOURCE_PATH" ;
    public static final String QYWX_CORPID = "QYWX_CORPID";
    public static final String QYWX_SECRET = "QYWX_SECRET";
    public static final String QYWX_TOKEN = "QYWX_TOKEN";
    public static final String QYWX_AGENTID = "QYWX_AGENTID";
    public static final String QYWX_JS_API_TICKET = "QYWX_JS_API_TICKET";
    public static final String JUMP_OUT_URL = "JUMP_OUT_URL";
    public static final String SYSTEM ="SYSTEM" ;
    public static final String IMG_DIR = "IMG_DIR";
    public static final String FILE_DIR ="FILE_DIR" ;
    public static final String FOOT_IMGURL ="FOOT_IMGURL" ;
    public static final String LINK_PHONE ="LINK_PHONE" ;
    public static final String LINK_MOBILE ="LINK_MOBILE" ;
    public static final String SERVER_TIME ="SERVER_TIME" ;
    public static final String ADDRESS ="ADDRESS" ;
    public static final String SOLVE_SCHEME ="SOLVE_SCHEME" ;
    public static final String WISDOM_SYSTEM ="WISDOM_SYSTEM" ;
    public static final String FOOT_WORDS ="FOOT_WORDS" ;
 
    public static final String WX_CONFIG ="WX_CONFIG" ;
    public static final String APPID ="APPID" ;
    public static final String SECRET ="SECRET" ;
    public static final String ACCESS_TOKEN ="ACCESS_TOKEN" ;
    public static final String SERVER_INTRODUCE ="SERVER_INTRODUCE" ;
    public static final String FEE_STANDARDS ="FEE_STANDARDS" ;
    public static final String ABOUT_US ="ABOUT_US" ;
    public static final String SERVER_PHONE ="SERVER_PHONE" ;
    public static final String USER_AGREEMENT ="USER_AGREEMENT" ;
    public static final String PRIVACY_AGREEMENT ="PRIVACY_AGREEMENT" ;
 
 
    public static final String RELEASE_CANCEL_TIMES ="RELEASE_CANCEL_TIMES" ;
    public static final String RECEIVE_CANCEL_TIMES ="RECEIVE_CANCEL_TIMES" ;
    public static final String RELEASE_CANCEL_TIME ="RELEASE_CANCEL_TIME" ;
    public static final String RECEIVE_CANCEL_TIME ="RECEIVE_CANCEL_TIME" ;
    public static final String AUTO_DISPATCH ="AUTO_DISPATCH" ;
    public static final String AUTO_DISPATCH_DISTANCE ="AUTO_DISPATCH_DISTANCE" ;
    public static final String AUTO_CONFIRM ="AUTO_CONFIRM" ;
 
    public static final String QYWX = "QYWX";
    public static final  Integer ONE = 1;
    public static final Integer TWO = 2;
    public static final Integer ZERO = 0;
    public static final Integer THREE = 3;
    public static final Integer FOUR = 4;
    public static final Integer SIX = 6;
    public static final Integer FIVE = 5;
    public static final String INENTITY_FILES = "INENTITY_FILES";
    public static final String MEMBER_FILES = "MEMBER_FILES";
    public static final String CATEGORY_FILES = "CATEGORY_FILES";
    public static final String ORDERS_FILES = "ORDERS_FILES";
    public static boolean WORKORDER_SHE_EMAIL_SENDING = false;
    public static  boolean DEALING_COMPANY_SYNC = false ;
    public static  boolean DEALING_MEMBER_SYNC = false ;
    public static final String WORKORDER_FILE_PATH ="WORKORDER_FILE_PATH" ;
    public static final String WORKORDER_LOG_FILE_PATH ="WORKORDER_LOG_FILE_PATH" ;
 
    public static final String REDIS_TOKEN_KEY = "token_";
    public interface   uploadType{
        String blob = "blob";
        String ftp = "ftp";
    }
 
    /**
     * 缓存Key
     */
    interface CacheKey {
    }
    public interface RedisKeys {
        public static final String ORDER_CODE = "ORDER_CODE";
    }
    /**
     * 操作类型,用于做接口验证分组
     */
   public interface OperaType {
 
        /**
         * 创建
         */
        interface Create {}
 
        /**
         * 修改
         */
        interface Update {}
 
        /**
         * 修改状态
         */
        interface UpdateStatus {}
    }
 
 
    public static boolean equalsInteger(Integer a, Integer b) {
        if (formatIntegerNum(a) == formatIntegerNum(b)) {
            return true;
        }
        return false;
    }
 
    public static int formatIntegerNum(Integer d) {
        if (d == null) {
            d = 0;
        }
        return d.intValue();
    }
    public static double getFormatMoney(Long d) {
        BigDecimal r = new BigDecimal(formatLongNum(d));
        r = r.divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
 
        return r.doubleValue();
    }
 
    public static long formatLongNum(Long d) {
        if (d == null) {
            d = 0L;
        }
        return d.longValue();
    }
 
    /**
     * Job常量
     */
    public interface Job {
 
        // jobId在JOB实例中的存储参数键
        String JOB_DATA_MAP_JOB_ID = "JOB_ID";
 
        /**
         * JOB状态
         */
        @Getter
        @AllArgsConstructor
        enum JobStatus {
            PAUSE( -1, "暂停"),
            READY(  0, "已准备"),
            RUNNING( 1, "运行中"),
            ;
            private int code;
            private String remark;
        }
 
        /**
         * 分片状态
         */
        @Getter
        @AllArgsConstructor
        enum SnippetStatus {
            READY((int) 0, "已准备"),
            RUNNING((int) 1, "运行中"),
            SUCCESS((int) 2, "执行成功"),
            FAILED((int) -2, "执行失败"),
            ;
            private int code;
            private String remark;
        }
 
        /**
         * 分片状态
         */
        @Getter
        @AllArgsConstructor
        enum LogStatus {
            FAILED((int) 0, "执行失败"),
            SUCCESS((int) 1, "执行成功"),
            IGNORE((int) 2, "跳过"),
            NONE((int) -1, "执行中"),
            ;
            private int code;
            private String remark;
        }
 
        /**
         * 触发类型
         */
        @Getter
        @AllArgsConstructor
        enum TriggerType {
            SYSTEM("SYSTEM", "系统"),
            MANUAL("MANUAL", "手动"),
            ;
            private String code;
            private String remark;
        }
    }
 
    /**
     * 跟踪日志异常等级
     */
    @Getter
    @AllArgsConstructor
  public  enum ExceptionLevel {
        DANGER((int)10, "高"),
        WARN((int)5, "中"),
        LOW((int)0, "低"),
        ;
 
        private int level;
 
        private String remark;
    }
 
    /**
     * MyBatis自动注入忽略
     */
    public interface Ignore {
        /**
         * 忽略时间,当不需要更新createTime/updateTime时,可使用该常量进行填充。
         */
        Date IGNORE_TIME = new IgnoreDate();
 
        /**
         * 忽略用户,当不需要更新createUser/updateUser时,可使用该常量进行填充。
         */
        Integer IGNORE_USER = -1;
 
        /**
         * 忽略时间类
         */
        class IgnoreDate extends Date {}
    }
 
 
    /**
     * 文件附件类型
     */
    public interface multiFileType{
        //0问题上报 1跌绊滑上报 2跌绊滑处理 3分配物业主管 4分配处理人 5DCA风险上报 6DCA风险处理 7DCA问题工单图片
//        int sheUpload = 0;
//        int dbhUpload = 1;
//        int dbhDeal = 2;
//        int dbhAllocation = 3;
//        int dbhDealUser = 4;
//        int dcaUpload = 5;
//        int dcaDeal = 6;
//        int dcaWorkOrder= 7;
 
        //0工单上报 1工单处理 2工单转交
        int  upload = 0;
        int deal = 1;
        int passOn = 2;
    }
 
 
    public enum WorkOrderStatus{
        waitConfirm( 0, "待分配WTS","{title}上报","","待分配WTS" ),
        waitAllocation(1, "待分配任务","待分配任务","","待分配任务"),
        waitDeal(2, "待处理","待处理","","待工程师处理"),
        sheClose(3, "已解决","SHE已关闭","","SHE已关闭"),
        wtsClose(4, "已解决","WTS已关闭","","WTS已关闭"),
        close(5, "已解决","已解决","","工程师关闭"),
        urge (6, "催促","","","")
        ;
 
        private int status;
        private String statusInfo;
        private String statusName;
        private String logTitle;
        private String noticeContent;
 
        // 构造方法
        WorkOrderStatus(int status, String statusInfo,String logTitle,String noticeContent,String statusName ) {
            this.status = status;
            this.statusInfo = statusInfo;
            this.logTitle = logTitle;
            this.noticeContent = noticeContent;
            this.statusName = statusName;
        }
        public static String getName(int index) {
            for (WorkOrderStatus c : WorkOrderStatus.values()) {
                if (c.getKey() == index) {
                    return c.statusInfo;
                }
            }
            return null;
        }
        public static String getStatusName(int index) {
            for (WorkOrderStatus c : WorkOrderStatus.values()) {
                if (c.getKey() == index) {
                    return c.statusName;
                }
            }
            return null;
        }
 
        public int getKey() {
            return status;
        }
 
        public void setKey(int key) {
            this.status = status;
        }
 
        public int getStatus() {
            return status;
        }
 
        public void setStatus(int status) {
            this.status = status;
        }
 
        public String getStatusName() {
            return statusName;
        }
 
        public void setStatusName(String statusName) {
            this.statusName = statusName;
        }
 
        public String getStatusInfo() {
            return statusInfo;
        }
 
        public void setStatusInfo(String statusInfo) {
            this.statusInfo = statusInfo;
        }
 
        public String getLogTitle() {
            return logTitle;
        }
 
        public void setLogTitle(String logTitle) {
            this.logTitle = logTitle;
        }
 
        public String getNoticeContent() {
            return noticeContent;
        }
 
        public void setNoticeContent(String noticeContent) {
            this.noticeContent = noticeContent;
        }
    }
 
    /**
     * 用户收支业务类型
     * 变动类型:0=用工单收入;1=货运单收入;2=供餐单收入;3=提现申请;
     */
    @Getter
    public enum RevenueType {
 
        YGD_INCOME(  0, "用工单收入","用工单收入" ,0),
        HYD_INCOME(  1, "货运单收入","货运单收入" ,0),
        GCD_INCOME(2, "供餐单收入","供餐单收入" ,0),
        WITHDRAW_APPLY(3, "提现申请","提现申请" ,0),
        REFUND(  4, "提现申请退回","提现申请退回" ,0)
        ;
 
        private int key;
        private String name;
        private  String info;
        private int navIndex;
 
        RevenueType(int key, String name, String info,int navIndex) {
            this.info = info;
            this.key = key;
            this.name = name;
            this.navIndex = navIndex;
        }
        public static RevenueType getObj(int index) {
            for (RevenueType c : RevenueType.values()) {
                if (c.getKey() == index) {
                    return c;
                }
            }
            return null;
        }
        public static String getObjName(int index) {
            for (RevenueType c : RevenueType.values()) {
                if (c.getKey() == index) {
                    return c.getName();
                }
            }
            return null;
        }
 
 
    }
 
 
 
 
    public  enum OrdersLog {
        UPLOAD(0, "发单方-发布订单","{userName}发布{param}",0),
        RECEIVE(1, "接单方-已抢单","{userName}已抢单",1),
        UPD_ORDER(2, "发单方-修改订单","{userName}修改了用工时间",0),
        UPD_DISAGREE(3, "接单方-不同意修改,订单取消","{userName}不同意修改,订单取消",1),
        UPD_AGREE(4, "接单方-同意修改","{userName}同意修改",1),
        AUTO(5, "系统-自动派单","无人接单已自动派单给{userName}",1),
        CANCEL(6, "接单方-取消接单","{userName}已手动取消接单",1),
        BEGIN(7, "发单方-开始作业","{userName}已开始作业",0),
        DONE(8, "发单方-完成作业","{userName}已确认完成作业",0),
        PAY(9, "发单方-完成支付","{userName}已支付费用",0),
        COMMENT(10, "发单方-评价完成","{userName}完成评价",0),
        SYSTEM_CANCEL(11, "系统-订单取消","系统取消",2),
        RELEASE_CANCEL(12, "发单方-订单取消","{userName}已手动取消订单",0),
        AUTO_COMMENT(13, "系统-自动评价","超出7日未评价,系统已自动评价",2),
        AUTO_AGREE(14, "系统-自动同意","接单方超时未处理,已自动同意",2),
 
        ;
        // 成员变量
        private String name;
        private String info;
        private int key;
        private int userType;
 
        // 构造方法
        OrdersLog(int key, String name,String info,int userType) {
            this.name = name;
            this.info = info;
            this.key = key;
            this.userType = userType;
        }
 
        // 普通方法
        public static String getName(int index) {
            for (OrdersLog c : OrdersLog.values()) {
                if (c.getKey() == index) {
                    return c.name;
                }
            }
            return null;
        }
        public static String getInfo(int index) {
            for (OrdersLog c : OrdersLog.values()) {
                if (c.getKey() == index) {
                    return c.info;
                }
            }
            return null;
        }
 
        // get set 方法
        public String getName() {
            return name;
        }
 
        public void setName(String name) {
            this.name = name;
        }
 
        public int getKey() {
            return key;
        }
 
        public void setKey(int key) {
            this.key = key;
        }
 
        public int getUserType() {
            return userType;
        }
 
        public void setUserType(int key) {
            this.userType = userType;
        }
 
        public String getInfo() {
            return info;
        }
 
        public void setInfo(String info) {
            this.info = info;
        }
    }
 
 
    public  enum workType {
        czg(0, "采摘工"),
        fjg(1, "分拣工"),
        bzg(2, "包装工"),
 
        ;
        // 成员变量
        private int key;
        private String name;
 
        // 构造方法
        workType(int key, String name) {
            this.name = name;
            this.key = key;
        }
 
        // 普通方法
        public static String getName(int index) {
            for (workType c : workType.values()) {
                if (c.getKey() == index) {
                    return c.name;
                }
            }
            return null;
        }
        // get set 方法
        public String getName() {
            return name;
        }
 
        public void setName(String name) {
            this.name = name;
        }
 
        public int getKey() {
            return key;
        }
 
        public void setKey(int key) {
            this.key = key;
        }
 
    }
 
 
    public  enum ordersStatus {
        waitPay(0, "待支付"),
        wait(1, "待接单"),
        accept(2, "已接单"),
        doing(3, "进行中"),
        done(4, "已完成"),
        cancel(99, "已取消"),
        ;
        // 成员变量
        private int key;
        private String name;
 
        // 构造方法
        ordersStatus(int key, String name) {
            this.name = name;
            this.key = key;
        }
 
        // 普通方法
        public static String getName(int index) {
            for (ordersStatus c : ordersStatus.values()) {
                if (c.getKey() == index) {
                    return c.name;
                }
            }
            return null;
        }
        // get set 方法
        public String getName() {
            return name;
        }
 
        public void setName(String name) {
            this.name = name;
        }
 
        public int getKey() {
            return key;
        }
 
        public void setKey(int key) {
            this.key = key;
        }
 
    }
 
}