From 47de60d2504839389e01ca5e133786f46fdcb576 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Tue, 29 Aug 2023 13:32:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/basic/controller/BasicMaterialController.java | 4 +++- .../java/com/logpm/basic/excel/BasicMaterialExcel.java | 8 ++++---- .../basic/service/impl/BasicMaterialServiceImpl.java | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java index 78b8dd9e8..eccad3e38 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java @@ -85,7 +85,9 @@ public class BasicMaterialController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入basicMaterial") public R> list(@ApiIgnore @RequestParam Map basicMaterial, Query query) { - IPage pages = basicMaterialService.page(Condition.getPage(query), Condition.getQueryWrapper(basicMaterial, BasicMaterialEntity.class)); + QueryWrapper queryWrapper = Condition.getQueryWrapper(basicMaterial, BasicMaterialEntity.class); + queryWrapper.orderByDesc("create_time"); + IPage pages = basicMaterialService.page(Condition.getPage(query), queryWrapper); return R.data(pages); } diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java index df2c1df2f..61e6c644e 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java @@ -136,25 +136,25 @@ public class BasicMaterialExcel implements Serializable { */ @ColumnWidth(20) @ExcelProperty("长") - private BigDecimal extent; + private String extent; /** * 宽 */ @ColumnWidth(20) @ExcelProperty("宽") - private BigDecimal breadth; + private String breadth; /** * 高度 */ @ColumnWidth(20) @ExcelProperty("高度") - private BigDecimal altitude; + private String altitude; /** * 体积 */ @ColumnWidth(20) @ExcelProperty("体积") - private BigDecimal volume; + private String volume; /** * 总量 */ diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java index 1e8f08db3..013a06882 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java @@ -94,6 +94,7 @@ public class BasicMaterialServiceImpl extends BaseServiceImpl basicMaterialEntities = baseMapper.selectList(new QueryWrapper().lambda().eq(BasicMaterialEntity::getProductCode,datum.getProductCode())); if (basicMaterialEntities.size()>0){continue;} BasicMaterialEntity copy = BeanUtil.copy(datum, BasicMaterialEntity.class); + copy.setHide(1); arrayList.add(copy); } // 根据对象的value属性进行去重