|
|
|
@ -3,14 +3,13 @@ package com.logpm.factory.receiver;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
|
import cn.hutool.core.util.EnumUtil; |
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import cn.hutool.json.JSONObject; |
|
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException; |
|
|
|
|
import com.logpm.factory.comfac.dto.UnloadCarDTO; |
|
|
|
|
import com.logpm.factory.mt.entity.MtPushData; |
|
|
|
|
import com.logpm.factory.mt.service.IMtFactoryDataService; |
|
|
|
|
import com.logpm.factory.mt.service.IMtFactoryOrderMainService; |
|
|
|
@ -18,7 +17,6 @@ import com.logpm.factory.mt.service.IMtPushDataService;
|
|
|
|
|
import com.logpm.factory.snm.vo.MTOrderPackageRelationVO; |
|
|
|
|
import com.logpm.factorydata.enums.BrandEnums; |
|
|
|
|
import com.logpm.factorydata.vo.NodePushMsg; |
|
|
|
|
import com.logpm.factorydata.vo.SendMsg; |
|
|
|
|
import com.logpm.oldproject.feign.IAdvanceDetailClient; |
|
|
|
|
import com.rabbitmq.client.Channel; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -76,11 +74,13 @@ public class HwyUnloadCarComHandler {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void pushMentTian(NodePushMsg nodePushMsg) { |
|
|
|
|
|
|
|
|
|
if (!ObjectUtil.equals(WorkNodeEnums.END_WAREHOUSE_UNLOADING, nodePushMsg.getNode())) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 根据包件获取车次
|
|
|
|
|
List<Object> content = nodePushMsg.getContent(); |
|
|
|
|
List<String> carNumList = new ArrayList<>(); |
|
|
|
|
if(CollUtil.isNotEmpty(content)){ |
|
|
|
|
if (CollUtil.isNotEmpty(content)) { |
|
|
|
|
for (Object s : content) { |
|
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(s); |
|
|
|
|
String packageCode = (String) jsonObject.get("packageCode"); |
|
|
|
@ -114,7 +114,7 @@ public class HwyUnloadCarComHandler {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
r.forEach(t->{ |
|
|
|
|
r.forEach(t -> { |
|
|
|
|
sendDataCarNum(t, DateUtil.formatDateTime(nodePushMsg.getOperatorTime())); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -144,15 +144,15 @@ public class HwyUnloadCarComHandler {
|
|
|
|
|
log.info("##################{} 车次已经推送过", carNum); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
try{ |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
R r = mtFactoryDataService.sendUnloadCarNum(carNum, completeDate); |
|
|
|
|
|
|
|
|
|
log.info("MT 数据卸车推送 {}",r.getMsg()); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.info("MT 数据卸车推送 {}", r.getMsg()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.error(">>>> 梦天数据卸车推送异常",e); |
|
|
|
|
log.error(">>>> 梦天数据卸车推送异常", e); |
|
|
|
|
} |
|
|
|
|
log.info("##################{} 梦天确认签收数据推送1", carNum); |
|
|
|
|
|
|
|
|
|