入库请求以及入库任务记录查询bug解消。
This commit is contained in:
parent
409df1ac81
commit
4e576a1225
|
|
@ -140,7 +140,7 @@ public class TaskController {
|
||||||
}
|
}
|
||||||
// 生成入库任务
|
// 生成入库任务
|
||||||
String saveTaskResult;
|
String saveTaskResult;
|
||||||
if (taskInRequest.getGoodsList().isEmpty()) {// 空托入库
|
if (taskInRequest.getGoodsList() == null || taskInRequest.getGoodsList().isEmpty()) {// 空托入库
|
||||||
saveTaskResult = genEmptyInTask(taskInRequest, nextLocationMap.get("nextLocationId"), nextLocationMap.get("preTaskId"));
|
saveTaskResult = genEmptyInTask(taskInRequest, nextLocationMap.get("nextLocationId"), nextLocationMap.get("preTaskId"));
|
||||||
} else {// 带料入库
|
} else {// 带料入库
|
||||||
saveTaskResult = genGoodsInTask(taskInRequest, nextLocationMap.get("nextLocationId"), nextLocationMap.get("preTaskId"));
|
saveTaskResult = genGoodsInTask(taskInRequest, nextLocationMap.get("nextLocationId"), nextLocationMap.get("preTaskId"));
|
||||||
|
|
@ -261,7 +261,7 @@ public class TaskController {
|
||||||
* @return 验证结果---空为验证通过,否则输出错误信息
|
* @return 验证结果---空为验证通过,否则输出错误信息
|
||||||
*/
|
*/
|
||||||
private String validateTaskInRequest(TaskInRequest taskInRequest) {
|
private String validateTaskInRequest(TaskInRequest taskInRequest) {
|
||||||
// 验证任务ID
|
// 验证任务请求
|
||||||
if (taskInRequest == null) {
|
if (taskInRequest == null) {
|
||||||
return TaskInValidationEnum.NO_REQUEST_BODY.getErrorMessage();
|
return TaskInValidationEnum.NO_REQUEST_BODY.getErrorMessage();
|
||||||
}
|
}
|
||||||
|
|
@ -287,7 +287,7 @@ public class TaskController {
|
||||||
BigDecimal max_weight = BigDecimal.valueOf(10000000);
|
BigDecimal max_weight = BigDecimal.valueOf(10000000);
|
||||||
try {
|
try {
|
||||||
max_weight = new BigDecimal(configMap.get(ConfigMapKeyEnum.MAX_WEIGHT.getConfigKey()));
|
max_weight = new BigDecimal(configMap.get(ConfigMapKeyEnum.MAX_WEIGHT.getConfigKey()));
|
||||||
} catch (NumberFormatException e) {
|
} catch (Exception e) {
|
||||||
logger.error("转换配置项---最大承重,发生错误");
|
logger.error("转换配置项---最大承重,发生错误");
|
||||||
}
|
}
|
||||||
if (taskInRequest.getTotalWeight().compareTo(max_weight) > 0) {
|
if (taskInRequest.getTotalWeight().compareTo(max_weight) > 0) {
|
||||||
|
|
@ -298,12 +298,12 @@ public class TaskController {
|
||||||
if (StringUtils.isEmpty(taskInRequest.getOriginPoint())) {
|
if (StringUtils.isEmpty(taskInRequest.getOriginPoint())) {
|
||||||
return TaskInValidationEnum.NO_IN_POINT.getErrorMessage();
|
return TaskInValidationEnum.NO_IN_POINT.getErrorMessage();
|
||||||
} else {
|
} else {
|
||||||
if (standService.validateStand(taskInRequest.getOriginPoint(), 1)) {
|
if (!standService.validateStand(taskInRequest.getOriginPoint(), TaskType.IN.getCode())) {
|
||||||
return TaskInValidationEnum.ERROR_IN_POINT.getErrorMessage();
|
return TaskInValidationEnum.ERROR_IN_POINT.getErrorMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 验证物料信息
|
// 验证物料信息
|
||||||
if (!taskInRequest.getGoodsList().isEmpty()) {
|
if (taskInRequest.getGoodsList() != null && !taskInRequest.getGoodsList().isEmpty()) {
|
||||||
for (GoodsInRequest goodsInRequest : taskInRequest.getGoodsList()) {
|
for (GoodsInRequest goodsInRequest : taskInRequest.getGoodsList()) {
|
||||||
// 验证物料编号
|
// 验证物料编号
|
||||||
if (StringUtils.isEmpty(goodsInRequest.getGoodsId())) {
|
if (StringUtils.isEmpty(goodsInRequest.getGoodsId())) {
|
||||||
|
|
@ -605,11 +605,11 @@ public class TaskController {
|
||||||
}
|
}
|
||||||
// 验证终点站台
|
// 验证终点站台
|
||||||
if (taskOutRequest.getIsPicking() == 0) {// 出库
|
if (taskOutRequest.getIsPicking() == 0) {// 出库
|
||||||
if (standService.validateStand(taskOutRequest.getDestinationPoint(), 2)) {
|
if (!standService.validateStand(taskOutRequest.getDestinationPoint(), 2)) {
|
||||||
return TaskOutValidationEnum.ERROR_DESTINATION_POINT.getErrorMessage();
|
return TaskOutValidationEnum.ERROR_DESTINATION_POINT.getErrorMessage();
|
||||||
}
|
}
|
||||||
} else {// 拣选出库
|
} else {// 拣选出库
|
||||||
if (standService.validateStand(taskOutRequest.getDestinationPoint(), 3)) {
|
if (!standService.validateStand(taskOutRequest.getDestinationPoint(), 3)) {
|
||||||
return TaskOutValidationEnum.ERROR_PICK_STAND.getErrorMessage();
|
return TaskOutValidationEnum.ERROR_PICK_STAND.getErrorMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -879,7 +879,10 @@ public class TaskController {
|
||||||
taskService.updateBatchById(feedBackTasks);
|
taskService.updateBatchById(feedBackTasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 返回成功
|
||||||
|
logger.info("处理任务反馈成功");
|
||||||
|
response.setCode(ResponseCode.OK.getCode());
|
||||||
|
response.setMessage("处理任务反馈成功");
|
||||||
return convertJsonString(response);
|
return convertJsonString(response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 回滚事务
|
// 回滚事务
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.wms.entity.app.vo;
|
package com.wms.entity.app.vo;
|
||||||
|
|
||||||
import com.wms.entity.app.dto.extend.TaskDetailInfo;
|
import com.wms.entity.app.dto.extend.TaskDetailInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -8,6 +9,7 @@ import java.time.LocalDateTime;
|
||||||
/**
|
/**
|
||||||
* 任务记录VO
|
* 任务记录VO
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class TaskRecordVO {
|
public class TaskRecordVO {
|
||||||
/**
|
/**
|
||||||
* 任务号
|
* 任务号
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user