Bläddra i källkod

修改sql以及传参

lfy 3 veckor sedan
förälder
incheckning
41d63b0873

+ 3 - 3
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/controller/admin/delivery/DeliveryController.java

@@ -114,11 +114,11 @@ public class DeliveryController {
114 114
         return success(true);
115 115
     }
116 116
 
117
-    @GetMapping("/revertKqxx")
117
+    @PostMapping("/revertKqxx")
118 118
     @Operation(summary = "库区退回")
119 119
     @PreAuthorize("@ss.hasPermission('coding:cfxx:return')")
120
-    public CommonResult<Boolean> revertKqxx(@Valid @RequestParam("ids") List<Long> ids) {
121
-        dwxxService.revertKqxx(ids);
120
+    public CommonResult<Boolean> revertKqxx(@Valid @RequestBody CaxxUpdateReqVO updateReqVO) {
121
+        dwxxService.revertKqxx(updateReqVO);
122 122
         return success(true);
123 123
     }
124 124
 

+ 3 - 0
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/controller/admin/delivery/vo/CaxxUpdateReqVO.java

@@ -26,4 +26,7 @@ public class CaxxUpdateReqVO {
26 26
 
27 27
     @Schema(description = "行政区划等级")
28 28
     private String areaLevel;
29
+
30
+    @Schema(description = "库区ids")
31
+    private List<Long>  kqIds;
29 32
 }

+ 1 - 1
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/service/dwxx/DwxxService.java

@@ -63,7 +63,7 @@ public interface DwxxService {
63 63
 
64 64
     void revertCaxx(CaxxUpdateReqVO updateReqVO);
65 65
 
66
-    void revertKqxx(List<Long> kqIds);
66
+    void revertKqxx(CaxxUpdateReqVO updateReqVO);
67 67
 
68 68
     PageResult<SpareRespVO> getProvinceSelectedPage(SparePageReqVO pageReqVO);
69 69
 

+ 5 - 1
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/service/dwxx/DwxxServiceImpl.java

@@ -505,11 +505,15 @@ public class DwxxServiceImpl implements DwxxService {
505 505
 
506 506
     @Override
507 507
     @Transactional
508
-    public void revertKqxx(List<Long> kqIds) {
508
+    public void revertKqxx(CaxxUpdateReqVO updateReqVO) {
509 509
         LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
510 510
         if (ObjectUtils.isEmpty(loginUser)) {
511 511
             throw exception(ERROR, "不存在用户信息");
512 512
         }
513
+        List<Long> kqIds = updateReqVO.getKqIds();
514
+        if (ObjectUtil.isEmpty(kqIds)){
515
+            throw exception(ERROR, "未选择库区");
516
+        }
513 517
         String areaLevel = loginUser.getInfo().get("areaLevel");
514 518
         // 国家交易中心
515 519
         if ("0".equals(areaLevel) || ObjectUtil.isEmpty(areaLevel)) {

+ 37 - 37
delivery-module-core/delivery-module-core-biz/src/main/resources/mapper/dwxx/DwxxMapper.xml

@@ -38,14 +38,14 @@
38 38
                     <if test="pageReqVO.cfzt!=null and pageReqVO.cfzt!=''">
39 39
                         and cc.CAZT=#{pageReqVO.cfzt}
40 40
                     </if>
41
-                    <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
42
-                        and cc.SJCR between #{pageReqVO.kqStart} and #{pageReqVO.kqEnd}
41
+                    <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
42
+                        and cc.SJCR between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
43 43
                     </if>
44
-                    <if test="(pageReqVO.kqStart == null or pageReqVO.kqStart == '') and pageReqVO.kqEnd != null and pageReqVO.kqEnd != ''">
45
-                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.kqEnd}
44
+                    <if test="(pageReqVO.cfStart == null or pageReqVO.cfStart == '') and pageReqVO.cfEnd != null and pageReqVO.cfEnd != ''">
45
+                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.cfEnd}
46 46
                     </if>
47
-                    <if test=" pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and (pageReqVO.kqEnd == null or pageReqVO.kqEnd == '') ">
48
-                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.kqStart}
47
+                    <if test=" pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd == null or pageReqVO.cfEnd == '') ">
48
+                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.cfStart}
49 49
                     </if>
50 50
                 </where>
51 51
                 group by cf.BASE_KQXX_ID
@@ -70,15 +70,15 @@
70 70
             <if test="pageReqVO.areaCode!=null and pageReqVO.areaCode!=''">
71 71
                 and ck.xzqhdm like #{pageReqVO.areaCode}
72 72
             </if>
73
-            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
74
-                and t1.sjcrNum between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
73
+            <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
74
+                and t1.sjcrNum between #{pageReqVO.kqStart} and #{pageReqVO.kqEnd}
75 75
             </if>
76
-            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd==null or pageReqVO.cfEnd=='')">
77
-                and t1.sjcrNum <![CDATA[>=]]>  #{pageReqVO.cfStart}
78
-            </if>
79
-            <if test="(pageReqVO.cfStart==null or pageReqVO.cfStart=='') and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
80
-                and t1.sjcrNum <![CDATA[<=]]>  #{pageReqVO.cfEnd}
76
+            <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and (pageReqVO.kqEnd==null or pageReqVO.kqEnd=='')">
77
+                and t1.sjcrNum <![CDATA[>=]]>  #{pageReqVO.kqStart}
81 78
             </if>
79
+            <if test="(pageReqVO.kqStart==null or pageReqVO.kqStart=='') and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
80
+                and t1.sjcrNum <![CDATA[<=]]>  #{pageReqVO.kqEnd}
81
+            </if>           
82 82
             <if test="pageReqVO.dwmc!=null and pageReqVO.dwmc!=''">
83 83
                 and cd.DWMC like #{pageReqVO.dwmc}
84 84
             </if>
@@ -116,14 +116,14 @@
116 116
                     <if test="pageReqVO.cfzt!=null and pageReqVO.cfzt!=''">
117 117
                         and cc.CAZT=#{pageReqVO.cfzt}
118 118
                     </if>
119
-                    <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
120
-                        and cc.SJCR between #{pageReqVO.kqStart} and #{pageReqVO.kqEnd}
119
+                    <if test="pageReqVO.cfStart!=null and cfStart.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
120
+                        and cc.SJCR between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
121 121
                     </if>
122
-                    <if test="(pageReqVO.kqStart == null or pageReqVO.kqStart == '') and pageReqVO.kqEnd != null and pageReqVO.kqEnd != ''">
123
-                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.kqEnd}
122
+                    <if test="(pageReqVO.cfStart == null or pageReqVO.cfStart == '') and pageReqVO.cfEnd != null and pageReqVO.cfEnd != ''">
123
+                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.cfEnd}
124 124
                     </if>
125
-                    <if test=" pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and (pageReqVO.kqEnd == null or pageReqVO.kqEnd == '') ">
126
-                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.kqStart}
125
+                    <if test=" pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd == null or pageReqVO.cfEnd == '') ">
126
+                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.cfStart}
127 127
                     </if>
128 128
                 </where>
129 129
                 group by cc.KQID
@@ -141,14 +141,14 @@
141 141
         <where>
142 142
             cd.qyxz!='10'
143 143
             and cd.DELETED=0
144
-            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
145
-                and t1.sjcrNum between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
144
+            <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
145
+                and t1.sjcrNum between #{pageReqVO.kqStart} and #{pageReqVO.kqEnd}
146 146
             </if>
147
-            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd==null or pageReqVO.cfEnd=='')">
148
-                and t1.sjcrNum <![CDATA[>=]]>  #{pageReqVO.cfStart}
147
+            <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and (pageReqVO.kqEnd==null or pageReqVO.kqEnd=='')">
148
+                and t1.sjcrNum <![CDATA[>=]]>  #{pageReqVO.kqStart}
149 149
             </if>
150
-            <if test="(pageReqVO.cfStart==null or pageReqVO.cfStart=='') and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
151
-                and t1.sjcrNum <![CDATA[<=]]>  #{pageReqVO.cfEnd}
150
+            <if test="(pageReqVO.kqStart==null or pageReqVO.kqStart=='') and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
151
+                and t1.sjcrNum <![CDATA[<=]]>  #{pageReqVO.kqEnd}
152 152
             </if>
153 153
             <if test="pageReqVO.dwmc!=null and pageReqVO.dwmc!=''">
154 154
                 and cd.DWMC like #{pageReqVO.dwmc}
@@ -202,14 +202,14 @@
202 202
                     <if test="pageReqVO.cfzt!=null and pageReqVO.cfzt!=''">
203 203
                         and cc.CAZT=#{pageReqVO.cfzt}
204 204
                     </if>
205
-                    <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
206
-                        and cc.SJCR between #{pageReqVO.kqStart} and #{pageReqVO.kqEnd}
205
+                    <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
206
+                        and cc.SJCR between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
207 207
                     </if>
208
-                    <if test="(pageReqVO.kqStart == null or pageReqVO.kqStart == '') and pageReqVO.kqEnd != null and pageReqVO.kqEnd != ''">
209
-                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.kqEnd}
208
+                    <if test="(pageReqVO.cfStart == null or pageReqVO.cfStart == '') and pageReqVO.cfEnd != null and pageReqVO.cfEnd != ''">
209
+                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.cfEnd}
210 210
                     </if>
211
-                    <if test=" pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and (pageReqVO.kqEnd == null or pageReqVO.kqEnd == '') ">
212
-                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.kqStart}
211
+                    <if test=" pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd == null or pageReqVO.cfEnd == '') ">
212
+                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.cfStart}
213 213
                     </if>
214 214
                 </where>
215 215
                 group by pe.KQ_ID
@@ -245,14 +245,14 @@
245 245
         ) t3 on t3.KQ_ID=ck.id
246 246
         <where>
247 247
             cd.qyxz!='10' and cd.DELETED=0
248
-            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
249
-                and t1.sjcrNum between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
248
+            <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
249
+                and t1.sjcrNum between #{pageReqVO.kqStart} and #{pageReqVO.kqEnd}
250 250
             </if>
251
-            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd==null or pageReqVO.cfEnd=='')">
252
-                and t1.sjcrNum <![CDATA[>=]]>  #{pageReqVO.cfStart}
251
+            <if test="pageReqVO.kqStart!=null and pageReqVO.kqStart!='' and (pageReqVO.kqEnd==null or pageReqVO.kqEnd=='')">
252
+                and t1.sjcrNum <![CDATA[>=]]>  #{pageReqVO.kqStart}
253 253
             </if>
254
-            <if test="(pageReqVO.cfStart==null or pageReqVO.cfStart=='') and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
255
-                and t1.sjcrNum <![CDATA[<=]]>  #{pageReqVO.cfEnd}
254
+            <if test="(pageReqVO.kqStart==null or pageReqVO.kqStart=='') and pageReqVO.kqEnd!=null and pageReqVO.kqEnd!=''">
255
+                and t1.sjcrNum <![CDATA[<=]]>  #{pageReqVO.kqEnd}
256 256
             </if>
257 257
             <if test="pageReqVO.dwmc!=null and pageReqVO.dwmc!=''">
258 258
                 and cd.DWMC like #{pageReqVO.dwmc}