常熟吴彦祖 3 months ago
parent
commit
851af57dc2
  1. 25
      src/main/java/com/gaotao/common/utils/AgvClientUtil.java
  2. 10
      src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java
  3. 6
      src/main/java/com/gaotao/modules/automatedWarehouse/task/WcsTaskScheduler.java
  4. 5
      src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java

25
src/main/java/com/gaotao/common/utils/AgvClientUtil.java

@ -108,13 +108,13 @@ public class AgvClientUtil {
// 调用AGV接口 // 调用AGV接口
// ResponseData response = HttpClientUtil.doPostByRaw(url, request); // ResponseData response = HttpClientUtil.doPostByRaw(url, request);
// //
// // 更新接口日志结果
// if (logId != null) {
// String responseJson = response != null ? JSONObject.toJSONString(response) : "null";
// interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null);
// }
//
// return response;
// 更新接口日志结果
if (logId != null) {
String responseJson = msg != null ? msg: "null";
interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null);
}
} catch (Exception e) { } catch (Exception e) {
// 更新接口日志错误信息 // 更新接口日志错误信息
@ -158,13 +158,10 @@ public class AgvClientUtil {
// 调用AGV接口 // 调用AGV接口
// ResponseData response = HttpClientUtil.doPostByRaw(url, request); // ResponseData response = HttpClientUtil.doPostByRaw(url, request);
// //
// // 更新接口日志结果
// if (logId != null) {
// String responseJson = response != null ? JSONObject.toJSONString(response) : "null";
// interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null);
// }
//
// return response;
if (logId != null) {
String responseJson = msg != null ? msg: "null";
interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null);
}
} catch (Exception e) { } catch (Exception e) {
// 更新接口日志错误信息 // 更新接口日志错误信息

10
src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java

@ -428,6 +428,8 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
//初始化的时候用 一开始栈板是没有位置的 按照第一个入栈的标签来给虚拟位置 后期不需要处理 //初始化的时候用 一开始栈板是没有位置的 按照第一个入栈的标签来给虚拟位置 后期不需要处理
if("TEMP".equals(labelWarehouseId)){ if("TEMP".equals(labelWarehouseId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "TEMP"); wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "TEMP");
}else if("AS".equals(labelLocationId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Virtual_AS");
}else if("W01".equals(labelWarehouseId)){ }else if("W01".equals(labelWarehouseId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "W01"); wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "W01");
}else if("L01".equals(labelWarehouseId)){ }else if("L01".equals(labelWarehouseId)){
@ -436,8 +438,6 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Q01"); wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Q01");
}else if("W02".equals(labelWarehouseId)){ }else if("W02".equals(labelWarehouseId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "W02"); wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "W02");
}else if("AS".equals(labelLocationId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Virtual_AS");
}else { }else {
throw new Exception("栈板不在运输点位,无法进行打托操作"); throw new Exception("栈板不在运输点位,无法进行打托操作");
} }
@ -1883,7 +1883,6 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
if (palletInfo == null) { if (palletInfo == null) {
throw new RuntimeException("栈板不存在"); throw new RuntimeException("栈板不存在");
} }
// 生成入库任务编号 - rqrq // 生成入库任务编号 - rqrq
TransNoControl transData = transNoService.getTransNo(site, "WOT", 10); TransNoControl transData = transNoService.getTransNo(site, "WOT", 10);
Date currentTime = new Date(); Date currentTime = new Date();
@ -1941,6 +1940,11 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
scheduleDeliveryTask.setToArea("Z103"); scheduleDeliveryTask.setToArea("Z103");
scheduleDeliveryTask.setUsername(currentUser.getUsername()); scheduleDeliveryTask.setUsername(currentUser.getUsername());
autoTaskService.scheduleDeliveryTask(scheduleDeliveryTask); autoTaskService.scheduleDeliveryTask(scheduleDeliveryTask);
}else {
Pallet pallet = wcsIntegrationMapper.getPalletByCode(site, palletId);
if (pallet.getLocationCode()== null||pallet.getLocationCode().isEmpty()) {
pallet.setLocationCode("Virtual_AS");
}
} }
// 调用空托盘推送方法只推送托盘数据cargoInfos为null- rqrq // 调用空托盘推送方法只推送托盘数据cargoInfos为null- rqrq
pushEmptyPalletDetail(site, palletId, orderTask.getTaskNo(), orderTask.getItemNo()); pushEmptyPalletDetail(site, palletId, orderTask.getTaskNo(), orderTask.getItemNo());

6
src/main/java/com/gaotao/modules/automatedWarehouse/task/WcsTaskScheduler.java

@ -52,9 +52,9 @@ public class WcsTaskScheduler {
@Scheduled(cron = "5/10 * * * * ?") @Scheduled(cron = "5/10 * * * * ?")
public void scheduleWcsTaskProcessing() { public void scheduleWcsTaskProcessing() {
// 检查定时任务开关 // 检查定时任务开关
if (!enabled) {
return;
}
// if (!enabled) {
// return;
// }
log.info("=== 开始处理WCS入库/出库相关业务 ==="); log.info("=== 开始处理WCS入库/出库相关业务 ===");

5
src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java

@ -492,7 +492,10 @@ public class InventoryMoveServiceImpl implements InventoryMoveService {
params.put("locationNo", group.sourceLocationNo); // 原库位 params.put("locationNo", group.sourceLocationNo); // 原库位
params.put("destLocationNo", group.destLocationNo); // 目标库位 params.put("destLocationNo", group.destLocationNo); // 目标库位
params.put("lotBatchNo", group.lotBatchNo); params.put("lotBatchNo", group.lotBatchNo);
if(group.sourceLocationNo.equals(group.destLocationNo)){
log.info("此物料ifs中没有库位变更,跳过-----"+group.partNo+group.lotBatchNo);
return;
}
// 添加过期日期参数 // 添加过期日期参数
if (group.expiredDate != null) { if (group.expiredDate != null) {
params.put("expiryDate", new SimpleDateFormat("yyyy-MM-dd").format(group.expiredDate)); params.put("expiryDate", new SimpleDateFormat("yyyy-MM-dd").format(group.expiredDate));

Loading…
Cancel
Save