Parcourir la source

Merge remote-tracking branch 'origin/dev' into dev

zk il y a 1 an
Parent
commit
ba56a0258f

+ 1 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/LogisticsOrderSubcontractDto.java

@@ -30,6 +30,7 @@ public class LogisticsOrderSubcontractDto implements Serializable {
     /**
      * 订单类型-托运订单1-承运订单2
      */
+    @NotBlank(message = "订单类型不能为空")
     private String type;
     /**
      *总量

+ 13 - 8
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtLogisticsOrderConsignmentService.java

@@ -149,6 +149,7 @@ public class KwtLogisticsOrderConsignmentService {
      *
      * @param dto
      */
+    @Transactional
     public void logisticsConsignmentSave(LogisticsConsignmentDto dto) {
         commonService.getRedisGenerateOrderNo();
         Long count = logisticsOrderMapper.selectCount(new LambdaQueryWrapper<KwtLogisticsOrder>().eq(KwtLogisticsOrder::getTOrderId, dto.getTOrderId()));
@@ -1410,6 +1411,7 @@ public class KwtLogisticsOrderConsignmentService {
      * @param logisticsOrderSubcontractDto
      * @return
      */
+    @Transactional
     public HttpResult logisticsOrderSubcontract(LogisticsOrderSubcontractDto bo) {
         HttpResult httpResult = ValidUtil.serviceValid(bo);
         String key = String.format(RedisConstant.LOGISTICS_ORDER_SUBCONTRACT_KEY, bo.getLOrderId());
@@ -1570,6 +1572,7 @@ public class KwtLogisticsOrderConsignmentService {
                             MessageEnum.INITIATING_LOGISTICS_CONSIGNMENT, MessageEnum.NEW_CARRIAGE_ORDER,
                             "1");
                 }
+                /** 2024-03-26 停止mq->mongodb数据*/
                 //修改父级mongodb数据
                 //更新mongodb
                 SckwLogisticsOrder lOrder = new SckwLogisticsOrder();
@@ -1589,10 +1592,10 @@ public class KwtLogisticsOrderConsignmentService {
                 //操作对象(1新增/2修改/3替换数据)
                 busSum.setMethod(2);
                 //业务汇总数据对象
-                busSum.setObject(lOrder);
-                streamBridge.send("sckw-busSum", com.alibaba.fastjson2.JSON.toJSONString(busSum));
-                //新增当前分包mongodb数据
-                subcontractSendMongoDB(lOrderNo, orderId, bo, logisticsOrder, orderStatus);
+//                busSum.setObject(lOrder);
+//                streamBridge.send("sckw-busSum", com.alibaba.fastjson2.JSON.toJSONString(busSum));
+//                //新增当前分包mongodb数据
+//                subcontractSendMongoDB(lOrderNo, orderId, bo, logisticsOrder, orderStatus);
             } finally {
                 redisLockUtil.unlock(key);
             }
@@ -1758,8 +1761,8 @@ public class KwtLogisticsOrderConsignmentService {
                 if (address.getAmount().compareTo(new BigDecimal("0.00")) == 0) {
                     continue;
                 }
-                if (parentLoadOrderMap.get(address.getAddressId()) != null) {
-                    KwtLogisticsOrderAddress loadAddressData = parentLoadOrderMap.get(address.getAddressId());
+                if (parentLoadOrderMap.get(Long.parseLong(address.getAddressId())) != null) {
+                    KwtLogisticsOrderAddress loadAddressData = parentLoadOrderMap.get(Long.parseLong(address.getAddressId()));
                     KwtLogisticsOrderAddress loadOrderAddress = new KwtLogisticsOrderAddress();
                     long addressId = new IdWorker(NumberConstant.ONE).nextId();
                     loadOrderAddress.setId(addressId);
@@ -1769,6 +1772,7 @@ public class KwtLogisticsOrderConsignmentService {
                     loadOrderAddress.setDetailAddress(loadAddressData.getDetailAddress());
                     loadOrderAddress.setContacts(loadAddressData.getContacts());
                     loadOrderAddress.setLOrderId(orderId);
+                    loadOrderAddress.setSort(address.getSort());
                     loadOrderAddress.setLat(loadAddressData.getLat());
                     loadOrderAddress.setFence(loadAddressData.getFence());
                     loadOrderAddress.setCityName(loadAddressData.getCityName());
@@ -1826,8 +1830,8 @@ public class KwtLogisticsOrderConsignmentService {
                 if (address.getAmount().compareTo(new BigDecimal("0.00")) == 0) {
                     continue;
                 }
-                if (parentLoadOrderMap.get(address.getAddressId()) != null) {
-                    KwtLogisticsOrderAddress loadAddressData = parentLoadOrderMap.get(address.getAddressId());
+                if (parentUnloadOrderMap.get(Long.parseLong(address.getAddressId())) != null) {
+                    KwtLogisticsOrderAddress loadAddressData = parentUnloadOrderMap.get(Long.parseLong(address.getAddressId()));
                     KwtLogisticsOrderAddress unloadOrderAddress = new KwtLogisticsOrderAddress();
                     long addressId = new IdWorker(NumberConstant.ONE).nextId();
                     unloadOrderAddress.setId(addressId);
@@ -1853,6 +1857,7 @@ public class KwtLogisticsOrderConsignmentService {
                     unloadOrderAddress.setLng(loadAddressData.getLng());
                     unloadOrderAddress.setRemark(loadAddressData.getRemark());
                     unloadOrderAddress.setStatus(loadAddressData.getStatus());
+                    unloadOrderAddress.setSort(address.getSort());
                     logisticsOrderAddressMapper.insert(unloadOrderAddress);
 
                     KwtLogisticsOrderAmount orderAmount = new KwtLogisticsOrderAmount();