Ver código fonte

정렬 수정

dwkim 2 anos atrás
pai
commit
8d5f9ec927

+ 74 - 2
src/main/resources/mybatis/sqlmaps/inoutmng/ColOdr.xml

@@ -237,10 +237,34 @@
237 237
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
238 238
                 <if test="gridRequest.sidx == 'colCmdUnqNo'.toString()">
239 239
                     <if test="gridRequest.sord == 'asc'.toString()">
240
-                        order by base.col_cmd_unq_no asc , ptcl.col_cmd_dtl_no asc
240
+                        order by base.col_cmd_unq_no asc
241 241
                     </if>
242 242
                     <if test="gridRequest.sord == 'desc'.toString()">
243
-                        order by base.col_cmd_unq_no desc , ptcl.col_cmd_dtl_no asc
243
+                        order by base.col_cmd_unq_no desc
244
+                    </if>
245
+                </if>
246
+                <if test="gridRequest.sidx == 'colCmdDtlNo'.toString()">
247
+                    <if test="gridRequest.sord == 'asc'.toString()">
248
+                        order by ptcl.col_cmd_dtl_no asc
249
+                    </if>
250
+                    <if test="gridRequest.sord == 'desc'.toString()">
251
+                        order by ptcl.col_cmd_dtl_no desc
252
+                    </if>
253
+                </if>
254
+                <if test="gridRequest.sidx == 'rtnPodrUnqNo'.toString()">
255
+                    <if test="gridRequest.sord == 'asc'.toString()">
256
+                        order by ptcl.rtn_podr_unq_no asc
257
+                    </if>
258
+                    <if test="gridRequest.sord == 'desc'.toString()">
259
+                        order by ptcl.rtn_podr_unq_no desc
260
+                    </if>
261
+                </if>
262
+                <if test="gridRequest.sidx == 'rtnPodrDtlNo'.toString()">
263
+                    <if test="gridRequest.sord == 'asc'.toString()">
264
+                        order by ptcl.rtn_podr_dtl_no asc
265
+                    </if>
266
+                    <if test="gridRequest.sord == 'desc'.toString()">
267
+                        order by  ptcl.rtn_podr_dtl_no desc
244 268
                     </if>
245 269
                 </if>
246 270
             </when>
@@ -607,6 +631,30 @@
607 631
                         order by mgnt.col_pick_unq_no desc
608 632
                     </if>
609 633
                 </if>
634
+                <if test="gridRequest.sidx == 'rtnPodrUnqNo'.toString()">
635
+                    <if test="gridRequest.sord == 'asc'.toString()">
636
+                        order by dtl.rtn_podr_unq_no asc
637
+                    </if>
638
+                    <if test="gridRequest.sord == 'desc'.toString()">
639
+                        order by dtl.rtn_podr_unq_no desc
640
+                    </if>
641
+                </if>
642
+                <if test="gridRequest.sidx == 'rtnPodrDtlNo'.toString()">
643
+                    <if test="gridRequest.sord == 'asc'.toString()">
644
+                        order by dtl.rtn_podr_dtl_no asc
645
+                    </if>
646
+                    <if test="gridRequest.sord == 'desc'.toString()">
647
+                        order by dtl.rtn_podr_dtl_no desc
648
+                    </if>
649
+                </if>
650
+                <if test="gridRequest.sidx == 'itemNm'.toString()">
651
+                    <if test="gridRequest.sord == 'asc'.toString()">
652
+                        order by dtl.item_nm asc
653
+                    </if>
654
+                    <if test="gridRequest.sord == 'desc'.toString()">
655
+                        order by dtl.item_nm desc
656
+                    </if>
657
+                </if>
610 658
             </when>
611 659
             <otherwise>
612 660
                 order by dtl.rtn_podr_unq_no desc, dtl.rtn_podr_dtl_no asc, dtl.item_nm asc
@@ -738,6 +786,30 @@
738 786
                         order by mgnt.col_pick_unq_no desc
739 787
                     </if>
740 788
                 </if>
789
+                <if test="gridRequest.sidx == 'rtnPodrUnqNo'.toString()">
790
+                    <if test="gridRequest.sord == 'asc'.toString()">
791
+                        order by dtl.rtn_podr_unq_no asc
792
+                    </if>
793
+                    <if test="gridRequest.sord == 'desc'.toString()">
794
+                        order by dtl.rtn_podr_unq_no desc
795
+                    </if>
796
+                </if>
797
+                <if test="gridRequest.sidx == 'rtnPodrDtlNo'.toString()">
798
+                    <if test="gridRequest.sord == 'asc'.toString()">
799
+                        order by dtl.rtn_podr_dtl_no asc
800
+                    </if>
801
+                    <if test="gridRequest.sord == 'desc'.toString()">
802
+                        order by dtl.rtn_podr_dtl_no desc
803
+                    </if>
804
+                </if>
805
+                <if test="gridRequest.sidx == 'itemNm'.toString()">
806
+                    <if test="gridRequest.sord == 'asc'.toString()">
807
+                        order by dtl.item_nm asc
808
+                    </if>
809
+                    <if test="gridRequest.sord == 'desc'.toString()">
810
+                        order by dtl.item_nm desc
811
+                    </if>
812
+                </if>
741 813
             </when>
742 814
             <otherwise>
743 815
                 order by dtl.rtn_podr_unq_no desc , dtl.rtn_podr_dtl_no asc, dtl.item_nm asc

+ 41 - 1
src/main/resources/mybatis/sqlmaps/inoutmng/ShmtOdr.xml

@@ -45,6 +45,22 @@
45 45
                         order by base.pch_podr_unq_no desc
46 46
                     </if>
47 47
                 </if>
48
+                <if test="gridRequest.sidx == 'pchPodrDtlNo'.toString()">
49
+                    <if test="gridRequest.sord == 'asc'.toString()">
50
+                        order by ptcl.pch_podr_dtl_no asc
51
+                    </if>
52
+                    <if test="gridRequest.sord == 'desc'.toString()">
53
+                        order by ptcl.pch_podr_dtl_no desc
54
+                    </if>
55
+                </if>
56
+                <if test="gridRequest.sidx == 'itemNm'.toString()">
57
+                    <if test="gridRequest.sord == 'asc'.toString()">
58
+                        order by ptcl.item_nm asc
59
+                    </if>
60
+                    <if test="gridRequest.sord == 'desc'.toString()">
61
+                        order by ptcl.item_nm desc
62
+                    </if>
63
+                </if>
48 64
             </when>
49 65
             <otherwise>
50 66
                 order by base.pch_podr_unq_no desc, ptcl.pch_podr_dtl_no  asc, ptcl.item_nm asc
@@ -593,7 +609,7 @@
593 609
         </if>
594 610
         <choose>
595 611
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
596
-                <if test="gridRequest.sidx == 'VIEW_NUM'.toString()">
612
+                <if test="gridRequest.sidx == 'dlvSttmtUnqNo'.toString()">
597 613
                     <if test="gridRequest.sord == 'asc'.toString()">
598 614
                         order by info.dlv_sttmt_unq_no asc
599 615
                     </if>
@@ -844,6 +860,30 @@
844 860
                         order by whs.pch_podr_unq_no desc
845 861
                     </if>
846 862
                 </if>
863
+                <if test="gridRequest.sidx == 'pchPodrDtlNo'.toString()">
864
+                    <if test="gridRequest.sord == 'asc'.toString()">
865
+                        order by whs.pch_podr_dtl_no asc
866
+                    </if>
867
+                    <if test="gridRequest.sord == 'desc'.toString()">
868
+                        order by whs.pch_podr_dtl_no desc
869
+                    </if>
870
+                </if>
871
+                <if test="gridRequest.sidx == 'dlvSttmtUnqNo'.toString()">
872
+                    <if test="gridRequest.sord == 'asc'.toString()">
873
+                        order by whs.dlv_sttmt_unq_no asc
874
+                    </if>
875
+                    <if test="gridRequest.sord == 'desc'.toString()">
876
+                        order by whs.dlv_sttmt_unq_no desc
877
+                    </if>
878
+                </if>
879
+                <if test="gridRequest.sidx == 'dlvSttmtDtlNo'.toString()">
880
+                    <if test="gridRequest.sord == 'asc'.toString()">
881
+                        order by  whs.dlv_sttmt_dtl_no asc
882
+                    </if>
883
+                    <if test="gridRequest.sord == 'desc'.toString()">
884
+                        order by  whs.dlv_sttmt_dtl_no desc
885
+                    </if>
886
+                </if>
847 887
             </when>
848 888
             <otherwise>
849 889
                 order by whs.pch_podr_unq_no desc, whs.pch_podr_dtl_no asc, whs.dlv_sttmt_unq_no desc, whs.dlv_sttmt_dtl_no asc

+ 8 - 0
src/main/resources/mybatis/sqlmaps/loanmng/DsptMng.xml

@@ -49,6 +49,14 @@
49 49
                         ORDER BY store_nm DESC
50 50
                     </if>
51 51
                 </if>
52
+                <if test="gridRequest.sidx == 'dpstNm'.toString()">
53
+                    <if test="gridRequest.sord == 'asc'.toString()">
54
+                        ORDER BY A.dpst_nm ASC
55
+                    </if>
56
+                    <if test="gridRequest.sord == 'desc'.toString()">
57
+                        ORDER BY A.dpst_nm DESC
58
+                    </if>
59
+                </if>
52 60
 
53 61
             </when>
54 62
             <otherwise>

+ 8 - 0
src/main/resources/mybatis/sqlmaps/loanmng/LoanState.xml

@@ -46,6 +46,14 @@
46 46
                         ORDER BY store_nm DESC
47 47
                     </if>
48 48
                 </if>
49
+                <if test="gridRequest.sidx == 'loanMgntUnqNo'.toString()">
50
+                    <if test="gridRequest.sord == 'asc'.toString()">
51
+                        ORDER BY A.loan_mgnt_unq_no ASC
52
+                    </if>
53
+                    <if test="gridRequest.sord == 'desc'.toString()">
54
+                        ORDER BY A.loan_mgnt_unq_no DESC
55
+                    </if>
56
+                </if>
49 57
             </when>
50 58
             <otherwise>
51 59
                 ORDER BY store_nm asc, A.loan_mgnt_unq_no desc

+ 10 - 2
src/main/resources/mybatis/sqlmaps/oper/Ntice.xml

@@ -107,10 +107,18 @@
107 107
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
108 108
                 <if test="gridRequest.sidx == 'nticeTitl'.toString()">
109 109
                     <if test="gridRequest.sord == 'asc'.toString()">
110
-                        order by A.add_dt asc, A.ntice_titl asc
110
+                        order by A.ntice_titl asc
111 111
                     </if>
112 112
                     <if test="gridRequest.sord == 'desc'.toString()">
113
-                        order by A.add_dt desc, A.ntice_titl asc
113
+                        order by A.ntice_titl desc
114
+                    </if>
115
+                </if>
116
+                <if test="gridRequest.sidx == 'addDt'.toString()">
117
+                    <if test="gridRequest.sord == 'asc'.toString()">
118
+                        order by A.add_dt asc
119
+                    </if>
120
+                    <if test="gridRequest.sord == 'desc'.toString()">
121
+                        order by A.add_dt desc
114 122
                     </if>
115 123
                 </if>
116 124
             </when>

+ 18 - 2
src/main/resources/mybatis/sqlmaps/pomng/PchReq.xml

@@ -513,10 +513,26 @@
513 513
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
514 514
                 <if test="gridRequest.sidx == 'pchReqUnqNo'.toString()">
515 515
                     <if test="gridRequest.sord == 'asc'.toString()">
516
-                        order by pch_req_unq_no asc , whs_nm asc, ptcl.item_nm asc
516
+                        order by pch_req_unq_no asc
517
+                    </if>
518
+                    <if test="gridRequest.sord == 'desc'.toString()">
519
+                        order by pch_req_unq_no desc
520
+                    </if>
521
+                </if>
522
+                <if test="gridRequest.sidx == 'whsNm'.toString()">
523
+                    <if test="gridRequest.sord == 'asc'.toString()">
524
+                        order by whs_nm asc
517 525
                     </if>
518 526
                     <if test="gridRequest.sord == 'desc'.toString()">
519
-                        order by pch_req_unq_no desc , whs_nm asc, ptcl.item_nm asc
527
+                        order by whs_nm desc
528
+                    </if>
529
+                </if>
530
+                <if test="gridRequest.sidx == 'itemNm'.toString()">
531
+                    <if test="gridRequest.sord == 'asc'.toString()">
532
+                        order by ptcl.item_nm asc
533
+                    </if>
534
+                    <if test="gridRequest.sord == 'desc'.toString()">
535
+                        order by ptcl.item_nm desc
520 536
                     </if>
521 537
                 </if>
522 538
             </when>

+ 10 - 2
src/main/resources/mybatis/sqlmaps/stinfo/Store.xml

@@ -81,10 +81,18 @@
81 81
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
82 82
                 <if test="gridRequest.sidx == 'storeNm'.toString()">
83 83
                     <if test="gridRequest.sord == 'asc'.toString()">
84
-                        order by store_nm asc, brand_nm asc
84
+                        order by store_nm asc
85 85
                     </if>
86 86
                     <if test="gridRequest.sord == 'desc'.toString()">
87
-                        order by store_nm desc, brand_nm asc
87
+                        order by store_nm desc
88
+                    </if>
89
+                </if>
90
+                <if test="gridRequest.sidx == 'brandNm'.toString()">
91
+                    <if test="gridRequest.sord == 'asc'.toString()">
92
+                        order by brand_nm asc
93
+                    </if>
94
+                    <if test="gridRequest.sord == 'desc'.toString()">
95
+                        order by brand_nm desc
88 96
                     </if>
89 97
                 </if>
90 98
             </when>

+ 10 - 2
src/main/resources/mybatis/sqlmaps/stinfo/Supply.xml

@@ -62,10 +62,18 @@
62 62
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
63 63
                 <if test="gridRequest.sidx == 'spplyNm'.toString()">
64 64
                     <if test="gridRequest.sord == 'asc'.toString()">
65
-                        order by spply_nm asc, brand_nm asc
65
+                        order by spply_nm asc
66
+                    </if>
67
+                    <if test="gridRequest.sord == 'desc'.toString()">
68
+                        order by spply_nm desc
69
+                    </if>
70
+                </if>
71
+                <if test="gridRequest.sidx == 'brandNm'.toString()">
72
+                    <if test="gridRequest.sord == 'asc'.toString()">
73
+                        order by brand_nm asc
66 74
                     </if>
67 75
                     <if test="gridRequest.sord == 'desc'.toString()">
68
-                        order by spply_nm desc, brand_nm asc
76
+                        order by brand_nm desc
69 77
                     </if>
70 78
                 </if>
71 79
             </when>

+ 26 - 3
src/main/resources/mybatis/sqlmaps/stinfo/brand.xml

@@ -117,10 +117,18 @@
117 117
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
118 118
                 <if test="gridRequest.sidx == 'brandNm'.toString()">
119 119
                     <if test="gridRequest.sord == 'asc'.toString()">
120
-                        order by affl.affl_shop_nm asc, brand.brand_nm asc
120
+                        order by  brand.brand_nm asc
121 121
                     </if>
122 122
                     <if test="gridRequest.sord == 'desc'.toString()">
123
-                        order by affl.affl_shop_nm desc, brand.brand_nm desc
123
+                        order by  brand.brand_nm desc
124
+                    </if>
125
+                </if>
126
+                <if test="gridRequest.sidx == 'afflShopNm'.toString()">
127
+                    <if test="gridRequest.sord == 'asc'.toString()">
128
+                        order by affl.affl_shop_nm asc
129
+                    </if>
130
+                    <if test="gridRequest.sord == 'desc'.toString()">
131
+                        order by affl.affl_shop_nm desc
124 132
                     </if>
125 133
                 </if>
126 134
             </when>
@@ -449,7 +457,22 @@
449 457
                 where  brd.store_st_cd = 'ST01'
450 458
                 group by brd.store_id, brd.store_nm	, brd.loan_dvsn
451 459
             ) ordering
452
-        order by ordering.store_nm, ordering.loan_dvsn
460
+
461
+        <choose>
462
+            <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
463
+                <if test="gridRequest.sidx == 'storeNm'.toString()">
464
+                    <if test="gridRequest.sord == 'asc'.toString()">
465
+                        order by ordering.store_nm asc
466
+                    </if>
467
+                    <if test="gridRequest.sord == 'desc'.toString()">
468
+                        order by ordering.store_nm desc
469
+                    </if>
470
+                </if>
471
+            </when>
472
+            <otherwise>
473
+                order by ordering.store_nm, ordering.loan_dvsn
474
+            </otherwise>
475
+        </choose>
453 476
         <if test="gridRequest.pagingYn == true">
454 477
             limit #{gridRequest.gridFirst}, #{gridRequest.gridSize}
455 478
         </if>

+ 16 - 0
src/main/resources/mybatis/sqlmaps/stockmng/StockMng.xml

@@ -68,6 +68,22 @@
68 68
                 </if>
69 69
         <choose>
70 70
             <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
71
+                <if test="gridRequest.sidx == 'whsId'.toString()">
72
+                    <if test="gridRequest.sord == 'asc'.toString()">
73
+                        ORDER BY c.whs_id ASC
74
+                    </if>
75
+                    <if test="gridRequest.sord == 'desc'.toString()">
76
+                        ORDER BY c.whs_id DESC
77
+                    </if>
78
+                </if>
79
+                <if test="gridRequest.sidx == 'locationNm'.toString()">
80
+                    <if test="gridRequest.sord == 'asc'.toString()">
81
+                        ORDER BY e.location_nm ASC
82
+                    </if>
83
+                    <if test="gridRequest.sord == 'desc'.toString()">
84
+                        ORDER BY e.location_nm DESC
85
+                    </if>
86
+                </if>
71 87
                 <if test="gridRequest.sidx == 'itemNm'.toString()">
72 88
                     <if test="gridRequest.sord == 'asc'.toString()">
73 89
                         ORDER BY c.item_nm ASC

+ 23 - 1
src/main/resources/mybatis/sqlmaps/stockmng/WhsMng.xml

@@ -34,6 +34,14 @@
34 34
                         ORDER BY store_nm DESC
35 35
                     </if>
36 36
                 </if>
37
+                <if test="gridRequest.sidx == 'whsNm'.toString()">
38
+                    <if test="gridRequest.sord == 'asc'.toString()">
39
+                        ORDER BY A.whs_nm ASC
40
+                    </if>
41
+                    <if test="gridRequest.sord == 'desc'.toString()">
42
+                        ORDER BY A.whs_nm DESC
43
+                    </if>
44
+                </if>
37 45
             </when>
38 46
             <otherwise>
39 47
                 ORDER BY store_nm asc, A.whs_nm ASC
@@ -91,7 +99,21 @@
91 99
         FROM whs_mgnt_base_loc A
92 100
         WHERE A.brand_id = #{brandId}
93 101
         AND A.whs_id = #{whsId}
94
-        ORDER BY A.location_nm ASC
102
+        <choose>
103
+            <when test="gridRequest.sidx != null and gridRequest.sidx != ''">
104
+                <if test="gridRequest.sidx == 'location'.toString()">
105
+                    <if test="gridRequest.sord == 'asc'.toString()">
106
+                        ORDER BY A.location_nm ASC
107
+                    </if>
108
+                    <if test="gridRequest.sord == 'desc'.toString()">
109
+                        ORDER BY A.location_nm DESC
110
+                    </if>
111
+                </if>
112
+            </when>
113
+            <otherwise>
114
+                ORDER BY A.location_nm ASC
115
+            </otherwise>
116
+        </choose>
95 117
         <if test="gridRequest.pagingYn == true">
96 118
             limit #{gridRequest.gridFirst}, #{gridRequest.gridSize}
97 119
         </if>