Commit 7f47203a authored by zhengyi's avatar zhengyi

到仓数据更新bug修复

parent 374ec321
......@@ -13,14 +13,12 @@ CREATE TABLE `ecw_order_warehouse_check` (
`volume` decimal(10,2) DEFAULT NULL COMMENT '体积',
`weight` decimal(10,2) DEFAULT NULL COMMENT '重量',
`express_no` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '快递单号',
`in_time` datetime DEFAULT NULL COMMENT '入仓时间',
`check_time` datetime DEFAULT NULL COMMENT '到仓时间',
`creator` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL COMMENT '创建时间',
`updater` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
`heavy_number` decimal(10,2) DEFAULT NULL COMMENT '重货方数',
`light_number` decimal(10,2) DEFAULT NULL COMMENT '泡货方数',
`source` int DEFAULT '1' COMMENT '入仓来源 字典order_warehouse_in_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓',
`specification_type` int DEFAULT '1' COMMENT '入仓规格类型',
`remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
......@@ -29,4 +27,4 @@ CREATE TABLE `ecw_order_warehouse_check` (
KEY `order_id` (`order_id`),
KEY `warehouse_in_id` (`warehouse_in_id`),
KEY `order_item_id` (`order_item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=174745 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='到仓货物详情表'
) ENGINE=InnoDB COMMENT='到仓货物详情表'
......@@ -222,7 +222,7 @@ public class OrderWarehouseCheckServiceImpl
List<String> expressNoList = new ArrayList<>();
List<String> remarkList = new ArrayList<>();
Date firstInTime = null;
Date checkTime = null;
String unit = null;
String units = null;
Integer specificationType = null;
......@@ -235,7 +235,7 @@ public class OrderWarehouseCheckServiceImpl
isMultiSpecification = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getSpecificationType).filter(Objects::nonNull).distinct().count() > 1;
cartonsNumSum = orderWarehouseCheckDOListExist.stream().filter(t -> t.getCartonsNum() != null).mapToInt(OrderWarehouseCheckDO::getCartonsNum).sum();
quantitySum = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getQuantityAll).filter(Objects::nonNull).reduce(Integer::sum).orElse(null);
quantitySum = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getQuantityAll).filter(Objects::nonNull).reduce(Integer::sum).orElse(0);
weightSum = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
volumeSum = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getVolume).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
expressNoList = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getExpressNo).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
......@@ -243,7 +243,7 @@ public class OrderWarehouseCheckServiceImpl
unit = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getUnit).filter(Objects::nonNull).sorted().findFirst().orElse(null);
specificationType = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getSpecificationType).filter(Objects::nonNull).sorted().findFirst().orElse(null);
units = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getUnit).filter(Objects::nonNull).sorted().distinct().collect(Collectors.joining(","));
firstInTime = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getCheckTime).filter(Objects::nonNull).sorted().findFirst().orElse(null);
checkTime = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getCheckTime).filter(Objects::nonNull).sorted().findFirst().orElse(null);
boxGauge = orderWarehouseCheckDOListExist.stream().map(OrderWarehouseCheckDO::getBoxGauge).filter(Objects::nonNull).sorted().findFirst().orElse(null);
if (StringUtils.isBlank(boxGauge)) {
throw ServiceExceptionUtil.exception(ErrorCodeConstants.BOX_GAUGE_FORMAT_ERROR);
......@@ -271,7 +271,7 @@ public class OrderWarehouseCheckServiceImpl
warehouseCheckInfoVO.setExpressNo(CollectionUtil.isNotEmpty(expressNoList) ? String.join(",", expressNoList) : "");
warehouseCheckInfoVO.setRemark(CollectionUtil.isNotEmpty(remarkList) ? String.join(",", remarkList) : "");
warehouseCheckInfoVO.setMixStatus(mixStatus);
warehouseCheckInfoVO.setCheckTime(firstInTime);
warehouseCheckInfoVO.setCheckTime(checkTime);
// TODO 暂时不支持设置储位
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment