Browse Source

1.库内bug修复

2.干线bug修复
master
zhenghaoyu 7 months ago
parent
commit
b21905cbb6
  1. 16
      blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/PackageAllocationInfoVO.java
  2. 19
      blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/PackageTrayInfoVO.java
  3. 15
      blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/StockAllocationInfoVO.java
  4. 14
      blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/StockTrayInfoVO.java
  5. 14
      blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/ZeroAllocationInfoVO.java
  6. 14
      blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/ZeroTrayInfoVO.java
  7. 276
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java
  8. 15
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java
  9. 62
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml
  10. 7
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISendFanoutService.java
  11. 14
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java
  12. 24
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SendFanoutServiceImpl.java
  13. 32
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java
  14. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  15. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/OpenOrderToLoadListener.java
  16. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  17. 24
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java
  18. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  19. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

16
blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/PackageAllocationInfoVO.java

@ -0,0 +1,16 @@
package com.logpm.patch.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class PackageAllocationInfoVO implements Serializable {
private String orderPackageCode;
private String orderPackageStatus;
private String allocationName;
private Integer conditions;
private Long warehouseId;
}

19
blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/PackageTrayInfoVO.java

@ -0,0 +1,19 @@
package com.logpm.patch.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class PackageTrayInfoVO implements Serializable {
private Long packageId;
private String orderPackageCode;
private Long orderId;
private String orderCode;
private String orderPackageStatus;
private String trayName;
private Integer conditions;
private Long warehouseId;
}

15
blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/StockAllocationInfoVO.java

@ -0,0 +1,15 @@
package com.logpm.patch.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class StockAllocationInfoVO implements Serializable {
private Long stockListId;
private Long warehouseId;
private String allocationName;
}

14
blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/StockTrayInfoVO.java

@ -0,0 +1,14 @@
package com.logpm.patch.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class StockTrayInfoVO implements Serializable {
private Long stockListId;
private Long warehouseId;
private String trayName;
}

14
blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/ZeroAllocationInfoVO.java

@ -0,0 +1,14 @@
package com.logpm.patch.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroAllocationInfoVO implements Serializable {
private String orderCode;
private Long warehouseId;
private String allocationName;
}

14
blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/vo/ZeroTrayInfoVO.java

@ -0,0 +1,14 @@
package com.logpm.patch.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroTrayInfoVO implements Serializable {
private String orderCode;
private Long warehouseId;
private String trayName;
}

276
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java

@ -5,16 +5,21 @@ import com.logpm.basicdata.entity.*;
import com.logpm.basicdata.feign.*;
import com.logpm.oldproject.entity.*;
import com.logpm.oldproject.feign.*;
import com.logpm.patch.service.ISendFanoutService;
import com.logpm.patch.service.IWarehouseMappingDataService;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.patch.vo.*;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.model.FanoutMsg;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@AllArgsConstructor
@ -28,7 +33,8 @@ public class SyncWarehouseData {
private final IBasicdataGoodsAllocationClient basicdataGoodsAllocationClient;//货位
private final IBasicdataTrayClient basicdataTrayClient;//托盘
private final IWarehouseWaybillClient warehouseWaybillClient;
private final ISendFanoutService sendFanoutMsg;
private final IWarehouseUpdownTypeClient warehouseUpdownTypeClient;
//-----------------老系统
private final IWarehouseClient warehouseClient;//仓库
@ -377,4 +383,270 @@ public class SyncWarehouseData {
return true;
}
@XxlJob("syncAllTrayAndAllocation")
public ReturnT<String> syncAllTrayAndAllocation(String param) {
log.info("############syncAllTrayAndAllocation: 处理所有包件零担库存品的托盘库位信息 开始 param={}", param);
//需要下架解托的包件Map
Map<Long,List<String>> delTrayAndAllocationPackageMap = new HashMap<>();
//托盘信息
//包件
List<PackageTrayInfoVO> packageTrayList = warehouseMappingDataService.findPackageTraysInfo();
//把packageTrayList中所有元素根据orderPackageStatus进行分组
Map<String, List<PackageTrayInfoVO>> packageTrayMap = packageTrayList.stream().collect(Collectors.groupingBy(PackageTrayInfoVO::getOrderPackageStatus));
packageTrayMap.keySet().forEach(orderPackageStatus -> {
List<PackageTrayInfoVO> packageTrayInfoVOS = packageTrayMap.get(orderPackageStatus);
if(!packageTrayInfoVOS.isEmpty()){
if("60".equals(orderPackageStatus) || "70".equals(orderPackageStatus)){
//把packageTrayInfoVOS通过warehouseId进行分组,来分仓处理下架解托的包件
Map<Long, List<PackageTrayInfoVO>> packageTrayInfoVOSMap = packageTrayInfoVOS.stream().collect(Collectors.groupingBy(PackageTrayInfoVO::getWarehouseId));
packageTrayInfoVOSMap.keySet().forEach(warehouseId -> {
List<PackageTrayInfoVO> packageTrayInfoVOS1 = packageTrayInfoVOSMap.get(warehouseId);
if(!packageTrayInfoVOS1.isEmpty()){
//把packageTrayInfoVOS1中的orderPackageCode放入一个List
List<String> orderPackageCodeList = packageTrayInfoVOS1.stream().map(PackageTrayInfoVO::getOrderPackageCode).collect(Collectors.toList());
List<String> list = delTrayAndAllocationPackageMap.get(warehouseId);
if(list.isEmpty()){
delTrayAndAllocationPackageMap.put(warehouseId,orderPackageCodeList);
}else{
list.addAll(orderPackageCodeList);
delTrayAndAllocationPackageMap.put(warehouseId,list);
}
}
});
}else{
//如果不是签收或者出库的包件
//把packageTrayInfoVOS通过conditions进行分组
Map<Integer, List<PackageTrayInfoVO>> packageTrayInfoVOSMap = packageTrayInfoVOS.stream().collect(Collectors.groupingBy(PackageTrayInfoVO::getConditions));
packageTrayInfoVOSMap.keySet().forEach(conditions -> {
List<PackageTrayInfoVO> packageTrayInfoVOS1 = packageTrayInfoVOSMap.get(conditions);
if(!packageTrayInfoVOS1.isEmpty()){
//把packageTrayInfoVOS1中所有元素的warehouseId进行分组
Map<Long, List<PackageTrayInfoVO>> packageTrayInfoVOSMap1 = packageTrayInfoVOS1.stream().collect(Collectors.groupingBy(PackageTrayInfoVO::getWarehouseId));
packageTrayInfoVOSMap1.keySet().forEach(warehouseId -> {
List<PackageTrayInfoVO> packageTrayInfoVOS2 = packageTrayInfoVOSMap1.get(warehouseId);
if(!packageTrayInfoVOS2.isEmpty()){
//把packageTrayInfoVOS2中所有元素根据trayName进行分组
Map<String, List<PackageTrayInfoVO>> packageTrayInfoVOSMap2 = packageTrayInfoVOS2.stream().collect(Collectors.groupingBy(PackageTrayInfoVO::getTrayName));
packageTrayInfoVOSMap2.keySet().forEach(trayName -> {
List<PackageTrayInfoVO> packageTrayInfoVOS3 = packageTrayInfoVOSMap2.get(trayName);
if(!packageTrayInfoVOS3.isEmpty()){
//订制品
JSONObject jsonObject = new JSONObject();
jsonObject.set("dataType",1);
jsonObject.set("operation",1);
jsonObject.set("conditions",conditions);
List<String> orderPackageCodes = packageTrayInfoVOS3.stream().map(PackageTrayInfoVO::getOrderPackageCode).collect(Collectors.toList());
jsonObject.set("orderPackageCodes",orderPackageCodes);
jsonObject.set("warehouseId",warehouseId);
jsonObject.set("trayName",trayName);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.warehouse.TRAYTYPE.EXCHANGE).msg(jsonObject.toString()).build();
sendFanoutMsg.sendFanoutMsg(fanoutMsg);
}
});
}
});
}
});
}
}
});
//零担
List<ZeroTrayInfoVO> zeroTrayList = warehouseMappingDataService.findZeroTraysInfo();
//把zeroTrayList通过warehouseId进行分组
Map<Long, List<ZeroTrayInfoVO>> zeroTrayMap = zeroTrayList.stream().collect(Collectors.groupingBy(ZeroTrayInfoVO::getWarehouseId));
zeroTrayMap.keySet().forEach(warehouseId -> {
List<ZeroTrayInfoVO> zeroTrayInfoVOS = zeroTrayMap.get(warehouseId);
if(!zeroTrayInfoVOS.isEmpty()){
//把zeroTrayInfoVOS通过trayName进行分组
Map<String, List<ZeroTrayInfoVO>> zeroTrayInfoVOSMap = zeroTrayInfoVOS.stream().collect(Collectors.groupingBy(ZeroTrayInfoVO::getTrayName));
zeroTrayInfoVOSMap.keySet().forEach(trayName -> {
List<ZeroTrayInfoVO> zeroTrayInfoVOS1 = zeroTrayInfoVOSMap.get(trayName);
if(!zeroTrayInfoVOS1.isEmpty()){
//把zeroTrayInfoVOS1中所有元素的orderCode放入一个List
List<String> orderCodes = zeroTrayInfoVOS1.stream().map(ZeroTrayInfoVO::getOrderCode).collect(Collectors.toList());
//订制品
JSONObject jsonObject = new JSONObject();
jsonObject.set("dataType",2);
jsonObject.set("operation",1);
jsonObject.set("orderCodes",orderCodes);
jsonObject.set("warehouseId",warehouseId);
jsonObject.set("trayName",trayName);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.warehouse.TRAYTYPE.EXCHANGE).msg(jsonObject.toString()).build();
sendFanoutMsg.sendFanoutMsg(fanoutMsg);
}
});
}
});
//无数据库存品
List<StockTrayInfoVO> stockTrayList = warehouseMappingDataService.findStockTraysInfo();
//把stockTrayList通过warehouseId分组
Map<Long, List<StockTrayInfoVO>> stockTrayMap = stockTrayList.stream().collect(Collectors.groupingBy(StockTrayInfoVO::getWarehouseId));
stockTrayMap.keySet().forEach(warehouseId -> {
List<StockTrayInfoVO> stockTrayInfoVOS = stockTrayMap.get(warehouseId);
if(!stockTrayInfoVOS.isEmpty()){
//把stockTrayInfoVOS通过trayName进行分组
Map<String, List<StockTrayInfoVO>> stockTrayInfoVOSMap = stockTrayInfoVOS.stream().collect(Collectors.groupingBy(StockTrayInfoVO::getTrayName));
stockTrayInfoVOSMap.keySet().forEach(trayName -> {
List<StockTrayInfoVO> stockTrayInfoVOS1 =stockTrayInfoVOSMap.get(trayName);
if(!stockTrayInfoVOS1.isEmpty()){
//把stockTrayInfoVOS1中所有元素的stockListId放入一个List
JSONObject jsonObject = new JSONObject();
jsonObject.set("dataType",3);
jsonObject.set("operation",1);
List<Long> stockListIds = stockTrayInfoVOS1.stream().map(StockTrayInfoVO::getStockListId).collect(Collectors.toList());
jsonObject.set("stockListIds",stockListIds);
jsonObject.set("warehouseId",warehouseId);
jsonObject.set("trayName",trayName);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.warehouse.TRAYTYPE.EXCHANGE).msg(jsonObject.toString()).build();
sendFanoutMsg.sendFanoutMsg(fanoutMsg);
}
});
}
});
//库位
//包件
List<PackageAllocationInfoVO> packageAllocationData = warehouseMappingDataService.findPackageAllocationData();
//把packageTrayList中所有元素根据orderPackageStatus进行分组
Map<String, List<PackageAllocationInfoVO>> packageAllocationMap = packageAllocationData.stream().collect(Collectors.groupingBy(PackageAllocationInfoVO::getOrderPackageStatus));
packageAllocationMap.keySet().forEach(orderPackageStatus -> {
List<PackageAllocationInfoVO> packageAllocationInfoVOS = packageAllocationMap.get(orderPackageStatus);
if(!packageAllocationInfoVOS.isEmpty()){
if("60".equals(orderPackageStatus) || "70".equals(orderPackageStatus)){
//把packageTrayInfoVOS通过warehouseId进行分组,来分仓处理下架解托的包件
Map<Long, List<PackageAllocationInfoVO>> packageAllocationInfoVOSMap = packageAllocationInfoVOS.stream().collect(Collectors.groupingBy(PackageAllocationInfoVO::getWarehouseId));
packageAllocationInfoVOSMap.keySet().forEach(warehouseId -> {
List<PackageAllocationInfoVO> packageAllocationInfoVOS1 = packageAllocationInfoVOSMap.get(warehouseId);
if(!packageAllocationInfoVOS1.isEmpty()){
//把packageTrayInfoVOS1中的orderPackageCode放入一个List
List<String> orderPackageCodeList = packageAllocationInfoVOS1.stream().map(PackageAllocationInfoVO::getOrderPackageCode).collect(Collectors.toList());
List<String> list = delTrayAndAllocationPackageMap.get(warehouseId);
if(list.isEmpty()){
delTrayAndAllocationPackageMap.put(warehouseId,orderPackageCodeList);
}else{
list.addAll(orderPackageCodeList);
delTrayAndAllocationPackageMap.put(warehouseId,list);
}
}
});
}else{
//如果不是签收或者出库的包件
//把packageTrayInfoVOS通过conditions进行分组
Map<Integer, List<PackageAllocationInfoVO>> packageAllocationInfoVOSMap = packageAllocationInfoVOS.stream().collect(Collectors.groupingBy(PackageAllocationInfoVO::getConditions));
packageAllocationInfoVOSMap.keySet().forEach(conditions -> {
List<PackageAllocationInfoVO> packageAllocationInfoVOS1 = packageAllocationInfoVOSMap.get(conditions);
if(!packageAllocationInfoVOS1.isEmpty()){
//把packageTrayInfoVOS1中所有元素的warehouseId进行分组
Map<Long, List<PackageAllocationInfoVO>> packageAllocationInfoVOSMap1 = packageAllocationInfoVOS1.stream().collect(Collectors.groupingBy(PackageAllocationInfoVO::getWarehouseId));
packageAllocationInfoVOSMap1.keySet().forEach(warehouseId -> {
List<PackageAllocationInfoVO> packageAllocationInfoVOS2 = packageAllocationInfoVOSMap1.get(warehouseId);
if(!packageAllocationInfoVOS2.isEmpty()){
//把packageTrayInfoVOS2中所有元素根据trayName进行分组
Map<String, List<PackageAllocationInfoVO>> packageAllocationInfoVOSMap2 = packageAllocationInfoVOS2.stream().collect(Collectors.groupingBy(PackageAllocationInfoVO::getAllocationName));
packageAllocationInfoVOSMap2.keySet().forEach(allocationName -> {
List<PackageAllocationInfoVO> packageAllocationInfoVOS3 = packageAllocationInfoVOSMap2.get(allocationName);
if(!packageAllocationInfoVOS3.isEmpty()){
//订制品
JSONObject jsonObject = new JSONObject();
jsonObject.set("dataType",1);
jsonObject.set("operation",3);
jsonObject.set("conditions",conditions);
List<String> orderPackageCodes = packageAllocationInfoVOS3.stream().map(PackageAllocationInfoVO::getOrderPackageCode).collect(Collectors.toList());
jsonObject.set("orderPackageCodes",orderPackageCodes);
jsonObject.set("warehouseId",warehouseId);
jsonObject.set("allocationName",allocationName);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.warehouse.ALLOCATION.EXCHANGE).msg(jsonObject.toString()).build();
sendFanoutMsg.sendFanoutMsg(fanoutMsg);
}
});
}
});
}
});
}
}
});
//零担
List<ZeroAllocationInfoVO> zeroAllocationList = warehouseMappingDataService.findZeroAllocationInfo();
//把zeroTrayList通过warehouseId进行分组
Map<Long, List<ZeroAllocationInfoVO>> zeroAllocationMap = zeroAllocationList.stream().collect(Collectors.groupingBy(ZeroAllocationInfoVO::getWarehouseId));
zeroAllocationMap.keySet().forEach(warehouseId -> {
List<ZeroAllocationInfoVO> zeroAllocationInfoVOS = zeroAllocationMap.get(warehouseId);
if(!zeroAllocationInfoVOS.isEmpty()){
//把zeroTrayInfoVOS通过trayName进行分组
Map<String, List<ZeroAllocationInfoVO>> zeroAllocationInfoVOSMap = zeroAllocationInfoVOS.stream().collect(Collectors.groupingBy(ZeroAllocationInfoVO::getAllocationName));
zeroAllocationInfoVOSMap.keySet().forEach(allocationName -> {
List<ZeroAllocationInfoVO> zeroAllocationInfoVOS1 = zeroAllocationInfoVOSMap.get(allocationName);
if(!zeroAllocationInfoVOS1.isEmpty()){
//把zeroTrayInfoVOS1中所有元素的orderCode放入一个List
List<String> orderCodes = zeroAllocationInfoVOS1.stream().map(ZeroAllocationInfoVO::getOrderCode).collect(Collectors.toList());
//订制品
JSONObject jsonObject = new JSONObject();
jsonObject.set("dataType",2);
jsonObject.set("operation",3);
jsonObject.set("orderCodes",orderCodes);
jsonObject.set("warehouseId",warehouseId);
jsonObject.set("allocationName",allocationName);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.warehouse.ALLOCATION.EXCHANGE).msg(jsonObject.toString()).build();
sendFanoutMsg.sendFanoutMsg(fanoutMsg);
}
});
}
});
//无数据库存品
List<StockAllocationInfoVO> stockAllocationList = warehouseMappingDataService.findStockAllocationInfo();
//把stockTrayList通过warehouseId分组
Map<Long, List<StockAllocationInfoVO>> stockAllocationMap = stockAllocationList.stream().collect(Collectors.groupingBy(StockAllocationInfoVO::getWarehouseId));
stockAllocationMap.keySet().forEach(warehouseId -> {
List<StockAllocationInfoVO> stockAllocationInfoVOS = stockAllocationMap.get(warehouseId);
if(!stockAllocationInfoVOS.isEmpty()){
//把stockTrayInfoVOS通过trayName进行分组
Map<String, List<StockAllocationInfoVO>> stockAllocationInfoVOSMap = stockAllocationInfoVOS.stream().collect(Collectors.groupingBy(StockAllocationInfoVO::getAllocationName));
stockAllocationInfoVOSMap.keySet().forEach(allocationName -> {
List<StockAllocationInfoVO> stockAllocationInfoVOS1 =stockAllocationInfoVOSMap.get(allocationName);
if(!stockAllocationInfoVOS1.isEmpty()){
//把stockTrayInfoVOS1中所有元素的stockListId放入一个List
JSONObject jsonObject = new JSONObject();
jsonObject.set("dataType",3);
jsonObject.set("operation",3);
List<Long> stockListIds = stockAllocationInfoVOS1.stream().map(StockAllocationInfoVO::getStockListId).collect(Collectors.toList());
jsonObject.set("stockListIds",stockListIds);
jsonObject.set("warehouseId",warehouseId);
jsonObject.set("allocationName",allocationName);
FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.warehouse.ALLOCATION.EXCHANGE).msg(jsonObject.toString()).build();
sendFanoutMsg.sendFanoutMsg(fanoutMsg);
}
});
}
});
delTrayAndAllocationPackageMap.keySet().forEach(warehouseId -> {
List<String> list = delTrayAndAllocationPackageMap.get(warehouseId);
if(!list.isEmpty()){
Set<String> orderPackageCodes = new HashSet<>(list);
warehouseUpdownTypeClient.downPackageOrDelTray(StringUtil.join(orderPackageCodes,","),warehouseId,"系统因为签收或者出库下架解托");
}
});
log.info("############syncAllTrayAndAllocation: 处理所有包件零担库存品的托盘库位信息 结束");
return ReturnT.SUCCESS;
}
}

15
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java

@ -2,7 +2,7 @@ package com.logpm.patch.mapper;
import cn.hutool.json.JSONObject;
import com.logpm.patch.entity.WarehouseMappingDataEntity;
import com.logpm.patch.vo.SyncZeroOrderVO;
import com.logpm.patch.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -109,5 +109,18 @@ public interface WarehouseMappingDataMapper {
Integer findTrayTypeNum(@Param("trayCode") String trayCode);
void updateTrayTypeNum(@Param("num") Integer num, @Param("aLong") Long aLong);
List<PackageTrayInfoVO> findPackageTraysInfo();
List<ZeroTrayInfoVO> findZeroTraysInfo();
List<StockTrayInfoVO> findStockTraysInfo();
List<PackageAllocationInfoVO> findPackageAllocationData();
List<ZeroAllocationInfoVO> findZeroAllocationInfo();
List<StockAllocationInfoVO> findStockAllocationInfo();
}

62
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml

@ -349,4 +349,66 @@
where id = #{aLong}
</update>
<select id="findPackageTraysInfo" resultType="com.logpm.patch.vo.PackageTrayInfoVO">
select lwtg.association_value orderPackageCode,
ldpl.warehouse_id warehouseId,
ldpl.conditions conditions,
lwt.pallet_name trayName,
ldpl.order_package_status orderPackageStatus
from logpm_warehouse_tray_goods lwtg
left join logpm_distribution_parcel_list ldpl on ldpl.order_package_code = lwtg.association_value and ldpl.warehouse_id = lwtg.warehouse_id
left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id
where lwtg.association_type = '3'
</select>
<select id="findZeroTraysInfo" resultType="com.logpm.patch.vo.ZeroTrayInfoVO">
select lwtg.association_value orderCode,
ldpl.warehouse_id warehouseId,
lwt.pallet_name trayName
from logpm_warehouse_tray_goods lwtg
left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id
where lwtg.association_type = '1'
</select>
<select id="findStockTraysInfo" resultType="com.logpm.patch.vo.StockTrayInfoVO">
select ldsl.id stockListId,
lwtg.warehouse_id warehouseId,
lwt.pallet_name trayName
from logpm_warehouse_tray_goods lwtg
left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id
left join logpm_distribution_stock_list ldsl on ldsl.cargo_number = lwtg.association_value and ldsl.warehouse_id = lwtg.warehouse_id and ldsl.market_id = lwtg.market_id and ldsl.incoming_batch = lwtg.incoming_batch
where lwtg.association_type = '4'
</select>
<select id="findPackageAllocationData" resultType="com.logpm.patch.vo.PackageAllocationInfoVO">
select lwug.association_value orderPackageCode,
ldpl.warehouse_id warehouseId,
ldpl.conditions conditions,
lwga.qr_code allocationName,
ldpl.order_package_status orderPackageStatus
from logpm_warehouse_updown_goods lwug
left join logpm_distribution_parcel_list ldpl on ldpl.order_package_code = lwtg.association_value and ldpl.warehouse_id = lwtg.warehouse_id
left join logpm_warehouse_goods_allocation lwga on lwga.id = lwug.allocation_id
where lwug.association_type = '3'
</select>
<select id="findZeroAllocationInfo" resultType="com.logpm.patch.vo.ZeroAllocationInfoVO">
select lwug.association_value orderCode,
lwug.warehouse_id warehouseId,
lwga.qr_code allocationName
from logpm_warehouse_updown_goods lwug
left join logpm_warehouse_goods_allocation lwga on lwga.id = lwug.allocation_id
where lwug.association_type = '1'
</select>
<select id="findStockAllocationInfo" resultType="com.logpm.patch.vo.StockAllocationInfoVO">
select ldsl.id stockListId,
lwug.warehouse_id warehouseId,
lwga.qr_code allocationName
from logpm_warehouse_updown_goods lwug
left join logpm_warehouse_goods_allocation lwga on lwga.id = lwug.allocation_id
left join logpm_distribution_stock_list ldsl on ldsl.cargo_number = lwug.association_value and ldsl.warehouse_id = lwug.warehouse_id and ldsl.market_id = lwug.market_id and ldsl.incoming_batch = lwug.incoming_batch
where lwug.association_type = '4'
</select>
</mapper>

7
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISendFanoutService.java

@ -0,0 +1,7 @@
package com.logpm.patch.service;
import org.springblade.common.model.FanoutMsg;
public interface ISendFanoutService {
void sendFanoutMsg(FanoutMsg fanoutMsg);
}

14
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java

@ -2,7 +2,7 @@ package com.logpm.patch.service;
import cn.hutool.json.JSONObject;
import com.logpm.patch.entity.WarehouseMappingDataEntity;
import com.logpm.patch.vo.SyncZeroOrderVO;
import com.logpm.patch.vo.*;
import java.util.List;
@ -100,4 +100,16 @@ public interface IWarehouseMappingDataService {
void updateTrayTypeNum(Integer num, Long aLong);
List<PackageTrayInfoVO> findPackageTraysInfo();
List<ZeroTrayInfoVO> findZeroTraysInfo();
List<StockTrayInfoVO> findStockTraysInfo();
List<PackageAllocationInfoVO> findPackageAllocationData();
List<ZeroAllocationInfoVO> findZeroAllocationInfo();
List<StockAllocationInfoVO> findStockAllocationInfo();
}

24
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SendFanoutServiceImpl.java

@ -0,0 +1,24 @@
package com.logpm.patch.service.impl;
import com.logpm.patch.service.ISendFanoutService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.model.FanoutMsg;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
@Slf4j
public class SendFanoutServiceImpl implements ISendFanoutService {
private final RabbitTemplate rabbitTemplate;
// @Retryable(value = Exception.class, maxAttempts = 3, backoff = @Backoff(value = 3000, multiplier = 1.5))
@Override
public void sendFanoutMsg(FanoutMsg fanoutMsg) {
rabbitTemplate.convertAndSend(fanoutMsg.getExchange(),null, fanoutMsg.getMsg());
}
}

32
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java

@ -4,7 +4,7 @@ import cn.hutool.json.JSONObject;
import com.logpm.patch.entity.WarehouseMappingDataEntity;
import com.logpm.patch.mapper.WarehouseMappingDataMapper;
import com.logpm.patch.service.IWarehouseMappingDataService;
import com.logpm.patch.vo.SyncZeroOrderVO;
import com.logpm.patch.vo.*;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@ -235,4 +235,34 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer
public void updateTrayTypeNum(Integer num, Long aLong) {
warehouseMappingDataMapper.updateTrayTypeNum(num,aLong);
}
@Override
public List<PackageTrayInfoVO> findPackageTraysInfo() {
return warehouseMappingDataMapper.findPackageTraysInfo();
}
@Override
public List<ZeroTrayInfoVO> findZeroTraysInfo() {
return warehouseMappingDataMapper.findZeroTraysInfo();
}
@Override
public List<StockTrayInfoVO> findStockTraysInfo() {
return warehouseMappingDataMapper.findStockTraysInfo();
}
@Override
public List<PackageAllocationInfoVO> findPackageAllocationData() {
return warehouseMappingDataMapper.findPackageAllocationData();
}
@Override
public List<ZeroAllocationInfoVO> findZeroAllocationInfo() {
return warehouseMappingDataMapper.findZeroAllocationInfo();
}
@Override
public List<StockAllocationInfoVO> findStockAllocationInfo() {
return warehouseMappingDataMapper.findStockAllocationInfo();
}
}

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -84,6 +84,7 @@
ltcl.arrive_time arriveTime,
ltcl.start_time startTime,
ltcl.create_user_name createUserName,
ltcl.operator operator,
ltcl.create_time createTime,
ltcl.now_warehouse_id nowWarehouseId,
sum(ltcll.now_transport_cost) nowTransportCost,

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/OpenOrderToLoadListener.java

@ -100,6 +100,7 @@ public class OpenOrderToLoadListener {
trunklineCarsOrderEntity.setNodeName(warehouseName);
trunklineCarsOrderEntity.setLoadLineId(carsLoadLineEntity.getId());
trunklineCarsOrderEntity.setOrderCode(orderCode);
trunklineCarsOrderEntity.setWaybillId(waybillId);
trunklineCarsOrderEntity.setWaybillNo(waybillNo);
// Integer totalNum = waybillOrderService.findTotalNumByWaybillNoAndOrderCode(waybillId,orderCode);
trunklineCarsOrderEntity.setTotalNum(advanceEntity.getTotalNum());

10
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -3713,6 +3713,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long waybillId = waybillEntity.getId();
Long newBrandId = openOrderDTO.getBrandId();
String newBrand = openOrderDTO.getBrand();
Long brandId = waybillEntity.getBrandId();
String brand = waybillEntity.getBrand();
if(!ObjectUtil.equals(newBrandId,brandId)){
stringBuilder.append("品牌:").append(brand).append("-->").append(newBrand).append(";");
waybillEntity.setBrandId(newBrandId);
waybillEntity.setBrand(newBrand);
}
String newDeparture = openOrderDTO.getDeparture();
String departure = waybillEntity.getDeparture();
if(!ObjectUtil.equals(newDeparture,departure)){

24
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

@ -160,24 +160,24 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
if(!Objects.isNull(waybillId)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
if(!Objects.isNull(waybillEntity)){
vo.setShipperName(waybillEntity.getShipper());
vo.setShipperAddress(waybillEntity.getShipperAddress());
vo.setMallName(waybillEntity.getConsignee());
vo.setShipperName(StringUtil.isBlank(waybillEntity.getShipper())?"":waybillEntity.getShipper());
vo.setShipperAddress(StringUtil.isBlank(waybillEntity.getShipperAddress())?"":waybillEntity.getShipperAddress());
vo.setMallName(StringUtil.isBlank(waybillEntity.getConsignee())?"":waybillEntity.getConsignee());
vo.setWaybillsNum(waybillEntity.getTotalCount()+"");
vo.setObjective(waybillEntity.getDestinationWarehouseName());
vo.setDepartureStation(waybillEntity.getDepartureWarehouseName());
vo.setWaybillNumber(waybillEntity.getWaybillNo());
vo.setObjective(StringUtil.isBlank(waybillEntity.getDestinationWarehouseName())?"":waybillEntity.getDestinationWarehouseName());
vo.setDepartureStation(StringUtil.isBlank(waybillEntity.getDepartureWarehouseName())?"":waybillEntity.getDepartureWarehouseName());
vo.setWaybillNumber(StringUtil.isBlank(waybillEntity.getWaybillNo())?"":waybillEntity.getWaybillNo());
}
}
vo.setOrderCode(orderCode);
vo.setCustomerName(advanceEntity.getCustomerName());
vo.setCustomerTelephone(advanceEntity.getCustomerPhone());
vo.setCustomerAddress(advanceEntity.getCustomerAddress());
vo.setMaterialName(advanceDetailEntity.getMaterialName());
vo.setCustomerName(StringUtil.isBlank(advanceEntity.getCustomerName())?"":advanceEntity.getCustomerName());
vo.setCustomerTelephone(StringUtil.isBlank(advanceEntity.getCustomerPhone())?"":advanceEntity.getCustomerPhone());
vo.setCustomerAddress(StringUtil.isBlank(advanceEntity.getCustomerAddress())?"":advanceEntity.getCustomerAddress());
vo.setMaterialName(StringUtil.isBlank(advanceDetailEntity.getMaterialName())?"":advanceDetailEntity.getMaterialName());
vo.setCategory(firstPackName+"/"+secondPackName+"/"+thirdPackName);
vo.setDealerCode(advanceEntity.getDealerCode());
vo.setDealerName(advanceEntity.getDealerName());
vo.setDealerCode(StringUtil.isBlank(advanceEntity.getDealerCode())?"":advanceEntity.getDealerCode());
vo.setDealerName(StringUtil.isBlank(advanceEntity.getDealerName())?"":advanceEntity.getDealerName());
vo.setQrCode(orderPackageCode);
vo.setTotalNumber(advanceEntity.getTotalNum()+"");

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -689,6 +689,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//取消节点的签收单
cancleCustomerSignOrder(loadId, warehouseId);
carsLoadEntity.setIsCustomer("2");
updateById(carsLoadEntity);
} catch (Exception e) {
log.error("#############cancelStartCarByLoadId: 处理取消节点签收单 和 发车数量失败", e);
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -1788,7 +1788,6 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
}
@Override
public R deleteZeroOrderByTrayCode(String orderCode, String trayCode,Long warehouseId,String remark) {
log.info("#########deleteZeroOrderByTrayCode: 删除对应的零担订单 orderCode={} trayCode={}", orderCode, trayCode);

Loading…
Cancel
Save