Commit 86b3a649 authored by Administrator's avatar Administrator

Merge branch 'release' into 'jd_dev'

Release代码合并到jd20241210

See merge request !40
parents b9d47497 7cceaf7c
-- 管理端复制订单权限按钮
INSERT INTO `system_menu`( `name`, `permission`, `menu_type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `is_show_in_menu_bar`, `name_en`, `keepalive`, `redirect`, `badge_field`) VALUES ('复制订单', 'ecw:order:copy', 3, 0, 1852, '', '', '', 0, '119', '2024-10-23 23:10:39', '119', '2024-10-23 23:10:39', b'0', b'1', 'Order Copy', b'0', NULL, NULL);
......@@ -214,7 +214,6 @@ public class CustomerMergeServiceImpl implements CustomerMergeService {
private void doMergeTargetLog(CustomerDO customerDOSaved, CustomerDO customerDODeleted) {
targetLogService.update(new LambdaUpdateWrapper<TargetLogDO>()
.set(TargetLogDO::getCustomerId, customerDOSaved.getId())
.set(TargetLogDO::getCustomerType, customerDOSaved.getType())
.eq(TargetLogDO::getCustomerId, customerDODeleted.getId()));
}
......
......@@ -153,6 +153,8 @@ public interface WarehouseService {
*/
List<WarehouseDO> findByCountryIdList(List<Long> countryIdList);
List<WarehouseDO> findByCountryIdListAndCityIdList(List<Long> countryIdList, List<Long> cityIdList);
List<WarehouseDO> getByIdList(List<Long> idList);
List<WarehouseDO> getAvailableWarehouseAdjustmentList(Long id);
......
......@@ -444,6 +444,14 @@ public class WarehouseServiceImpl implements WarehouseService {
);
}
@Override
public List<WarehouseDO> findByCountryIdListAndCityIdList(List<Long> countryIdList, List<Long> cityIdList) {
return warehouseMapper.selectList(new LambdaQueryWrapperX<WarehouseDO>()
.in(CollectionUtil.isNotEmpty(countryIdList), WarehouseDO::getGuojia, countryIdList)
.in(CollectionUtil.isNotEmpty(cityIdList), WarehouseDO::getShi, cityIdList)
);
}
@Override
public List<WarehouseDO> getAvailableWarehouseAdjustmentList(Long id) {
WarehouseDO currentWarehouseDO = warehouseMapper.selectById(id);
......
......@@ -6706,7 +6706,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderItemDO.setVolume(io.getVolume());
orderItemDO.setWeight(io.getWeight());
orderItemDO.setQuantity(io.getQuantity());
orderItemDO.setNum(io.getQuantity());
orderItemDO.setNum(io.getNum());
orderItemDO.setWorth(io.getWorth());
orderItemDO.setBoxGauge(io.getBoxGauge());
orderItemDO.setBrand(io.getBrand());
......
......@@ -118,7 +118,8 @@ public interface BoxPreloadGoodsMapper extends AbstractMapper<BoxPreloadGoodsDO>
"ewl.dest_warehouse_id, ",
"IFNULL((select a.pkg_id from ecw_box_pkg_order a where a.deleted=0 and a.order_item_id=ebpg.order_item_id limit 1),0) as pkgId, ",
"(select t1.pkg_num from ecw_box_pkg_order t INNER JOIN ecw_box_merge_pkg t1 on t.pkg_id=t1.id where t.deleted=0 and t1.deleted=0 and t.order_id=ebpg.order_id limit 1) as pkgNum, ",
"(select count(0) from ecw_order_guanlian t LEFT JOIN ecw_order t1 on t.order_id=t1.order_id LEFT JOIN ecw_order t2 on t.relate_order_id=t2.order_id where (t.order_id=3398 or t.relate_order_id = 3398) and t1.deleted=0 and t2.deleted=0 and t.deleted=0 ) as guanLianOrderCount ",
"(select count(0) from ecw_order_guanlian t LEFT JOIN ecw_order t1 on t.order_id=t1.order_id LEFT JOIN ecw_order t2 on t.relate_order_id=t2.order_id where (t.order_id = eo.order_id or t.relate_order_id = eo.order_id) and t1.deleted=0 and t2.deleted=0 and t.deleted=0 ) as guanLianOrderCount, ",
"(select count(0) from ecw_order_warehouse_in owi where owi.order_item_id = eoi.order_item_id and owi.deleted = 0 and JSON_LENGTH(owi.order_warehouse_in_details) > 0) as mixCount",
"FROM ecw_box_preload_goods ebpg ",
"INNER JOIN ecw_box_preload_section ebps ON ebpg.sec_id = ebps.id ",
"INNER JOIN ecw_order eo ON eo.order_id = ebpg.order_id ",
......
......@@ -1580,11 +1580,19 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
warehouseIdList = warehouseList.stream().map(WarehouseDO::getId).collect(Collectors.toList());
query.setWarehouseIdList(warehouseIdList);
}
if (CollectionUtil.isNotEmpty(query.getCountryIdList())) {
if (CollectionUtil.isNotEmpty(query.getCountryIdList()) || CollectionUtil.isNotEmpty(query.getDestCityIdList())) {
List<WarehouseDO> warehouseList =
warehouseService.findByCountryIdList(query.getCountryIdList());
warehouseIdList = warehouseList.stream().map(WarehouseDO::getId).collect(Collectors.toList());
query.setWarehouseIdList(warehouseIdList);
warehouseService.findByCountryIdListAndCityIdList(query.getCountryIdList(), query.getDestCityIdList());
if (CollectionUtil.isNotEmpty(warehouseList)){
warehouseIdList = warehouseList.stream().map(WarehouseDO::getId).collect(Collectors.toList());
Set<Long> destWarehouseIdSet = new HashSet<>();
if (CollectionUtil.isNotEmpty(query.getDestWarehouseIdList())) {
destWarehouseIdSet.addAll(query.getDestWarehouseIdList());
}
destWarehouseIdSet.addAll(warehouseIdList);
query.setDestWarehouseIdList(new ArrayList<>(destWarehouseIdSet));
}
}
//上面都是处理查询条件相关逻辑
return boxInfoQuery1(boxMapper.selectPage2(page, query), false);
......
......@@ -1843,6 +1843,24 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
orderVO.setTidanNum(boxPreloadGoodsDO.getTidanNum());
orderVO.setPreloadId(boxPreloadGoodsDO.getId());
// 设置混箱状态
Integer mixStatus = goodsList.stream().anyMatch(t -> t.getMixStatus() == 1) ? 1 : 0;
orderVO.setMixStatus(mixStatus);
// 设置包装类型
String units = goodsList.stream()
.map(boxPreloadGoodsBackVO -> boxPreloadGoodsBackVO.getUnits())
.filter(StringUtils::isNotEmpty)
.flatMap(t -> Arrays.stream(t.split(",")))
.distinct()
.collect(Collectors.joining(","));
orderVO.setUnits(units);
orderVO.setUnits(boxPreloadGoodsDO.getUnits());
// 是否有关联单
boolean hasRelationOrder = goodsList.stream().anyMatch(t -> t.getGuanLianOrderCount() > 0);
orderVO.setHasRelationOrder(hasRelationOrder);
List<OrderItemDO> orderStaticsList = new ArrayList<>();
for (BoxPreloadGoodsBackVO item : goodsList) {
OrderItemDO orderItemDO = new OrderItemDO();
......
......@@ -210,6 +210,16 @@ public class BoxLoadOrderVO {
private Long shipmentId ;
@ApiModelProperty(value = "混箱状态, 1-混箱")
private Integer mixStatus = 0;
@ApiModelProperty(value = "包装类型(入仓汇总的,逗号分隔)")
private String units;
@ApiModelProperty(value = "是否有关联单")
private Boolean hasRelationOrder = false;
public void setGuanLianOrderStatus(String guanLianOrderStatus) {
this.guanLianOrderStatus = guanLianOrderStatus;
if (StringUtils.isNotBlank(guanLianOrderStatus)) {
......
......@@ -463,16 +463,13 @@ public class BoxPreloadGoodsBackVO {
}
}
@ApiModelProperty(value = "混箱的入仓纪录数")
private Integer mixCount = 0;
@ApiModelProperty(value = "混箱状态, 1-混箱")
private Integer mixStatus = 0;
public Integer getMixStatus() {
WarehouseInInfoVO warehouseInInfoVO = getWarehouseInInfoVO();
if(warehouseInInfoVO != null) {
//入仓纪录明细不为空则是混箱
mixStatus = warehouseInInfoVO.getMixStatus();
}
return mixStatus;
// 当混箱的入仓纪录数大于0时,就认为是混箱
return mixCount > 0 ? 1 : 0;
}
/**
......
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