feat(入库订单): 删除入库订单校验
This commit is contained in:
parent
0dad2afa47
commit
a7b254599b
|
|
@ -58,7 +58,6 @@ public class AppPmsController extends BaseController {
|
||||||
Integer orderType = orderInRequest.getOrderType();
|
Integer orderType = orderInRequest.getOrderType();
|
||||||
if (StringUtils.isEmpty(orderInRequest.getListId())
|
if (StringUtils.isEmpty(orderInRequest.getListId())
|
||||||
|| !orderInTypeList.contains(orderInRequest.getOrderType())
|
|| !orderInTypeList.contains(orderInRequest.getOrderType())
|
||||||
|| StringUtils.isEmpty(orderInRequest.getCustomerId())
|
|
||||||
|| StringUtils.isEmpty(orderInRequest.getOrderId())
|
|| StringUtils.isEmpty(orderInRequest.getOrderId())
|
||||||
|| StringUtils.isEmpty(orderInRequest.getGoodsId())
|
|| StringUtils.isEmpty(orderInRequest.getGoodsId())
|
||||||
|| StringUtils.isEmpty(orderInRequest.getGoodsCode())
|
|| StringUtils.isEmpty(orderInRequest.getGoodsCode())
|
||||||
|
|
@ -81,13 +80,7 @@ public class AppPmsController extends BaseController {
|
||||||
appPmsOrderIn.setCreateTime(new Date());
|
appPmsOrderIn.setCreateTime(new Date());
|
||||||
appPmsOrderIn.setUpdateTime(new Date());
|
appPmsOrderIn.setUpdateTime(new Date());
|
||||||
|
|
||||||
AppPendingStorage appPendingStorage = new AppPendingStorage();
|
|
||||||
appPendingStorage.setRecordId(UUID.randomUUID().toString());
|
|
||||||
BeanUtils.copyProperties(appPmsOrderIn, appPendingStorage);
|
|
||||||
int i = appPendingStorageService.insertAppPendingStorage(appPendingStorage);
|
|
||||||
if (i == 0) {
|
|
||||||
return error("存入入库码盘信息失败");
|
|
||||||
}
|
|
||||||
int i1 = appPmsOrderInService.insertAppPmsOrderIn(appPmsOrderIn);
|
int i1 = appPmsOrderInService.insertAppPmsOrderIn(appPmsOrderIn);
|
||||||
if (i1 == 0) {
|
if (i1 == 0) {
|
||||||
return error("入库单保存失败");
|
return error("入库单保存失败");
|
||||||
|
|
@ -107,7 +100,6 @@ public class AppPmsController extends BaseController {
|
||||||
// 判断请求数据完整性
|
// 判断请求数据完整性
|
||||||
if (StringUtils.isEmpty(orderOutRequest.getListId())
|
if (StringUtils.isEmpty(orderOutRequest.getListId())
|
||||||
|| orderOutRequest.getOrderType() == null
|
|| orderOutRequest.getOrderType() == null
|
||||||
|| StringUtils.isEmpty(orderOutRequest.getCustomerId())
|
|
||||||
|| StringUtils.isEmpty(orderOutRequest.getGoodsId())
|
|| StringUtils.isEmpty(orderOutRequest.getGoodsId())
|
||||||
|| orderOutRequest.getGoodsNum() == null
|
|| orderOutRequest.getGoodsNum() == null
|
||||||
|| StringUtils.isEmpty(orderOutRequest.getGoodsDesc())) {
|
|| StringUtils.isEmpty(orderOutRequest.getGoodsDesc())) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package com.ruoyi.quartz.domain.app;
|
||||||
/**
|
/**
|
||||||
* Wcs通用响应信息
|
* Wcs通用响应信息
|
||||||
*/
|
*/
|
||||||
public class WcsCommonResponse {
|
public class WcsCommonRes {
|
||||||
/**
|
/**
|
||||||
* code
|
* code
|
||||||
*/
|
*/
|
||||||
|
|
@ -5,7 +5,7 @@ import java.math.BigDecimal;
|
||||||
/**
|
/**
|
||||||
* 向wcs发送堆垛机任务请求
|
* 向wcs发送堆垛机任务请求
|
||||||
*/
|
*/
|
||||||
public class WcsStackerTaskRequest {
|
public class WcsStackerTaskReq {
|
||||||
/**
|
/**
|
||||||
* 任务id
|
* 任务id
|
||||||
*/
|
*/
|
||||||
|
|
@ -6,8 +6,8 @@ import com.ruoyi.app.service.*;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.http.HttpUtils;
|
import com.ruoyi.common.utils.http.HttpUtils;
|
||||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||||
import com.ruoyi.quartz.domain.app.WcsCommonResponse;
|
import com.ruoyi.quartz.domain.app.WcsCommonRes;
|
||||||
import com.ruoyi.quartz.domain.app.WcsStackerTaskRequest;
|
import com.ruoyi.quartz.domain.app.WcsStackerTaskReq;
|
||||||
import com.ruoyi.system.service.ISysConfigService;
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
@ -117,14 +117,14 @@ public class TaskExecutor {
|
||||||
}
|
}
|
||||||
for (AppWcsTask appWcsTask : wcsTaskList) {
|
for (AppWcsTask appWcsTask : wcsTaskList) {
|
||||||
// 添加wcs任务请求
|
// 添加wcs任务请求
|
||||||
WcsStackerTaskRequest wcsStackerTaskRequest = getWcsStackerTaskRequest(appWcsTask);
|
WcsStackerTaskReq wcsStackerTaskReq = getWcsStackerTaskRequest(appWcsTask);
|
||||||
// 发送http请求---请求5次
|
// 发送http请求---请求5次
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
WcsCommonResponse wcsCommonResponse = JSON.parseObject(HttpUtils.sendPost(url, JSON.toJSONString(wcsStackerTaskRequest)), WcsCommonResponse.class);
|
WcsCommonRes wcsCommonRes = JSON.parseObject(HttpUtils.sendPost(url, JSON.toJSONString(wcsStackerTaskReq)), WcsCommonRes.class);
|
||||||
if (wcsCommonResponse == null) {
|
if (wcsCommonRes == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (wcsCommonResponse.getCode() == 0) {
|
if (wcsCommonRes.getCode() == 0) {
|
||||||
// 返回ok
|
// 返回ok
|
||||||
appWcsTask.setWcsTaskStatus(1);// 已经发送成功
|
appWcsTask.setWcsTaskStatus(1);// 已经发送成功
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -145,15 +145,15 @@ public class TaskExecutor {
|
||||||
* @param appWcsTask 任务
|
* @param appWcsTask 任务
|
||||||
* @return 请求详情
|
* @return 请求详情
|
||||||
*/
|
*/
|
||||||
private WcsStackerTaskRequest getWcsStackerTaskRequest(AppWcsTask appWcsTask) {
|
private WcsStackerTaskReq getWcsStackerTaskRequest(AppWcsTask appWcsTask) {
|
||||||
WcsStackerTaskRequest wcsStackerTaskRequest = new WcsStackerTaskRequest();
|
WcsStackerTaskReq wcsStackerTaskReq = new WcsStackerTaskReq();
|
||||||
wcsStackerTaskRequest.setTaskId(appWcsTask.getWcsTaskId());
|
wcsStackerTaskReq.setTaskId(appWcsTask.getWcsTaskId());
|
||||||
wcsStackerTaskRequest.setTaskType(appWcsTask.getWcsTaskType());
|
wcsStackerTaskReq.setTaskType(appWcsTask.getWcsTaskType());
|
||||||
wcsStackerTaskRequest.setPriority(appWcsTask.getTaskPriority());
|
wcsStackerTaskReq.setPriority(appWcsTask.getTaskPriority());
|
||||||
wcsStackerTaskRequest.setOrigin(appWcsTask.getOrigin());
|
wcsStackerTaskReq.setOrigin(appWcsTask.getOrigin());
|
||||||
wcsStackerTaskRequest.setDestination(appWcsTask.getDestination());
|
wcsStackerTaskReq.setDestination(appWcsTask.getDestination());
|
||||||
wcsStackerTaskRequest.setVehicleNo(appWcsTask.getVehicleId());
|
wcsStackerTaskReq.setVehicleNo(appWcsTask.getVehicleId());
|
||||||
return wcsStackerTaskRequest;
|
return wcsStackerTaskReq;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user