|
|
@@ -1,8 +1,10 @@
|
|
|
package com.sckw.transport.service;
|
|
|
|
|
|
+import com.alibaba.fastjson2.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.sckw.core.common.enums.NumberConstant;
|
|
|
+import com.sckw.core.common.enums.enums.DictEnum;
|
|
|
import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
|
import com.sckw.core.exception.BusinessException;
|
|
|
import com.sckw.core.model.constant.Global;
|
|
|
@@ -22,7 +24,10 @@ import com.sckw.order.api.dubbo.TradeOrderInfoService;
|
|
|
import com.sckw.order.api.model.CompleteLogisticsOrderParam;
|
|
|
import com.sckw.redis.constant.RedisConstant;
|
|
|
import com.sckw.redis.utils.RedissonUtils;
|
|
|
+import com.sckw.stream.enums.MessageEnum;
|
|
|
import com.sckw.stream.model.SckwBusSum;
|
|
|
+import com.sckw.stream.model.SckwMessage;
|
|
|
+import com.sckw.stream.model.UserInfo;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
|
@@ -706,6 +711,7 @@ public class KwtWaybillOrderService {
|
|
|
waybillOrder.setDriverIdcard(circulate.getDriverIdcard());
|
|
|
waybillOrder.setEntrustAmount(circulate.getEntrustAmount());
|
|
|
waybillOrder.setStatus(CarWaybillEnum.PENDING_VEHICLE.getCode());
|
|
|
+ waybillOrder.setCreateBy(circulate.getCreateBy());
|
|
|
return waybillOrder;
|
|
|
}
|
|
|
|
|
|
@@ -1275,7 +1281,16 @@ public class KwtWaybillOrderService {
|
|
|
editSckwLogisticsOrder(lOrder, logisticsOrder);
|
|
|
|
|
|
/**6发送消息**/
|
|
|
-
|
|
|
+ List<UserInfo> users = new ArrayList<>(){{add(new UserInfo(waybillOrder.getCreateBy(), waybillOrder.getEntId()));}};
|
|
|
+ Map<String, Object> msgParams = new HashMap<>(){{put("orderNo", waybillOrder.getWOrderNo());}};
|
|
|
+ SckwMessage msg = new SckwMessage();
|
|
|
+ msg.setRequestId(UUIDUtils.get32UUID());
|
|
|
+ msg.setMessageEnum(MessageEnum.WAYBILL_REFUSE_SENDCAR_TRIP);
|
|
|
+ msg.setParams(msgParams);
|
|
|
+ msg.setMsgUrl(null);
|
|
|
+ msg.setUserInfos(users);
|
|
|
+ msg.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ streamBridge.send("sckw-message", JSON.toJSONString(msg));
|
|
|
}
|
|
|
|
|
|
/**循环派车**/
|
|
|
@@ -1303,8 +1318,18 @@ public class KwtWaybillOrderService {
|
|
|
editSckwWaybillOrder(wOrder, waybillOrder, 2);
|
|
|
|
|
|
/**4发送消息**/
|
|
|
+ KwtLogisticsOrder logisticsOrder = logisticsOrderDao.selectById(circulate.getLOrderId());
|
|
|
+ List<UserInfo> users = new ArrayList<>(){{add(new UserInfo(circulate.getCreateBy(), circulate.getEntId()));}};
|
|
|
+ Map<String, Object> msgParams = new HashMap<>(){{put("orderNo", logisticsOrder.getLOrderNo());}};
|
|
|
+ SckwMessage msg = new SckwMessage();
|
|
|
+ msg.setRequestId(UUIDUtils.get32UUID());
|
|
|
+ msg.setMessageEnum(MessageEnum.WAYBILL_REFUSE_SENDCAR_CIRCULATE);
|
|
|
+ msg.setParams(msgParams);
|
|
|
+ msg.setMsgUrl(null);
|
|
|
+ msg.setUserInfos(users);
|
|
|
+ msg.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ streamBridge.send("sckw-message", JSON.toJSONString(msg));
|
|
|
}
|
|
|
-
|
|
|
return HttpResult.ok("拒绝接单成功!");
|
|
|
}
|
|
|
|
|
|
@@ -1396,6 +1421,16 @@ public class KwtWaybillOrderService {
|
|
|
editSckwLogisticsOrder(lOrder, logisticsOrder);
|
|
|
|
|
|
/**7发送消息**/
|
|
|
+ List<UserInfo> users = new ArrayList<>(){{add(new UserInfo(waybillOrder.getCreateBy(), waybillOrder.getEntId()));}};
|
|
|
+ Map<String, Object> msgParams = new HashMap<>(){{put("orderNo", waybillOrder.getWOrderNo());}};
|
|
|
+ SckwMessage msg = new SckwMessage();
|
|
|
+ msg.setRequestId(UUIDUtils.get32UUID());
|
|
|
+ msg.setMessageEnum(MessageEnum.ORDER_REJECT_PURCHASE);
|
|
|
+ msg.setParams(msgParams);
|
|
|
+ msg.setMsgUrl(null);
|
|
|
+ msg.setUserInfos(users);
|
|
|
+ msg.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ streamBridge.send("sckw-message", JSON.toJSONString(msg));
|
|
|
|
|
|
return HttpResult.ok("拒绝出车成功!");
|
|
|
}
|