更新料箱库, 删除一次只下发一个任务给wcs的限制, 添加上报上位机回调
This commit is contained in:
parent
6af6bd1209
commit
efbe57735c
|
|
@ -28,3 +28,4 @@ replay_pid*
|
||||||
/.idea/inspectionProfiles/Project_Default.xml
|
/.idea/inspectionProfiles/Project_Default.xml
|
||||||
/.idea/CoolRequestHistoryPersistent.xml
|
/.idea/CoolRequestHistoryPersistent.xml
|
||||||
/.idea/CoolRequestCookiePersistent.xml
|
/.idea/CoolRequestCookiePersistent.xml
|
||||||
|
/.mvn
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.wms_main.model.dto.request.mywms;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class OrderInCancel {
|
||||||
|
@JsonProperty("vehicleNo")
|
||||||
|
private String vehicleNo;
|
||||||
|
}
|
||||||
|
|
@ -457,24 +457,24 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
||||||
if (!appTaskBakService.save(wmsTask.of())) {
|
if (!appTaskBakService.save(wmsTask.of())) {
|
||||||
log.info("备份入库任务失败,任务:{}", wmsTask.getTaskId());
|
log.info("备份入库任务失败,任务:{}", wmsTask.getTaskId());
|
||||||
}
|
}
|
||||||
// OrderInCBReq orderInCBReq = new OrderInCBReq();
|
OrderInCBReq orderInCBReq = new OrderInCBReq();
|
||||||
// orderInCBReq.setTaskId(orderIn.getOrderId());
|
orderInCBReq.setTaskId(orderIn.getOrderId());
|
||||||
// orderInCBReq.setVehicleNo(wmsTask.getVehicleId());
|
orderInCBReq.setVehicleNo(wmsTask.getVehicleId());
|
||||||
// orderInCBReq.setLocationId(wmsTask.getDestination());
|
orderInCBReq.setLocationId(wmsTask.getDestination());
|
||||||
// orderInCBReq.setResult(OrderInCBEnums.COMPLETE.getCode());
|
orderInCBReq.setResult(OrderInCBEnums.COMPLETE.getCode());
|
||||||
// orderInCBReq.setResultMessage("入库完成");
|
orderInCBReq.setResultMessage("入库完成");
|
||||||
// int times = 0;
|
int times = 0;
|
||||||
// MesApiResponse response = null;
|
MesApiResponse response = null;
|
||||||
// do {
|
do {
|
||||||
// Thread.sleep(15000L * times);
|
Thread.sleep(15000L * times);
|
||||||
// response = externalApiService.invokeOrderInCB(orderInCBReq);
|
response = externalApiService.invokeOrderInCB(orderInCBReq);
|
||||||
// times++;
|
times++;
|
||||||
// } while (response.getCode() != 0 && times <= 10);
|
} while (response.getCode() != 0 && times <= 10);
|
||||||
// if (response.getCode() != 0) {
|
if (response.getCode() != 0) {
|
||||||
// log.error("[wms]上报失败");
|
log.error("[wms]上报失败");
|
||||||
// } else {
|
} else {
|
||||||
// log.info("[wms]上报成功");
|
log.info("[wms]上报成功");
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -580,26 +580,26 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
||||||
appOrderOutService.removeBatchByIds(orderOuts);
|
appOrderOutService.removeBatchByIds(orderOuts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for (TAppOrderOut orderOut : orderOuts) {
|
for (TAppOrderOut orderOut : orderOuts) {
|
||||||
// OrderOutCBReq orderOutCBReq = new OrderOutCBReq();
|
OrderOutCBReq orderOutCBReq = new OrderOutCBReq();
|
||||||
// orderOutCBReq.setTaskId(orderOut.getOrderId());
|
orderOutCBReq.setTaskId(orderOut.getOrderId());
|
||||||
// orderOutCBReq.setVehicleNo(vehicleId);
|
orderOutCBReq.setVehicleNo(vehicleId);
|
||||||
// orderOutCBReq.setResult(OrderOutCBEnums.COMPLETE.getCode());
|
orderOutCBReq.setResult(OrderOutCBEnums.COMPLETE.getCode());
|
||||||
// orderOutCBReq.setResultMessage("出库完成");
|
orderOutCBReq.setResultMessage("出库完成");
|
||||||
|
|
||||||
// int times = 0;
|
int times = 0;
|
||||||
// MesApiResponse response = null;
|
MesApiResponse response = null;
|
||||||
// do {
|
do {
|
||||||
// response = externalApiService.invokeOrderOutCB(orderOutCBReq);
|
response = externalApiService.invokeOrderOutCB(orderOutCBReq);
|
||||||
// times++;
|
times++;
|
||||||
// Thread.sleep(15000L * times);
|
Thread.sleep(15000L * times);
|
||||||
// } while (response.getCode() != 0 && times <= 10);
|
} while (response.getCode() != 0 && times <= 10);
|
||||||
// if (response.getCode() != 0) {
|
if (response.getCode() != 0) {
|
||||||
// log.error("[WMS]上报失败");
|
log.error("[WMS]上报失败");
|
||||||
// } else {
|
} else {
|
||||||
// log.info("[WMS]上报成功");
|
log.info("[WMS]上报成功");
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,6 @@ public class WcsStackerTaskSender implements Job {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) {
|
public void execute(JobExecutionContext jobExecutionContext) {
|
||||||
if (appWcsTaskService.exists(new LambdaQueryWrapper<TAppWcsTask>().eq(TAppWcsTask::getWcsTaskStatus,
|
|
||||||
WcsStackerTaskStatusEnums.WAIT.getCode()))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 查询到所有的待下发的wcsTask并按优先级排序
|
// 查询到所有的待下发的wcsTask并按优先级排序
|
||||||
List<TAppWcsTask> waitSendWcsTaskList = appWcsTaskService.list(
|
List<TAppWcsTask> waitSendWcsTaskList = appWcsTaskService.list(
|
||||||
new LambdaQueryWrapper<TAppWcsTask>()
|
new LambdaQueryWrapper<TAppWcsTask>()
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 本地
|
# 本地
|
||||||
# url: jdbc:mysql://localhost:3306/wms_mengyang_box?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
# url: jdbc:mysql://localhost:3306/wms_mengyang_box?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||||
# username: root
|
# username: root
|
||||||
# password: root
|
# password: root
|
||||||
# 服务器
|
# 服务器
|
||||||
url: jdbc:mysql://localhost:3306/wms_mengyang_box?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
url: jdbc:mysql://localhost:3306/wms_mengyang_box?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||||
username: user
|
username: user
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.wms_main.service.api.serviceImpl;
|
package com.wms_main.service.api.serviceImpl;
|
||||||
|
|
||||||
import com.wms_main.app.AppCommon;
|
import com.wms_main.app.AppCommon;
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ public class WcsApiServiceImpl implements IWcsApiService {
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
return WcsApiResponse.error("请求未获得响应信息。", null);
|
return WcsApiResponse.error("请求未获得响应信息。", null);
|
||||||
// return WcsApiResponse.success("请求未获得响应信息。", null);
|
// return WcsApiResponse.success("请求未获得响应信息。", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 本地
|
# 本地
|
||||||
# url: jdbc:mysql://localhost:3306/wms_mengyang_tp?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
# url: jdbc:mysql://localhost:3306/wms_mengyang_tp?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||||
# username: root
|
# username: root
|
||||||
# password: root
|
# password: root
|
||||||
# 服务器
|
# 服务器
|
||||||
url: jdbc:mysql://localhost:3306/wms_mengyang_tp?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
url: jdbc:mysql://localhost:3306/wms_mengyang_tp?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||||
username: user
|
username: user
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user