rev:称重位是否有货校验

This commit is contained in:
2025-11-27 11:05:26 +08:00
parent 180b27da2a
commit 06f1849c73
2 changed files with 10 additions and 8 deletions

View File

@@ -200,8 +200,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
public BaseResponse isPutVehicle(JSONObject whereJson) {
log.info("ACS向WMS请求是否可以取放货请求参数--------------------------------------" + whereJson.toString());
// 查询当前任务
SchBaseTask taskDao = iSchBaseTaskService.getByCode(whereJson.getString("task_code"));
// 查询当前点位
SchBasePoint pointDao = iSchBasePointService.getById(whereJson.getString("point_code"));
if (ObjectUtil.isEmpty(pointDao)) {
@@ -212,12 +210,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
// 判断当前点位是否有货
if (ObjectUtil.isNotEmpty(pointDao.getVehicle_code())) {
data.put("is_confirm", IOSConstant.ZERO);
return BaseResponse.responseOk("当前点位存在库存,不允许放货【" + pointDao.getPoint_code() + "", data);
}
// 判断任务是否一致
if (!taskDao.getTask_id().equals(pointDao.getIng_task_code())) {
data.put("is_confirm", IOSConstant.ZERO);
return BaseResponse.responseOk("当前点位存其他任务,不允许放货【" + pointDao.getIng_task_code() + "", data);
return BaseResponse.responseError("当前点位存在库存,不允许放货【" + pointDao.getPoint_code() + "", data);
}
data.put("is_confirm", IOSConstant.ONE);

View File

@@ -91,4 +91,13 @@ public class BaseResponse implements Serializable {
return response;
}
public static BaseResponse responseError(String message,JSONObject data) {
BaseResponse response = new BaseResponse();
response.setStatus(HttpStatus.HTTP_BAD_REQUEST);
response.setMessage(message);
response.setResponseDate(DateUtil.now());
response.setData(data);
return response;
}
}