rev:称重位是否有货校验
This commit is contained in:
@@ -200,8 +200,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
public BaseResponse isPutVehicle(JSONObject whereJson) {
|
public BaseResponse isPutVehicle(JSONObject whereJson) {
|
||||||
log.info("ACS向WMS请求是否可以取放货,请求参数:--------------------------------------" + whereJson.toString());
|
log.info("ACS向WMS请求是否可以取放货,请求参数:--------------------------------------" + whereJson.toString());
|
||||||
|
|
||||||
// 查询当前任务
|
|
||||||
SchBaseTask taskDao = iSchBaseTaskService.getByCode(whereJson.getString("task_code"));
|
|
||||||
// 查询当前点位
|
// 查询当前点位
|
||||||
SchBasePoint pointDao = iSchBasePointService.getById(whereJson.getString("point_code"));
|
SchBasePoint pointDao = iSchBasePointService.getById(whereJson.getString("point_code"));
|
||||||
if (ObjectUtil.isEmpty(pointDao)) {
|
if (ObjectUtil.isEmpty(pointDao)) {
|
||||||
@@ -212,12 +210,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
// 判断当前点位是否有货
|
// 判断当前点位是否有货
|
||||||
if (ObjectUtil.isNotEmpty(pointDao.getVehicle_code())) {
|
if (ObjectUtil.isNotEmpty(pointDao.getVehicle_code())) {
|
||||||
data.put("is_confirm", IOSConstant.ZERO);
|
data.put("is_confirm", IOSConstant.ZERO);
|
||||||
return BaseResponse.responseOk("当前点位存在库存,不允许放货【" + pointDao.getPoint_code() + "】", data);
|
return BaseResponse.responseError("当前点位存在库存,不允许放货【" + 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data.put("is_confirm", IOSConstant.ONE);
|
data.put("is_confirm", IOSConstant.ONE);
|
||||||
|
|||||||
@@ -91,4 +91,13 @@ public class BaseResponse implements Serializable {
|
|||||||
return response;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user