Browse Source

Merge branch 'master' of http://101.36.160.140:21044/delivery-warehouse-java/delivery-depot-admin into liuj_pc_dev

liujing-123 2 weeks ago
parent
commit
039b8a6a17

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

@@ -38,4 +38,6 @@ public class StorePageReqVO extends PageParam {
38 38
     private Integer cfStart;
39 39
     @Schema(description = "仓房仓容end")
40 40
     private Integer cfEnd;
41
+    @Schema(description = "类型:省0,银行1")
42
+    private  Integer type;
41 43
 }

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

@@ -1,5 +1,7 @@
1 1
 package com.unis.module.coding.controller.admin.delivery.vo;
2 2
 
3
+import com.unis.framework.excel.core.annotations.DictFormat;
4
+import com.unis.module.system.enums.DictTypeConstants;
3 5
 import io.swagger.v3.oas.annotations.media.Schema;
4 6
 import lombok.Data;
5 7
 
@@ -43,5 +45,6 @@ public class StoreRespVO {
43 45
     private String mobile;
44 46
 
45 47
     @Schema(description = "储存状态")
48
+    @DictFormat(DictTypeConstants.CC_TYPE)
46 49
     private Integer cczt;
47 50
 }

+ 3 - 1
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/dal/mysql/province/ProvinceMapper.java

@@ -8,6 +8,7 @@ import com.unis.framework.common.pojo.PageResult;
8 8
 import com.unis.framework.common.util.object.ObjectUtils;
9 9
 import com.unis.framework.mybatis.core.mapper.BaseMapperX;
10 10
 import com.unis.framework.mybatis.core.query.LambdaQueryWrapperX;
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.controller.admin.province.vo.ProvincePageReqVO;
13 14
 import com.unis.module.coding.dal.dataobject.bank.BankDO;
@@ -68,8 +69,9 @@ public interface ProvinceMapper extends BaseMapperX<ProvinceDO> {
68 69
 
69 70
         );
70 71
     }
71
-    List<StoreRespVO> getStoreListForProvince(@Param("kqId") Long  kqId,@Param("type")Integer type);
72
+    List<StoreRespVO> getStoreListForProvinceOnly(@Param("kqId") Long  kqId,@Param("type")Integer type);
72 73
 
74
+    List<StoreRespVO> getStoreListForProvince(@Param("pageReqVO") StorePageReqVO pageReqVO);
73 75
     default int deleteListByKqIds(List<Long> kqIds) {
74 76
         return delete(
75 77
                 new LambdaUpdateWrapper<ProvinceDO>()

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

@@ -55,6 +55,8 @@ import org.springframework.transaction.annotation.Transactional;
55 55
 import org.springframework.validation.annotation.Validated;
56 56
 
57 57
 import javax.annotation.Resource;
58
+import java.math.BigDecimal;
59
+import java.math.RoundingMode;
58 60
 import java.util.ArrayList;
59 61
 import java.util.Arrays;
60 62
 import java.util.List;
@@ -272,6 +274,12 @@ public class DwxxServiceImpl implements DwxxService {
272 274
             } else if (YXZT.SELECTED.getCode().equals(pageReqVO.getYxcf()) || YXZT.OPTION.getCode().equals(pageReqVO.getYxcf())) {
273 275
                 List<CaxxDO> caxxDOS = caxxMapper.selectListByKqId(pageReqVO.getKqId());
274 276
                 if (!ObjectUtils.isEmpty(caxxDOS)) {
277
+                    caxxDOS.stream().forEach(s->{
278
+                        if (s.getSjcr()!=null) {
279
+                            BigDecimal truncatedNumber = s.getSjcr().setScale(0, RoundingMode.DOWN);
280
+                            s.setSjcr(truncatedNumber);
281
+                        }
282
+                    });
275 283
                     List<StoreRespVO> selectedStoreSForNation = BeanUtils.toBean(caxxDOS, StoreRespVO.class);
276 284
                     return selectedStoreSForNation;
277 285
                 }
@@ -283,7 +291,7 @@ public class DwxxServiceImpl implements DwxxService {
283 291
                 return storeRespVOS;
284 292
             } else {
285 293
                 //国家查看省已选仓房列表
286
-                List<StoreRespVO> storeListForProvince = provinceMapper.getStoreListForProvince(pageReqVO.getKqId(), 0);
294
+                List<StoreRespVO> storeListForProvince = provinceMapper.getStoreListForProvinceOnly(pageReqVO.getKqId(), 0);
287 295
                 return storeListForProvince;
288 296
             }
289 297
         }
@@ -302,7 +310,8 @@ public class DwxxServiceImpl implements DwxxService {
302 310
                         throw exception(ERROR, "当前银行用户不存在银行信息");
303 311
                     }
304 312
                     if (YXZT.NOT_SELECTED.getCode().equals(pageReqVO.getYxcf())) {
305
-                        List<StoreRespVO> storeListForBank = provinceMapper.getStoreListForProvince(pageReqVO.getKqId(), 1);
313
+                        pageReqVO.setType(1);
314
+                        List<StoreRespVO> storeListForBank = provinceMapper.getStoreListForProvince(pageReqVO);
306 315
                         List<StoreRespVO> storeListSelelct = bankMapper.getStoreListForBank(pageReqVO.getKqId(),bankType);
307 316
                         if (!ObjectUtils.isEmpty(storeListForBank)) {
308 317
                             if (!ObjectUtils.isEmpty(storeListSelelct)) {
@@ -326,7 +335,7 @@ public class DwxxServiceImpl implements DwxxService {
326 335
                 } else {// 省已选
327 336
                     if (YXZT.NOT_SELECTED.getCode().equals(pageReqVO.getYxcf())) {
328 337
                         List<CaxxDO> caxxDOS = caxxMapper.selectList(pageReqVO);
329
-                        List<StoreRespVO> storeListSelect = provinceMapper.getStoreListForProvince(pageReqVO.getKqId(), 0);
338
+                        List<StoreRespVO> storeListSelect = provinceMapper.getStoreListForProvinceOnly(pageReqVO.getKqId(), 0);
330 339
                         List<StoreRespVO> storeListForProvice = new ArrayList<>();
331 340
                         if (!ObjectUtils.isEmpty(caxxDOS)) {
332 341
                             if (!ObjectUtils.isEmpty(storeListSelect)) {
@@ -336,12 +345,18 @@ public class DwxxServiceImpl implements DwxxService {
336 345
                                 }
337 346
                             }
338 347
                             if (!ObjectUtils.isEmpty(caxxDOS)) {
348
+                                caxxDOS.stream().forEach(s->{
349
+                                    if (s.getSjcr()!=null) {
350
+                                        BigDecimal truncatedNumber = s.getSjcr().setScale(0, RoundingMode.DOWN);
351
+                                        s.setSjcr(truncatedNumber);
352
+                                    }
353
+                                });
339 354
                                 storeListForProvice = BeanUtils.toBean(caxxDOS, StoreRespVO.class);
340 355
                             }
341 356
                             return storeListForProvice;
342 357
                         }
343 358
                     } else if (YXZT.SELECTED.getCode().equals(pageReqVO.getYxcf()) || YXZT.OPTION.getCode().equals(pageReqVO.getYxcf())) {
344
-                        List<StoreRespVO> storeListForProvince = provinceMapper.getStoreListForProvince(pageReqVO.getKqId(), 0);
359
+                        List<StoreRespVO> storeListForProvince = provinceMapper.getStoreListForProvinceOnly(pageReqVO.getKqId(), 0);
345 360
                         return storeListForProvince;
346 361
                     } else if (YXZT.IDENTIFY.getCode().equals(pageReqVO.getYxcf())) {
347 362
                         List<StoreRespVO> storeRespVOS = caxxMapper.selectListForIdentify(pageReqVO.getKqId(), pageReqVO.getYhmc());

+ 2 - 2
delivery-module-core/delivery-module-core-biz/src/main/resources/mapper/bank/BankMapper.xml

@@ -17,11 +17,11 @@
17 17
                 cc.CAMC,
18 18
                 cc.CFLX,
19 19
                 cc.CAZT,
20
-                cc.SJCR,
20
+                TRUNC(cc.SJCR) sjcr,
21 21
                 cc.yxcf
22 22
         from  DELIVERY_CAXX cc
23 23
         join  DELIVERY_BANK bk on bk.CA_ID=cc.ID
24
-        where bk.KQ_ID=#{kqId} and   bk.deleted=0  and bk.rdyh_id = #{pageReqVO.yhmc}
24
+        where bk.KQ_ID=#{kqId} and   bk.deleted=0  and bk.rdyh_id = #{yhmc}
25 25
         order by bk.KQ_ID desc
26 26
     </select>
27 27
 </mapper>

+ 2 - 2
delivery-module-core/delivery-module-core-biz/src/main/resources/mapper/caxx/CaxxMapper.xml

@@ -410,7 +410,7 @@
410 410
                 cc.CAMC,
411 411
                 cc.CFLX,
412 412
                 cc.CAZT,
413
-                cc.SJCR,
413
+                TRUNC(cc.SJCR) sjcr,
414 414
                 LISTAGG(DISTINCT bk.RDYH_NAME, ',') rdyh_name
415 415
         from DELIVERY_CAXX cc
416 416
         join DELIVERY_BANK bk on cc.id=bk.CA_ID
@@ -435,7 +435,7 @@
435 435
                 cc.CAMC,
436 436
                 cc.CFLX,
437 437
                 cc.CAZT,
438
-                cc.SJCR,
438
+                TRUNC(cc.SJCR) sjcr,
439 439
                 t1.RDYH_NAME,
440 440
                 t1.CCZT,
441 441
                 t1.NICKNAME,

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

@@ -12,7 +12,7 @@
12 12
             cd.TYXYDM,
13 13
             cd.DWMC,
14 14
             ck.KQMC,
15
-            ifnull(t1.sjcrNum, 0) sjcrNum,
15
+            TRUNC(ifnull(t1.sjcrNum, 0)) sjcrNum,
16 16
             ifnull(t1.cfnum, 0) cfnum,
17 17
             ifnull(t2.yxcfnum, 0) yxcfnum,
18 18
             ck.xzqhdm
@@ -95,7 +95,7 @@
95 95
             cd.TYXYDM,
96 96
             cd.DWMC,
97 97
             ck.KQMC,
98
-            ifnull(t1.sjcrNum, 0) sjcrNum,
98
+            TRUNC(ifnull(t1.sjcrNum, 0)) sjcrNum,
99 99
             ifnull(t1.cfnum, 0) cfnum,
100 100
             ifnull(t2.yxcfnum, 0) yxcfnum
101 101
         from  DELIVERY_DWXX cd
@@ -175,7 +175,7 @@
175 175
             cd.TYXYDM,
176 176
             cd.DWMC,
177 177
             ck.KQMC,
178
-            ifnull(t1.sjcrNum, 0) sjcrNum,
178
+            TRUNC(ifnull(t1.sjcrNum, 0)) sjcrNum,
179 179
             ifnull(t1.cfnum, 0) cfnum,
180 180
             ifnull(t3.yxcfnum, 0) yxcfnum,
181 181
             ifnull(t2.SYNDZZC, 0) zzc,
@@ -276,8 +276,9 @@
276 276
                 cc.ID  ,
277 277
                 cc.KQMC,
278 278
                 cc.CAMC,
279
+
279 280
                 cc.CFLX,
280
-                cc.CAZT,
281
+                TRUNC(cc.SJCR)  sjcr,
281 282
                 cc.SJCR
282 283
         from  CODING_CAXX cc
283 284
         join CODING_FMXX cf on cc.id=cf.BASE_CAXX_ID

+ 23 - 3
delivery-module-core/delivery-module-core-biz/src/main/resources/mapper/province/ProvinceMapper.xml

@@ -17,13 +17,13 @@
17 17
                 cc.CAMC,
18 18
                 cc.CFLX,
19 19
                 cc.CAZT,
20
-                cc.SJCR,
20
+                TRUNC(cc.SJCR) sjcr,
21 21
                 cc.yxcf
22 22
         from  DELIVERY_CAXX cc
23 23
         join  DELIVERY_PROVINCE pe on pe.CA_ID=cc.ID
24 24
         <where>
25
-            and pe.KQ_ID=#{kqId}   and pe.deleted=0
26
-             <if test="type!=null  and type==1">
25
+            and pe.KQ_ID=#{pageReqVO.kqId}   and pe.deleted=0
26
+             <if test="pageReqVO.type!=null  and pageReqVO.type==1">
27 27
                 and pe.HY_STATE=1
28 28
             </if>
29 29
             <if test="pageReqVO.cflx!=null and pageReqVO.cflx!=''">
@@ -44,5 +44,25 @@
44 44
         </where>
45 45
         order by pe.KQ_ID desc
46 46
     </select>
47
+    <select id="getStoreListForProvinceOnly"
48
+                     resultType="com.unis.module.coding.controller.admin.delivery.vo.StoreRespVO">
49
+  select
50
+                cc.ID  ,
51
+                cc.KQMC,
52
+                cc.CAMC,
53
+                cc.CFLX,
54
+                cc.CAZT,
55
+                TRUNC(cc.SJCR)  sjcr,
56
+                cc.yxcf
57
+        from  DELIVERY_CAXX cc
58
+        join  DELIVERY_PROVINCE pe on pe.CA_ID=cc.ID
59
+        <where>
60
+            and pe.KQ_ID=#{kqId}   and pe.deleted=0
61
+             <if test="type!=null  and type==1">
62
+                and pe.HY_STATE=1
63
+            </if>
64
+        </where>
65
+        order by pe.KQ_ID desc
66
+    </select>
47 67
 
48 68
 </mapper>

+ 3 - 4
delivery-module-system/delivery-module-system-api/src/main/java/com/unis/module/system/enums/DictTypeConstants.java

@@ -27,10 +27,9 @@ public interface DictTypeConstants {
27 27
     String SYSTEM_ROLE_TYPE = "system_role_type"; // 短信接收状态
28 28
 
29 29
     String SYSTEM_AREA_DEEP = "system_area_deep"; // 地区级别:0 省 1 市 2 区县
30
-    /**
31
-     * 库存性质
32
-     */
33
-    String HY_STATE = "hy_state";
30
+
31
+    String HY_STATE = "hy_state";//核验状态
34 32
 
35 33
     String BANK_TYPE = "bank_type"; //银行类型
34
+    String CC_TYPE ="cczt";//储存状态
36 35
 }