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