cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
package cn.ksource.beans;
 
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
 
import org.apache.commons.lang.StringUtils;
 
 
import cn.ksource.core.dao.BaseBean;
import cn.ksource.core.util.ConvertUtil;
import cn.ksource.core.util.StringUtil;
 
/**
 * 工作流程-节点
 */
public class WORKFLOW_NODE extends BaseBean{
 
    public final static Map<String, String> KEYS = new HashMap<String, String>();
    private Map BEAN_VALUES = null;
    
    static {
        KEYS.put("id", "String");
        KEYS.put("nodename", "String");
        KEYS.put("flowstate", "Integer");
        KEYS.put("flow_type", "Integer");
        KEYS.put("createtime", "Long");
        KEYS.put("answer_time", "Long");
        KEYS.put("dealtime", "Long");
        KEYS.put("flowid", "String");
        KEYS.put("node_template_id", "String");
        KEYS.put("deal_result", "Integer");
        KEYS.put("deal_type", "Integer");
        KEYS.put("current_dealer_id", "String");
        KEYS.put("current_dealer_name", "String");
        KEYS.put("current_deal_roleida", "String");
        KEYS.put("current_deal_rolename", "String");
        KEYS.put("deal_note_title", "String");
        KEYS.put("deal_note", "String");
        KEYS.put("deal_usetime", "Long");
        KEYS.put("answer_usertime", "Long");
        KEYS.put("is_admin", "Integer");
        KEYS.put("source_node_instance_id", "String");
        KEYS.put("same_node_key", "String");
        KEYS.put("pid", "String");
        KEYS.put("business_id", "String");
        KEYS.put("working_hours", "String");
        KEYS.put("level", "Integer");
        KEYS.put("note_key", "String");
        KEYS.put("note_val", "String");
    }
    public Map getColumnMap(){
        return KEYS;
    }
 
    private String id;
    private Boolean isSetted_id = false;;
    
    private String nodename;
    private Boolean isSetted_nodename = false;
    private Integer flowstate;
    private Boolean isSetted_flowstate = false;
    private Integer flow_type;
    private Boolean isSetted_flow_type = false;
    private Long createtime;
    private Boolean isSetted_createtime = false;
    private Long answer_time;
    private Boolean isSetted_answer_time = false;
    private Long dealtime;
    private Boolean isSetted_dealtime = false;
    private String flowid;
    private Boolean isSetted_flowid = false;
    private String node_template_id;
    private Boolean isSetted_node_template_id = false;
    private Integer deal_result;
    private Boolean isSetted_deal_result = false;
    private Integer deal_type;
    private Boolean isSetted_deal_type = false;
    private String current_dealer_id;
    private Boolean isSetted_current_dealer_id = false;
    private String current_dealer_name;
    private Boolean isSetted_current_dealer_name = false;
    private String current_deal_roleida;
    private Boolean isSetted_current_deal_roleida = false;
    private String current_deal_rolename;
    private Boolean isSetted_current_deal_rolename = false;
    private String deal_note_title;
    private Boolean isSetted_deal_note_title = false;
    private String deal_note;
    private Boolean isSetted_deal_note = false;
    private Long deal_usetime;
    private Boolean isSetted_deal_usetime = false;
    private Long answer_usertime;
    private Boolean isSetted_answer_usertime = false;
    private Integer is_admin;
    private Boolean isSetted_is_admin = false;
    private String source_node_instance_id;
    private Boolean isSetted_source_node_instance_id = false;
    private String same_node_key;
    private Boolean isSetted_same_node_key = false;
    private String pid;
    private Boolean isSetted_pid = false;
    private String business_id;
    private Boolean isSetted_business_id = false;
    private String working_hours;
    private Boolean isSetted_working_hours = false;
    private Integer level;
    private Boolean isSetted_level = false;
    private String note_key;
    private Boolean isSetted_note_key = false;
    private String note_val;
    private Boolean isSetted_note_val = false;
 
    private void initBeanValues(){
        BEAN_VALUES = new HashMap<String, Object>();
        BEAN_VALUES.put("id",id);
            BEAN_VALUES.put("nodename", null);
            BEAN_VALUES.put("flowstate", null);
            BEAN_VALUES.put("flow_type", null);
            BEAN_VALUES.put("createtime", null);
            BEAN_VALUES.put("answer_time", null);
            BEAN_VALUES.put("dealtime", null);
            BEAN_VALUES.put("flowid", null);
            BEAN_VALUES.put("node_template_id", null);
            BEAN_VALUES.put("deal_result", null);
            BEAN_VALUES.put("deal_type", null);
            BEAN_VALUES.put("current_dealer_id", null);
            BEAN_VALUES.put("current_dealer_name", null);
            BEAN_VALUES.put("current_deal_roleida", null);
            BEAN_VALUES.put("current_deal_rolename", null);
            BEAN_VALUES.put("deal_note_title", null);
            BEAN_VALUES.put("deal_note", null);
            BEAN_VALUES.put("deal_usetime", null);
            BEAN_VALUES.put("answer_usertime", null);
            BEAN_VALUES.put("is_admin", null);
            BEAN_VALUES.put("source_node_instance_id", null);
            BEAN_VALUES.put("same_node_key", null);
            BEAN_VALUES.put("pid", null);
            BEAN_VALUES.put("business_id", null);
            BEAN_VALUES.put("working_hours", null);
            BEAN_VALUES.put("level", null);
            BEAN_VALUES.put("note_key", null);
            BEAN_VALUES.put("note_val", null);
    }
    
    public WORKFLOW_NODE() {
        initBeanValues();
    }
    
    public WORKFLOW_NODE(String id) {
        super();
        this.id = id;
        initBeanValues();
        BEAN_VALUES.put("id",id);
    }
 
    /**
     * 获取ID
     */
    public String getId() {
        return this.id;
    }
    /**
     * 设置ID
     */
    public WORKFLOW_NODE setId(String id) {
        this.id = id;
        this.isSetted_id = true;
        BEAN_VALUES.put("id",id);
        return this;
    }
    
    @Override
    public String getUpdateSql() {
        StringBuffer sBuffer = new StringBuffer("update WORKFLOW_NODE set ");
            if (isSetted_nodename) {
                sBuffer.append("nodename=:nodename,");
            }
            if (isSetted_flowstate) {
                sBuffer.append("flowstate=:flowstate,");
            }
            if (isSetted_flow_type) {
                sBuffer.append("flow_type=:flow_type,");
            }
            if (isSetted_createtime) {
                sBuffer.append("createtime=:createtime,");
            }
            if (isSetted_answer_time) {
                sBuffer.append("answer_time=:answer_time,");
            }
            if (isSetted_dealtime) {
                sBuffer.append("dealtime=:dealtime,");
            }
            if (isSetted_flowid) {
                sBuffer.append("flowid=:flowid,");
            }
            if (isSetted_node_template_id) {
                sBuffer.append("node_template_id=:node_template_id,");
            }
            if (isSetted_deal_result) {
                sBuffer.append("deal_result=:deal_result,");
            }
            if (isSetted_deal_type) {
                sBuffer.append("deal_type=:deal_type,");
            }
            if (isSetted_current_dealer_id) {
                sBuffer.append("current_dealer_id=:current_dealer_id,");
            }
            if (isSetted_current_dealer_name) {
                sBuffer.append("current_dealer_name=:current_dealer_name,");
            }
            if (isSetted_current_deal_roleida) {
                sBuffer.append("current_deal_roleida=:current_deal_roleida,");
            }
            if (isSetted_current_deal_rolename) {
                sBuffer.append("current_deal_rolename=:current_deal_rolename,");
            }
            if (isSetted_deal_note_title) {
                sBuffer.append("deal_note_title=:deal_note_title,");
            }
            if (isSetted_deal_note) {
                sBuffer.append("deal_note=:deal_note,");
            }
            if (isSetted_deal_usetime) {
                sBuffer.append("deal_usetime=:deal_usetime,");
            }
            if (isSetted_answer_usertime) {
                sBuffer.append("answer_usertime=:answer_usertime,");
            }
            if (isSetted_is_admin) {
                sBuffer.append("is_admin=:is_admin,");
            }
            if (isSetted_source_node_instance_id) {
                sBuffer.append("source_node_instance_id=:source_node_instance_id,");
            }
            if (isSetted_same_node_key) {
                sBuffer.append("same_node_key=:same_node_key,");
            }
            if (isSetted_pid) {
                sBuffer.append("pid=:pid,");
            }
            if (isSetted_business_id) {
                sBuffer.append("business_id=:business_id,");
            }
            if (isSetted_working_hours) {
                sBuffer.append("working_hours=:working_hours,");
            }
            if (isSetted_level) {
                sBuffer.append("level=:level,");
            }
            if (isSetted_note_key) {
                sBuffer.append("note_key=:note_key,");
            }
            if (isSetted_note_val) {
                sBuffer.append("note_val=:note_val,");
            }
        String sql = sBuffer.toString();
        return StringUtils.removeEnd(sql, ",") + " where id=:id";
    }
    
    
    @Override
    public String getInsertSql() {
        StringBuffer sBuffer = new StringBuffer("insert into WORKFLOW_NODE(");
        StringBuffer fileds = new StringBuffer("id,");
        StringBuffer values = new StringBuffer(":id,");        
            fileds.append("nodename,");
            values.append(":nodename,");
            fileds.append("flowstate,");
            values.append(":flowstate,");
            fileds.append("flow_type,");
            values.append(":flow_type,");
            fileds.append("createtime,");
            values.append(":createtime,");
            fileds.append("answer_time,");
            values.append(":answer_time,");
            fileds.append("dealtime,");
            values.append(":dealtime,");
            fileds.append("flowid,");
            values.append(":flowid,");
            fileds.append("node_template_id,");
            values.append(":node_template_id,");
            fileds.append("deal_result,");
            values.append(":deal_result,");
            fileds.append("deal_type,");
            values.append(":deal_type,");
            fileds.append("current_dealer_id,");
            values.append(":current_dealer_id,");
            fileds.append("current_dealer_name,");
            values.append(":current_dealer_name,");
            fileds.append("current_deal_roleida,");
            values.append(":current_deal_roleida,");
            fileds.append("current_deal_rolename,");
            values.append(":current_deal_rolename,");
            fileds.append("deal_note_title,");
            values.append(":deal_note_title,");
            fileds.append("deal_note,");
            values.append(":deal_note,");
            fileds.append("deal_usetime,");
            values.append(":deal_usetime,");
            fileds.append("answer_usertime,");
            values.append(":answer_usertime,");
            fileds.append("is_admin,");
            values.append(":is_admin,");
            fileds.append("source_node_instance_id,");
            values.append(":source_node_instance_id,");
            fileds.append("same_node_key,");
            values.append(":same_node_key,");
            fileds.append("pid,");
            values.append(":pid,");
            fileds.append("business_id,");
            values.append(":business_id,");
            fileds.append("working_hours,");
            values.append(":working_hours,");
            fileds.append("level,");
            values.append(":level,");
            fileds.append("note_key,");
            values.append(":note_key,");
            fileds.append("note_val,");
            values.append(":note_val,");
        sBuffer.append(StringUtils.removeEnd(fileds.toString(), ",") + ") values("+StringUtils.removeEnd(values.toString(), ",")+")");
        return sBuffer.toString();
    }
    
 
        /**
         * 获取环节名称<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getNodename() {
            return nodename;
        }
        /**
         * 设置环节名称<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setNodename(String nodename) {
            this.nodename = nodename;
            this.isSetted_nodename = true;
            BEAN_VALUES.put("nodename",nodename);
            return this;
        }
        /**
         * 获取流转状态(1=待响应;2=进行中;3=已处理;)<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Integer getFlowstate() {
            return flowstate;
        }
        /**
         * 设置流转状态(1=待响应;2=进行中;3=已处理;)<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setFlowstate(Integer flowstate) {
            this.flowstate = flowstate;
            this.isSetted_flowstate = true;
            BEAN_VALUES.put("flowstate",flowstate);
            return this;
        }
        /**
         * 获取流转类型(1=正常流转;2=回退)<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Integer getFlow_type() {
            return flow_type;
        }
        /**
         * 设置流转类型(1=正常流转;2=回退)<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setFlow_type(Integer flow_type) {
            this.flow_type = flow_type;
            this.isSetted_flow_type = true;
            BEAN_VALUES.put("flow_type",flow_type);
            return this;
        }
        /**
         * 获取创建时间<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Long getCreatetime() {
            return createtime;
        }
        /**
         * 设置创建时间<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setCreatetime(Long createtime) {
            this.createtime = createtime;
            this.isSetted_createtime = true;
            BEAN_VALUES.put("createtime",createtime);
            return this;
        }
        /**
         * 获取响应时间(开始处理时间)<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Long getAnswer_time() {
            return answer_time;
        }
        /**
         * 设置响应时间(开始处理时间)<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setAnswer_time(Long answer_time) {
            this.answer_time = answer_time;
            this.isSetted_answer_time = true;
            BEAN_VALUES.put("answer_time",answer_time);
            return this;
        }
        /**
         * 获取处理时间<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Long getDealtime() {
            return dealtime;
        }
        /**
         * 设置处理时间<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setDealtime(Long dealtime) {
            this.dealtime = dealtime;
            this.isSetted_dealtime = true;
            BEAN_VALUES.put("dealtime",dealtime);
            return this;
        }
        /**
         * 获取流程编号<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getFlowid() {
            return flowid;
        }
        /**
         * 设置流程编号<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setFlowid(String flowid) {
            this.flowid = flowid;
            this.isSetted_flowid = true;
            BEAN_VALUES.put("flowid",flowid);
            return this;
        }
        /**
         * 获取环节模版编号<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getNode_template_id() {
            return node_template_id;
        }
        /**
         * 设置环节模版编号<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setNode_template_id(String node_template_id) {
            this.node_template_id = node_template_id;
            this.isSetted_node_template_id = true;
            BEAN_VALUES.put("node_template_id",node_template_id);
            return this;
        }
        /**
         * 获取处理结果(1=通过;2=不通过;3=回退)<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Integer getDeal_result() {
            return deal_result;
        }
        /**
         * 设置处理结果(1=通过;2=不通过;3=回退)<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setDeal_result(Integer deal_result) {
            this.deal_result = deal_result;
            this.isSetted_deal_result = true;
            BEAN_VALUES.put("deal_result",deal_result);
            return this;
        }
        /**
         * 获取处理人类型(1=指定角色;2=指定人员;3=上一环节指定;4=流程发起人)<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Integer getDeal_type() {
            return deal_type;
        }
        /**
         * 设置处理人类型(1=指定角色;2=指定人员;3=上一环节指定;4=流程发起人)<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setDeal_type(Integer deal_type) {
            this.deal_type = deal_type;
            this.isSetted_deal_type = true;
            BEAN_VALUES.put("deal_type",deal_type);
            return this;
        }
        /**
         * 获取当前处理人编号<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getCurrent_dealer_id() {
            return current_dealer_id;
        }
        /**
         * 设置当前处理人编号<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setCurrent_dealer_id(String current_dealer_id) {
            this.current_dealer_id = current_dealer_id;
            this.isSetted_current_dealer_id = true;
            BEAN_VALUES.put("current_dealer_id",current_dealer_id);
            return this;
        }
        /**
         * 获取当前处理人名称<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getCurrent_dealer_name() {
            return current_dealer_name;
        }
        /**
         * 设置当前处理人名称<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setCurrent_dealer_name(String current_dealer_name) {
            this.current_dealer_name = current_dealer_name;
            this.isSetted_current_dealer_name = true;
            BEAN_VALUES.put("current_dealer_name",current_dealer_name);
            return this;
        }
        /**
         * 获取当前处理角色编号<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getCurrent_deal_roleida() {
            return current_deal_roleida;
        }
        /**
         * 设置当前处理角色编号<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setCurrent_deal_roleida(String current_deal_roleida) {
            this.current_deal_roleida = current_deal_roleida;
            this.isSetted_current_deal_roleida = true;
            BEAN_VALUES.put("current_deal_roleida",current_deal_roleida);
            return this;
        }
        /**
         * 获取当前处理角色名称<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getCurrent_deal_rolename() {
            return current_deal_rolename;
        }
        /**
         * 设置当前处理角色名称<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setCurrent_deal_rolename(String current_deal_rolename) {
            this.current_deal_rolename = current_deal_rolename;
            this.isSetted_current_deal_rolename = true;
            BEAN_VALUES.put("current_deal_rolename",current_deal_rolename);
            return this;
        }
        /**
         * 获取处理意见标题<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getDeal_note_title() {
            return deal_note_title;
        }
        /**
         * 设置处理意见标题<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setDeal_note_title(String deal_note_title) {
            this.deal_note_title = deal_note_title;
            this.isSetted_deal_note_title = true;
            BEAN_VALUES.put("deal_note_title",deal_note_title);
            return this;
        }
        /**
         * 获取处理意见<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getDeal_note() {
            return deal_note;
        }
        /**
         * 设置处理意见<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setDeal_note(String deal_note) {
            this.deal_note = deal_note;
            this.isSetted_deal_note = true;
            BEAN_VALUES.put("deal_note",deal_note);
            return this;
        }
        /**
         * 获取处理耗时<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Long getDeal_usetime() {
            return deal_usetime;
        }
        /**
         * 设置处理耗时<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setDeal_usetime(Long deal_usetime) {
            this.deal_usetime = deal_usetime;
            this.isSetted_deal_usetime = true;
            BEAN_VALUES.put("deal_usetime",deal_usetime);
            return this;
        }
        /**
         * 获取响应耗时<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Long getAnswer_usertime() {
            return answer_usertime;
        }
        /**
         * 设置响应耗时<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setAnswer_usertime(Long answer_usertime) {
            this.answer_usertime = answer_usertime;
            this.isSetted_answer_usertime = true;
            BEAN_VALUES.put("answer_usertime",answer_usertime);
            return this;
        }
        /**
         * 获取是否主要负责人(1=是;2=否)<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Integer getIs_admin() {
            return is_admin;
        }
        /**
         * 设置是否主要负责人(1=是;2=否)<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setIs_admin(Integer is_admin) {
            this.is_admin = is_admin;
            this.isSetted_is_admin = true;
            BEAN_VALUES.put("is_admin",is_admin);
            return this;
        }
        /**
         * 获取源节点实例编号<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getSource_node_instance_id() {
            return source_node_instance_id;
        }
        /**
         * 设置源节点实例编号<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setSource_node_instance_id(String source_node_instance_id) {
            this.source_node_instance_id = source_node_instance_id;
            this.isSetted_source_node_instance_id = true;
            BEAN_VALUES.put("source_node_instance_id",source_node_instance_id);
            return this;
        }
        /**
         * 获取同环节标识<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getSame_node_key() {
            return same_node_key;
        }
        /**
         * 设置同环节标识<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setSame_node_key(String same_node_key) {
            this.same_node_key = same_node_key;
            this.isSetted_same_node_key = true;
            BEAN_VALUES.put("same_node_key",same_node_key);
            return this;
        }
        /**
         * 获取<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getPid() {
            return pid;
        }
        /**
         * 设置<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setPid(String pid) {
            this.pid = pid;
            this.isSetted_pid = true;
            BEAN_VALUES.put("pid",pid);
            return this;
        }
        /**
         * 获取<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getBusiness_id() {
            return business_id;
        }
        /**
         * 设置<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setBusiness_id(String business_id) {
            this.business_id = business_id;
            this.isSetted_business_id = true;
            BEAN_VALUES.put("business_id",business_id);
            return this;
        }
        /**
         * 获取<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getWorking_hours() {
            return working_hours;
        }
        /**
         * 设置<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setWorking_hours(String working_hours) {
            this.working_hours = working_hours;
            this.isSetted_working_hours = true;
            BEAN_VALUES.put("working_hours",working_hours);
            return this;
        }
        /**
         * 获取<BR/>
         * 䣺2020-11-02 hh:04
         */
        public Integer getLevel() {
            return level;
        }
        /**
         * 设置<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setLevel(Integer level) {
            this.level = level;
            this.isSetted_level = true;
            BEAN_VALUES.put("level",level);
            return this;
        }
        /**
         * 获取描述信息KEY<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getNote_key() {
            return note_key;
        }
        /**
         * 设置描述信息KEY<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setNote_key(String note_key) {
            this.note_key = note_key;
            this.isSetted_note_key = true;
            BEAN_VALUES.put("note_key",note_key);
            return this;
        }
        /**
         * 获取描述信息VAL<BR/>
         * 䣺2020-11-02 hh:04
         */
        public String getNote_val() {
            return note_val;
        }
        /**
         * 设置描述信息VAL<BR/>
         * 2020-11-02 hh:04
         */
        public WORKFLOW_NODE setNote_val(String note_val) {
            this.note_val = note_val;
            this.isSetted_note_val = true;
            BEAN_VALUES.put("note_val",note_val);
            return this;
        }
 
        /**
         * 使用ID删除Bean<BR/>
         */
        public void deleteById() {
            if (StringUtils.isBlank(id)) {
                throw new RuntimeException("删除bean时ID不能为空");
            }
            dao.execute("delete from " + getTableName() + " where id = :id", BEAN_VALUES);
        }
    
        @Override
        public WORKFLOW_NODE getInstanceById() {
            if (StringUtils.isBlank(id)) {
                throw new RuntimeException("获取Bean时ID不能为空");
            }
            return dao.queryForBean("select * from " + getTableName() + " where id=:id", BEAN_VALUES, this);
        }
    
        
        
        @Override
        public WORKFLOW_NODE queryForBean() {
            StringBuffer sBuffer = new StringBuffer("select * from WORKFLOW_NODE where ");
            if(isSetted_id){
                sBuffer.append("id=:id and ");
            }
                if (isSetted_nodename) {
                    sBuffer.append("nodename=:nodename and ");
                }
                if (isSetted_flowstate) {
                    sBuffer.append("flowstate=:flowstate and ");
                }
                if (isSetted_flow_type) {
                    sBuffer.append("flow_type=:flow_type and ");
                }
                if (isSetted_createtime) {
                    sBuffer.append("createtime=:createtime and ");
                }
                if (isSetted_answer_time) {
                    sBuffer.append("answer_time=:answer_time and ");
                }
                if (isSetted_dealtime) {
                    sBuffer.append("dealtime=:dealtime and ");
                }
                if (isSetted_flowid) {
                    sBuffer.append("flowid=:flowid and ");
                }
                if (isSetted_node_template_id) {
                    sBuffer.append("node_template_id=:node_template_id and ");
                }
                if (isSetted_deal_result) {
                    sBuffer.append("deal_result=:deal_result and ");
                }
                if (isSetted_deal_type) {
                    sBuffer.append("deal_type=:deal_type and ");
                }
                if (isSetted_current_dealer_id) {
                    sBuffer.append("current_dealer_id=:current_dealer_id and ");
                }
                if (isSetted_current_dealer_name) {
                    sBuffer.append("current_dealer_name=:current_dealer_name and ");
                }
                if (isSetted_current_deal_roleida) {
                    sBuffer.append("current_deal_roleida=:current_deal_roleida and ");
                }
                if (isSetted_current_deal_rolename) {
                    sBuffer.append("current_deal_rolename=:current_deal_rolename and ");
                }
                if (isSetted_deal_note_title) {
                    sBuffer.append("deal_note_title=:deal_note_title and ");
                }
                if (isSetted_deal_note) {
                    sBuffer.append("deal_note=:deal_note and ");
                }
                if (isSetted_deal_usetime) {
                    sBuffer.append("deal_usetime=:deal_usetime and ");
                }
                if (isSetted_answer_usertime) {
                    sBuffer.append("answer_usertime=:answer_usertime and ");
                }
                if (isSetted_is_admin) {
                    sBuffer.append("is_admin=:is_admin and ");
                }
                if (isSetted_source_node_instance_id) {
                    sBuffer.append("source_node_instance_id=:source_node_instance_id and ");
                }
                if (isSetted_same_node_key) {
                    sBuffer.append("same_node_key=:same_node_key and ");
                }
                if (isSetted_pid) {
                    sBuffer.append("pid=:pid and ");
                }
                if (isSetted_business_id) {
                    sBuffer.append("business_id=:business_id and ");
                }
                if (isSetted_working_hours) {
                    sBuffer.append("working_hours=:working_hours and ");
                }
                if (isSetted_level) {
                    sBuffer.append("level=:level and ");
                }
                if (isSetted_note_key) {
                    sBuffer.append("note_key=:note_key and ");
                }
                if (isSetted_note_val) {
                    sBuffer.append("note_val=:note_val and ");
                }
            String sql = sBuffer.toString();
            sql = StringUtils.removeEnd(sql, " and ");
            return dao.queryForBean(sql,this);
        }
    
        @Override
        public String getTableName() {
            return "WORKFLOW_NODE";
        }
        
        
        public Map getBeanValues(){
            return this.BEAN_VALUES;
        }
    
        @Override
        public WORKFLOW_NODE insert() {
            if (StringUtils.isBlank(id)) {
                this.setId(StringUtil.getUUID());
            }
            dao.execute(getInsertSql(),BEAN_VALUES);
            return this;
        }
    
        @Override
        public WORKFLOW_NODE update() {
            if (StringUtils.isBlank(id)) {
                throw new RuntimeException("更新Bean时ID不能为空");
            }
            dao.execute(getUpdateSql(),BEAN_VALUES);
            return this;
        }  
        
        public WORKFLOW_NODE insertOrUpdate(){
            if (StringUtils.isNotBlank(id)) {
                return update();
            } else {
                return insert();
            }
        }
        
        /**
         * 通过ID获取该条信息的Map结构
         */
        public Map getBeanMapById() {
            
            if (StringUtils.isBlank(id)) {
                throw new RuntimeException("ID不能为空!");
            }
            
            return dao.queryForMap("select * from WORKFLOW_NODE where id=:id",BEAN_VALUES);
        }
 
        public Object mapRow(ResultSet rs, int rownum) throws SQLException {
            Object id = rs.getObject("ID");
            this.setId(ConvertUtil.obj2Str(id));
            BEAN_VALUES.put("id",id);
            Object obj = null;
            obj = rs.getObject("NODENAME");
            BEAN_VALUES.put("nodename",obj);
                this.setNodename(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("FLOWSTATE");
            BEAN_VALUES.put("flowstate",obj);
                this.setFlowstate(ConvertUtil.obj2Integer(obj));
            obj = rs.getObject("FLOW_TYPE");
            BEAN_VALUES.put("flow_type",obj);
                this.setFlow_type(ConvertUtil.obj2Integer(obj));
            obj = rs.getObject("CREATETIME");
            BEAN_VALUES.put("createtime",obj);
                this.setCreatetime(ConvertUtil.obj2Long(obj));
            obj = rs.getObject("ANSWER_TIME");
            BEAN_VALUES.put("answer_time",obj);
                this.setAnswer_time(ConvertUtil.obj2Long(obj));
            obj = rs.getObject("DEALTIME");
            BEAN_VALUES.put("dealtime",obj);
                this.setDealtime(ConvertUtil.obj2Long(obj));
            obj = rs.getObject("FLOWID");
            BEAN_VALUES.put("flowid",obj);
                this.setFlowid(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("NODE_TEMPLATE_ID");
            BEAN_VALUES.put("node_template_id",obj);
                this.setNode_template_id(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("DEAL_RESULT");
            BEAN_VALUES.put("deal_result",obj);
                this.setDeal_result(ConvertUtil.obj2Integer(obj));
            obj = rs.getObject("DEAL_TYPE");
            BEAN_VALUES.put("deal_type",obj);
                this.setDeal_type(ConvertUtil.obj2Integer(obj));
            obj = rs.getObject("CURRENT_DEALER_ID");
            BEAN_VALUES.put("current_dealer_id",obj);
                this.setCurrent_dealer_id(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("CURRENT_DEALER_NAME");
            BEAN_VALUES.put("current_dealer_name",obj);
                this.setCurrent_dealer_name(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("CURRENT_DEAL_ROLEIDA");
            BEAN_VALUES.put("current_deal_roleida",obj);
                this.setCurrent_deal_roleida(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("CURRENT_DEAL_ROLENAME");
            BEAN_VALUES.put("current_deal_rolename",obj);
                this.setCurrent_deal_rolename(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("DEAL_NOTE_TITLE");
            BEAN_VALUES.put("deal_note_title",obj);
                this.setDeal_note_title(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("DEAL_NOTE");
            BEAN_VALUES.put("deal_note",obj);
                this.setDeal_note(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("DEAL_USETIME");
            BEAN_VALUES.put("deal_usetime",obj);
                this.setDeal_usetime(ConvertUtil.obj2Long(obj));
            obj = rs.getObject("ANSWER_USERTIME");
            BEAN_VALUES.put("answer_usertime",obj);
                this.setAnswer_usertime(ConvertUtil.obj2Long(obj));
            obj = rs.getObject("IS_ADMIN");
            BEAN_VALUES.put("is_admin",obj);
                this.setIs_admin(ConvertUtil.obj2Integer(obj));
            obj = rs.getObject("SOURCE_NODE_INSTANCE_ID");
            BEAN_VALUES.put("source_node_instance_id",obj);
                this.setSource_node_instance_id(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("SAME_NODE_KEY");
            BEAN_VALUES.put("same_node_key",obj);
                this.setSame_node_key(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("PID");
            BEAN_VALUES.put("pid",obj);
                this.setPid(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("BUSINESS_ID");
            BEAN_VALUES.put("business_id",obj);
                this.setBusiness_id(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("WORKING_HOURS");
            BEAN_VALUES.put("working_hours",obj);
                this.setWorking_hours(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("LEVEL");
            BEAN_VALUES.put("level",obj);
                this.setLevel(ConvertUtil.obj2Integer(obj));
            obj = rs.getObject("NOTE_KEY");
            BEAN_VALUES.put("note_key",obj);
                this.setNote_key(ConvertUtil.obj2Str(obj));
            obj = rs.getObject("NOTE_VAL");
            BEAN_VALUES.put("note_val",obj);
                this.setNote_val(ConvertUtil.obj2Str(obj));
            return this;
        }
        
        
        public String toString() {
            StringBuffer sb = new StringBuffer("[");
            for (Iterator iterator = KEYS.keySet().iterator(); iterator.hasNext();) {
                String key = (String) iterator.next();
                sb.append(key+"=" + BEAN_VALUES.get(key)+",");
            }
            sb.append("]");
            return sb.toString();
        }
        
        public WORKFLOW_NODE newInstance(){
            return new WORKFLOW_NODE();
        }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
}