Commit 3e19f25c authored by zhengyi's avatar zhengyi

Merge branch 'master' into order-update

parents b26c164d 771f9571
...@@ -13,17 +13,17 @@ alter table `ecw_order` ...@@ -13,17 +13,17 @@ alter table `ecw_order`
CREATE TABLE `compare_air_customer_result` ( CREATE TABLE `compare_air_customer_result` (
`id` bigint NOT NULL AUTO_INCREMENT, `id` bigint NOT NULL AUTO_INCREMENT,
`number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'name', `number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'name',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'name', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'name',
`phone` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'phone', `phone` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'phone',
`old_customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'old_customerName', `old_customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'old_customerName',
`customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'customerName', `customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'customerName',
`enter_open_sea_time` datetime DEFAULT NULL COMMENT '入公海时间', `enter_open_sea_time` datetime DEFAULT NULL COMMENT '入公海时间',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'type', `type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'type',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT='客户比对表结果表'; ) ENGINE=InnoDB COMMENT='客户比对表结果表';
......
...@@ -2544,7 +2544,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2544,7 +2544,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} }
} else if (vo.getDrawee() == 2) {//收货人付款 层级5 第一个 } else if (vo.getDrawee() == 2) {//收货人付款 层级5 第一个
if (consigneeDO != null) { if (consigneeDO != null) {
vo.setCustomerId(orderConsignorBackVO.getCustomerId()); vo.setCustomerId(orderConsigneeBackVO.getCustomerId());
} else { } else {
//没有收货人 //没有收货人
vo.setCustomerId(0L); vo.setCustomerId(0L);
...@@ -2555,7 +2555,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2555,7 +2555,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} else if (vo.getDrawee() == 3) { //自定义付款 } else if (vo.getDrawee() == 3) { //自定义付款
List<CustomDraweeVO> list = JSONObject.parseArray(vo.getCustomDrawee(), CustomDraweeVO.class); List<CustomDraweeVO> list = JSONObject.parseArray(vo.getCustomDrawee(), CustomDraweeVO.class);
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
List<CustomDraweeVO> freightList = list.stream().filter(s -> s.getName().equals("freight")).collect(Collectors.toList()); List<CustomDraweeVO> freightList = list.stream().filter(s -> s.getName().equals("freight")).collect(Collectors.toList());
List<CustomDraweeVO> clearanceFeeList = list.stream().filter(s -> s.getName().equals("clearanceFee")).collect(Collectors.toList()); List<CustomDraweeVO> clearanceFeeList = list.stream().filter(s -> s.getName().equals("clearanceFee")).collect(Collectors.toList());
int freight = freightList.get(0).getValue();//运费 int freight = freightList.get(0).getValue();//运费
...@@ -2577,7 +2576,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2577,7 +2576,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} else { } else {
//业绩归收货人 //业绩归收货人
vo.setCustomerId(orderConsigneeBackVO.getCustomerId() != null ? orderConsigneeBackVO.getCustomerId() : 0); vo.setCustomerId(orderConsigneeBackVO.getCustomerId() != null ? orderConsigneeBackVO.getCustomerId() : 0);
customerType = 2; customerType = 2;
} }
} }
...@@ -4257,6 +4255,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -4257,6 +4255,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
case UNLOADED_CABINET: case UNLOADED_CABINET:
// if (Objects.isNull(currentOrderDO.getUnloadTime())) { // if (Objects.isNull(currentOrderDO.getUnloadTime())) {
currentOrderDO.setUnloadTime(now); currentOrderDO.setUnloadTime(now);
// }
break;
case UNLOADED_CABINET_AIR:
// if (Objects.isNull(currentOrderDO.getUnloadTime())) {
currentOrderDO.setUnloadTime(now);
// } // }
break; break;
case PICKED_UP: case PICKED_UP:
......
...@@ -336,8 +336,9 @@ public class MyOrderController { ...@@ -336,8 +336,9 @@ public class MyOrderController {
OrderBackInfoDto dto = orderQueryService.info(orderId); OrderBackInfoDto dto = orderQueryService.info(orderId);
dto.setUserType(UserTypeEnum.MEMBER.getValue()); dto.setUserType(UserTypeEnum.MEMBER.getValue());
if (CollectionUtil.isNotEmpty(dto.getOrderTimeVOList())) { if (CollectionUtil.isNotEmpty(dto.getOrderTimeVOList())) {
List<OrderTimeBackVO> orderTimeVOList = dto.getOrderTimeVOList().stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(OrderTimeBackVO::getStatusType))), ArrayList::new)); List<OrderTimeBackVO> orderTimeVOList = dto.getOrderTimeVOList().stream()
dto.setOrderTimeVOList(orderTimeVOList.stream().sorted(Comparator.comparing(OrderTimeBackVO::getId).reversed()).collect(Collectors.toList())); .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(OrderTimeBackVO::getStatusType))), ArrayList::new));
dto.setOrderTimeVOList(orderTimeVOList.stream().filter(t -> t.getStatus() != 15 && t.getStatus() != 150330).sorted(Comparator.comparing(OrderTimeBackVO::getId).reversed()).collect(Collectors.toList()));
} }
return success(dto); return success(dto);
} }
......
...@@ -3468,29 +3468,29 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3468,29 +3468,29 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
ProductPriceStepDO clear = new ProductPriceStepDO(); ProductPriceStepDO clear = new ProductPriceStepDO();
if (createReqVO.getPriceType() == 1) { if (createReqVO.getPriceType() == 1) {
if (CollectionUtil.isNotEmpty(respVO.getFullPriceStepList())) { if (CollectionUtil.isNotEmpty(respVO.getFullPriceStepList())) {
respVO.getFullPriceStepList().forEach(pack -> { // respVO.getFullPriceStepList().forEach(pack -> {
ProductPriceStepDO priceStepDO = new ProductPriceStepDO(); // ProductPriceStepDO priceStepDO = new ProductPriceStepDO();
BeanUtils.copyProperties(pack, priceStepDO); // BeanUtils.copyProperties(pack, priceStepDO);
priceStepDO.setId(null); // priceStepDO.setId(null);
priceStepDO.setStartNum(BigDecimal.valueOf(0)); // priceStepDO.setStartNum(BigDecimal.valueOf(0));
priceStepDO.setEndNum(BigDecimal.valueOf(0)); // priceStepDO.setEndNum(BigDecimal.valueOf(0));
priceStepDO.setWeightUnit(price.getTransportPriceUnit()); // priceStepDO.setWeightUnit(price.getTransportPriceUnit());
priceStepDO.setAllPrice(respVO.getAllPrice()); // priceStepDO.setAllPrice(respVO.getAllPrice());
priceStepDO.setAllPriceUnit(respVO.getAllPriceUnit()); // priceStepDO.setAllPriceUnit(respVO.getAllPriceUnit());
priceStepDO.setAllVolumeUnit(respVO.getAllVolumeUnit()); // priceStepDO.setAllVolumeUnit(respVO.getAllVolumeUnit());
if (CollectionUtil.isNotEmpty(respVO.getSpecialList())) { // if (CollectionUtil.isNotEmpty(respVO.getSpecialList())) {
List<ProductPriceStepSpecialDO> specialList = new ArrayList<>(); // List<ProductPriceStepSpecialDO> specialList = new ArrayList<>();
respVO.getSpecialList().forEach(sp -> { // respVO.getSpecialList().forEach(sp -> {
ProductPriceStepSpecialDO specialDO = new ProductPriceStepSpecialDO(); // ProductPriceStepSpecialDO specialDO = new ProductPriceStepSpecialDO();
BeanUtils.copyProperties(sp, specialDO); // BeanUtils.copyProperties(sp, specialDO);
specialDO.setId(null); // specialDO.setId(null);
specialList.add(specialDO); // specialList.add(specialDO);
}); // });
priceStepDO.setSpecialList(specialList); // priceStepDO.setSpecialList(specialList);
} // }
fullPriceStepList.add(priceStepDO); // fullPriceStepList.add(priceStepDO);
}); // });
createReqVO.setFullPriceStepList(fullPriceStepList); createReqVO.setFullPriceStepList(respVO.getFullPriceStepList());
} }
} else { } else {
// if (CollectionUtil.isEmpty(respVO.getFreightPriceStepList())) { // if (CollectionUtil.isEmpty(respVO.getFreightPriceStepList())) {
......
...@@ -69,9 +69,8 @@ public class AchievementDetailExcelListener { ...@@ -69,9 +69,8 @@ public class AchievementDetailExcelListener {
event.setUrl(fileDO.getUrl()); event.setUrl(fileDO.getUrl());
event.setFileId(fileDO.getId()); event.setFileId(fileDO.getId());
} catch (Exception e) { } catch (Exception e) {
log.info("业绩明细导出失败",e); log.error("业绩明细导出失败",e);
e.printStackTrace(); event.setResult(e + "");
event.setResult(e.getMessage());
} }
} }
} }
...@@ -1914,7 +1914,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -1914,7 +1914,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
orderService.updateStatus(orderId, null, orderStatus, null, inWarehouseState, shipmentState, auditType, auditResult, businessTime, "出货操作", null); orderService.updateStatus(orderId, null, orderStatus, null, inWarehouseState, shipmentState, auditType, auditResult, businessTime, "出货操作", null);
} }
// 卸柜/到仓操作时,不在此处更新动态 // 卸柜/到仓操作时,不在此处更新动态
if (TO_WAREHOUSED.getStatus() != shipmentState) { if (Objects.nonNull(shipmentState) && TO_WAREHOUSED.getStatus() != shipmentState) {
this.shipmentAirOrderTimeLog(orderIdList, null, businessTime, shipmentState); this.shipmentAirOrderTimeLog(orderIdList, null, businessTime, shipmentState);
} }
...@@ -1966,6 +1966,10 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -1966,6 +1966,10 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
orderSeaTimeEnum = OrderSeaTimeEnum.SEA_CLEARED; orderSeaTimeEnum = OrderSeaTimeEnum.SEA_CLEARED;
break; break;
case UNLOADED: case UNLOADED:
if (Objects.isNull(businessTime)){
// 到仓业务时间为空时,不更新订单到仓动态
return;
}
orderSeaTimeEnum = OrderSeaTimeEnum.SEA_UNLOADED_CABINET; orderSeaTimeEnum = OrderSeaTimeEnum.SEA_UNLOADED_CABINET;
break; break;
} }
...@@ -2002,6 +2006,10 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -2002,6 +2006,10 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
orderAirTimeEnum = OrderAirTimeEnum.AIR_ARRIVED; orderAirTimeEnum = OrderAirTimeEnum.AIR_ARRIVED;
break; break;
case TO_WAREHOUSED: case TO_WAREHOUSED:
if (Objects.isNull(businessTime)){
// 到仓业务时间为空时,不在做订单到仓动态更新
return;
}
orderAirTimeEnum = OrderAirTimeEnum.AIR_UNLOADED_CABINET; orderAirTimeEnum = OrderAirTimeEnum.AIR_UNLOADED_CABINET;
break; break;
} }
......
...@@ -137,14 +137,14 @@ public class BoxCabinetUnloadServiceImpl extends AbstractService<BoxCabinetUnloa ...@@ -137,14 +137,14 @@ public class BoxCabinetUnloadServiceImpl extends AbstractService<BoxCabinetUnloa
//修改订单状态为已到仓 //修改订单状态为已到仓
boxService.updateOrderStatusByShipmentIdAndTransportType(shipmentId, OrderStatusEnum.UNLOADED_CABINET.getValue(), boxService.updateOrderStatusByShipmentIdAndTransportType(shipmentId, OrderStatusEnum.UNLOADED_CABINET.getValue(),
OrderStatusMsgEnum.UNLOADED_CABINET.getInWarehouseState(), OrderStatusMsgEnum.UNLOADED_CABINET.getInWarehouseState(),
BoxAirStatusEnum.TO_WAREHOUSED.getStatus(), null, null, ulBoxTime, null, Integer.parseInt(boxDO.getTransportType())); BoxAirStatusEnum.TO_WAREHOUSED.getStatus(), null, null, null, null, Integer.parseInt(boxDO.getTransportType()));
boxService.addOrderLogByShipmentId(shipmentId, OrderShipmentLog.CABINET_WAREHOUSE, ""); boxService.addOrderLogByShipmentId(shipmentId, OrderShipmentLog.CABINET_WAREHOUSE, "");
} else { } else {
//修改订单状态为已卸柜 //修改订单状态为已卸柜
boxService.updateOrderStatusByShipmentIdAndTransportType(shipmentId, OrderStatusEnum.UNLOADED_CABINET.getValue(), boxService.updateOrderStatusByShipmentIdAndTransportType(shipmentId, OrderStatusEnum.UNLOADED_CABINET.getValue(),
OrderStatusMsgEnum.UNLOADED_CABINET.getInWarehouseState(), OrderStatusMsgEnum.UNLOADED_CABINET.getInWarehouseState(),
BoxStatusEnum.UNLOADED.getStatus(), null, null, ulBoxTime, null, Integer.parseInt(boxDO.getTransportType())); BoxStatusEnum.UNLOADED.getStatus(), null, null, null, null, Integer.parseInt(boxDO.getTransportType()));
boxService.addOrderLogByShipmentId(shipmentId, OrderShipmentLog.CABINET_UNLOAD, ""); boxService.addOrderLogByShipmentId(shipmentId, OrderShipmentLog.CABINET_UNLOAD, "");
} }
......
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