|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.logpm.factory.jobhandler; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import cn.hutool.json.JSONObject; |
|
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
@ -34,7 +35,7 @@ public class MengTianPushDataJob {
|
|
|
|
|
private final RabbitTemplate rabbitTemplate; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 定时扫描梦天手动数据 |
|
|
|
|
* 定时扫描梦天手动数据 文员复核 |
|
|
|
|
* |
|
|
|
|
* @param param |
|
|
|
|
* @return |
|
|
|
@ -70,12 +71,39 @@ public class MengTianPushDataJob {
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
String mes = com.alibaba.fastjson.JSONObject.toJSONString(dto); |
|
|
|
|
map.put("messageData", mes); |
|
|
|
|
log.info("梦天手动回推签收数据:{}", JSONUtil.toJsonStr(map)); |
|
|
|
|
log.info("梦天手动回推签收文员复核数据:{}", JSONUtil.toJsonStr(map)); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.MT_BUSINESS_DATA_CLERK_CHECK_2_FACTORY_EXCHANGE, RabbitConstant.MT_BUSINESS_DATA_CLERK_CHECK_2_FACTORY_ROUTING, map); |
|
|
|
|
mtPushDataMapper.customPushNodeDataSended(sendTaskId); |
|
|
|
|
mtPushDataMapper.customPushNodeDataSended(sendTaskId, 2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 定时扫描梦天手动数据 签收扫描 |
|
|
|
|
* |
|
|
|
|
* @param param |
|
|
|
|
* @return |
|
|
|
|
* @throws Exception |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("mengTianCustomPushNodeScanData") |
|
|
|
|
public ReturnT<String> mengTianCustomPushNodeScanData(String param) throws Exception { |
|
|
|
|
|
|
|
|
|
JSONObject js = this.mtPushDataMapper.customPushNodeDataScan(); |
|
|
|
|
if (ObjectUtil.isEmpty(js)) { |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
JSONObject entries = new JSONObject(); |
|
|
|
|
entries.set("orderPackageCode", js.getStr("unitNo")); |
|
|
|
|
entries.set("operationTime", js.getStr("operateDate")); |
|
|
|
|
entries.set("distributionContactId", js.getStr("sendTaskId")); |
|
|
|
|
entries.set("destinationWarehouse", js.getStr("warehouse")); |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("messageData", entries); |
|
|
|
|
log.info("梦天手动回推签收扫描数据:{}", JSONUtil.toJsonStr(map)); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_EXCHANGE, RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_ROUTING, map); |
|
|
|
|
mtPushDataMapper.customPushNodeDataSended(js.getStr("sendTaskId"), 1); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|