Browse Source

交收仓选择返回空仓查询查询条件用于查询仓房列表

lfy 2 weeks ago
parent
commit
13085cdd9f

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

@@ -72,4 +72,15 @@ public class DeliveryRespVO {
72 72
     @Schema(description = "联系电话")
73 73
     @ExcelIgnore
74 74
     private String lxdh;
75
+    @Schema(description = "仓房类型编码")
76
+    private String cflx;
77
+
78
+    @Schema(description = "仓房状态编码")
79
+    private String cfzt;
80
+
81
+    // 仓房仓容
82
+    @Schema(description = "仓房仓容start")
83
+    private Integer cfStart;
84
+    @Schema(description = "仓房仓容end")
85
+    private Integer cfEnd;
75 86
 }

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

@@ -27,4 +27,15 @@ public class StorePageReqVO extends PageParam {
27 27
 
28 28
     @Schema(description = "银行名称")
29 29
     private String yhmc;
30
+
31
+    @Schema(description = "仓房类型编码")
32
+    private String cflx;
33
+
34
+    @Schema(description = "仓房状态编码")
35
+    private String cfzt;
36
+
37
+    @Schema(description = "仓房仓容start")
38
+    private Integer cfStart;
39
+    @Schema(description = "仓房仓容end")
40
+    private Integer cfEnd;
30 41
 }

+ 16 - 3
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/dal/mysql/caxx/CaxxMapper.java

@@ -8,6 +8,7 @@ import com.unis.framework.mybatis.core.query.LambdaQueryWrapperX;
8 8
 import com.unis.module.coding.controller.admin.caxx.vo.CaxxPageReqVO;
9 9
 import com.unis.module.coding.controller.admin.delivery.vo.SparePageReqVO;
10 10
 import com.unis.module.coding.controller.admin.delivery.vo.SpareRespVO;
11
+import com.unis.module.coding.controller.admin.delivery.vo.StorePageReqVO;
11 12
 import com.unis.module.coding.controller.admin.delivery.vo.StoreRespVO;
12 13
 import com.unis.module.coding.dal.dataobject.caxx.CaxxDO;
13 14
 import org.apache.ibatis.annotations.Mapper;
@@ -52,11 +53,15 @@ public interface CaxxMapper extends BaseMapperX<CaxxDO> {
52 53
 
53 54
     Page<SpareRespVO> selectWrapperPageForSheng(Page<Object> objectPage, @Param("pageReqVO")SparePageReqVO pageReqVO);
54 55
 
55
-    default List<CaxxDO> selectListByKqId(Long  kqId) {
56
+    default List<CaxxDO> selectList(StorePageReqVO pageReqVO) {
56 57
           List<CaxxDO> caxxList = selectList(
57 58
                 new LambdaQueryWrapperX<CaxxDO>()
58
-                        .eqIfPresent(CaxxDO::getKqid, kqId)
59
-
59
+                        .eqIfPresent(CaxxDO::getKqid, pageReqVO.getKqId())
60
+                        .eqIfPresent(CaxxDO::getCflx, pageReqVO.getCflx())
61
+                        .eqIfPresent(CaxxDO::getCazt, pageReqVO.getCfzt())
62
+                        .between(pageReqVO.getCfStart() != null && pageReqVO.getCfEnd() != null,CaxxDO::getSjcr, pageReqVO.getCfStart(), pageReqVO.getCfEnd())
63
+                        .le(pageReqVO.getCfStart() == null && pageReqVO.getCfEnd() != null,CaxxDO::getSjcr, pageReqVO.getCfEnd())
64
+                        .ge(pageReqVO.getCfStart() != null && (pageReqVO.getCfEnd() == null ),CaxxDO::getSjcr, pageReqVO.getCfStart())
60 65
         );
61 66
         return caxxList;
62 67
     }
@@ -77,4 +82,12 @@ public interface CaxxMapper extends BaseMapperX<CaxxDO> {
77 82
     Page<SpareRespVO> getSelectPageForBank(Page<Object> objectPage, @Param("pageReqVO")SparePageReqVO pageReqVO);
78 83
 
79 84
     Page<SpareRespVO> getSelectPageForSheng(Page<Object> objectPage, @Param("pageReqVO")SparePageReqVO pageReqVO);
85
+
86
+    default  List<CaxxDO> selectListByKqId(Long kqId){
87
+        List<CaxxDO> caxxList = selectList(
88
+                new LambdaQueryWrapperX<CaxxDO>()
89
+                        .eqIfPresent(CaxxDO::getKqid, kqId)
90
+        );
91
+        return caxxList;
92
+    }
80 93
 }

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

@@ -242,7 +242,17 @@ public class DwxxServiceImpl implements DwxxService {
242 242
                     page = dwxxMapper.selectWrapperPageForSheng(new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()), pageReqVO);
243 243
                 }
244 244
             }
245
-
245
+        }
246
+        if (!ObjectUtils.isEmpty(page)) {
247
+            List<DeliveryRespVO> records = page.getRecords();
248
+            if (!ObjectUtils.isEmpty(records)) {
249
+                records.stream().forEach(s -> {
250
+                     s.setCflx(pageReqVO.getCflx());
251
+                     s.setCfzt(pageReqVO.getCfzt());
252
+                     s.setCfEnd(pageReqVO.getCfEnd());
253
+                     s.setCfStart(pageReqVO.getCfStart());
254
+                });
255
+            }
246 256
         }
247 257
         return new PageResult<>(page.getRecords(), page.getTotal());
248 258
     }
@@ -324,7 +334,7 @@ public class DwxxServiceImpl implements DwxxService {
324 334
                     }
325 335
                 } else {// 省已选
326 336
                     if (YXZT.NOT_SELECTED.getCode().equals(pageReqVO.getYxcf())) {
327
-                        List<CaxxDO> caxxDOS = caxxMapper.selectListByKqId(pageReqVO.getKqId());
337
+                        List<CaxxDO> caxxDOS = caxxMapper.selectList(pageReqVO);
328 338
                         List<StoreRespVO> storeListSelect = provinceMapper.getStoreListForProvince(pageReqVO.getKqId(), 0);
329 339
                         List<StoreRespVO> storeListForProvice = new ArrayList<>();
330 340
                         if (!ObjectUtils.isEmpty(caxxDOS)) {

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

@@ -284,6 +284,21 @@
284 284
             cf.deleted=0
285 285
             and cf.lsxz='000'
286 286
             and cc.KQID=#{pageReqVO.kqId}
287
+            <if test="pageReqVO.cflx!=null and pageReqVO.cflx!=''">
288
+                        and cc.CFLX=#{pageReqVO.cflx}
289
+            </if>
290
+            <if test="pageReqVO.cfzt!=null and pageReqVO.cfzt!=''">
291
+                        and cc.CAZT=#{pageReqVO.cfzt}
292
+            </if>
293
+            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
294
+                        and cc.SJCR between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
295
+            </if>
296
+            <if test="(pageReqVO.cfStart == null or pageReqVO.cfStart == '') and pageReqVO.cfEnd != null and pageReqVO.cfEnd != ''">
297
+                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.cfEnd}
298
+            </if>
299
+            <if test=" pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd == null or pageReqVO.cfEnd == '') ">
300
+                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.cfStart}
301
+            </if>
287 302
         </where>
288 303
         order by cc.KQID desc
289 304
     </select>

+ 15 - 0
delivery-module-core/delivery-module-core-biz/src/main/resources/mapper/province/ProvinceMapper.xml

@@ -26,6 +26,21 @@
26 26
              <if test="type!=null  and type==1">
27 27
                 and pe.HY_STATE=1
28 28
             </if>
29
+            <if test="pageReqVO.cflx!=null and pageReqVO.cflx!=''">
30
+                        and cc.CFLX=#{pageReqVO.cflx}
31
+            </if>
32
+            <if test="pageReqVO.cfzt!=null and pageReqVO.cfzt!=''">
33
+                        and cc.CAZT=#{pageReqVO.cfzt}
34
+            </if>
35
+            <if test="pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and pageReqVO.cfEnd!=null and pageReqVO.cfEnd!=''">
36
+                        and cc.SJCR between #{pageReqVO.cfStart} and #{pageReqVO.cfEnd}
37
+            </if>
38
+            <if test="(pageReqVO.cfStart == null or pageReqVO.cfStart == '') and pageReqVO.cfEnd != null and pageReqVO.cfEnd != ''">
39
+                        and cc.SJCR <![CDATA[<=]]>  #{pageReqVO.cfEnd}
40
+            </if>
41
+            <if test=" pageReqVO.cfStart!=null and pageReqVO.cfStart!='' and (pageReqVO.cfEnd == null or pageReqVO.cfEnd == '') ">
42
+                        and cc.SJCR <![CDATA[>=]]>  #{pageReqVO.cfStart}
43
+            </if>
29 44
         </where>
30 45
         order by pe.KQ_ID desc
31 46
     </select>